diff --git a/.ci/build-phar.sh b/.ci/build-phar.sh index 486115b342..013685930e 100755 --- a/.ci/build-phar.sh +++ b/.ci/build-phar.sh @@ -18,6 +18,7 @@ if [ "$(command -v box 2>/dev/null || true)" = "" ]; then exit 1 fi +box validate box compile if [ ! -f "./zephir.phar" ] || [ ! -x "./zephir.phar" ]; then diff --git a/.ci/travis.ini b/.ci/travis.ini index f54136f4a8..d5e1aee633 100644 --- a/.ci/travis.ini +++ b/.ci/travis.ini @@ -13,3 +13,6 @@ enable_dl=1 ; See: https://github.com/phalcon/zephir/issues/1713 allow_url_fopen=1 + +; See: https://github.com/zendframework/zend-code/issues/160 +error_reporting=-1 diff --git a/.travis.yml b/.travis.yml index f5d289f2d8..9c3061a62e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,15 +23,13 @@ env: global: - BUILD_PHAR=1 - BUILD_TYPE=regular - - BOX_VERSION=3.3.1 + - BOX_VERSION=3.8.1 - REPORT_COVERAGE=1 - ZEPHIR_PARSER_VERSION="v1.3.2" - PATH="${HOME}/bin:${PATH}" - TRAVIS_COMMIT_LOG="$(git log --format=fuller -5)" - MAKEFLAGS="-j $(getconf _NPROCESSORS_ONLN)" - SYMFONY_PHPUNIT_DIR="$HOME/.phpunit" - # TODO: See Library/StatementsBlock.php - # - ZEPHIR_DEBUG=true matrix: fast_finish: true diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d2462f27b..c16444acb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,23 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +## [0.12.10] - 2019-10-19 +### Fixed +- Fixed incorrect behaviour in `zephir_get_global` if `zval` reference count <= 1 + [#1961](https://github.com/phalcon/zephir/issues/1961) + +### Removed +- Removed `--vernum` option from the help for regular commands +- Removed `void` from the return type hint in the generated stubs + [#1977](https://github.com/phalcon/zephir/issues/1977) +- Remove no longer supported TSRMLS_CC usage + [#1865](https://github.com/phalcon/zephir/issues/1865) + +### Changed +- Disabled PHP warnings for PHP >= 7.3.0 to be able correct work with lowest versions of dependencies + [zendframework/zend-code#160](https://github.com/zendframework/zend-code/issues/160) +- Introduced support of multiline `@param` body for generated stubs + [#1968](https://github.com/phalcon/zephir/issues/1968) ## [0.12.9] - 2019-10-14 ### Added @@ -26,7 +43,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Changed - Print warning during the code generation if the `timecop` extension was detected [#1950](https://github.com/phalcon/zephir/issues/1950) -- Improved error handling to not print stack trace on PHP error `ZEPHIR_DEBUG` is not set +- Improved error handling to not print PHP stack traces if `ZEPHIR_DEBUG` is not set ### Removed - Removed no longer used `zephir_dtor` macro @@ -288,7 +305,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Fixed casting resource to int (only ZendEngine 3) [#1524](https://github.com/phalcon/zephir/issues/1524) -[Unreleased]: https://github.com/phalcon/zephir/compare/0.12.9...HEAD +[Unreleased]: https://github.com/phalcon/zephir/compare/0.12.10...HEAD +[0.12.10]: https://github.com/phalcon/zephir/compare/0.12.0...0.12.10 [0.12.9]: https://github.com/phalcon/zephir/compare/0.12.8...0.12.9 [0.12.8]: https://github.com/phalcon/zephir/compare/0.12.7...0.12.8 [0.12.7]: https://github.com/phalcon/zephir/compare/0.12.6...0.12.7 diff --git a/Library/Backends/ZendEngine2/Backend.php b/Library/Backends/ZendEngine2/Backend.php index bcf07c5e5b..3821d8cca6 100644 --- a/Library/Backends/ZendEngine2/Backend.php +++ b/Library/Backends/ZendEngine2/Backend.php @@ -11,10 +11,8 @@ namespace Zephir\Backends\ZendEngine2; -use function Zephir\add_slashes; use Zephir\BaseBackend; use Zephir\ClassMethod; -use Zephir\CodePrinter; use Zephir\CompilationContext; use Zephir\CompiledExpression; use Zephir\Compiler; @@ -141,137 +139,21 @@ public function generateInitCode(&$groupVariables, $type, $pointer, Variable $va ); } - public function initializeVariableDefaults($variables, CompilationContext $compilationContext) + /** + * {@inheritdoc} + */ + public function initializeVariableDefaults($variables, CompilationContext $compilationContext): string { - $codePrinter = new CodePrinter(); - $codePrinter->increaseLevel(); - $oldCodePrinter = $compilationContext->codePrinter; - $compilationContext->codePrinter = $codePrinter; - - /* Initialize default values in dynamic variables */ - foreach ($variables as $variable) { - /* - * Initialize 'dynamic' variables with default values - */ - if ('variable' == $variable->getType()) { - if ($variable->getNumberUses() > 0) { - if ('this_ptr' != $variable->getName() && 'return_value' != $variable->getName() && 'return_value_ptr' != $variable->getName()) { - $defaultValue = $variable->getDefaultInitValue(); - if (\is_array($defaultValue)) { - $compilationContext->symbolTable->mustGrownStack(true); - $compilationContext->backend->initVar($variable, $compilationContext); - switch ($defaultValue['type']) { - case 'int': - case 'uint': - case 'long': - $compilationContext->backend->assignLong($variable, $defaultValue['value'], $compilationContext); - break; - - case 'bool': - $compilationContext->backend->assignBool($variable, $defaultValue['value'], $compilationContext); - break; - - case 'char': - case 'uchar': - if (\strlen($defaultValue['value']) > 2) { - if (\strlen($defaultValue['value']) > 10) { - throw new CompilerException("Invalid char literal: '".substr($defaultValue['value'], 0, 10)."...'", $defaultValue); - } else { - throw new CompilerException("Invalid char literal: '".$defaultValue['value']."'", $defaultValue); - } - } - $compilationContext->backend->assignLong($variable, '\''.$defaultValue['value'].'\'', $compilationContext); - break; - - case 'null': - $compilationContext->backend->assignNull($variable, $compilationContext); - break; - - case 'double': - $compilationContext->backend->assignDouble($variable, $defaultValue['value'], $compilationContext); - break; - - case 'string': - $compilationContext->backend->assignString( - $variable, - add_slashes($defaultValue['value']), - $compilationContext - ); - break; - - case 'array': - case 'empty-array': - $compilationContext->backend->initArray($variable, $compilationContext, null); - break; - - default: - throw new CompilerException('Invalid default type: '.$defaultValue['type'].' for data type: '.$variable->getType(), $variable->getOriginal()); - } - } - } - } - continue; - } - - /* - * Initialize 'string' variables with default values - */ - if ('string' == $variable->getType()) { - if ($variable->getNumberUses() > 0) { - $defaultValue = $variable->getDefaultInitValue(); - if (\is_array($defaultValue)) { - $compilationContext->symbolTable->mustGrownStack(true); - $compilationContext->backend->initVar($variable, $compilationContext); - switch ($defaultValue['type']) { - case 'string': - $compilationContext->backend->assignString( - $variable, - add_slashes($defaultValue['value']), - $compilationContext - ); - break; - - case 'null': - $compilationContext->backend->assignString($variable, null, $compilationContext); - break; - - default: - throw new CompilerException('Invalid default type: '.$defaultValue['type'].' for data type: '.$variable->getType(), $variable->getOriginal()); - } - } - } - continue; - } - - /* - * Initialize 'array' variables with default values - */ - if ('array' == $variable->getType()) { - if ($variable->getNumberUses() > 0) { - $defaultValue = $variable->getDefaultInitValue(); - if (\is_array($defaultValue)) { - $compilationContext->symbolTable->mustGrownStack(true); - $compilationContext->backend->initVar($variable, $compilationContext); - switch ($defaultValue['type']) { - case 'null': - $compilationContext->backend->assignNull($variable, $compilationContext); - break; - - case 'array': - case 'empty-array': - $compilationContext->backend->initArray($variable, $compilationContext, null); - break; - - default: - throw new CompilerException('Invalid default type: '.$defaultValue['type'].' for data type: '.$variable->getType(), $variable->getOriginal()); - } - } - } - } - } - $compilationContext->codePrinter = $oldCodePrinter; + throw new CompilerException( + 'ZendEngine2 backend is no longer supported' + ); + } - return $codePrinter->getOutput(); + public function declareConstant($type, $name, $value, CompilationContext $context) + { + throw new CompilerException( + 'ZendEngine2 backend is no longer supported' + ); } public function declareVariables($method, $typeToVariables, CompilationContext $compilationContext) @@ -319,79 +201,13 @@ public function initVar(Variable $variable, CompilationContext $context, $useCod } /** - * Returns the signature of an internal method. + * {@inheritdoc} */ - public function getInternalSignature(ClassMethod $method, CompilationContext $context) - { - if ($method->isInitializer() && !$method->isStatic()) { - return 'zend_object_value '.$method->getName().'(zend_class_entry *class_type TSRMLS_DC)'; - } - - if ($method->isInitializer() && $method->isStatic()) { - return 'void '.$method->getName().'(TSRMLS_D)'; - } - - $signatureParameters = []; - $parameters = $method->getParameters(); - if (\is_object($parameters)) { - foreach ($parameters->getParameters() as $parameter) { - switch ($parameter['data-type']) { - case 'int': - case 'uint': - case 'long': - case 'double': - case 'bool': - case 'char': - case 'uchar': - case 'string': - case 'array': - $signatureParameters[] = 'zval *'.$parameter['name'].'_param_ext'; - break; - - default: - $signatureParameters[] = 'zval *'.$parameter['name'].'_ext'; - break; - } - } - } - - if (\count($signatureParameters)) { - return 'void '.$method->getInternalName().'(int ht, zval *return_value, zval **return_value_ptr, zval *this_ptr, int return_value_used, '.implode(', ', $signatureParameters).' TSRMLS_DC)'; - } - - return 'void '.$method->getInternalName().'(int ht, zval *return_value, zval **return_value_ptr, zval *this_ptr, int return_value_used TSRMLS_DC)'; - } - - public function declareConstant($type, $name, $value, CompilationContext $context) + public function getInternalSignature(ClassMethod $method, CompilationContext $context): string { - $ce = $context->classDefinition->getClassEntry($context); - $dType = null; - switch ($type) { - case 'bool': - $value = 'false' == $value ? '0' : 1; - break; - case 'long': - case 'int': - $dType = 'long'; - break; - case 'double': - break; - case 'string': - case 'char': - if ('string' == $type || 'char' == $type) { - $value = '"'.add_slashes($value).'"'; - } - $dType = 'string'; - break; - } - if (!isset($dType)) { - $dType = $type; - } - if ('null' == $dType) { - $context->codePrinter->output('zend_declare_class_constant_null('.$ce.', SL("'.$name.'") TSRMLS_CC);'); - } else { - $context->codePrinter->output('zend_declare_class_constant_'.$dType.'('.$ce.', SL("'.$name.'"), '.$value.' TSRMLS_CC);'); - } + throw new CompilerException( + 'ZendEngine2 backend is no longer supported' + ); } public function assignString(Variable $variable, $value, CompilationContext $context, $useCodePrinter = true, $doCopy = true) @@ -448,7 +264,7 @@ public function concatSelf(Variable $variable, Variable $itemVariable, Compilati { $variable = $this->getVariableCodePointer($variable); $itemVariable = $this->getVariableCode($itemVariable); - $context->codePrinter->output('zephir_concat_self('.$variable.', '.$itemVariable.' TSRMLS_CC);'); + $context->codePrinter->output('zephir_concat_self('.$variable.', '.$itemVariable.');'); } public function initArray(Variable $variable, CompilationContext $context, $size = null, $useCodePrinter = true) @@ -456,7 +272,7 @@ public function initArray(Variable $variable, CompilationContext $context, $size if (!isset($size)) { $output = 'array_init('.$this->getVariableCode($variable).');'; } else { - $output = 'zephir_create_array('.$this->getVariableCode($variable).', '.$size.', 0 TSRMLS_CC);'; + $output = 'zephir_create_array('.$this->getVariableCode($variable).', '.$size.', 0);'; } if ($useCodePrinter) { $context->codePrinter->output($output); @@ -467,8 +283,9 @@ public function initArray(Variable $variable, CompilationContext $context, $size public function createClosure(Variable $variable, $classDefinition, CompilationContext $context) { - $symbol = $this->getVariableCode($variable); - $context->codePrinter->output('zephir_create_closure_ex('.$symbol.', NULL, '.$classDefinition->getClassEntry().', SS("__invoke") TSRMLS_CC);'); + throw new CompilerException( + 'ZendEngine2 backend is no longer supported' + ); } public function addArrayEntry(Variable $variable, $key, $value, CompilationContext $context, $statement = null, $useCodePrinter = true) @@ -638,7 +455,7 @@ public function arrayFetch(Variable $var, Variable $src, $index, $flags, $arrayA ); } if ($isVariable && \in_array($index->getType(), ['variable', 'string'])) { - $output = 'zephir_array_fetch('.$this->getVariableCodePointer($var).', '.$this->getVariableCode($src).', '.$this->getVariableCode($index).', '.$flags.', "'.Compiler::getShortUserPath($arrayAccess['file']).'", '.$arrayAccess['line'].' TSRMLS_CC);'; + $output = 'zephir_array_fetch('.$this->getVariableCodePointer($var).', '.$this->getVariableCode($src).', '.$this->getVariableCode($index).', '.$flags.', "'.Compiler::getShortUserPath($arrayAccess['file']).'", '.$arrayAccess['line'].');'; } else { if ($isVariable) { $indexAccess = $this->getVariableCode($index); @@ -648,7 +465,7 @@ public function arrayFetch(Variable $var, Variable $src, $index, $flags, $arrayA $indexAccess = 'SL("'.$indexAccess.'")'; } } - $output = 'zephir_array_fetch_'.$type.'('.$this->getVariableCodePointer($var).', '.$this->getVariableCode($src).', '.$indexAccess.', '.$flags.', "'.Compiler::getShortUserPath($arrayAccess['file']).'", '.$arrayAccess['line'].' TSRMLS_CC);'; + $output = 'zephir_array_fetch_'.$type.'('.$this->getVariableCodePointer($var).', '.$this->getVariableCode($src).', '.$indexAccess.', '.$flags.', "'.Compiler::getShortUserPath($arrayAccess['file']).'", '.$arrayAccess['line'].');'; } if ($useCodePrinter) { @@ -683,25 +500,27 @@ public function arrayIssetFetch(Variable $target, Variable $var, $resolvedExpr, if (!($resolvedExpr instanceof Variable)) { if ('string' == $resolvedExpr->getType()) { - return new CompiledExpression('bool', 'zephir_array_isset_string_fetch('.$code.', SS("'.$resolvedExpr->getCode().'"), '.$flags.' TSRMLS_CC)', $expression); + return new CompiledExpression('bool', 'zephir_array_isset_string_fetch('.$code.', SS("'.$resolvedExpr->getCode().'"), '.$flags.')', $expression); } elseif (\in_array($resolvedExpr->getType(), ['int', 'uint', 'long'])) { - return new CompiledExpression('bool', 'zephir_array_isset_long_fetch('.$code.', '.$resolvedExpr->getCode().', '.$flags.' TSRMLS_CC)', $expression); + return new CompiledExpression('bool', 'zephir_array_isset_long_fetch('.$code.', '.$resolvedExpr->getCode().', '.$flags.')', $expression); } else { $resolvedExpr = $context->symbolTable->getVariableForRead($resolvedExpr->getCode(), $context); } } if ('int' == $resolvedExpr->getType() || 'long' == $resolvedExpr->getType()) { - return new CompiledExpression('bool', 'zephir_array_isset_long_fetch('.$code.', '.$this->getVariableCode($resolvedExpr).', '.$flags.' TSRMLS_CC)', $expression); + return new CompiledExpression('bool', 'zephir_array_isset_long_fetch('.$code.', '.$this->getVariableCode($resolvedExpr).', '.$flags.')', $expression); } elseif ('variable' == $resolvedExpr->getType() || 'string' == $resolvedExpr->getType()) { - return new CompiledExpression('bool', 'zephir_array_isset_fetch('.$code.', '.$this->getVariableCode($resolvedExpr).', '.$flags.' TSRMLS_CC)', $expression); + return new CompiledExpression('bool', 'zephir_array_isset_fetch('.$code.', '.$this->getVariableCode($resolvedExpr).', '.$flags.')', $expression); } throw new CompilerException('arrayIssetFetch ['.$resolvedExpr->getType().']', $expression); } public function propertyIsset(Variable $var, $key, CompilationContext $context) { - return new CompiledExpression('bool', 'zephir_isset_property('.$this->getVariableCode($var).', SS("'.$key.'") TSRMLS_CC)', null); + throw new CompilerException( + 'ZendEngine2 backend is no longer supported' + ); } public function arrayUnset(Variable $variable, $exprIndex, $flags, CompilationContext $context) @@ -750,7 +569,16 @@ public function assignArrayMulti(Variable $variable, $symbolVariable, $offsetExp $symbol = $this->resolveValue($symbolVariable, $compilationContext, true); $varCode = $this->getVariableCodePointer($variable); - $compilationContext->codePrinter->output('zephir_array_update_multi('.$varCode.', '.$symbol.' TSRMLS_CC, SL("'.$keys.'"), '.$numberParams.', '.implode(', ', $offsetItems).');'); + $compilationContext->codePrinter->output( + sprintf( + 'zephir_array_update_multi(%s, %s, SL("%s"), %d, %s);', + $varCode, + $symbol, + $keys, + $numberParams, + implode(', ', $offsetItems) + ) + ); } public function assignPropertyArrayMulti(Variable $variable, $valueVariable, $propertyName, $offsetExprs, CompilationContext $compilationContext) @@ -758,7 +586,17 @@ public function assignPropertyArrayMulti(Variable $variable, $valueVariable, $pr list($keys, $offsetItems, $numberParams) = $this->resolveOffsetExprs($offsetExprs, $compilationContext); $valueVariable = $this->resolveValue($valueVariable, $compilationContext, true); - $compilationContext->codePrinter->output('zephir_update_property_array_multi('.$variable->getName().', SL("'.$propertyName.'"), '.$valueVariable.' TSRMLS_CC, SL("'.$keys.'"), '.$numberParams.', '.implode(', ', $offsetItems).');'); + $compilationContext->codePrinter->output( + sprintf( + 'zephir_update_property_array_multi(%s, SL("%s"), %s, SL("%s"), %d, %s);', + $variable->getName(), + $propertyName, + $valueVariable, + $keys, + $numberParams, + implode(', ', $offsetItems) + ) + ); } public function assignStaticPropertyArrayMulti($classEntry, $valueVariable, $propertyName, $offsetExprs, CompilationContext $compilationContext) @@ -767,30 +605,31 @@ public function assignStaticPropertyArrayMulti($classEntry, $valueVariable, $pro $valueVariable = $this->resolveValue($valueVariable, $compilationContext, true); $offsetStr = $offsetItems ? ', '.implode(', ', $offsetItems) : ''; - $compilationContext->codePrinter->output('zephir_update_static_property_array_multi_ce('.$classEntry.', SL("'.$propertyName.'"), '.$valueVariable.' TSRMLS_CC, SL("'.$keys.'"), '.$numberParams.$offsetStr.');'); + $compilationContext->codePrinter->output( + sprintf( + 'zephir_update_static_property_array_multi_ce(%s, SL("%s"), %s, SL("%s"), %d%s);', + $classEntry, + $propertyName, + $valueVariable, + $keys, + $numberParams, + $offsetStr + ) + ); } public function fetchGlobal(Variable $globalVar, CompilationContext $compilationContext, $useCodePrinter = true) { - $name = $globalVar->getName(); - $output = 'zephir_get_global(&'.$name.', SS("'.$name.'") TSRMLS_CC);'; - $compilationContext->symbolTable->mustGrownStack(true); - if ($useCodePrinter) { - $compilationContext->codePrinter->output($output); - } - - return $output; + throw new CompilerException( + 'ZendEngine2 backend is no longer supported' + ); } public function fetchClass(Variable $zendClassEntry, $className, $guarded, CompilationContext $context) { - if ($guarded) { - $context->codePrinter->output('if (!'.$zendClassEntry->getName().') {'); - } - $context->codePrinter->output("\t".$zendClassEntry->getName().' = zend_fetch_class('.$className.', ZEND_FETCH_CLASS_AUTO TSRMLS_CC);'); - if ($guarded) { - $context->codePrinter->output('}'); - } + throw new CompilerException( + 'ZendEngine2 backend is no longer supported' + ); } public function fetchProperty(Variable $symbolVariable, Variable $variableVariable, $property, $readOnly, CompilationContext $context, $useOptimized = false) @@ -812,11 +651,9 @@ public function fetchProperty(Variable $symbolVariable, Variable $variableVariab public function fetchStaticProperty(Variable $symbolVariable, $classDefinition, $property, $readOnly, CompilationContext $context) { - if ($readOnly) { - $context->codePrinter->output($symbolVariable->getName().' = zephir_fetch_static_property_ce('.$classDefinition->getClassEntry().', SL("'.$property.'") TSRMLS_CC);'); - } else { - $context->codePrinter->output('zephir_read_static_property_ce(&'.$symbolVariable->getName().', '.$classDefinition->getClassEntry().', SL("'.$property.'") TSRMLS_CC);'); - } + throw new CompilerException( + 'ZendEngine2 backend is no longer supported' + ); } public function resolveValue($value, CompilationContext $context, $usePointer = false) @@ -848,44 +685,28 @@ public function resolveValue($value, CompilationContext $context, $usePointer = public function updateProperty(Variable $symbolVariable, $propertyName, $value, CompilationContext $context) { - $value = $this->resolveValue($value, $context); - if ('this_ptr' == $symbolVariable->getName()) { - if ($propertyName instanceof Variable) { - $context->codePrinter->output('zephir_update_property_zval_zval(getThis(), '.$this->getVariableCode($propertyName).', '.$value.' TSRMLS_CC);'); - } else { - $context->codePrinter->output('zephir_update_property_this(getThis(), SL("'.$propertyName.'"), '.$value.' TSRMLS_CC);'); - } - } else { - if ($propertyName instanceof Variable) { - $context->codePrinter->output('zephir_update_property_zval_zval('.$this->getVariableCode($symbolVariable).', '.$this->getVariableCode($propertyName).', '.$value.' TSRMLS_CC);'); - } else { - $context->codePrinter->output('zephir_update_property_zval('.$symbolVariable->getName().', SL("'.$propertyName.'"), '.$value.' TSRMLS_CC);'); - } - } + throw new CompilerException( + 'ZendEngine2 backend is no longer supported' + ); } public function updateStaticProperty($classEntry, $property, $value, CompilationContext $context) { - $value = $this->resolveValue($value, $context); - $context->codePrinter->output('zephir_update_static_property_ce('.$classEntry.', SL("'.$property.'"), &'.$value.' TSRMLS_CC);'); + throw new CompilerException( + 'ZendEngine2 backend is no longer supported' + ); } public function assignArrayProperty(Variable $variable, $property, $key, $value, CompilationContext $context) { - $resolveValue = $this->resolveValue($value, $context); - if (isset($key)) { - $context->codePrinter->output('zephir_update_property_array('.$this->getVariableCode($variable).', SL("'.$property.'"), '.$this->getVariableCode($key).', '.$resolveValue.' TSRMLS_CC);'); - } else { - $context->codePrinter->output('zephir_update_property_array_append('.$this->getVariableCode($variable).', SL("'.$property.'"), '.$resolveValue.' TSRMLS_CC);'); - } - if (\is_object($value) && $value instanceof Variable && $value->isTemporal()) { - $value->initVariant($context); - } + throw new CompilerException( + 'ZendEngine2 backend is no longer supported' + ); } public function checkConstructor(Variable $var, CompilationContext $context) { - $context->codePrinter->output('if (zephir_has_constructor('.$this->getVariableCode($var).' TSRMLS_CC)) {'); + $context->codePrinter->output('if (zephir_has_constructor('.$this->getVariableCode($var).')) {'); } public function callMethod($symbolVariable, Variable $variable, $methodName, $cachePointer, $params, CompilationContext $context) @@ -925,11 +746,7 @@ public function zvalOperator($zvalOperator, Variable $expected, Variable $variab $op1 = $this->getVariableCode($variableLeft); $op2 = $this->getVariableCode($variableRight); - $params = ' TSRMLS_CC'; - if ('zephir_add_function' == $zvalOperator || 'zephir_sub_function' == $zvalOperator) { - $params = ''; - } - $compilationContext->codePrinter->output($zvalOperator.'('.$expected.', '.$op1.', '.$op2.$params.');'); + $compilationContext->codePrinter->output($zvalOperator.'('.$expected.', '.$op1.', '.$op2.');'); } public function maybeSeparate(Variable $variableTempSeparated, Variable $variable, CompilationContext $context) @@ -1075,14 +892,16 @@ public function forStatement(Variable $exprVariable, $keyVariable, $variable, $d public function forStatementIterator(Variable $iteratorVariable, Variable $targetVariable, CompilationContext $compilationContext) { - $compilationContext->codePrinter->output('zval **ZEPHIR_TMP_ITERATOR_PTR;'); - $compilationContext->codePrinter->output($iteratorVariable->getName().'->funcs->get_current_data('.$iteratorVariable->getName().', &ZEPHIR_TMP_ITERATOR_PTR TSRMLS_CC);'); - $this->copyOnWrite($targetVariable, '(*ZEPHIR_TMP_ITERATOR_PTR)', $compilationContext); + throw new CompilerException( + 'ZendEngine2 backend is no longer supported' + ); } public function destroyIterator(Variable $iteratorVariable, CompilationContext $context) { - $context->codePrinter->output($iteratorVariable->getName().'->funcs->dtor('.$iteratorVariable->getName().' TSRMLS_CC);'); + throw new CompilerException( + 'ZendEngine2 backend is no longer supported' + ); } public function ifVariableValueUndefined(Variable $var, CompilationContext $context, $onlyBody = false, $useCodePrinter = true) @@ -1139,7 +958,7 @@ public function checkStrictType($type, $var, CompilationContext $context) $conditions[] = $cond.'IS_'.strtoupper($type); break; case 'callable': - $conditions[] = 'zephir_is_callable('.$inputParamCode.' TSRMLS_CC) != 1'; + $conditions[] = 'zephir_is_callable('.$inputParamCode.') != 1'; break; default: throw new CompilerException('Unknown type '.$type); @@ -1153,7 +972,7 @@ public function checkStrictType($type, $var, CompilationContext $context) $exceptionMessage = sprintf('SL("Parameter \'%s\' must be of the type %s")', $var['name'], $type); $codePrinter->output( sprintf( - 'zephir_throw_exception_string(spl_ce_InvalidArgumentException, %s TSRMLS_CC);', + 'zephir_throw_exception_string(spl_ce_InvalidArgumentException, %s);', $exceptionMessage ) ); @@ -1209,7 +1028,7 @@ public function checkStrictType($type, $var, CompilationContext $context) public function fetchClassEntry($str) { - return 'zephir_get_internal_ce(SS("'.$str.'") TSRMLS_CC)'; + return 'zephir_get_internal_ce(SS("'.$str.'"))'; } public function getScalarTempVariable($type, CompilationContext $compilationContext, $isLocal = false) diff --git a/Library/Backends/ZendEngine2/FcallManager.php b/Library/Backends/ZendEngine2/FcallManager.php deleted file mode 100644 index 4772987086..0000000000 --- a/Library/Backends/ZendEngine2/FcallManager.php +++ /dev/null @@ -1,166 +0,0 @@ - - * - * For the full copyright and license information, please view - * the LICENSE file that was distributed with this source code. - */ - -namespace Zephir\Backends\ZendEngine2; - -use Zephir\CodePrinter; -use Zephir\Fcall\FcallManagerInterface; -use function Zephir\file_put_contents_ex; - -/** - * Zephir\Backends\ZendEngine2\FcallManager. - */ -class FcallManager implements FcallManagerInterface -{ - protected $requiredMacros = []; - - public function macroIsRequired($macro) - { - return isset($this->requiredMacros[$macro]); - } - - /** - * {@inheritdoc} - * - * @param bool $static - * @param int $doReturn tri-state: 0 -> no return value, 1 -> do return, 2 -> do return to given variable - * @param int $paramCount - * - * @return string - */ - public function getMacro($static, $doReturn, $paramCount) - { - /* - $scopes = array('', 'STATIC'); - $modes = array('CALL_INTERNAL_METHOD_P', 'RETURN_CALL_INTERNAL_METHOD_P', 'CALL_INTERNAL_METHOD_NORETURN_P'); - */ - $scope = $static ? 'STATIC' : ''; - $mode = 'CALL_INTERNAL_METHOD_NORETURN_P'; - if ($doReturn) { - $mode = 'RETURN_CALL_INTERNAL_METHOD_P'; - if (2 === $doReturn) { - $mode = 'CALL_INTERNAL_METHOD_P'; - } - } - $macroName = 'ZEPHIR_'.($scope ? $scope.'_' : '').$mode.$paramCount; - if (!$this->macroIsRequired($macroName)) { - $this->requiredMacros[$macroName] = [$scope, $mode, $paramCount]; - } - - return $macroName; - } - - public function genFcallCode() - { - $codePrinter = new CodePrinter(); - $codePrinter->output('#ifndef ZEPHIR_KERNEL_FCALL_INTERNAL_H'); - $codePrinter->output('#define ZEPHIR_KERNEL_FCALL_INTERNAL_H'); - $codePrinter->increaseLevel(); - - ksort($this->requiredMacros); - foreach ($this->requiredMacros as $name => $info) { - list($scope, $mode, $paramCount) = $info; - $paramsStr = ''; - $retParam = ''; - $retValueUsed = '0'; - $params = []; - $zvals = []; - $initStatements = []; - $postStatements = []; - - for ($i = 0; $i < $paramCount; ++$i) { - $params[] = 'p'.$i; - } - if ($paramCount) { - $paramsStr = ', '.implode(', ', $params); - } - - if ('CALL_INTERNAL_METHOD_P' == $mode) { - $retValueUsed = '1'; - $retParam = 'return_value_ptr'; - $initStatements[] = 'ZEPHIR_INIT_NVAR(*(return_value_ptr)); \\'; - } - $objParam = $scope ? 'scope_ce, ' : 'object, '; - $macroName = $name.'('.($retParam ? $retParam.', ' : '').$objParam.'method'.$paramsStr.')'; - $codePrinter->output('#define '.$macroName.' \\'); - if (!$retParam) { - $retParam = 'return_value'; - } - $codePrinter->increaseLevel(); - $codePrinter->output('do { \\'); - $codePrinter->increaseLevel(); - - if ('CALL_INTERNAL_METHOD_NORETURN_P' == $mode) { - $codePrinter->output('zval *rv = NULL; \\'); - $codePrinter->output('zval **rvp = &rv; \\'); - $codePrinter->output('ALLOC_INIT_ZVAL(rv); \\'); - $retParam = 'rvp'; - } - - $codePrinter->output('ZEPHIR_BACKUP_SCOPE() \\'); - $codePrinter->output('ZEPHIR_BACKUP_THIS_PTR() \\'); - if (!$scope) { - $codePrinter->output('ZEPHIR_SET_THIS(object); \\'); - $codePrinter->output('ZEPHIR_SET_SCOPE((Z_TYPE_P(object) == IS_OBJECT ? Z_OBJCE_P(object) : NULL), (Z_TYPE_P(object) == IS_OBJECT ? Z_OBJCE_P(object) : NULL)); \\'); - } else { - $codePrinter->output('ZEPHIR_SET_THIS(NULL); \\'); - $codePrinter->output('ZEPHIR_SET_SCOPE(scope_ce, scope_ce); \\'); - } - - /* Create new zval's for parameters */ - for ($i = 0; $i < $paramCount; ++$i) { - //$zv = '_' . $params[$i]; - //$zvals[] = $zv; - //$initStatements[] = 'ALLOC_ZVAL(' . $zv . '); \\'; - //$initStatements[] = 'INIT_PZVAL_COPY(' . $zv . ', ' . $params[$i] . '); \\'; - //$postStatements[] = 'zval_ptr_dtor(&' . $zv . '); \\'; - $zv = $params[$i]; - $zvals[] = $zv; - $initStatements[] = 'Z_ADDREF_P('.$zv.'); \\'; - $postStatements[] = 'Z_DELREF_P('.$zv.'); \\'; - } - if ($i) { - //$codePrinter->output('zval *' . implode(', *', $zvals) . '; \\'); - } - foreach ($initStatements as $statement) { - $codePrinter->output($statement); - } - $zvalStr = $i ? ', '.implode(', ', $zvals) : ''; - $retExpr = ''; - if ($retParam) { - if ('return_value' == $retParam) { - $retExpr = ', return_value, return_value_ptr'; - } else { - $retExpr = ', *'.$retParam.', '.$retParam; - } - } - $codePrinter->output('method(0'.$retExpr.', '.($scope ? 'NULL, ' : $objParam).$retValueUsed.$zvalStr.' TSRMLS_CC); \\'); - if ('CALL_INTERNAL_METHOD_NORETURN_P' == $mode) { - $postStatements[] = 'zval_ptr_dtor(rvp); \\'; - } - foreach ($postStatements as $statement) { - $codePrinter->output($statement); - } - $codePrinter->output('ZEPHIR_LAST_CALL_STATUS = EG(exception) ? FAILURE : SUCCESS; \\'); - $codePrinter->output('ZEPHIR_RESTORE_THIS_PTR(); \\'); - - $codePrinter->output('ZEPHIR_RESTORE_SCOPE(); \\'); - $codePrinter->decreaseLevel(); - $codePrinter->output('} while (0)'); - $codePrinter->decreaseLevel(); - $codePrinter->output(''); - } - - $codePrinter->decreaseLevel(); - $codePrinter->output('#endif'); - file_put_contents_ex($codePrinter->getOutput(), 'ext/kernel/fcall_internal.h'); - } -} diff --git a/Library/Backends/ZendEngine2/StringsManager.php b/Library/Backends/ZendEngine2/StringsManager.php deleted file mode 100644 index 387ef6676e..0000000000 --- a/Library/Backends/ZendEngine2/StringsManager.php +++ /dev/null @@ -1,231 +0,0 @@ - - * - * For the full copyright and license information, please view - * the LICENSE file that was distributed with this source code. - */ - -namespace Zephir\Backends\ZendEngine2; - -use function Zephir\file_put_contents_ex; -use Zephir\StringsManager as BaseStringsManager; - -/** - * Class StringsManager. - * - * Manages the concatenation keys for the extension and the interned strings - */ -class StringsManager extends BaseStringsManager -{ - /** - * List of headers. - * - * @var array - */ - protected $concatKeys = [ - 'vv' => true, - 'vs' => true, - 'sv' => true, - ]; - - /** - * Adds a concatenation combination to the manager. - * - * @param string $key - */ - public function addConcatKey($key) - { - $this->concatKeys[$key] = true; - } - - /** - * Generates the concatenation code. - * - * @return array - */ - public function genConcatCode() - { - $code = ' -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include "php_ext.h" -#include -#include "ext.h" - -#include "kernel/main.h" -#include "kernel/memory.h" -#include "kernel/concat.h"'.PHP_EOL.PHP_EOL; - - $pcodeh = ' -#ifndef ZEPHIR_KERNEL_CONCAT_H -#define ZEPHIR_KERNEL_CONCAT_H - -#include -#include - -#include "kernel/main.h" - -'; - - $codeh = ''; - - $macros = []; - ksort($this->concatKeys, SORT_STRING); - foreach ($this->concatKeys as $key => $one) { - $len = \strlen($key); - $params = []; - $zvalCopy = []; - $useCopy = []; - $avars = []; - $zvars = []; - $svars = []; - $lengths = []; - $sparams = []; - $lparams = []; - for ($i = 0; $i < $len; ++$i) { - $n = $i + 1; - $t = substr($key, $i, 1); - $sparams[] = 'op'.$n; - if ('s' == $t) { - $params[] = 'const char *op'.$n.', zend_uint op'.$n.'_len'; - $lparams[] = 'op'.$n.', sizeof(op'.$n.')-1'; - $lengths[] = 'op'.$n.'_len'; - $svars[] = $n; - $avars[$n] = 's'; - } else { - $params[] = 'zval *op'.$n; - $lparams[] = 'op'.$n; - $zvalCopy[] = 'op'.$n.'_copy'; - $useCopy[] = 'use_copy'.$n.' = 0'; - $lengths[] = 'Z_STRLEN_P(op'.$n.')'; - $zvars[] = $n; - $avars[$n] = 'v'; - } - } - - $macros[] = '#define ZEPHIR_CONCAT_'.strtoupper($key).'(result, '.implode(', ', $sparams).') \\'.PHP_EOL."\t".' zephir_concat_'.$key.'(&result, '.implode(', ', $lparams).', 0 TSRMLS_CC);'; - $macros[] = '#define ZEPHIR_SCONCAT_'.strtoupper($key).'(result, '.implode(', ', $sparams).') \\'.PHP_EOL."\t".' zephir_concat_'.$key.'(&result, '.implode(', ', $lparams).', 1 TSRMLS_CC);'; - $macros[] = ''; - - $proto = 'void zephir_concat_'.$key.'(zval **result, '.implode(', ', $params).', int self_var TSRMLS_DC)'; - - $codeh .= ''.$proto.';'.PHP_EOL; - - $code .= $proto.'{'.PHP_EOL.PHP_EOL; - - if (\count($zvalCopy)) { - $code .= "\t".'zval result_copy, '.implode(', ', $zvalCopy).';'.PHP_EOL; - $code .= "\t".'int use_copy = 0, '.implode(', ', $useCopy).';'.PHP_EOL; - } else { - $code .= "\t".'zval result_copy;'.PHP_EOL; - $code .= "\t".'int use_copy = 0;'.PHP_EOL; - } - $code .= "\t".'uint offset = 0, length;'.PHP_EOL.PHP_EOL; - - foreach ($zvars as $zvar) { - $code .= "\t".'if (Z_TYPE_P(op'.$zvar.') != IS_STRING) {'.PHP_EOL; - $code .= "\t".' zend_make_printable_zval(op'.$zvar.', &op'.$zvar.'_copy, &use_copy'.$zvar.');'.PHP_EOL; - $code .= "\t".' if (use_copy'.$zvar.') {'.PHP_EOL; - $code .= "\t".' op'.$zvar.' = &op'.$zvar.'_copy;'.PHP_EOL; - $code .= "\t".' }'.PHP_EOL; - $code .= "\t".'}'.PHP_EOL.PHP_EOL; - } - - $code .= "\t".'length = '.implode(' + ', $lengths).';'.PHP_EOL; - $code .= "\t".'if (self_var) {'.PHP_EOL; - $code .= ''.PHP_EOL; - $code .= "\t\t".'if (Z_TYPE_PP(result) != IS_STRING) {'.PHP_EOL; - $code .= "\t\t\t".'zend_make_printable_zval(*result, &result_copy, &use_copy);'.PHP_EOL; - $code .= "\t\t\t".'if (use_copy) {'.PHP_EOL; - $code .= "\t\t\t\t".'ZEPHIR_CPY_WRT_CTOR(*result, (&result_copy));'.PHP_EOL; - $code .= "\t\t\t".'}'.PHP_EOL; - $code .= "\t\t".'}'.PHP_EOL.PHP_EOL; - $code .= "\t\t".'offset = Z_STRLEN_PP(result);'.PHP_EOL; - $code .= "\t\t".'length += offset;'.PHP_EOL; - $code .= "\t\t".'Z_STRVAL_PP(result) = (char *) str_erealloc(Z_STRVAL_PP(result), length + 1);'.PHP_EOL; - $code .= ''.PHP_EOL; - $code .= "\t".'} else {'.PHP_EOL; - $code .= "\t\t".'Z_STRVAL_PP(result) = (char *) emalloc(length + 1);'.PHP_EOL; - $code .= "\t".'}'.PHP_EOL.PHP_EOL; - - $position = ''; - foreach ($avars as $n => $type) { - if ('s' == $type) { - $code .= "\t".'memcpy(Z_STRVAL_PP(result) + offset'.$position.', op'.$n.', op'.$n.'_len);'.PHP_EOL; - $position .= ' + op'.$n.'_len'; - } else { - $code .= "\t".'memcpy(Z_STRVAL_PP(result) + offset'.$position.', Z_STRVAL_P(op'.$n.'), Z_STRLEN_P(op'.$n.'));'.PHP_EOL; - $position .= ' + Z_STRLEN_P(op'.$n.')'; - } - } - - $code .= "\t".'Z_STRVAL_PP(result)[length] = 0;'.PHP_EOL; - $code .= "\t".'Z_TYPE_PP(result) = IS_STRING;'.PHP_EOL; - $code .= "\t".'Z_STRLEN_PP(result) = length;'.PHP_EOL.PHP_EOL; - - foreach ($zvars as $zvar) { - $code .= "\t".'if (use_copy'.$zvar.') {'.PHP_EOL; - $code .= "\t".' zval_dtor(op'.$zvar.');'.PHP_EOL; - $code .= "\t".'}'.PHP_EOL.PHP_EOL; - } - - $code .= "\t".'if (use_copy) {'.PHP_EOL; - $code .= "\t".' zval_dtor(&result_copy);'.PHP_EOL; - $code .= "\t".'}'.PHP_EOL.PHP_EOL; - - $code .= '}'.PHP_EOL.PHP_EOL; - } - - $codeh .= '#define zephir_concat_function(d, l, r) _zephir_concat_function(d, l, r TSRMLS_CC) -void _zephir_concat_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); - -#endif /* ZEPHIR_KERNEL_CONCAT_H */ -'; - - $code .= "void _zephir_concat_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) -{ - zval *tmp; - - /* - res == op1 == op2: won't leak - res == op1 != op2: won't leak - res == op2 != op1: will leak - */ - if (result == op2 && result != op1) { - ALLOC_INIT_ZVAL(tmp); - ZVAL_ZVAL(tmp, result, 1, 0); - if (1 == Z_REFCOUNT_P(result)) { - zval_dtor(result); - } - - op2 = tmp; - } - - concat_function(result, op1, op2 TSRMLS_CC); - if (tmp) { - zval_ptr_dtor(&tmp); - } -} -"; - $contents = $pcodeh.implode(PHP_EOL, $macros).PHP_EOL.PHP_EOL.$codeh; - file_put_contents_ex($contents, 'ext/kernel/concat.h'); - file_put_contents_ex($code, 'ext/kernel/concat.c'); - } - - /** - * Obtains the existing concatenation keys. - * - * @return array - */ - public function getConcatKeys() - { - return $this->concatKeys; - } -} diff --git a/Library/Backends/ZendEngine3/Backend.php b/Library/Backends/ZendEngine3/Backend.php index 5ca6afe7f8..23a1d34769 100644 --- a/Library/Backends/ZendEngine3/Backend.php +++ b/Library/Backends/ZendEngine3/Backend.php @@ -15,6 +15,7 @@ use Zephir\Backends\ZendEngine2\Backend as BackendZendEngine2; use Zephir\ClassDefinition; use Zephir\ClassMethod; +use Zephir\CodePrinter; use Zephir\CompilationContext; use Zephir\CompiledExpression; use Zephir\Compiler; @@ -264,7 +265,7 @@ public function getTypeofCondition( break; case 'callable': - $condition = 'zephir_is_callable('.$variableName.' TSRMLS_CC) '.$operator.' 1'; + $condition = 'zephir_is_callable('.$variableName.') '.$operator.' 1'; break; default: @@ -396,6 +397,147 @@ public function generateInitCode(&$groupVariables, $type, $pointer, Variable $va $groupVariables[] = $pointer.$variable->getName(); } + /** + * {@inheritdoc} + * + * @param Variable[] $variables + * @param CompilationContext $compilationContext + * + * @return string + */ + public function initializeVariableDefaults($variables, CompilationContext $compilationContext): string + { + $codePrinter = new CodePrinter(); + $codePrinter->increaseLevel(); + $oldCodePrinter = $compilationContext->codePrinter; + $compilationContext->codePrinter = $codePrinter; + + /* Initialize default values in dynamic variables */ + foreach ($variables as $variable) { + /* + * Initialize 'dynamic' variables with default values + */ + if ('variable' == $variable->getType()) { + if ($variable->getNumberUses() > 0) { + if ('this_ptr' != $variable->getName() && 'return_value' != $variable->getName() && 'return_value_ptr' != $variable->getName()) { + $defaultValue = $variable->getDefaultInitValue(); + if (\is_array($defaultValue)) { + $compilationContext->symbolTable->mustGrownStack(true); + $compilationContext->backend->initVar($variable, $compilationContext); + switch ($defaultValue['type']) { + case 'int': + case 'uint': + case 'long': + $compilationContext->backend->assignLong($variable, $defaultValue['value'], $compilationContext); + break; + + case 'bool': + $compilationContext->backend->assignBool($variable, $defaultValue['value'], $compilationContext); + break; + + case 'char': + case 'uchar': + if (\strlen($defaultValue['value']) > 2) { + if (\strlen($defaultValue['value']) > 10) { + throw new CompilerException("Invalid char literal: '".substr($defaultValue['value'], 0, 10)."...'", $defaultValue); + } else { + throw new CompilerException("Invalid char literal: '".$defaultValue['value']."'", $defaultValue); + } + } + $compilationContext->backend->assignLong($variable, '\''.$defaultValue['value'].'\'', $compilationContext); + break; + + case 'null': + $compilationContext->backend->assignNull($variable, $compilationContext); + break; + + case 'double': + $compilationContext->backend->assignDouble($variable, $defaultValue['value'], $compilationContext); + break; + + case 'string': + $compilationContext->backend->assignString( + $variable, + add_slashes($defaultValue['value']), + $compilationContext + ); + break; + + case 'array': + case 'empty-array': + $compilationContext->backend->initArray($variable, $compilationContext, null); + break; + + default: + throw new CompilerException('Invalid default type: '.$defaultValue['type'].' for data type: '.$variable->getType(), $variable->getOriginal()); + } + } + } + } + continue; + } + + /* + * Initialize 'string' variables with default values + */ + if ('string' == $variable->getType()) { + if ($variable->getNumberUses() > 0) { + $defaultValue = $variable->getDefaultInitValue(); + if (\is_array($defaultValue)) { + $compilationContext->symbolTable->mustGrownStack(true); + $compilationContext->backend->initVar($variable, $compilationContext); + switch ($defaultValue['type']) { + case 'string': + $compilationContext->backend->assignString( + $variable, + add_slashes($defaultValue['value']), + $compilationContext + ); + break; + + case 'null': + $compilationContext->backend->assignString($variable, null, $compilationContext); + break; + + default: + throw new CompilerException('Invalid default type: '.$defaultValue['type'].' for data type: '.$variable->getType(), $variable->getOriginal()); + } + } + } + continue; + } + + /* + * Initialize 'array' variables with default values + */ + if ('array' == $variable->getType()) { + if ($variable->getNumberUses() > 0) { + $defaultValue = $variable->getDefaultInitValue(); + if (\is_array($defaultValue)) { + $compilationContext->symbolTable->mustGrownStack(true); + $compilationContext->backend->initVar($variable, $compilationContext); + switch ($defaultValue['type']) { + case 'null': + $compilationContext->backend->assignNull($variable, $compilationContext); + break; + + case 'array': + case 'empty-array': + $compilationContext->backend->initArray($variable, $compilationContext, null); + break; + + default: + throw new CompilerException('Invalid default type: '.$defaultValue['type'].' for data type: '.$variable->getType(), $variable->getOriginal()); + } + } + } + } + } + $compilationContext->codePrinter = $oldCodePrinter; + + return (string) $codePrinter->getOutput(); + } + public function declareConstant($type, $name, $value, CompilationContext $context) { $ce = $context->classDefinition->getClassEntry($context); @@ -435,9 +577,14 @@ public function declareConstant($type, $name, $value, CompilationContext $contex } /** - * Returns the signature of an internal method. + * {@inheritdoc} + * + * @param ClassMethod $method + * @param CompilationContext $context + * + * @return string */ - public function getInternalSignature(ClassMethod $method, CompilationContext $context) + public function getInternalSignature(ClassMethod $method, CompilationContext $context): string { if ($method->isInitializer() && !$method->isStatic()) { return 'zend_object *'.$method->getName().'(zend_class_entry *class_type TSRMLS_DC)'; @@ -511,7 +658,9 @@ public function returnString($value, CompilationContext $context, $useCodePrinte public function createClosure(Variable $variable, $classDefinition, CompilationContext $context) { $symbol = $this->getVariableCode($variable); - $context->codePrinter->output('zephir_create_closure_ex('.$symbol.', NULL, '.$classDefinition->getClassEntry().', SL("__invoke"));'); + $context->codePrinter->output( + 'zephir_create_closure_ex('.$symbol.', NULL, '.$classDefinition->getClassEntry().', SL("__invoke"));' + ); } public function addArrayEntry(Variable $variable, $key, $value, CompilationContext $context, $statement = null, $useCodePrinter = true) @@ -773,7 +922,7 @@ public function updateProperty(Variable $symbolVariable, $propertyName, $value, //TODO: maybe optimizations as well as above $value = $this->resolveValue($value, $context); if ($propertyName instanceof Variable) { - $context->codePrinter->output('zephir_update_property_zval_zval('.$this->getVariableCode($symbolVariable).', '.$this->getVariableCode($propertyName).', '.$value.' TSRMLS_CC);'); + $context->codePrinter->output('zephir_update_property_zval_zval('.$this->getVariableCode($symbolVariable).', '.$this->getVariableCode($propertyName).', '.$value.');'); } else { $context->codePrinter->output('zephir_update_property_zval('.$this->getVariableCode($symbolVariable).', SL("'.$propertyName.'"), '.$value.');'); } diff --git a/Library/Backends/ZendEngine3/FcallManager.php b/Library/Backends/ZendEngine3/FcallManager.php index 5977ee7064..250651fb93 100644 --- a/Library/Backends/ZendEngine3/FcallManager.php +++ b/Library/Backends/ZendEngine3/FcallManager.php @@ -11,7 +11,6 @@ namespace Zephir\Backends\ZendEngine3; -use Zephir\Backends\ZendEngine2\FcallManager as ZE2FcallManager; use Zephir\CodePrinter; use Zephir\Fcall\FcallManagerInterface; use function Zephir\file_put_contents_ex; @@ -19,14 +18,60 @@ /** * Zephir\Backends\ZendEngine3\FcallManager. */ -class FcallManager extends ZE2FcallManager implements FcallManagerInterface +class FcallManager implements FcallManagerInterface { + protected $requiredMacros = []; + + public function macroIsRequired($macro) + { + return isset($this->requiredMacros[$macro]); + } + + /** + * {@inheritdoc} + * + * @param bool $static + * @param int $doReturn tri-state: 0 -> no return value, 1 -> do return, 2 -> do return to given variable + * @param int $paramCount + * + * @return string + */ + public function getMacro($static, $doReturn, $paramCount) + { + $scope = $static ? 'STATIC' : ''; + $mode = 'CALL_INTERNAL_METHOD_NORETURN_P'; + + if ($doReturn) { + $mode = 'RETURN_CALL_INTERNAL_METHOD_P'; + if (2 === $doReturn) { + $mode = 'CALL_INTERNAL_METHOD_P'; + } + } + + $macroName = 'ZEPHIR_'.($scope ? $scope.'_' : '').$mode.$paramCount; + + if (!$this->macroIsRequired($macroName)) { + $this->requiredMacros[$macroName] = [$scope, $mode, $paramCount]; + } + + return $macroName; + } + public function genFcallCode() { $codePrinter = new CodePrinter(); - $codePrinter->output('#ifndef ZEPHIR_KERNEL_FCALL_INTERNAL_H'); - $codePrinter->output('#define ZEPHIR_KERNEL_FCALL_INTERNAL_H'); - $codePrinter->increaseLevel(); + + $header = <<output($header); ksort($this->requiredMacros); foreach ($this->requiredMacros as $name => $info) { @@ -84,7 +129,6 @@ public function genFcallCode() $zvals[] = $zv; $initStatements[] = 'ZVAL_COPY(&'.$zv.', '.$params[$i].'); \\'; $postStatements[] = 'Z_TRY_DELREF_P('.$params[$i].'); \\'; - //$postStatements[] = 'zval_ptr_dtor(' . $params[$i] . '); \\'; } if ($i) { $codePrinter->output('zval '.implode(', ', $zvals).'; \\'); @@ -110,7 +154,6 @@ public function genFcallCode() $codePrinter->output(''); } - $codePrinter->decreaseLevel(); $codePrinter->output('#endif'); file_put_contents_ex($codePrinter->getOutput(), 'ext/kernel/fcall_internal.h'); } diff --git a/Library/BaseBackend.php b/Library/BaseBackend.php index 577af8d25f..0a16cbff9b 100644 --- a/Library/BaseBackend.php +++ b/Library/BaseBackend.php @@ -124,9 +124,27 @@ abstract public function getTypeofCondition( CompilationContext $context ): string; + /** + * Initialize variable defaults. + * + * @param Variable[] $variables + * @param CompilationContext $compilationContext + * + * @return string + */ + abstract public function initializeVariableDefaults($variables, CompilationContext $compilationContext): string; + abstract public function generateInitCode(&$groupVariables, $type, $pointer, Variable $variable); - abstract public function getInternalSignature(ClassMethod $method, CompilationContext $context); + /** + * Returns the signature of an internal method. + * + * @param ClassMethod $method + * @param CompilationContext $context + * + * @return string + */ + abstract public function getInternalSignature(ClassMethod $method, CompilationContext $context): string; abstract public function checkStrictType($type, $var, CompilationContext $context); diff --git a/Library/ClassDefinition.php b/Library/ClassDefinition.php index a93b4a9e47..cf407f3a31 100644 --- a/Library/ClassDefinition.php +++ b/Library/ClassDefinition.php @@ -1196,7 +1196,11 @@ public function compile(CompilationContext $compilationContext) $this->checkInterfaceImplements($this, $classInterfaceDefinition); } - $codePrinter->output('zend_class_implements('.$this->getClassEntry().' TSRMLS_CC, 1, '.$classEntry.');'); + $codePrinter->output(sprintf( + 'zend_class_implements(%s, 1, %s);', + $this->getClassEntry(), + $classEntry + )); } } diff --git a/Library/ClassProperty.php b/Library/ClassProperty.php index 6a7fb32f75..4f7f12a82a 100644 --- a/Library/ClassProperty.php +++ b/Library/ClassProperty.php @@ -350,6 +350,7 @@ protected function getBooleanCode($value) * @param string $type * @param $value * + * @throws Exception * @throws CompilerException */ protected function declareProperty(CompilationContext $compilationContext, $type, $value) @@ -363,24 +364,48 @@ protected function declareProperty(CompilationContext $compilationContext, $type $classEntry = $compilationContext->classDefinition->getClassEntry(); switch ($type) { - case 'long': - case 'int': - $codePrinter->output('zend_declare_property_long('.$classEntry.', SL("'.$this->getName().'"), '.$value.', '.$this->getVisibilityAccessor().' TSRMLS_CC);'); + case Types::T_INT: + case Types::T_LONG: + $codePrinter->output( + sprintf( + 'zend_declare_property_long(%s, SL("%s"), %s, %s);', + $classEntry, + $this->getName(), + $value, + $this->getVisibilityAccessor() + ) + ); break; - case 'double': - $codePrinter->output('zend_declare_property_double('.$classEntry.', SL("'.$this->getName().'"), '.$value.', '.$this->getVisibilityAccessor().' TSRMLS_CC);'); + case Types::T_DOUBLE: + $codePrinter->output( + sprintf( + 'zend_declare_property_double(%s, SL("%s"), %s, %s);', + $classEntry, + $this->getName(), + $value, + $this->getVisibilityAccessor() + ) + ); break; - case 'bool': - $codePrinter->output('zend_declare_property_bool('.$classEntry.', SL("'.$this->getName().'"), '.$this->getBooleanCode($value).', '.$this->getVisibilityAccessor().' TSRMLS_CC);'); + case Types::T_BOOL: + $codePrinter->output( + sprintf( + 'zend_declare_property_bool(%s, SL("%s"), %s, %s);', + $classEntry, + $this->getName(), + $this->getBooleanCode($value), + $this->getVisibilityAccessor() + ) + ); break; case Types::T_CHAR: case Types::T_STRING: $codePrinter->output( sprintf( - 'zend_declare_property_string(%s, SL("%s"), "%s", %s TSRMLS_CC);', + 'zend_declare_property_string(%s, SL("%s"), "%s", %s);', $classEntry, $this->getName(), add_slashes($value), @@ -392,7 +417,14 @@ protected function declareProperty(CompilationContext $compilationContext, $type case 'array': case 'empty-array': case 'null': - $codePrinter->output('zend_declare_property_null('.$classEntry.', SL("'.$this->getName().'"), '.$this->getVisibilityAccessor().' TSRMLS_CC);'); + $codePrinter->output( + sprintf( + 'zend_declare_property_null(%s, SL("%s"), %s);', + $classEntry, + $this->getName(), + $this->getVisibilityAccessor() + ) + ); break; default: diff --git a/Library/Console/Command/Command.php b/Library/Console/Command/Command.php index 83d88cdfa7..722b6207d8 100644 --- a/Library/Console/Command/Command.php +++ b/Library/Console/Command/Command.php @@ -26,6 +26,6 @@ public function mergeApplicationDefinition($mergeArgs = true) { parent::mergeApplicationDefinition($mergeArgs); - $this->removeOptions(['dumpversion', 'version']); + $this->removeOptions(['dumpversion', 'version', 'vernum']); } } diff --git a/Library/EventListener/ConsoleErrorListener.php b/Library/EventListener/ConsoleErrorListener.php index a42d82cad3..4c13606cb0 100644 --- a/Library/EventListener/ConsoleErrorListener.php +++ b/Library/EventListener/ConsoleErrorListener.php @@ -22,7 +22,7 @@ class ConsoleErrorListener { public function onCommandError(ConsoleErrorEvent $event) { - if (!\in_array(getenv('ZEPHIR_DEBUG'), ['true', 'TRUE', '1', 'on', 'ON'], true)) { + if (!filter_var(getenv('ZEPHIR_DEBUG'), FILTER_VALIDATE_BOOLEAN)) { return; } diff --git a/Library/Expression/StaticConstantAccess.php b/Library/Expression/StaticConstantAccess.php index 6ae06e94de..1218106521 100644 --- a/Library/Expression/StaticConstantAccess.php +++ b/Library/Expression/StaticConstantAccess.php @@ -168,7 +168,7 @@ public function compile(array $expression, CompilationContext $compilationContex $compilationContext->codePrinter->output( sprintf( - 'zephir_get_class_constant(%s, %s, SS("%s") TSRMLS_CC);', + 'zephir_get_class_constant(%s, %s, SS("%s"));', $symbolVariable->getName(), $classDefinition->getClassEntry($compilationContext), $constant diff --git a/Library/Operators/Arithmetical/DivOperator.php b/Library/Operators/Arithmetical/DivOperator.php index 22152221bf..b5d49976d3 100644 --- a/Library/Operators/Arithmetical/DivOperator.php +++ b/Library/Operators/Arithmetical/DivOperator.php @@ -65,10 +65,10 @@ public function compile($expression, CompilationContext $compilationContext) case 'uint': case 'long': case 'ulong': - return new CompiledExpression('double', 'zephir_safe_div_long_long('.$left->getCode().', '.$right->getCode().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_long_long('.$left->getCode().', '.$right->getCode().')', $expression); case 'double': - return new CompiledExpression('double', 'zephir_safe_div_long_double((double) '.$left->getCode().', '.$right->getCode().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_long_double((double) '.$left->getCode().', '.$right->getCode().')', $expression); case 'bool': return new CompiledExpression('bool', '('.$left->getCode().' - '.$right->getBooleanCode().')', $expression); @@ -81,15 +81,15 @@ public function compile($expression, CompilationContext $compilationContext) case 'long': case 'ulong': case 'bool': - return new CompiledExpression('double', 'zephir_safe_div_long_long('.$left->getCode().', '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_long_long('.$left->getCode().', '.$variableRight->getName().')', $expression); case 'double': - return new CompiledExpression('double', 'zephir_safe_div_long_double('.$left->getCode().', '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_long_double('.$left->getCode().', '.$variableRight->getName().')', $expression); case 'variable': $variableRightCode = $compilationContext->backend->getVariableCode($variableRight); - return new CompiledExpression('double', 'zephir_safe_div_long_zval('.$left->getCode().', '.$variableRightCode.' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_long_zval('.$left->getCode().', '.$variableRightCode.')', $expression); default: throw new CompilerException("Cannot operate variable('int') with variable('".$variableRight->getType()."')", $expression); @@ -124,13 +124,13 @@ public function compile($expression, CompilationContext $compilationContext) case 'uint': case 'long': case 'ulong': - return new CompiledExpression('double', 'zephir_safe_div_double_long('.$left->getCode().', (double) ('.$right->getCode().') TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_double_long('.$left->getCode().', (double) ('.$right->getCode().'))', $expression); case 'double': - return new CompiledExpression('double', 'zephir_safe_div_double_long('.$left->getCode().', '.$right->getCode().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_double_long('.$left->getCode().', '.$right->getCode().')', $expression); case 'bool': - return new CompiledExpression('double', 'zephir_safe_div_double_long('.$left->getCode().', '.$right->getBooleanCode().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_double_long('.$left->getCode().', '.$right->getBooleanCode().')', $expression); case 'variable': $variableRight = $compilationContext->symbolTable->getVariableForRead($right->getCode(), $compilationContext, $expression); @@ -140,15 +140,15 @@ public function compile($expression, CompilationContext $compilationContext) case 'long': case 'ulong': case 'bool': - return new CompiledExpression('double', 'zephir_safe_div_double_long('.$left->getCode().', '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_double_long('.$left->getCode().', '.$variableRight->getName().')', $expression); case 'double': - return new CompiledExpression('double', 'zephir_safe_div_double_double('.$left->getCode().', '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_double_double('.$left->getCode().', '.$variableRight->getName().')', $expression); case 'variable': $symbolRight = $compilationContext->backend->getVariableCode($variableRight); - return new CompiledExpression('double', 'zephir_safe_div_double_zval('.$left->getCode().', '.$symbolRight.' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_double_zval('.$left->getCode().', '.$symbolRight.')', $expression); break; default: @@ -181,10 +181,10 @@ public function compile($expression, CompilationContext $compilationContext) case 'uint': case 'long': case 'ulong': - return new CompiledExpression('double', 'zephir_safe_div_long_long('.$left->getCode().', '.$right->getCode().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_long_long('.$left->getCode().', '.$right->getCode().')', $expression); case 'double': - return new CompiledExpression('double', 'zephir_safe_div_long_double('.$left->getCode().', '.$right->getCode().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_long_double('.$left->getCode().', '.$right->getCode().')', $expression); case 'variable': $variableRight = $compilationContext->symbolTable->getVariableForRead($right->getCode(), $compilationContext, $expression['right']); @@ -194,19 +194,19 @@ public function compile($expression, CompilationContext $compilationContext) case 'long': case 'ulong': case 'bool': - return new CompiledExpression('double', 'zephir_safe_div_long_long('.$variableLeft->getName().', '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_long_long('.$variableLeft->getName().', '.$variableRight->getName().')', $expression); case 'double': - return new CompiledExpression('double', 'zephir_safe_div_long_double('.$variableLeft->getName().', '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_long_double('.$variableLeft->getName().', '.$variableRight->getName().')', $expression); case 'variable': $compilationContext->headersManager->add('kernel/operators'); if ($variableRight->isLocalOnly()) { - return new CompiledExpression('double', 'zephir_safe_div_long_zval('.$variableLeft->getName().', &'.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_long_zval('.$variableLeft->getName().', &'.$variableRight->getName().')', $expression); } else { $variableRightCode = $compilationContext->backend->getVariableCode($variableRight); - return new CompiledExpression('double', 'zephir_safe_div_long_zval('.$variableLeft->getName().', '.$variableRightCode.' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_long_zval('.$variableLeft->getName().', '.$variableRightCode.')', $expression); } break; @@ -238,22 +238,22 @@ public function compile($expression, CompilationContext $compilationContext) case 'uint': case 'long': case 'ulong': - return new CompiledExpression('double', 'zephir_safe_div_long_long('.$variableLeft->getName().', '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_long_long('.$variableLeft->getName().', '.$variableRight->getName().')', $expression); case 'double': - return new CompiledExpression('double', 'zephir_safe_div_long_double('.$variableLeft->getName().', '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_long_double('.$variableLeft->getName().', '.$variableRight->getName().')', $expression); case 'bool': - return new CompiledExpression('double', 'zephir_safe_div_long_long('.$variableLeft->getName().' '.$this->bitOperator.' '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_long_long('.$variableLeft->getName().' '.$this->bitOperator.' '.$variableRight->getName().')', $expression); case 'variable': $compilationContext->headersManager->add('kernel/operators'); if ($variableRight->isLocalOnly()) { - return new CompiledExpression('double', 'zephir_safe_div_long_zval('.$variableLeft->getName().', &'.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_long_zval('.$variableLeft->getName().', &'.$variableRight->getName().')', $expression); } else { $variableRightCode = $compilationContext->backend->getVariableCode($variableRight); - return new CompiledExpression('double', 'zephir_safe_div_long_zval('.$variableLeft->getName().', '.$variableRightCode.' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_long_zval('.$variableLeft->getName().', '.$variableRightCode.')', $expression); } break; @@ -274,7 +274,7 @@ public function compile($expression, CompilationContext $compilationContext) case 'long': case 'ulong': case 'double': - return new CompiledExpression('double', 'zephir_safe_div_double_long('.$left->getCode().', '.$right->getCode().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_double_long('.$left->getCode().', '.$right->getCode().')', $expression); case 'bool': return new CompiledExpression('bool', '('.$left->getCode().' '.$this->bitOperator.' '.$right->getBooleanCode().')', $expression); @@ -286,10 +286,10 @@ public function compile($expression, CompilationContext $compilationContext) case 'uint': case 'long': case 'ulong': - return new CompiledExpression('double', 'zephir_safe_div_double_long('.$variableLeft->getName().', (double) '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_double_long('.$variableLeft->getName().', (double) '.$variableRight->getName().')', $expression); case 'double': - return new CompiledExpression('double', 'zephir_safe_div_double_long('.$variableLeft->getName().', '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_double_long('.$variableLeft->getName().', '.$variableRight->getName().')', $expression); case 'bool': return new CompiledExpression('bool', '('.$variableLeft->getName().' '.$this->bitOperator.' '.$variableRight->getName().')', $expression); @@ -298,7 +298,7 @@ public function compile($expression, CompilationContext $compilationContext) $compilationContext->headersManager->add('kernel/operators'); $symbolRight = $compilationContext->backend->getVariableCode($variableRight); - return new CompiledExpression('double', 'zephir_safe_div_double_zval('.$variableLeft->getName().', '.$symbolRight.' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_double_zval('.$variableLeft->getName().', '.$symbolRight.')', $expression); default: throw new CompilerException("Cannot operate variable('double') with variable('".$variableRight->getType()."')", $expression); @@ -324,12 +324,12 @@ public function compile($expression, CompilationContext $compilationContext) case 'ulong': $op2 = $right->getCode(); - return new CompiledExpression('double', 'zephir_safe_div_zval_long('.$op1.', '.$op2.' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_zval_long('.$op1.', '.$op2.')', $expression); case 'double': $op2 = $right->getCode(); - return new CompiledExpression('double', 'zephir_safe_div_zval_double('.$op1.', '.$op2.' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_zval_double('.$op1.', '.$op2.')', $expression); /* a(var) + a(x) */ case 'variable': @@ -340,14 +340,14 @@ public function compile($expression, CompilationContext $compilationContext) case 'uint': case 'long': case 'ulong': - return new CompiledExpression('double', 'zephir_safe_div_zval_long('.$op1.', '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_zval_long('.$op1.', '.$variableRight->getName().')', $expression); case 'double': - return new CompiledExpression('double', 'zephir_safe_div_zval_double('.$op1.', '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_zval_double('.$op1.', '.$variableRight->getName().')', $expression); /* a(var) + a(bool) */ case 'bool': - return new CompiledExpression('int', 'zephir_safe_div_zval_long('.$op1.', '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('int', 'zephir_safe_div_zval_long('.$op1.', '.$variableRight->getName().')', $expression); /* a(var) + a(var) */ case 'variable': @@ -355,7 +355,7 @@ public function compile($expression, CompilationContext $compilationContext) $expected = $this->getExpected($compilationContext, $expression); $expectedCode = $compilationContext->backend->getVariableCode($expected); - $compilationContext->codePrinter->output($this->zvalOperator.'('.$expectedCode.', '.$op1.', '.$op2.' TSRMLS_CC);'); + $compilationContext->codePrinter->output($this->zvalOperator.'('.$expectedCode.', '.$op1.', '.$op2.');'); if ($variableLeft->isTemporal()) { $variableLeft->setIdle(true); @@ -385,12 +385,12 @@ public function compile($expression, CompilationContext $compilationContext) case 'ulong': $op2 = $right->getCode(); - return new CompiledExpression('double', 'zephir_safe_div_zval_long('.$op1.', '.$op2.' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_zval_long('.$op1.', '.$op2.')', $expression); case 'double': $op2 = $right->getCode(); - return new CompiledExpression('double', 'zephir_safe_div_zval_double('.$op1.', '.$op2.' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_zval_double('.$op1.', '.$op2.')', $expression); case 'variable': $variableRight = $compilationContext->symbolTable->getVariableForRead($right->resolve(null, $compilationContext), $compilationContext, $expression); @@ -400,20 +400,20 @@ public function compile($expression, CompilationContext $compilationContext) case 'long': case 'ulong': case 'bool': - return new CompiledExpression('double', 'zephir_safe_div_zval_long('.$op1.', '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_zval_long('.$op1.', '.$variableRight->getName().')', $expression); case 'double': - return new CompiledExpression('double', 'zephir_safe_div_zval_double('.$op1.', '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_zval_double('.$op1.', '.$variableRight->getName().')', $expression); case 'variable': $variableRight = $compilationContext->symbolTable->getVariableForRead($variableRight->getCode(), $compilationContext, $expression); $op2 = $compilationContext->backend->getVariableCode($variableRight); switch ($variableRight->getType()) { case 'int': - return new CompiledExpression('double', 'zephir_safe_div_zval_long('.$variableLeft->getName().', '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_zval_long('.$variableLeft->getName().', '.$variableRight->getName().')', $expression); case 'double': - return new CompiledExpression('double', 'zephir_safe_div_zval_double('.$variableLeft->getName().', '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_div_zval_double('.$variableLeft->getName().', '.$variableRight->getName().')', $expression); case 'bool': return new CompiledExpression('bool', $variableLeft->getName().' '.$this->bitOperator.' '.$variableRight->getName(), $expression); diff --git a/Library/Operators/Arithmetical/ModOperator.php b/Library/Operators/Arithmetical/ModOperator.php index 8e0375a095..e6a39a7155 100644 --- a/Library/Operators/Arithmetical/ModOperator.php +++ b/Library/Operators/Arithmetical/ModOperator.php @@ -65,10 +65,10 @@ public function compile($expression, CompilationContext $compilationContext) case 'uint': case 'long': case 'ulong': - return new CompiledExpression('double', 'zephir_safe_mod_long_long('.$left->getCode().', '.$right->getCode().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_long_long('.$left->getCode().', '.$right->getCode().')', $expression); case 'double': - return new CompiledExpression('double', 'zephir_safe_mod_long_double((double) '.$left->getCode().', '.$right->getCode().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_long_double((double) '.$left->getCode().', '.$right->getCode().')', $expression); case 'bool': return new CompiledExpression('bool', '('.$left->getCode().' - '.$right->getBooleanCode().')', $expression); @@ -81,16 +81,16 @@ public function compile($expression, CompilationContext $compilationContext) case 'long': case 'ulong': case 'bool': - return new CompiledExpression('double', 'zephir_safe_mod_long_long('.$left->getCode().', '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_long_long('.$left->getCode().', '.$variableRight->getName().')', $expression); case 'double': - return new CompiledExpression('double', 'zephir_safe_mod_long_double('.$left->getCode().', '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_long_double('.$left->getCode().', '.$variableRight->getName().')', $expression); case 'variable': if ($variableRight->isLocalOnly()) { - return new CompiledExpression('double', 'zephir_safe_mod_long_zval('.$left->getCode().', &'.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_long_zval('.$left->getCode().', &'.$variableRight->getName().')', $expression); } else { - return new CompiledExpression('double', 'zephir_safe_mod_long_zval('.$left->getCode().', '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_long_zval('.$left->getCode().', '.$variableRight->getName().')', $expression); } break; @@ -127,13 +127,13 @@ public function compile($expression, CompilationContext $compilationContext) case 'uint': case 'long': case 'ulong': - return new CompiledExpression('double', 'zephir_safe_mod_double_long('.$left->getCode().', (double) ('.$right->getCode().') TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_double_long('.$left->getCode().', (double) ('.$right->getCode().'))', $expression); case 'double': - return new CompiledExpression('double', 'zephir_safe_mod_double_long('.$left->getCode().', '.$right->getCode().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_double_long('.$left->getCode().', '.$right->getCode().')', $expression); case 'bool': - return new CompiledExpression('double', 'zephir_safe_mod_double_long('.$left->getCode().', '.$right->getBooleanCode().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_double_long('.$left->getCode().', '.$right->getBooleanCode().')', $expression); case 'variable': $variableRight = $compilationContext->symbolTable->getVariableForRead($right->getCode(), $compilationContext, $expression); @@ -143,16 +143,16 @@ public function compile($expression, CompilationContext $compilationContext) case 'long': case 'ulong': case 'bool': - return new CompiledExpression('double', 'zephir_safe_mod_double_long('.$left->getCode().', '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_double_long('.$left->getCode().', '.$variableRight->getName().')', $expression); case 'double': - return new CompiledExpression('double', 'zephir_safe_mod_double_double('.$left->getCode().', '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_double_double('.$left->getCode().', '.$variableRight->getName().')', $expression); case 'variable': if ($variableRight->isLocalOnly()) { - return new CompiledExpression('double', 'zephir_safe_mod_double_zval('.$left->getCode().', &'.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_double_zval('.$left->getCode().', &'.$variableRight->getName().')', $expression); } else { - return new CompiledExpression('double', 'zephir_safe_mod_double_zval('.$left->getCode().', '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_double_zval('.$left->getCode().', '.$variableRight->getName().')', $expression); } break; @@ -186,10 +186,10 @@ public function compile($expression, CompilationContext $compilationContext) case 'uint': case 'long': case 'ulong': - return new CompiledExpression('double', 'zephir_safe_mod_long_long('.$left->getCode().', '.$right->getCode().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_long_long('.$left->getCode().', '.$right->getCode().')', $expression); case 'double': - return new CompiledExpression('double', 'zephir_safe_mod_long_double('.$left->getCode().', '.$right->getCode().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_long_double('.$left->getCode().', '.$right->getCode().')', $expression); case 'variable': $variableRight = $compilationContext->symbolTable->getVariableForRead($right->getCode(), $compilationContext, $expression['right']); @@ -199,16 +199,16 @@ public function compile($expression, CompilationContext $compilationContext) case 'long': case 'ulong': case 'bool': - return new CompiledExpression('double', 'zephir_safe_mod_long_long('.$variableLeft->getName().', '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_long_long('.$variableLeft->getName().', '.$variableRight->getName().')', $expression); case 'double': - return new CompiledExpression('double', 'zephir_safe_mod_long_double('.$variableLeft->getName().', '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_long_double('.$variableLeft->getName().', '.$variableRight->getName().')', $expression); case 'variable': if ($variableRight->isLocalOnly()) { - return new CompiledExpression('double', 'zephir_safe_mod_long_zval('.$variableLeft->getName().', &'.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_long_zval('.$variableLeft->getName().', &'.$variableRight->getName().')', $expression); } else { - return new CompiledExpression('double', 'zephir_safe_mod_long_zval('.$variableLeft->getName().', '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_long_zval('.$variableLeft->getName().', '.$variableRight->getName().')', $expression); } break; @@ -240,20 +240,20 @@ public function compile($expression, CompilationContext $compilationContext) case 'uint': case 'long': case 'ulong': - return new CompiledExpression('double', 'zephir_safe_mod_long_long('.$variableLeft->getName().', '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_long_long('.$variableLeft->getName().', '.$variableRight->getName().')', $expression); case 'double': - return new CompiledExpression('double', 'zephir_safe_mod_long_double('.$variableLeft->getName().', '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_long_double('.$variableLeft->getName().', '.$variableRight->getName().')', $expression); case 'bool': - return new CompiledExpression('double', 'zephir_safe_mod_long_long('.$variableLeft->getName().' '.$this->bitOperator.' '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_long_long('.$variableLeft->getName().' '.$this->bitOperator.' '.$variableRight->getName().')', $expression); case 'variable': $compilationContext->headersManager->add('kernel/operators'); if ($variableRight->isLocalOnly()) { - return new CompiledExpression('double', 'zephir_safe_mod_long_zval('.$variableLeft->getName().', &'.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_long_zval('.$variableLeft->getName().', &'.$variableRight->getName().')', $expression); } else { - return new CompiledExpression('double', 'zephir_safe_mod_long_zval('.$variableLeft->getName().', '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_long_zval('.$variableLeft->getName().', '.$variableRight->getName().')', $expression); } break; @@ -274,7 +274,7 @@ public function compile($expression, CompilationContext $compilationContext) case 'long': case 'ulong': case 'double': - return new CompiledExpression('double', 'zephir_safe_mod_double_long('.$left->getCode().', '.$right->getCode().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_double_long('.$left->getCode().', '.$right->getCode().')', $expression); case 'bool': return new CompiledExpression('bool', '('.$left->getCode().' '.$this->bitOperator.' '.$right->getBooleanCode().')', $expression); @@ -286,10 +286,10 @@ public function compile($expression, CompilationContext $compilationContext) case 'uint': case 'long': case 'ulong': - return new CompiledExpression('double', 'zephir_safe_mod_double_long('.$variableLeft->getName().', (double) '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_double_long('.$variableLeft->getName().', (double) '.$variableRight->getName().')', $expression); case 'double': - return new CompiledExpression('double', 'zephir_safe_mod_double_long('.$variableLeft->getName().', '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_double_long('.$variableLeft->getName().', '.$variableRight->getName().')', $expression); case 'bool': return new CompiledExpression('bool', '('.$variableLeft->getName().' '.$this->bitOperator.' '.$variableRight->getName().')', $expression); @@ -297,9 +297,9 @@ public function compile($expression, CompilationContext $compilationContext) case 'variable': $compilationContext->headersManager->add('kernel/operators'); if ($variableRight->isLocalOnly()) { - return new CompiledExpression('double', 'zephir_safe_mod_double_zval('.$variableLeft->getName().', &'.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_double_zval('.$variableLeft->getName().', &'.$variableRight->getName().')', $expression); } else { - return new CompiledExpression('double', 'zephir_safe_mod_double_zval('.$variableLeft->getName().', '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_double_zval('.$variableLeft->getName().', '.$variableRight->getName().')', $expression); } break; @@ -326,13 +326,13 @@ public function compile($expression, CompilationContext $compilationContext) case 'ulong': $op2 = $right->getCode(); - return new CompiledExpression('double', 'zephir_safe_mod_zval_long('.$op1.', '.$op2.' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_zval_long('.$op1.', '.$op2.')', $expression); break; case 'double': $op2 = $right->getCode(); - return new CompiledExpression('double', 'zephir_safe_mod_zval_double('.$op1.', '.$op2.' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_zval_double('.$op1.', '.$op2.')', $expression); break; /* a(var) + a(x) */ @@ -344,12 +344,12 @@ public function compile($expression, CompilationContext $compilationContext) case 'uint': case 'long': case 'ulong': - return new CompiledExpression('double', 'zephir_safe_mod_zval_long('.$op1.', '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_zval_long('.$op1.', '.$variableRight->getName().')', $expression); break; /* a(var) + a(bool) */ case 'bool': - return new CompiledExpression('int', 'zephir_safe_mod_zval_long('.$op1.', '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('int', 'zephir_safe_mod_zval_long('.$op1.', '.$variableRight->getName().')', $expression); break; /* a(var) + a(var) */ @@ -359,7 +359,7 @@ public function compile($expression, CompilationContext $compilationContext) $expected = $this->getExpected($compilationContext, $expression); $symbol = $compilationContext->backend->getVariableCode($expected); - $compilationContext->codePrinter->output($this->zvalOperator.'('.$symbol.', '.$op1.', '.$op2.' TSRMLS_CC);'); + $compilationContext->codePrinter->output($this->zvalOperator.'('.$symbol.', '.$op1.', '.$op2.');'); if ($variableLeft->isTemporal()) { $variableLeft->setIdle(true); @@ -389,12 +389,12 @@ public function compile($expression, CompilationContext $compilationContext) case 'ulong': $op2 = $right->getCode(); - return new CompiledExpression('double', 'zephir_safe_mod_zval_long('.$op1.', '.$op2.' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_zval_long('.$op1.', '.$op2.')', $expression); case 'double': $op2 = $right->getCode(); - return new CompiledExpression('double', 'zephir_safe_mod_zval_double('.$op1.', '.$op2.' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_zval_double('.$op1.', '.$op2.')', $expression); case 'variable': $variableRight = $compilationContext->symbolTable->getVariableForRead($right->resolve(null, $compilationContext), $compilationContext, $expression); @@ -406,17 +406,17 @@ public function compile($expression, CompilationContext $compilationContext) case 'bool': $compilationContext->headersManager->add('kernel/operators'); - return new CompiledExpression('double', 'zephir_safe_mod_zval_long('.$op1.', '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_zval_long('.$op1.', '.$variableRight->getName().')', $expression); break; case 'variable': $variableRight = $compilationContext->symbolTable->getVariableForRead($variableRight->getCode(), $compilationContext, $expression); switch ($variableRight->getType()) { case 'int': - return new CompiledExpression('double', 'zephir_safe_mod_zval_long('.$op1.', '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_zval_long('.$op1.', '.$variableRight->getName().')', $expression); case 'double': - return new CompiledExpression('double', 'zephir_safe_mod_zval_double('.$op1.', '.$variableRight->getName().' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_safe_mod_zval_double('.$op1.', '.$variableRight->getName().')', $expression); case 'bool': return new CompiledExpression('bool', $op1.' '.$this->bitOperator.' '.$variableRight->getName(), $expression); diff --git a/Library/Operators/Bitwise/BitwiseBaseOperator.php b/Library/Operators/Bitwise/BitwiseBaseOperator.php index 4699ed7909..9ed5f52296 100644 --- a/Library/Operators/Bitwise/BitwiseBaseOperator.php +++ b/Library/Operators/Bitwise/BitwiseBaseOperator.php @@ -470,7 +470,7 @@ public function compile($expression, CompilationContext $compilationContext) $expected = $this->getExpected($compilationContext, $expression); $expectedSymbol = $compilationContext->backend->getVariableCode($expected); - $compilationContext->codePrinter->output($this->zvalOperator.'('.$expectedSymbol.', '.$op1.', '.$op2.' TSRMLS_CC);'); + $compilationContext->codePrinter->output($this->zvalOperator.'('.$expectedSymbol.', '.$op1.', '.$op2.');'); if ($variableLeft->isTemporal()) { $variableLeft->setIdle(true); diff --git a/Library/Operators/Logical/LogicalBaseOperator.php b/Library/Operators/Logical/LogicalBaseOperator.php index 776d958a81..50c98fbc15 100644 --- a/Library/Operators/Logical/LogicalBaseOperator.php +++ b/Library/Operators/Logical/LogicalBaseOperator.php @@ -340,9 +340,9 @@ public function compile($expression, CompilationContext $compilationContext) $expected = $this->getExpected($compilationContext, $expression); if ($expected->isLocalOnly()) { - $compilationContext->codePrinter->output('add_function(&'.$expected->getName().', '.$op1.', '.$op2.' TSRMLS_CC);'); + $compilationContext->codePrinter->output('add_function(&'.$expected->getName().', '.$op1.', '.$op2.');'); } else { - $compilationContext->codePrinter->output('add_function('.$expected->getName().', '.$op1.', '.$op2.' TSRMLS_CC);'); + $compilationContext->codePrinter->output('add_function('.$expected->getName().', '.$op1.', '.$op2.');'); } return new CompiledExpression('variable', $expected->getName(), $expression); diff --git a/Library/Operators/Other/CloneOperator.php b/Library/Operators/Other/CloneOperator.php index a15f2466a3..18f4ce7479 100644 --- a/Library/Operators/Other/CloneOperator.php +++ b/Library/Operators/Other/CloneOperator.php @@ -73,7 +73,7 @@ public function compile(array $expression, CompilationContext $compilationContex $symbol = $compilationContext->backend->getVariableCode($symbolVariable); $clonedSymbol = $compilationContext->backend->getVariableCode($clonedVariable); - $compilationContext->codePrinter->output('if (zephir_clone('.$symbol.', '.$clonedSymbol.' TSRMLS_CC) == FAILURE) {'); + $compilationContext->codePrinter->output('if (zephir_clone('.$symbol.', '.$clonedSymbol.') == FAILURE) {'); $compilationContext->codePrinter->output("\t".'RETURN_MM();'); $compilationContext->codePrinter->output('}'); diff --git a/Library/Operators/Other/InstanceOfOperator.php b/Library/Operators/Other/InstanceOfOperator.php index 1b3a2ef47e..0fb2630b16 100644 --- a/Library/Operators/Other/InstanceOfOperator.php +++ b/Library/Operators/Other/InstanceOfOperator.php @@ -85,7 +85,7 @@ public function compile($expression, CompilationContext $context) if ('Traversable' == $className) { $symbol = $context->backend->getVariableCode($symbolVariable); - return new CompiledExpression('bool', 'zephir_zval_is_traversable('.$symbol.' TSRMLS_CC)', $expression); + return new CompiledExpression('bool', 'zephir_zval_is_traversable('.$symbol.')', $expression); } if ($context->compiler->isClass($className)) { @@ -130,10 +130,10 @@ public function compile($expression, CompilationContext $context) $context->headersManager->add('kernel/object'); $symbol = $context->backend->getVariableCode($symbolVariable); if (isset($code)) { - return new CompiledExpression('bool', 'zephir_is_instance_of('.$symbol.', '.$code.' TSRMLS_CC)', $expression); + return new CompiledExpression('bool', 'zephir_is_instance_of('.$symbol.', '.$code.')', $expression); } - return new CompiledExpression('bool', 'zephir_instance_of_ev('.$symbol.', '.$classEntry.' TSRMLS_CC)', $expression); + return new CompiledExpression('bool', 'zephir_instance_of_ev('.$symbol.', '.$classEntry.')', $expression); } private function prepareBackendSpecificCode($variable, CompilationContext $context) diff --git a/Library/Operators/Other/IssetOperator.php b/Library/Operators/Other/IssetOperator.php index a6940e1502..58c7043066 100644 --- a/Library/Operators/Other/IssetOperator.php +++ b/Library/Operators/Other/IssetOperator.php @@ -139,7 +139,7 @@ public function compile(array $expression, CompilationContext $compilationContex case 'string': $indexVariableCode = $compilationContext->backend->getVariableCode($indexVariable); - return new CompiledExpression('bool', 'zephir_isset_property_zval('.$variableCode.', '.$indexVariableCode.' TSRMLS_CC)', $left['right']); + return new CompiledExpression('bool', 'zephir_isset_property_zval('.$variableCode.', '.$indexVariableCode.')', $left['right']); default: throw new CompilerException('['.$indexVariable->getType().']', $expression); diff --git a/Library/Operators/Other/RequireOperator.php b/Library/Operators/Other/RequireOperator.php index 1d3177310c..1972f5e6a4 100644 --- a/Library/Operators/Other/RequireOperator.php +++ b/Library/Operators/Other/RequireOperator.php @@ -69,9 +69,9 @@ public function compile(array $expression, CompilationContext $compilationContex if ($symbolVariable) { $codePrinter->output('ZEPHIR_OBSERVE_OR_NULLIFY_PPZV(&'.$symbolVariable->getName().');'); $symbol = $compilationContext->backend->getVariableCodePointer($symbolVariable); - $codePrinter->output('if (zephir_require_zval_ret('.$symbol.', '.$exprVar.' TSRMLS_CC) == FAILURE) {'); + $codePrinter->output('if (zephir_require_zval_ret('.$symbol.', '.$exprVar.') == FAILURE) {'); } else { - $codePrinter->output('if (zephir_require_zval('.$exprVar.' TSRMLS_CC) == FAILURE) {'); + $codePrinter->output('if (zephir_require_zval('.$exprVar.') == FAILURE) {'); } $codePrinter->output("\t".'RETURN_MM_NULL();'); $codePrinter->output('}'); diff --git a/Library/Operators/Unary/MinusOperator.php b/Library/Operators/Unary/MinusOperator.php index 60788cd740..a452eebcf4 100644 --- a/Library/Operators/Unary/MinusOperator.php +++ b/Library/Operators/Unary/MinusOperator.php @@ -59,7 +59,7 @@ public function compile($expression, CompilationContext $compilationContext) case 'variable': $compilationContext->headersManager->add('kernel/operators'); - $compilationContext->codePrinter->output('zephir_negate('.$compilationContext->backend->getVariableCode($variable).' TSRMLS_CC);'); + $compilationContext->codePrinter->output('zephir_negate('.$compilationContext->backend->getVariableCode($variable).');'); return new CompiledExpression('variable', $variable->getName(), $expression); diff --git a/Library/Optimizers/FunctionCall/AddslashesOptimizer.php b/Library/Optimizers/FunctionCall/AddslashesOptimizer.php index 934d99f7ae..5673e4ed13 100644 --- a/Library/Optimizers/FunctionCall/AddslashesOptimizer.php +++ b/Library/Optimizers/FunctionCall/AddslashesOptimizer.php @@ -65,7 +65,7 @@ public function optimize(array $expression, Call $call, CompilationContext $cont } $symbol = $context->backend->getVariableCode($symbolVariable); - $context->codePrinter->output('zephir_addslashes('.$symbol.', '.$resolvedParams[0].' TSRMLS_CC);'); + $context->codePrinter->output('zephir_addslashes('.$symbol.', '.$resolvedParams[0].');'); return new CompiledExpression('variable', $symbolVariable->getRealName(), $expression); } diff --git a/Library/Optimizers/FunctionCall/ArrayKeyExistsOptimizer.php b/Library/Optimizers/FunctionCall/ArrayKeyExistsOptimizer.php index 9e00be4471..30e3f65c04 100644 --- a/Library/Optimizers/FunctionCall/ArrayKeyExistsOptimizer.php +++ b/Library/Optimizers/FunctionCall/ArrayKeyExistsOptimizer.php @@ -48,6 +48,6 @@ public function optimize(array $expression, Call $call, CompilationContext $cont $resolvedParams = $call->getReadOnlyResolvedParams($expression['parameters'], $context, $expression); //Note: the first parameter is key in php array_key_exists - return new CompiledExpression('bool', 'zephir_array_key_exists('.$resolvedParams[1].', '.$resolvedParams[0].' TSRMLS_CC)', $expression); + return new CompiledExpression('bool', 'zephir_array_key_exists('.$resolvedParams[1].', '.$resolvedParams[0].')', $expression); } } diff --git a/Library/Optimizers/FunctionCall/ArrayKeysOptimizer.php b/Library/Optimizers/FunctionCall/ArrayKeysOptimizer.php index 70a3757a15..fabc0c4ba3 100644 --- a/Library/Optimizers/FunctionCall/ArrayKeysOptimizer.php +++ b/Library/Optimizers/FunctionCall/ArrayKeysOptimizer.php @@ -64,7 +64,7 @@ public function optimize(array $expression, Call $call, CompilationContext $cont } $symbol = $context->backend->getVariableCode($symbolVariable); - $context->codePrinter->output('zephir_array_keys('.$symbol.', '.$resolvedParams[0].' TSRMLS_CC);'); + $context->codePrinter->output('zephir_array_keys('.$symbol.', '.$resolvedParams[0].');'); return new CompiledExpression('variable', $symbolVariable->getRealName(), $expression); } diff --git a/Library/Optimizers/FunctionCall/ArrayMergeOptimizer.php b/Library/Optimizers/FunctionCall/ArrayMergeOptimizer.php index 382e51787b..9677b889e5 100644 --- a/Library/Optimizers/FunctionCall/ArrayMergeOptimizer.php +++ b/Library/Optimizers/FunctionCall/ArrayMergeOptimizer.php @@ -63,7 +63,7 @@ public function optimize(array $expression, Call $call, CompilationContext $cont } $symbol = $context->backend->getVariableCode($symbolVariable); $resolveParam = $this->createParamResolver($context); - $context->codePrinter->output('zephir_fast_array_merge('.$symbol.', '.$resolveParam($resolvedParams[0]).', '.$resolveParam($resolvedParams[1]).' TSRMLS_CC);'); + $context->codePrinter->output('zephir_fast_array_merge('.$symbol.', '.$resolveParam($resolvedParams[0]).', '.$resolveParam($resolvedParams[1]).');'); return new CompiledExpression('variable', $symbolVariable->getRealName(), $expression); } diff --git a/Library/Optimizers/FunctionCall/BasenameOptimizer.php b/Library/Optimizers/FunctionCall/BasenameOptimizer.php index 9ba750609d..88085f6bdd 100644 --- a/Library/Optimizers/FunctionCall/BasenameOptimizer.php +++ b/Library/Optimizers/FunctionCall/BasenameOptimizer.php @@ -64,7 +64,7 @@ public function optimize(array $expression, Call $call, CompilationContext $cont } $symbol = $context->backend->getVariableCode($symbolVariable); - $context->codePrinter->output('zephir_basename('.$symbol.', '.$resolvedParams[0].' TSRMLS_CC);'); + $context->codePrinter->output('zephir_basename('.$symbol.', '.$resolvedParams[0].');'); return new CompiledExpression('variable', $symbolVariable->getRealName(), $expression); } diff --git a/Library/Optimizers/FunctionCall/CeilOptimizer.php b/Library/Optimizers/FunctionCall/CeilOptimizer.php index 6df97d6695..6f624831a7 100644 --- a/Library/Optimizers/FunctionCall/CeilOptimizer.php +++ b/Library/Optimizers/FunctionCall/CeilOptimizer.php @@ -47,6 +47,6 @@ public function optimize(array $expression, Call $call, CompilationContext $cont $resolvedParams = $call->getReadOnlyResolvedParams($expression['parameters'], $context, $expression); - return new CompiledExpression('double', 'zephir_ceil('.$resolvedParams[0].' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_ceil('.$resolvedParams[0].')', $expression); } } diff --git a/Library/Optimizers/FunctionCall/ClassExistsOptimizer.php b/Library/Optimizers/FunctionCall/ClassExistsOptimizer.php index 9551bff9b2..64b492d577 100644 --- a/Library/Optimizers/FunctionCall/ClassExistsOptimizer.php +++ b/Library/Optimizers/FunctionCall/ClassExistsOptimizer.php @@ -57,6 +57,6 @@ public function optimize(array $expression, Call $call, CompilationContext $cont $context->headersManager->add('kernel/object'); - return new CompiledExpression('bool', 'zephir_class_exists('.$resolvedParams[0].', '.$autoload.' TSRMLS_CC)', $expression); + return new CompiledExpression('bool', 'zephir_class_exists('.$resolvedParams[0].', '.$autoload.')', $expression); } } diff --git a/Library/Optimizers/FunctionCall/CompareMtimeOptimizer.php b/Library/Optimizers/FunctionCall/CompareMtimeOptimizer.php index 6f444233ac..cd66dd0f09 100644 --- a/Library/Optimizers/FunctionCall/CompareMtimeOptimizer.php +++ b/Library/Optimizers/FunctionCall/CompareMtimeOptimizer.php @@ -52,6 +52,6 @@ public function optimize(array $expression, Call $call, CompilationContext $cont $resolvedParams = $call->getReadOnlyResolvedParams($expression['parameters'], $context, $expression); - return new CompiledExpression('bool', 'zephir_compare_mtime('.$resolvedParams[0].', '.$resolvedParams[1].' TSRMLS_CC)', $expression); + return new CompiledExpression('bool', 'zephir_compare_mtime('.$resolvedParams[0].', '.$resolvedParams[1].')', $expression); } } diff --git a/Library/Optimizers/FunctionCall/CountOptimizer.php b/Library/Optimizers/FunctionCall/CountOptimizer.php index 7cc04747a1..c6e240bd24 100644 --- a/Library/Optimizers/FunctionCall/CountOptimizer.php +++ b/Library/Optimizers/FunctionCall/CountOptimizer.php @@ -42,6 +42,6 @@ public function optimize(array $expression, Call $call, CompilationContext $cont $resolvedParams = $call->getReadOnlyResolvedParams($expression['parameters'], $context, $expression); - return new CompiledExpression('int', 'zephir_fast_count_int('.$resolvedParams[0].' TSRMLS_CC)', $expression); + return new CompiledExpression('int', 'zephir_fast_count_int('.$resolvedParams[0].')', $expression); } } diff --git a/Library/Optimizers/FunctionCall/CreateArrayOptimizer.php b/Library/Optimizers/FunctionCall/CreateArrayOptimizer.php index c52054b5e7..df282e2db0 100644 --- a/Library/Optimizers/FunctionCall/CreateArrayOptimizer.php +++ b/Library/Optimizers/FunctionCall/CreateArrayOptimizer.php @@ -72,9 +72,9 @@ public function optimize(array $expression, Call $call, CompilationContext $cont $symbol = $context->backend->getVariableCode($symbolVariable); if ($resolvedParams) { - $context->codePrinter->output('zephir_create_array('.$symbol.', zephir_get_intval('.$resolvedParams[0].'), 1 TSRMLS_CC);'); + $context->codePrinter->output('zephir_create_array('.$symbol.', zephir_get_intval('.$resolvedParams[0].'), 1);'); } else { - $context->codePrinter->output('zephir_create_array('.$symbol.', 0, 1 TSRMLS_CC);'); + $context->codePrinter->output('zephir_create_array('.$symbol.', 0, 1);'); } return new CompiledExpression('variable', $symbolVariable->getRealName(), $expression); diff --git a/Library/Optimizers/FunctionCall/CreateInstanceOptimizer.php b/Library/Optimizers/FunctionCall/CreateInstanceOptimizer.php index a7bd29c5f6..9558c99554 100644 --- a/Library/Optimizers/FunctionCall/CreateInstanceOptimizer.php +++ b/Library/Optimizers/FunctionCall/CreateInstanceOptimizer.php @@ -74,7 +74,7 @@ public function optimize(array $expression, Call $call, CompilationContext $cont $call->addCallStatusFlag($context); $symbol = $context->backend->getVariableCode($symbolVariable); - $context->codePrinter->output('ZEPHIR_LAST_CALL_STATUS = zephir_create_instance('.$symbol.', '.$resolvedParams[0].' TSRMLS_CC);'); + $context->codePrinter->output('ZEPHIR_LAST_CALL_STATUS = zephir_create_instance('.$symbol.', '.$resolvedParams[0].');'); $call->checkTempParameters($context); $call->addCallStatusOrJump($context); diff --git a/Library/Optimizers/FunctionCall/CreateInstanceParamsOptimizer.php b/Library/Optimizers/FunctionCall/CreateInstanceParamsOptimizer.php index ecfa823091..3b74582816 100644 --- a/Library/Optimizers/FunctionCall/CreateInstanceParamsOptimizer.php +++ b/Library/Optimizers/FunctionCall/CreateInstanceParamsOptimizer.php @@ -69,7 +69,7 @@ public function optimize(array $expression, Call $call, CompilationContext $cont $call->addCallStatusFlag($context); $symbol = $context->backend->getVariableCode($symbolVariable); - $context->codePrinter->output('ZEPHIR_LAST_CALL_STATUS = zephir_create_instance_params('.$symbol.', '.$resolvedParams[0].', '.$resolvedParams[1].' TSRMLS_CC);'); + $context->codePrinter->output('ZEPHIR_LAST_CALL_STATUS = zephir_create_instance_params('.$symbol.', '.$resolvedParams[0].', '.$resolvedParams[1].');'); $call->addCallStatusOrJump($context); diff --git a/Library/Optimizers/FunctionCall/EvalOptimizer.php b/Library/Optimizers/FunctionCall/EvalOptimizer.php index dfdc839f21..d6faf4a5e8 100644 --- a/Library/Optimizers/FunctionCall/EvalOptimizer.php +++ b/Library/Optimizers/FunctionCall/EvalOptimizer.php @@ -69,7 +69,7 @@ public function optimize(array $expression, Call $call, CompilationContext $cont $symbol = $context->backend->getVariableCode($symbolVariable); $context->codePrinter->output( - sprintf('zephir_eval_php(%s, %s, "%s" TSRMLS_CC);', $resolvedParams[0], $symbol, $evalContext) + sprintf('zephir_eval_php(%s, %s, "%s");', $resolvedParams[0], $symbol, $evalContext) ); return new CompiledExpression('variable', $symbolVariable->getRealName(), $expression); diff --git a/Library/Optimizers/FunctionCall/ExplodeOptimizer.php b/Library/Optimizers/FunctionCall/ExplodeOptimizer.php index 9ffb481400..805ab50ddf 100644 --- a/Library/Optimizers/FunctionCall/ExplodeOptimizer.php +++ b/Library/Optimizers/FunctionCall/ExplodeOptimizer.php @@ -86,12 +86,12 @@ public function optimize(array $expression, Call $call, CompilationContext $cont $symbol = $context->backend->getVariableCode($symbolVariable); if (isset($str)) { - $context->codePrinter->output('zephir_fast_explode_str('.$symbol.', SL("'.$str.'"), '.$resolvedParams[0].', '.$limit.' TSRMLS_CC);'); + $context->codePrinter->output('zephir_fast_explode_str('.$symbol.', SL("'.$str.'"), '.$resolvedParams[0].', '.$limit.');'); return new CompiledExpression('variable', $symbolVariable->getRealName(), $expression); } - $context->codePrinter->output('zephir_fast_explode('.$symbol.', '.$resolvedParams[0].', '.$resolvedParams[1].', '.$limit.' TSRMLS_CC);'); + $context->codePrinter->output('zephir_fast_explode('.$symbol.', '.$resolvedParams[0].', '.$resolvedParams[1].', '.$limit.');'); return new CompiledExpression('variable', $symbolVariable->getRealName(), $expression); } diff --git a/Library/Optimizers/FunctionCall/FcloseOptimizer.php b/Library/Optimizers/FunctionCall/FcloseOptimizer.php index 17c56a092d..a3ebdaab73 100644 --- a/Library/Optimizers/FunctionCall/FcloseOptimizer.php +++ b/Library/Optimizers/FunctionCall/FcloseOptimizer.php @@ -47,6 +47,6 @@ public function optimize(array $expression, Call $call, CompilationContext $cont $resolvedParams = $call->getReadOnlyResolvedParams($expression['parameters'], $context, $expression); - return new CompiledExpression('bool', 'zephir_fclose('.$resolvedParams[0].' TSRMLS_CC)', $expression); + return new CompiledExpression('bool', 'zephir_fclose('.$resolvedParams[0].')', $expression); } } diff --git a/Library/Optimizers/FunctionCall/FeofOptimizer.php b/Library/Optimizers/FunctionCall/FeofOptimizer.php index 5f3458e1bc..19bf308e24 100644 --- a/Library/Optimizers/FunctionCall/FeofOptimizer.php +++ b/Library/Optimizers/FunctionCall/FeofOptimizer.php @@ -44,6 +44,6 @@ public function optimize(array $expression, Call $call, CompilationContext $cont $resolvedParams = $call->getReadOnlyResolvedParams($expression['parameters'], $context, $expression); - return new CompiledExpression('bool', 'zephir_feof('.$resolvedParams[0].' TSRMLS_CC)', $expression); + return new CompiledExpression('bool', 'zephir_feof('.$resolvedParams[0].')', $expression); } } diff --git a/Library/Optimizers/FunctionCall/FileExistsOptimizer.php b/Library/Optimizers/FunctionCall/FileExistsOptimizer.php index d39628ca56..508ff5608a 100644 --- a/Library/Optimizers/FunctionCall/FileExistsOptimizer.php +++ b/Library/Optimizers/FunctionCall/FileExistsOptimizer.php @@ -47,6 +47,6 @@ public function optimize(array $expression, Call $call, CompilationContext $cont $resolvedParams = $call->getReadOnlyResolvedParams($expression['parameters'], $context, $expression); - return new CompiledExpression('bool', '(zephir_file_exists('.$resolvedParams[0].' TSRMLS_CC) == SUCCESS)', $expression); + return new CompiledExpression('bool', '(zephir_file_exists('.$resolvedParams[0].') == SUCCESS)', $expression); } } diff --git a/Library/Optimizers/FunctionCall/FileGetContentsOptimizer.php b/Library/Optimizers/FunctionCall/FileGetContentsOptimizer.php index 38dd41bd13..b0491ce6eb 100644 --- a/Library/Optimizers/FunctionCall/FileGetContentsOptimizer.php +++ b/Library/Optimizers/FunctionCall/FileGetContentsOptimizer.php @@ -63,11 +63,11 @@ public function optimize(array $expression, Call $call, CompilationContext $cont } if ($symbolVariable) { $symbol = $context->backend->getVariableCode($symbolVariable); - $context->codePrinter->output('zephir_file_get_contents('.$symbol.', '.$resolvedParams[0].' TSRMLS_CC);'); + $context->codePrinter->output('zephir_file_get_contents('.$symbol.', '.$resolvedParams[0].');'); return new CompiledExpression('variable', $symbolVariable->getRealName(), $expression); } else { - $context->codePrinter->output('zephir_file_get_contents(NULL, '.$resolvedParams[0].' TSRMLS_CC);'); + $context->codePrinter->output('zephir_file_get_contents(NULL, '.$resolvedParams[0].');'); } return new CompiledExpression('null', 'null', $expression); diff --git a/Library/Optimizers/FunctionCall/FilePutContentsOptimizer.php b/Library/Optimizers/FunctionCall/FilePutContentsOptimizer.php index bbedc11fd3..3299d0f83e 100644 --- a/Library/Optimizers/FunctionCall/FilePutContentsOptimizer.php +++ b/Library/Optimizers/FunctionCall/FilePutContentsOptimizer.php @@ -63,11 +63,11 @@ public function optimize(array $expression, Call $call, CompilationContext $cont if ($call->mustInitSymbolVariable()) { $symbolVariable->initVariant($context); } - $context->codePrinter->output('zephir_file_put_contents('.$symbol.', '.$resolvedParams[0].', '.$resolvedParams[1].' TSRMLS_CC);'); + $context->codePrinter->output('zephir_file_put_contents('.$symbol.', '.$resolvedParams[0].', '.$resolvedParams[1].');'); return new CompiledExpression('variable', $symbolVariable->getRealName(), $expression); } else { - $context->codePrinter->output('zephir_file_put_contents(NULL, '.$resolvedParams[0].', '.$resolvedParams[1].' TSRMLS_CC);'); + $context->codePrinter->output('zephir_file_put_contents(NULL, '.$resolvedParams[0].', '.$resolvedParams[1].');'); } return new CompiledExpression('null', 'null', $expression); diff --git a/Library/Optimizers/FunctionCall/FilemtimeOptimizer.php b/Library/Optimizers/FunctionCall/FilemtimeOptimizer.php index 28ceab105c..c6bf64547b 100644 --- a/Library/Optimizers/FunctionCall/FilemtimeOptimizer.php +++ b/Library/Optimizers/FunctionCall/FilemtimeOptimizer.php @@ -64,7 +64,7 @@ public function optimize(array $expression, Call $call, CompilationContext $cont $symbol = $context->backend->getVariableCode($symbolVariable); - $context->codePrinter->output('zephir_filemtime('.$symbol.', '.$resolvedParams[0].' TSRMLS_CC);'); + $context->codePrinter->output('zephir_filemtime('.$symbol.', '.$resolvedParams[0].');'); return new CompiledExpression('variable', $symbolVariable->getRealName(), $expression); } diff --git a/Library/Optimizers/FunctionCall/FloorOptimizer.php b/Library/Optimizers/FunctionCall/FloorOptimizer.php index 3ccba66fc1..34edf236b3 100644 --- a/Library/Optimizers/FunctionCall/FloorOptimizer.php +++ b/Library/Optimizers/FunctionCall/FloorOptimizer.php @@ -47,6 +47,6 @@ public function optimize(array $expression, Call $call, CompilationContext $cont $resolvedParams = $call->getReadOnlyResolvedParams($expression['parameters'], $context, $expression); - return new CompiledExpression('double', 'zephir_floor('.$resolvedParams[0].' TSRMLS_CC)', $expression); + return new CompiledExpression('double', 'zephir_floor('.$resolvedParams[0].')', $expression); } } diff --git a/Library/Optimizers/FunctionCall/FuncGetArgOptimizer.php b/Library/Optimizers/FunctionCall/FuncGetArgOptimizer.php index 72178305d9..7fb5f4e5fa 100644 --- a/Library/Optimizers/FunctionCall/FuncGetArgOptimizer.php +++ b/Library/Optimizers/FunctionCall/FuncGetArgOptimizer.php @@ -79,7 +79,7 @@ public function optimize(array $expression, Call $call, CompilationContext $cont if ($context->backend->isZE3()) { $template = 'zephir_get_arg(%s, zephir_get_intval(%s));'; } else { - $template = 'zephir_get_arg(%s, zephir_get_intval(%s) TSRMLS_CC);'; + $template = 'zephir_get_arg(%s, zephir_get_intval(%s));'; } $context->codePrinter->output(sprintf($template, $symbol, $resolvedParams[0])); diff --git a/Library/Optimizers/FunctionCall/FuncGetArgsOptimizer.php b/Library/Optimizers/FunctionCall/FuncGetArgsOptimizer.php index 7ff40f3527..171dc5f734 100644 --- a/Library/Optimizers/FunctionCall/FuncGetArgsOptimizer.php +++ b/Library/Optimizers/FunctionCall/FuncGetArgsOptimizer.php @@ -53,7 +53,7 @@ public function optimize(array $expression, Call $call, CompilationContext $cont if ($context->backend->isZE3()) { $context->codePrinter->output('zephir_get_args('.$symbol.');'); } else { - $context->codePrinter->output('zephir_get_args('.$symbol.' TSRMLS_CC);'); + $context->codePrinter->output('zephir_get_args('.$symbol.');'); } return new CompiledExpression('variable', $symbolVariable->getRealName(), $expression); diff --git a/Library/Optimizers/FunctionCall/FunctionExistsOptimizer.php b/Library/Optimizers/FunctionCall/FunctionExistsOptimizer.php index 777d265fca..0253d41a09 100644 --- a/Library/Optimizers/FunctionCall/FunctionExistsOptimizer.php +++ b/Library/Optimizers/FunctionCall/FunctionExistsOptimizer.php @@ -49,9 +49,9 @@ public function optimize(array $expression, Call $call, CompilationContext $cont /* TODO: Solve this macro stuff better, move to backend */ $macro = $context->backend->isZE3() ? 'SL' : 'SS'; - return new CompiledExpression('bool', '(zephir_function_exists_ex('.$macro.'("'.strtolower($str).'") TSRMLS_CC) == SUCCESS)', $expression); + return new CompiledExpression('bool', '(zephir_function_exists_ex('.$macro.'("'.strtolower($str).'")) == SUCCESS)', $expression); } - return new CompiledExpression('bool', '(zephir_function_exists('.$resolvedParams[0].' TSRMLS_CC) == SUCCESS)', $expression); + return new CompiledExpression('bool', '(zephir_function_exists('.$resolvedParams[0].') == SUCCESS)', $expression); } } diff --git a/Library/Optimizers/FunctionCall/FwriteOptimizer.php b/Library/Optimizers/FunctionCall/FwriteOptimizer.php index 42091bf2d3..cb6baf985b 100644 --- a/Library/Optimizers/FunctionCall/FwriteOptimizer.php +++ b/Library/Optimizers/FunctionCall/FwriteOptimizer.php @@ -63,11 +63,11 @@ public function optimize(array $expression, Call $call, CompilationContext $cont $symbolVariable->initVariant($context); } $symbol = $context->backend->getVariableCode($symbolVariable); - $context->codePrinter->output('zephir_fwrite('.$symbol.', '.$resolvedParams[0].', '.$resolvedParams[1].' TSRMLS_CC);'); + $context->codePrinter->output('zephir_fwrite('.$symbol.', '.$resolvedParams[0].', '.$resolvedParams[1].');'); return new CompiledExpression('variable', $symbolVariable->getRealName(), $expression); } else { - $context->codePrinter->output('zephir_fwrite(NULL, '.$resolvedParams[0].', '.$resolvedParams[1].' TSRMLS_CC);'); + $context->codePrinter->output('zephir_fwrite(NULL, '.$resolvedParams[0].', '.$resolvedParams[1].');'); } return new CompiledExpression('null', 'null', $expression); diff --git a/Library/Optimizers/FunctionCall/GetCalledClassOptimizer.php b/Library/Optimizers/FunctionCall/GetCalledClassOptimizer.php index 8409651e1f..5fc8e33b71 100644 --- a/Library/Optimizers/FunctionCall/GetCalledClassOptimizer.php +++ b/Library/Optimizers/FunctionCall/GetCalledClassOptimizer.php @@ -61,7 +61,7 @@ public function optimize(array $expression, Call $call, CompilationContext $cont $symbolVariable->setDynamicTypes('string'); $symbol = $context->backend->getVariableCode($symbolVariable); - $context->codePrinter->output('zephir_get_called_class('.$symbol.' TSRMLS_CC);'); + $context->codePrinter->output('zephir_get_called_class('.$symbol.');'); return new CompiledExpression('variable', $symbolVariable->getRealName(), $expression); } diff --git a/Library/Optimizers/FunctionCall/GetClassLowerOptimizer.php b/Library/Optimizers/FunctionCall/GetClassLowerOptimizer.php index d6a06639fd..04495854bf 100644 --- a/Library/Optimizers/FunctionCall/GetClassLowerOptimizer.php +++ b/Library/Optimizers/FunctionCall/GetClassLowerOptimizer.php @@ -65,7 +65,7 @@ public function optimize(array $expression, Call $call, CompilationContext $cont $symbol = $context->backend->getVariableCode($symbolVariable); - $context->codePrinter->output('zephir_get_class('.$symbol.', '.$resolvedParams[0].', 1 TSRMLS_CC);'); + $context->codePrinter->output('zephir_get_class('.$symbol.', '.$resolvedParams[0].', 1);'); return new CompiledExpression('variable', $symbolVariable->getRealName(), $expression); } diff --git a/Library/Optimizers/FunctionCall/GetClassNsOptimizer.php b/Library/Optimizers/FunctionCall/GetClassNsOptimizer.php index b1ce851f6b..9224d85e42 100644 --- a/Library/Optimizers/FunctionCall/GetClassNsOptimizer.php +++ b/Library/Optimizers/FunctionCall/GetClassNsOptimizer.php @@ -65,9 +65,9 @@ public function optimize(array $expression, Call $call, CompilationContext $cont $symbol = $context->backend->getVariableCode($symbolVariable); if (!isset($resolvedParams[1])) { - $context->codePrinter->output('zephir_get_class_ns('.$symbol.', '.$resolvedParams[0].', 0 TSRMLS_CC);'); + $context->codePrinter->output('zephir_get_class_ns('.$symbol.', '.$resolvedParams[0].', 0);'); } else { - $context->codePrinter->output('zephir_get_class_ns('.$symbol.', '.$resolvedParams[0].', '.$resolvedParams[1].' TSRMLS_CC);'); + $context->codePrinter->output('zephir_get_class_ns('.$symbol.', '.$resolvedParams[0].', '.$resolvedParams[1].');'); } return new CompiledExpression('variable', $symbolVariable->getRealName(), $expression); diff --git a/Library/Optimizers/FunctionCall/GetClassOptimizer.php b/Library/Optimizers/FunctionCall/GetClassOptimizer.php index 037fc38cad..cd6f97118f 100644 --- a/Library/Optimizers/FunctionCall/GetClassOptimizer.php +++ b/Library/Optimizers/FunctionCall/GetClassOptimizer.php @@ -64,7 +64,7 @@ public function optimize(array $expression, Call $call, CompilationContext $cont $symbol = $context->backend->getVariableCode($symbolVariable); - $context->codePrinter->output('zephir_get_class('.$symbol.', '.$resolvedParams[0].', 0 TSRMLS_CC);'); + $context->codePrinter->output('zephir_get_class('.$symbol.', '.$resolvedParams[0].', 0);'); return new CompiledExpression('variable', $symbolVariable->getRealName(), $expression); } diff --git a/Library/Optimizers/FunctionCall/GetDefinedVarsOptimizer.php b/Library/Optimizers/FunctionCall/GetDefinedVarsOptimizer.php index ff991a0ddb..85517e15f0 100644 --- a/Library/Optimizers/FunctionCall/GetDefinedVarsOptimizer.php +++ b/Library/Optimizers/FunctionCall/GetDefinedVarsOptimizer.php @@ -48,7 +48,7 @@ public function optimize(array $expression, Call $call, CompilationContext $cont if ($context->backend->isZE3()) { $context->codePrinter->output('zephir_get_defined_vars('.$symbol.');'); } else { - $context->codePrinter->output('zephir_get_defined_vars('.$symbol.' TSRMLS_CC);'); + $context->codePrinter->output('zephir_get_defined_vars('.$symbol.');'); } return new CompiledExpression('variable', $symbolVariable->getRealName(), $expression); diff --git a/Library/Optimizers/FunctionCall/GetNsClassOptimizer.php b/Library/Optimizers/FunctionCall/GetNsClassOptimizer.php index feff73f9c1..2f4d204c52 100644 --- a/Library/Optimizers/FunctionCall/GetNsClassOptimizer.php +++ b/Library/Optimizers/FunctionCall/GetNsClassOptimizer.php @@ -62,7 +62,7 @@ public function optimize(array $expression, Call $call, CompilationContext $cont $symbolVariable->initVariant($context); } $symbol = $context->backend->getVariableCode($symbolVariable); - $context->codePrinter->output('zephir_get_ns_class('.$symbol.', '.$resolvedParams[0].', 0 TSRMLS_CC);'); + $context->codePrinter->output('zephir_get_ns_class('.$symbol.', '.$resolvedParams[0].', 0);'); return new CompiledExpression('variable', $symbolVariable->getRealName(), $expression); } diff --git a/Library/Optimizers/FunctionCall/GettypeOptimizer.php b/Library/Optimizers/FunctionCall/GettypeOptimizer.php index 87dd898d28..4a6bc07fb4 100644 --- a/Library/Optimizers/FunctionCall/GettypeOptimizer.php +++ b/Library/Optimizers/FunctionCall/GettypeOptimizer.php @@ -61,7 +61,7 @@ public function optimize(array $expression, Call $call, CompilationContext $cont $symbolVariable->initVariant($context); } $symbol = $context->backend->getVariableCode($symbolVariable); - $context->codePrinter->output('zephir_gettype('.$symbol.', '.$resolvedParams[0].' TSRMLS_CC);'); + $context->codePrinter->output('zephir_gettype('.$symbol.', '.$resolvedParams[0].');'); return new CompiledExpression('variable', $symbolVariable->getRealName(), $expression); } diff --git a/Library/Optimizers/FunctionCall/ImplodeOptimizer.php b/Library/Optimizers/FunctionCall/ImplodeOptimizer.php index 8b8f2422d1..a8ef661d70 100644 --- a/Library/Optimizers/FunctionCall/ImplodeOptimizer.php +++ b/Library/Optimizers/FunctionCall/ImplodeOptimizer.php @@ -70,12 +70,12 @@ public function optimize(array $expression, Call $call, CompilationContext $cont $symbol = $context->backend->getVariableCode($symbolVariable); if (isset($str)) { - $context->codePrinter->output('zephir_fast_join_str('.$symbol.', SL("'.$str.'"), '.$resolvedParams[0].' TSRMLS_CC);'); + $context->codePrinter->output('zephir_fast_join_str('.$symbol.', SL("'.$str.'"), '.$resolvedParams[0].');'); return new CompiledExpression('variable', $symbolVariable->getRealName(), $expression); } - $context->codePrinter->output('zephir_fast_join('.$symbol.', '.$resolvedParams[0].', '.$resolvedParams[1].' TSRMLS_CC);'); + $context->codePrinter->output('zephir_fast_join('.$symbol.', '.$resolvedParams[0].', '.$resolvedParams[1].');'); return new CompiledExpression('variable', $symbolVariable->getRealName(), $expression); } diff --git a/Library/Optimizers/FunctionCall/InArrayOptimizer.php b/Library/Optimizers/FunctionCall/InArrayOptimizer.php index 9f993b60f2..e51533c590 100644 --- a/Library/Optimizers/FunctionCall/InArrayOptimizer.php +++ b/Library/Optimizers/FunctionCall/InArrayOptimizer.php @@ -47,6 +47,6 @@ public function optimize(array $expression, Call $call, CompilationContext $cont $resolvedParams = $call->getReadOnlyResolvedParams($expression['parameters'], $context, $expression); - return new CompiledExpression('bool', 'zephir_fast_in_array('.$resolvedParams[0].', '.$resolvedParams[1].' TSRMLS_CC)', $expression); + return new CompiledExpression('bool', 'zephir_fast_in_array('.$resolvedParams[0].', '.$resolvedParams[1].')', $expression); } } diff --git a/Library/Optimizers/FunctionCall/InterfaceExistsOptimizer.php b/Library/Optimizers/FunctionCall/InterfaceExistsOptimizer.php index 23db1bc8ed..ed34c3ec53 100644 --- a/Library/Optimizers/FunctionCall/InterfaceExistsOptimizer.php +++ b/Library/Optimizers/FunctionCall/InterfaceExistsOptimizer.php @@ -61,6 +61,6 @@ public function optimize(array $expression, Call $call, CompilationContext $cont $context->headersManager->add('kernel/object'); - return new CompiledExpression('bool', 'zephir_interface_exists('.$resolvedParams[0].', '.$autoload.' TSRMLS_CC)', $expression); + return new CompiledExpression('bool', 'zephir_interface_exists('.$resolvedParams[0].', '.$autoload.')', $expression); } } diff --git a/Library/Optimizers/FunctionCall/IsCallableOptimizer.php b/Library/Optimizers/FunctionCall/IsCallableOptimizer.php index a5abe9847f..a618d3a4a2 100644 --- a/Library/Optimizers/FunctionCall/IsCallableOptimizer.php +++ b/Library/Optimizers/FunctionCall/IsCallableOptimizer.php @@ -42,6 +42,6 @@ public function optimize(array $expression, Call $call, CompilationContext $cont $resolvedParams = $call->getReadOnlyResolvedParams($expression['parameters'], $context, $expression); - return new CompiledExpression('bool', 'zephir_is_callable('.$resolvedParams[0].' TSRMLS_CC)', $expression); + return new CompiledExpression('bool', 'zephir_is_callable('.$resolvedParams[0].')', $expression); } } diff --git a/Library/Optimizers/FunctionCall/JsonDecodeOptimizer.php b/Library/Optimizers/FunctionCall/JsonDecodeOptimizer.php index 6b0ea617bb..2196e57dbf 100644 --- a/Library/Optimizers/FunctionCall/JsonDecodeOptimizer.php +++ b/Library/Optimizers/FunctionCall/JsonDecodeOptimizer.php @@ -76,7 +76,7 @@ public function optimize(array $expression, Call $call, CompilationContext $cont if ($context->backend->isZE3()) { $context->codePrinter->output('zephir_json_decode('.$symbol.', '.$resolvedParams[0].', '.$options.');'); } else { - $context->codePrinter->output('zephir_json_decode('.$symbol.', &('.$symbol.'), '.$resolvedParams[0].', '.$options.' TSRMLS_CC);'); + $context->codePrinter->output('zephir_json_decode('.$symbol.', &('.$symbol.'), '.$resolvedParams[0].', '.$options.');'); } return new CompiledExpression('variable', $symbolVariable->getRealName(), $expression); diff --git a/Library/Optimizers/FunctionCall/JsonEncodeOptimizer.php b/Library/Optimizers/FunctionCall/JsonEncodeOptimizer.php index ad378d80ca..ecd6827cf7 100644 --- a/Library/Optimizers/FunctionCall/JsonEncodeOptimizer.php +++ b/Library/Optimizers/FunctionCall/JsonEncodeOptimizer.php @@ -69,7 +69,7 @@ public function optimize(array $expression, Call $call, CompilationContext $cont if ($context->backend->isZE3()) { $context->codePrinter->output('zephir_json_encode('.$symbol.', '.$resolvedParams[0].', '.$options.');'); } else { - $context->codePrinter->output('zephir_json_encode('.$symbol.', &('.$symbol.'), '.$resolvedParams[0].', '.$options.' TSRMLS_CC);'); + $context->codePrinter->output('zephir_json_encode('.$symbol.', &('.$symbol.'), '.$resolvedParams[0].', '.$options.');'); } return new CompiledExpression('variable', $symbolVariable->getRealName(), $expression); diff --git a/Library/Optimizers/FunctionCall/LdexpOptimizer.php b/Library/Optimizers/FunctionCall/LdexpOptimizer.php index 625c83bd0e..775772b6b7 100644 --- a/Library/Optimizers/FunctionCall/LdexpOptimizer.php +++ b/Library/Optimizers/FunctionCall/LdexpOptimizer.php @@ -55,7 +55,7 @@ public function optimize(array $expression, Call $call, CompilationContext $cont return new CompiledExpression( 'double', - 'zephir_'.$this->getFunctionName().'('.$resolvedParams[0].', '.$resolvedParams[1].' TSRMLS_CC)', + 'zephir_'.$this->getFunctionName().'('.$resolvedParams[0].', '.$resolvedParams[1].')', $expression ); } diff --git a/Library/Optimizers/FunctionCall/MethodExistsOptimizer.php b/Library/Optimizers/FunctionCall/MethodExistsOptimizer.php index 38a67de73c..555a75f5c5 100644 --- a/Library/Optimizers/FunctionCall/MethodExistsOptimizer.php +++ b/Library/Optimizers/FunctionCall/MethodExistsOptimizer.php @@ -52,9 +52,9 @@ public function optimize(array $expression, Call $call, CompilationContext $cont /* TODO: Solve this macro stuff better, move to backend */ $macro = $context->backend->isZE3() ? 'SL' : 'SS'; if (isset($str)) { - return new CompiledExpression('bool', '(zephir_method_exists_ex('.$resolvedParams[0].', '.$macro.'("'.strtolower($str).'") TSRMLS_CC) == SUCCESS)', $expression); + return new CompiledExpression('bool', '(zephir_method_exists_ex('.$resolvedParams[0].', '.$macro.'("'.strtolower($str).'")) == SUCCESS)', $expression); } - return new CompiledExpression('bool', '(zephir_method_exists('.$resolvedParams[0].', '.$resolvedParams[1].' TSRMLS_CC) == SUCCESS)', $expression); + return new CompiledExpression('bool', '(zephir_method_exists('.$resolvedParams[0].', '.$resolvedParams[1].') == SUCCESS)', $expression); } } diff --git a/Library/Optimizers/FunctionCall/MicrotimeOptimizer.php b/Library/Optimizers/FunctionCall/MicrotimeOptimizer.php index 20947eeae0..46170c4c9e 100644 --- a/Library/Optimizers/FunctionCall/MicrotimeOptimizer.php +++ b/Library/Optimizers/FunctionCall/MicrotimeOptimizer.php @@ -58,14 +58,14 @@ public function optimize(array $expression, Call $call, CompilationContext $cont if ($call->mustInitSymbolVariable()) { $symbolVariable->initVariant($context); } - $context->codePrinter->output('zephir_microtime('.$symbol.', NULL TSRMLS_CC);'); + $context->codePrinter->output('zephir_microtime('.$symbol.', NULL);'); } else { $symbolVariable->setDynamicTypes('double'); $resolvedParams = $call->getReadOnlyResolvedParams($expression['parameters'], $context, $expression); if ($call->mustInitSymbolVariable()) { $symbolVariable->initVariant($context); } - $context->codePrinter->output('zephir_microtime('.$symbol.', '.$resolvedParams[0].' TSRMLS_CC);'); + $context->codePrinter->output('zephir_microtime('.$symbol.', '.$resolvedParams[0].');'); } return new CompiledExpression('variable', $symbolVariable->getRealName(), $expression); diff --git a/Library/Optimizers/FunctionCall/MtRandOptimizer.php b/Library/Optimizers/FunctionCall/MtRandOptimizer.php index eb7143c60e..a215002a3d 100644 --- a/Library/Optimizers/FunctionCall/MtRandOptimizer.php +++ b/Library/Optimizers/FunctionCall/MtRandOptimizer.php @@ -48,6 +48,6 @@ public function optimize(array $expression, Call $call, CompilationContext $cont $resolvedParams = $call->getReadOnlyResolvedParams($expression['parameters'], $context, $expression); - return new CompiledExpression('long', 'zephir_mt_rand(zephir_get_intval('.$resolvedParams[0].'), zephir_get_intval('.$resolvedParams[1].') TSRMLS_CC)', $expression); + return new CompiledExpression('long', 'zephir_mt_rand(zephir_get_intval('.$resolvedParams[0].'), zephir_get_intval('.$resolvedParams[1].'))', $expression); } } diff --git a/Library/Optimizers/FunctionCall/PregMatchOptimizer.php b/Library/Optimizers/FunctionCall/PregMatchOptimizer.php index 2153f65929..892d7e03e7 100644 --- a/Library/Optimizers/FunctionCall/PregMatchOptimizer.php +++ b/Library/Optimizers/FunctionCall/PregMatchOptimizer.php @@ -92,7 +92,7 @@ public function optimize(array $expression, Call $call, CompilationContext $cont $context->codePrinter->output( sprintf( - 'zephir_preg_match(%s, %s, %s, %s, %d, %s, %s TSRMLS_CC);', + 'zephir_preg_match(%s, %s, %s, %s, %d, %s, %s);', $symbol, $resolvedParams[0], $resolvedParams[1], diff --git a/Library/Optimizers/FunctionCall/PrepareVirtualPathOptimizer.php b/Library/Optimizers/FunctionCall/PrepareVirtualPathOptimizer.php index b0e316e170..e287345c33 100644 --- a/Library/Optimizers/FunctionCall/PrepareVirtualPathOptimizer.php +++ b/Library/Optimizers/FunctionCall/PrepareVirtualPathOptimizer.php @@ -63,7 +63,7 @@ public function optimize(array $expression, Call $call, CompilationContext $cont } $symbol = $context->backend->getVariableCode($symbolVariable); - $context->codePrinter->output('zephir_prepare_virtual_path('.$symbol.', '.$resolvedParams[0].', '.$resolvedParams[1].' TSRMLS_CC);'); + $context->codePrinter->output('zephir_prepare_virtual_path('.$symbol.', '.$resolvedParams[0].', '.$resolvedParams[1].');'); return new CompiledExpression('variable', $symbolVariable->getRealName(), $expression); } diff --git a/Library/Optimizers/FunctionCall/RoundOptimizer.php b/Library/Optimizers/FunctionCall/RoundOptimizer.php index 8ea2fdb49b..9708eb69c8 100644 --- a/Library/Optimizers/FunctionCall/RoundOptimizer.php +++ b/Library/Optimizers/FunctionCall/RoundOptimizer.php @@ -70,7 +70,7 @@ public function optimize(array $expression, Call $call, CompilationContext $cont */ case 1: $context->codePrinter->output( - 'zephir_round('.$symbol.', '.$resolvedParams[0].', NULL, NULL TSRMLS_CC);' + 'zephir_round('.$symbol.', '.$resolvedParams[0].', NULL, NULL);' ); break; @@ -79,13 +79,13 @@ public function optimize(array $expression, Call $call, CompilationContext $cont */ case 2: $context->codePrinter->output( - 'zephir_round('.$symbol.', '.$resolvedParams[0].', '.$resolvedParams[1].', NULL TSRMLS_CC);' + 'zephir_round('.$symbol.', '.$resolvedParams[0].', '.$resolvedParams[1].', NULL);' ); break; default: $context->codePrinter->output( - 'zephir_round('.$symbol.', '.$resolvedParams[0].', '.$resolvedParams[1].', '.$resolvedParams[2].' TSRMLS_CC);' + 'zephir_round('.$symbol.', '.$resolvedParams[0].', '.$resolvedParams[1].', '.$resolvedParams[2].');' ); break; } diff --git a/Library/Optimizers/FunctionCall/StrReplaceOptimizer.php b/Library/Optimizers/FunctionCall/StrReplaceOptimizer.php index c2fd5a8008..e20dacc9b7 100644 --- a/Library/Optimizers/FunctionCall/StrReplaceOptimizer.php +++ b/Library/Optimizers/FunctionCall/StrReplaceOptimizer.php @@ -72,7 +72,7 @@ public function optimize(array $expression, Call $call, CompilationContext $cont $symbol = $context->backend->getVariableCodePointer($symbolVariable); - $context->codePrinter->output('zephir_fast_str_replace('.$symbol.', '.$resolvedParams[0].', '.$resolvedParams[1].', '.$resolvedParams[2].' TSRMLS_CC);'); + $context->codePrinter->output('zephir_fast_str_replace('.$symbol.', '.$resolvedParams[0].', '.$resolvedParams[1].', '.$resolvedParams[2].');'); return new CompiledExpression('variable', $symbolVariable->getRealName(), $expression); } diff --git a/Library/Optimizers/FunctionCall/StripcslashesOptimizer.php b/Library/Optimizers/FunctionCall/StripcslashesOptimizer.php index 24da6436f9..3749c38197 100644 --- a/Library/Optimizers/FunctionCall/StripcslashesOptimizer.php +++ b/Library/Optimizers/FunctionCall/StripcslashesOptimizer.php @@ -65,7 +65,7 @@ public function optimize(array $expression, Call $call, CompilationContext $cont $symbol = $context->backend->getVariableCode($symbolVariable); if ('ZendEngine2' == $context->backend->getName()) { - $context->codePrinter->output('zephir_stripcslashes('.$symbol.', '.$resolvedParams[0].' TSRMLS_CC);'); + $context->codePrinter->output('zephir_stripcslashes('.$symbol.', '.$resolvedParams[0].');'); } else { $context->codePrinter->output('zephir_stripcslashes('.$symbol.', '.$resolvedParams[0].');'); } diff --git a/Library/Optimizers/FunctionCall/StripslashesOptimizer.php b/Library/Optimizers/FunctionCall/StripslashesOptimizer.php index 8eb37b4a44..6c405ba626 100644 --- a/Library/Optimizers/FunctionCall/StripslashesOptimizer.php +++ b/Library/Optimizers/FunctionCall/StripslashesOptimizer.php @@ -64,7 +64,7 @@ public function optimize(array $expression, Call $call, CompilationContext $cont $symbol = $context->backend->getVariableCode($symbolVariable); if ('ZendEngine2' == $context->backend->getName()) { - $context->codePrinter->output('zephir_stripslashes('.$symbol.', '.$resolvedParams[0].' TSRMLS_CC);'); + $context->codePrinter->output('zephir_stripslashes('.$symbol.', '.$resolvedParams[0].');'); } else { $context->codePrinter->output('zephir_stripslashes('.$symbol.', '.$resolvedParams[0].');'); } diff --git a/Library/Optimizers/FunctionCall/TrimOptimizer.php b/Library/Optimizers/FunctionCall/TrimOptimizer.php index 5770525664..d760bc3bde 100644 --- a/Library/Optimizers/FunctionCall/TrimOptimizer.php +++ b/Library/Optimizers/FunctionCall/TrimOptimizer.php @@ -74,7 +74,7 @@ public function optimize(array $expression, Call $call, CompilationContext $cont } $symbol = $context->backend->getVariableCode($symbolVariable); - $context->codePrinter->output('zephir_fast_trim('.$symbol.', '.$resolvedParams[0].', '.$charlist.', '.static::$TRIM_WHERE.' TSRMLS_CC);'); + $context->codePrinter->output('zephir_fast_trim('.$symbol.', '.$resolvedParams[0].', '.$charlist.', '.static::$TRIM_WHERE.');'); return new CompiledExpression('variable', $symbolVariable->getRealName(), $expression); } diff --git a/Library/Optimizers/FunctionCall/UniqueKeyOptimizer.php b/Library/Optimizers/FunctionCall/UniqueKeyOptimizer.php index 9ee293f7ce..6821e8a4a7 100644 --- a/Library/Optimizers/FunctionCall/UniqueKeyOptimizer.php +++ b/Library/Optimizers/FunctionCall/UniqueKeyOptimizer.php @@ -63,7 +63,7 @@ public function optimize(array $expression, Call $call, CompilationContext $cont } $symbol = $context->backend->getVariableCode($symbolVariable); - $context->codePrinter->output('zephir_unique_key('.$symbol.', '.$resolvedParams[0].', '.$resolvedParams[1].' TSRMLS_CC);'); + $context->codePrinter->output('zephir_unique_key('.$symbol.', '.$resolvedParams[0].', '.$resolvedParams[1].');'); return new CompiledExpression('variable', $symbolVariable->getRealName(), $expression); } diff --git a/Library/Optimizers/FunctionCall/UniquePathKeyOptimizer.php b/Library/Optimizers/FunctionCall/UniquePathKeyOptimizer.php index 010fb7ef53..98aa30ed72 100644 --- a/Library/Optimizers/FunctionCall/UniquePathKeyOptimizer.php +++ b/Library/Optimizers/FunctionCall/UniquePathKeyOptimizer.php @@ -62,7 +62,7 @@ public function optimize(array $expression, Call $call, CompilationContext $cont $resolvedParams = $call->getReadOnlyResolvedParams($expression['parameters'], $context, $expression); $symbol = $context->backend->getVariableCode($symbolVariable); - $context->codePrinter->output('zephir_unique_path_key('.$symbol.', '.$resolvedParams[0].' TSRMLS_CC);'); + $context->codePrinter->output('zephir_unique_path_key('.$symbol.', '.$resolvedParams[0].');'); return new CompiledExpression('variable', $symbolVariable->getRealName(), $expression); } diff --git a/Library/Optimizers/FunctionCall/VarDumpOptimizer.php b/Library/Optimizers/FunctionCall/VarDumpOptimizer.php index 9bb4382b07..ac0048a7bd 100644 --- a/Library/Optimizers/FunctionCall/VarDumpOptimizer.php +++ b/Library/Optimizers/FunctionCall/VarDumpOptimizer.php @@ -87,7 +87,7 @@ public function optimize(array $expression, Call $call, CompilationContext $cont } $symbol = $context->backend->getVariableCodePointer($variable); - $context->codePrinter->output('zephir_var_dump('.$symbol.' TSRMLS_CC);'); + $context->codePrinter->output('zephir_var_dump('.$symbol.');'); } return new CompiledExpression('null', 'null', $expression); diff --git a/Library/Optimizers/FunctionCall/VarExportOptimizer.php b/Library/Optimizers/FunctionCall/VarExportOptimizer.php index be9635b446..150541f71b 100644 --- a/Library/Optimizers/FunctionCall/VarExportOptimizer.php +++ b/Library/Optimizers/FunctionCall/VarExportOptimizer.php @@ -111,12 +111,12 @@ public function optimize(array $expression, Call $call, CompilationContext $cont $symbolVariable->initVariant($context); } $symbol = $context->backend->getVariableCode($symbolVariable); - $context->codePrinter->output('zephir_var_export_ex('.$symbol.', '.$variableSymbol.' TSRMLS_CC);'); + $context->codePrinter->output('zephir_var_export_ex('.$symbol.', '.$variableSymbol.');'); return new CompiledExpression('variable', $symbolVariable->getRealName(), $expression); } - $context->codePrinter->output('zephir_var_export('.$variableSymbol.' TSRMLS_CC);'); + $context->codePrinter->output('zephir_var_export('.$variableSymbol.');'); return new CompiledExpression('null', 'null', $expression); } diff --git a/Library/Optimizers/MathOptimizer.php b/Library/Optimizers/MathOptimizer.php index 6347699f99..4f9c0601b1 100644 --- a/Library/Optimizers/MathOptimizer.php +++ b/Library/Optimizers/MathOptimizer.php @@ -84,7 +84,7 @@ public function optimize(array $expression, Call $call, CompilationContext $cont return new CompiledExpression( 'double', - 'zephir_'.$this->getFunctionName().'('.$context->backend->getVariableCode($variable).' TSRMLS_CC)', + 'zephir_'.$this->getFunctionName().'('.$context->backend->getVariableCode($variable).')', $expression ); break; diff --git a/Library/Statements/ForStatement.php b/Library/Statements/ForStatement.php index ec3bb66486..cec070b8ee 100644 --- a/Library/Statements/ForStatement.php +++ b/Library/Statements/ForStatement.php @@ -474,10 +474,10 @@ public function compileIterator(array $exprRaw, CompilationContext $compilationC */ ++$compilationContext->insideCycle; - $codePrinter->output($iteratorVariable->getName().' = zephir_get_iterator('.$compilationContext->backend->getVariableCode($exprVariable).' TSRMLS_CC);'); + $codePrinter->output($iteratorVariable->getName().' = zephir_get_iterator('.$compilationContext->backend->getVariableCode($exprVariable).');'); - $codePrinter->output($iteratorVariable->getName().'->funcs->rewind('.$iteratorVariable->getName().' TSRMLS_CC);'); - $codePrinter->output('for (;'.$iteratorVariable->getName().'->funcs->valid('.$iteratorVariable->getName().' TSRMLS_CC) == SUCCESS && !EG(exception); '.$iteratorVariable->getName().'->funcs->move_forward('.$iteratorVariable->getName().' TSRMLS_CC)) {'); + $codePrinter->output($iteratorVariable->getName().'->funcs->rewind('.$iteratorVariable->getName().');'); + $codePrinter->output('for (;'.$iteratorVariable->getName().'->funcs->valid('.$iteratorVariable->getName().') == SUCCESS && !EG(exception); '.$iteratorVariable->getName().'->funcs->move_forward('.$iteratorVariable->getName().')) {'); if (isset($this->statement['key'])) { $compilationContext->symbolTable->mustGrownStack(true); diff --git a/Library/Statements/Let/ExportSymbol.php b/Library/Statements/Let/ExportSymbol.php index 07f61e40d9..2006c65107 100644 --- a/Library/Statements/Let/ExportSymbol.php +++ b/Library/Statements/Let/ExportSymbol.php @@ -64,7 +64,7 @@ public function assign($variable, ZephirVariable $symbolVariable, CompiledExpres $symbol = $compilationContext->backend->getVariableCode($symbolVariable); $variable = $compilationContext->backend->getVariableCode($variable); - $codePrinter->output('if (zephir_set_symbol('.$symbol.', '.$variable.' TSRMLS_CC) == FAILURE) {'); + $codePrinter->output('if (zephir_set_symbol('.$symbol.', '.$variable.') == FAILURE) {'); $codePrinter->output("\t".'return;'); $codePrinter->output('}'); } diff --git a/Library/Statements/Let/ExportSymbolString.php b/Library/Statements/Let/ExportSymbolString.php index c101b2187e..b58674e1b9 100644 --- a/Library/Statements/Let/ExportSymbolString.php +++ b/Library/Statements/Let/ExportSymbolString.php @@ -62,7 +62,7 @@ public function assign($variable, ZephirVariable $symbolVariable = null, Compile $letStatement->compile($compilationContext); $symbol = $compilationContext->backend->getVariableCode($variable); - $codePrinter->output('if (zephir_set_symbol_str(SS("'.$statement['variable'].'"), '.$symbol.' TSRMLS_CC) == FAILURE) {'); + $codePrinter->output('if (zephir_set_symbol_str(SS("'.$statement['variable'].'"), '.$symbol.') == FAILURE) {'); $codePrinter->output(' return;'); $codePrinter->output('}'); } diff --git a/Library/Statements/Let/ObjectProperty.php b/Library/Statements/Let/ObjectProperty.php index d45e1e898e..477da85208 100644 --- a/Library/Statements/Let/ObjectProperty.php +++ b/Library/Statements/Let/ObjectProperty.php @@ -178,23 +178,15 @@ public function assign($variable, ZephirVariable $symbolVariable, CompiledExpres break; case 'string': - if ('ZendEngine2' == $compilationContext->backend->getName()) { - $tempVariable = $compilationContext->symbolTable->getTempNonTrackedVariable('variable', $compilationContext); - } else { - $tempVariable = $compilationContext->symbolTable->getTempVariableForWrite('variable', $compilationContext, false); - } + $tempVariable = $compilationContext->symbolTable->getTempVariableForWrite('variable', $compilationContext, false); switch ($statement['operator']) { case 'concat-assign': - $codePrinter->output('zephir_concat_self_str(&'.$tempVariable->getName().', "'.$resolvedExpr->getCode().'", sizeof("'.$resolvedExpr->getCode().'")-1 TSRMLS_CC);'); + $codePrinter->output('zephir_concat_self_str(&'.$tempVariable->getName().', "'.$resolvedExpr->getCode().'", sizeof("'.$resolvedExpr->getCode().'") - 1);'); break; case 'assign': /* We only can use nonReferenced variables for not refcounted stuff in ZE3 */ - if ('ZendEngine2' == $compilationContext->backend->getName()) { - $tempVariable->initNonReferenced($compilationContext); - } else { - $tempVariable->initVariant($compilationContext); - } + $tempVariable->initVariant($compilationContext); $compilationContext->backend->assignString($tempVariable, $resolvedExpr->getCode(), $compilationContext); break; } diff --git a/Library/Statements/Let/ObjectPropertyDecr.php b/Library/Statements/Let/ObjectPropertyDecr.php index 34e5295da6..a03f052a93 100644 --- a/Library/Statements/Let/ObjectPropertyDecr.php +++ b/Library/Statements/Let/ObjectPropertyDecr.php @@ -100,6 +100,6 @@ public function assign($variable, $property, ZephirVariable $symbolVariable, Com } $compilationContext->headersManager->add('kernel/object'); - $compilationContext->codePrinter->output('RETURN_ON_FAILURE(zephir_property_decr('.$symbolVariable->getName().', SL("'.$property.'") TSRMLS_CC));'); + $compilationContext->codePrinter->output('RETURN_ON_FAILURE(zephir_property_decr('.$symbolVariable->getName().', SL("'.$property.'")));'); } } diff --git a/Library/Statements/Let/ObjectPropertyIncr.php b/Library/Statements/Let/ObjectPropertyIncr.php index dfa1e7eabc..08c0efa7e4 100644 --- a/Library/Statements/Let/ObjectPropertyIncr.php +++ b/Library/Statements/Let/ObjectPropertyIncr.php @@ -100,6 +100,6 @@ public function assign($variable, $property, ZephirVariable $symbolVariable, Com } $compilationContext->headersManager->add('kernel/object'); - $compilationContext->codePrinter->output('RETURN_ON_FAILURE(zephir_property_incr('.$symbolVariable->getName().', SL("'.$property.'") TSRMLS_CC));'); + $compilationContext->codePrinter->output('RETURN_ON_FAILURE(zephir_property_incr('.$symbolVariable->getName().', SL("'.$property.'")));'); } } diff --git a/Library/Statements/Let/StaticProperty.php b/Library/Statements/Let/StaticProperty.php index 817f001c7a..01495e2763 100644 --- a/Library/Statements/Let/StaticProperty.php +++ b/Library/Statements/Let/StaticProperty.php @@ -196,7 +196,7 @@ public function assignStatic($className, $property, CompiledExpression $resolved $propertyCache = $compilationContext->symbolTable->getTempVariableForWrite('zend_property_info', $compilationContext); $propertyCache->setMustInitNull(true); $propertyCache->setReusable(false); - $codePrinter->output('zephir_update_static_property_ce_cache('.$classEntry.', SL("'.$property.'"), &'.$tempVariable->getName().', &'.$propertyCache->getName().' TSRMLS_CC);'); + $codePrinter->output('zephir_update_static_property_ce_cache('.$classEntry.', SL("'.$property.'"), &'.$tempVariable->getName().', &'.$propertyCache->getName().');'); } else { $compilationContext->backend->updateStaticProperty($classEntry, $property, $tempVariable, $compilationContext); } @@ -212,7 +212,7 @@ public function assignStatic($className, $property, CompiledExpression $resolved $propertyCache = $compilationContext->symbolTable->getTempVariableForWrite('zend_property_info', $compilationContext); $propertyCache->setMustInitNull(true); $propertyCache->setReusable(false); - $codePrinter->output('zephir_update_static_property_ce_cache('.$classEntry.', SL("'.$property.'"), &'.$tempVariable->getName().', &'.$propertyCache->getName().' TSRMLS_CC);'); + $codePrinter->output('zephir_update_static_property_ce_cache('.$classEntry.', SL("'.$property.'"), &'.$tempVariable->getName().', &'.$propertyCache->getName().');'); } else { $compilationContext->backend->updateStaticProperty($classEntry, $property, $tempVariable, $compilationContext); } diff --git a/Library/Statements/Let/Variable.php b/Library/Statements/Let/Variable.php index 17fe7e3738..df36d99aa8 100644 --- a/Library/Statements/Let/Variable.php +++ b/Library/Statements/Let/Variable.php @@ -573,7 +573,7 @@ private function doStringAssignment( $compilationContext->backend->assignString($symbolVariable, $resolvedExpr->getCode(), $compilationContext); break; case 'concat-assign': - $codePrinter->output('zephir_concat_self_str(&'.$variable.', "'.$resolvedExpr->getCode().'", sizeof("'.$resolvedExpr->getCode().'")-1 TSRMLS_CC);'); + $codePrinter->output('zephir_concat_self_str(&'.$variable.', "'.$resolvedExpr->getCode().'", sizeof("'.$resolvedExpr->getCode().'") - 1);'); break; default: throw new IllegalOperationException($statement, $resolvedExpr); @@ -591,7 +591,7 @@ private function doStringAssignment( } break; case 'concat-assign': - $codePrinter->output('zephir_concat_self_str(&'.$variable.', "'.$resolvedExpr->getCode().'", sizeof("'.$resolvedExpr->getCode().'")-1 TSRMLS_CC);'); + $codePrinter->output('zephir_concat_self_str(&'.$variable.', "'.$resolvedExpr->getCode().'", sizeof("'.$resolvedExpr->getCode().'") - 1);'); break; default: throw new IllegalOperationException($statement, $resolvedExpr); @@ -612,7 +612,7 @@ private function doStringAssignment( case 'concat-assign': $compilationContext->headersManager->add('kernel/operators'); - $codePrinter->output('zephir_concat_self_str(&'.$variable.', "'.$resolvedExpr->getCode().'", sizeof("'.$resolvedExpr->getCode().'")-1 TSRMLS_CC);'); + $codePrinter->output('zephir_concat_self_str(&'.$variable.', "'.$resolvedExpr->getCode().'", sizeof("'.$resolvedExpr->getCode().'") - 1);'); break; default: @@ -637,7 +637,7 @@ private function doStringAssignment( case 'concat-assign': $compilationContext->headersManager->add('kernel/operators'); - $codePrinter->output('zephir_concat_self_long(&'.$variable.', '.$itemVariable->getName().' TSRMLS_CC);'); + $codePrinter->output('zephir_concat_self_long(&'.$variable.', '.$itemVariable->getName().');'); break; default: @@ -657,7 +657,7 @@ private function doStringAssignment( case 'concat-assign': $compilationContext->headersManager->add('kernel/operators'); - $codePrinter->output('zephir_concat_self_char(&'.$variable.', '.$itemVariable->getName().' TSRMLS_CC);'); + $codePrinter->output('zephir_concat_self_char(&'.$variable.', '.$itemVariable->getName().');'); break; default: @@ -1101,7 +1101,7 @@ private function doVariableAssignment( case 'concat-assign': $compilationContext->headersManager->add('kernel/operators'); - $codePrinter->output('zephir_concat_self_str(&'.$variable.', SL("'.$resolvedExpr->getCode().'") TSRMLS_CC);'); + $codePrinter->output('zephir_concat_self_str(&'.$variable.', SL("'.$resolvedExpr->getCode().'"));'); break; default: diff --git a/Library/Statements/ThrowStatement.php b/Library/Statements/ThrowStatement.php index 7ac56b8958..4697c14777 100644 --- a/Library/Statements/ThrowStatement.php +++ b/Library/Statements/ThrowStatement.php @@ -127,7 +127,7 @@ public function compile(CompilationContext $compilationContext) $line = $statement['expr']['line']; $codePrinter->output( - 'zephir_throw_exception_debug('.$variableCode.', "'.$file.'", '.$line.' TSRMLS_CC);' + 'zephir_throw_exception_debug('.$variableCode.', "'.$file.'", '.$line.');' ); if (!$compilationContext->insideTryCatch) { diff --git a/Library/Statements/UnsetStatement.php b/Library/Statements/UnsetStatement.php index 7a94cfab01..76bc1d374a 100644 --- a/Library/Statements/UnsetStatement.php +++ b/Library/Statements/UnsetStatement.php @@ -56,7 +56,7 @@ public function compile(CompilationContext $compilationContext) $variableCode = $compilationContext->backend->getVariableCode($variable); $compilationContext->headersManager->add('kernel/object'); - $compilationContext->codePrinter->output('zephir_unset_property('.$variableCode.', "'.$expression['right']['value'].'" TSRMLS_CC);'); + $compilationContext->codePrinter->output('zephir_unset_property('.$variableCode.', "'.$expression['right']['value'].'");'); return true; diff --git a/Library/StaticCall.php b/Library/StaticCall.php index 8241c17df0..d762fc76ad 100644 --- a/Library/StaticCall.php +++ b/Library/StaticCall.php @@ -571,7 +571,13 @@ protected function callFromDynamicClass($methodName, array $expression, $symbolV $compilationContext->headersManager->add('kernel/object'); $classEntryVariable = $compilationContext->symbolTable->addTemp('zend_class_entry', $compilationContext); - $codePrinter->output($classEntryVariable->getName().' = zephir_fetch_class('.$compilationContext->backend->getVariableCode($classNameVariable).' TSRMLS_CC);'); + $codePrinter->output( + sprintf( + '%s = zephir_fetch_class(%s);', + $classEntryVariable->getName(), + $compilationContext->backend->getVariableCode($classNameVariable) + ) + ); $classEntry = $classEntryVariable->getName(); if ($symbolVariable) { @@ -653,7 +659,13 @@ protected function callFromDynamicClassDynamicMethod(array $expression, $symbolV $classEntryVariable = $compilationContext->symbolTable->addTemp('zend_class_entry', $compilationContext); - $codePrinter->output($classEntryVariable->getName().' = zephir_fetch_class('.$compilationContext->backend->getVariableCode($classNameVariable).' TSRMLS_CC);'); + $codePrinter->output( + sprintf( + '%s = zephir_fetch_class(%s);', + $classEntryVariable->getName(), + $compilationContext->backend->getVariableCode($classNameVariable) + ) + ); $classEntry = $classEntryVariable->getName(); diff --git a/Library/Stubs/Generator.php b/Library/Stubs/Generator.php index 8fe7ad075c..a9a2232b8b 100644 --- a/Library/Stubs/Generator.php +++ b/Library/Stubs/Generator.php @@ -244,7 +244,7 @@ protected function buildConstant(ClassConstant $constant, $indent) * * @return string */ - protected function buildMethod(ClassMethod $method, $isInterface, $indent) + protected function buildMethod(ClassMethod $method, bool $isInterface, string $indent): string { $modifier = implode(' ', array_diff($method->getVisibility(), $this->ignoreModifiers)); @@ -289,16 +289,15 @@ protected function buildMethod(ClassMethod $method, $isInterface, $indent) } $return = ''; - if (version_compare(PHP_VERSION, '7.0.0', '>=') && ($method->hasReturnTypes() || $method->isVoid())) { + /** + * TODO: Add $method->isVoid() check after removing PHP 7.0 support. + * + * @see https://github.com/phalcon/zephir/issues/1977 + * @see https://github.com/phalcon/zephir/pull/1978 + */ + if (version_compare(PHP_VERSION, '7.0.0', '>=') && $method->hasReturnTypes()) { $supported = 0; - if ($method->isVoid()) { - if (version_compare(PHP_VERSION, '7.1.0', '>=')) { - $return = 'void'; - ++$supported; - } - } - if (\array_key_exists('object', $method->getReturnTypes()) && 1 == \count($method->getReturnClassTypes())) { $return = key($method->getReturnClassTypes()); ++$supported; @@ -348,10 +347,10 @@ protected function buildMethod(ClassMethod $method, $isInterface, $indent) if ($isInterface || $method->isAbstract()) { $methodBody .= ';'; } else { - $methodBody .= ' {}'; + $methodBody .= PHP_EOL.$indent.'{'.PHP_EOL.$indent.'}'; } - return $docBlock."\n".$methodBody; + return $docBlock->processMethodDocBlock().PHP_EOL.$methodBody; } /** diff --git a/Library/Stubs/MethodDocBlock.php b/Library/Stubs/MethodDocBlock.php index 4df860dacc..539c5e9b3e 100644 --- a/Library/Stubs/MethodDocBlock.php +++ b/Library/Stubs/MethodDocBlock.php @@ -23,6 +23,9 @@ class MethodDocBlock extends DocBlock { private $parameters = []; + /** Parameters which are described by User into docblock */ + private $predefinedParams = []; + private $return; private $shortcutName = ''; @@ -34,6 +37,9 @@ class MethodDocBlock extends DocBlock */ private $aliasManager; + /** @var ClassMethod */ + private $classMethod; + public function __construct(ClassMethod $method, AliasManager $aliasManager, $indent = ' ') { parent::__construct($method->getDocBlock(), $indent); @@ -41,15 +47,26 @@ public function __construct(ClassMethod $method, AliasManager $aliasManager, $in $this->deprecated = $method->isDeprecated(); $this->aliasManager = $aliasManager; $this->shortcutName = $method->isShortcut() ? $method->getShortcutName() : ''; + $this->classMethod = $method; + } - $this->parseMethodParameters($method); + /** + * Process DocBlock and Method arguments. + * + * @return string + */ + public function processMethodDocBlock() + { + $this->parseMethodParameters($this->classMethod); $this->parseLines(); - $this->parseMethodReturnType($method); + $this->parseMethodReturnType($this->classMethod); $this->appendParametersLines(); if (!empty($this->return)) { $this->appendReturnLine(); } + + return $this->__toString(); } protected function parseMethodReturnType(ClassMethod $method) @@ -102,45 +119,79 @@ protected function parseMethodReturnType(ClassMethod $method) } } + /** + * Parse DocBlock and returns extracted groups. + */ + protected function parseDocBlockParam(string $line): array + { + $pattern = '~ + @(?Pparam|return|var)\s+ + (?P[\\\\\w]+(:?\s*\|\s*[\\\\\w]+)*)\s* + (?P\$)? + (?P[a-z_][a-z0-9_]*)?\s* + (?P(.|\s)*)? + ~xi'; + + preg_match($pattern, $line, $matched); + + return $matched; + } + protected function parseLines() { $lines = []; foreach ($this->lines as $line) { - if (0 === preg_match('#^@(param|return|var) +(.*)$#', $line, $matches)) { - $lines[] = $line; - } else { - list(, $docType, $tokens) = $matches; + $parsedLine = $this->parseDocBlockParam($line); + $docType = $parsedLine['doctype'] ?? null; - $tokens = preg_split('/\s+/', $tokens, 3); - $type = $tokens[0]; + $dollar = $parsedLine['dollar'] ?? ''; + $identifier = $parsedLine['name'] ?? false; + $description = $parsedLine['description'] ?? ''; + $type = $parsedLine['type'] ?? ''; - if ('var' == $docType && 'set' == $this->shortcutName) { - $docType = 'param'; - $name = array_keys($this->parameters); - $name = $name[0]; - } elseif ('var' == $docType && 'get' == $this->shortcutName) { - $docType = 'return'; - } else { - $name = isset($tokens[1]) ? '$'.trim($tokens[1], '$') : ''; - } + // remember docblock @param to avoid param duplication when parse input args + if ($identifier) { + $this->predefinedParams[$identifier] = true; + } - // TODO: there must be a better way - if (0 === strpos($type, 'Phalcon\\')) { - $type = str_replace('Phalcon\\', '\Phalcon\\', $type); - } + // remember docblock @return to avoid duplication + // also replace @var to @mixed for PHP docblock + if ('return' === $docType) { + $this->predefinedParams['return'] = true; + + $mixed = str_replace('var', 'mixed', $type); + $line = str_replace($type, $mixed, $line); + } - $description = isset($tokens[2]) ? $tokens[2] : ''; + if ('$' !== $dollar && $identifier && 'return' !== $docType) { + $line = '@'.$docType.' '.trim($type).' $'.trim($identifier.' '.$description); + } - switch ($docType) { - case 'param': - $this->parameters[$name] = [$type, $description]; - break; - case 'return': - $this->return = [$type, $description]; - break; - } + if ('var' === $docType) { + $line = str_replace('@var', '@param', $line); } + + if ('var' == $docType && 'set' == $this->shortcutName) { + $docType = 'param'; + $name = array_keys($this->parameters); + $name = $name[0]; + } elseif ('var' == $docType && 'get' == $this->shortcutName) { + $docType = 'return'; + } else { + $name = $identifier ? '$'.trim($identifier, '$') : ''; + } + + switch ($docType) { + case 'param': + $this->parameters[$name] = [$type, $description]; + break; + case 'return': + $this->return = [$type, $description]; + break; + } + + $lines[] = $line; } $this->lines = $lines; @@ -148,10 +199,12 @@ protected function parseLines() private function appendReturnLine() { - list($type, $description) = $this->return; + if (!isset($this->predefinedParams['return'])) { + list($type, $description) = $this->return; - $return = $type.' '.$description; - $this->lines[] = '@return '.trim($return, ' '); + $return = $type.' '.$description; + $this->lines[] = '@return '.trim($return, ' '); + } } private function parseMethodParameters(ClassMethod $method) @@ -186,10 +239,12 @@ private function parseMethodParameters(ClassMethod $method) private function appendParametersLines() { foreach ($this->parameters as $name => $parameter) { - list($type, $description) = $parameter; + if (!isset($this->predefinedParams[trim($name, '$')])) { + list($type, $description) = $parameter; - $param = $type.' '.$name.' '.$description; - $this->lines[] = '@param '.trim($param, ' '); + $param = $type.' '.$name.' '.$description; + $this->lines[] = '@param '.trim($param, ' '); + } } if ($this->deprecated) { diff --git a/Library/Zephir.php b/Library/Zephir.php index 7bfc7080cd..4a224384e8 100644 --- a/Library/Zephir.php +++ b/Library/Zephir.php @@ -16,7 +16,7 @@ */ final class Zephir { - const VERSION = '0.12.9-$Id$'; + const VERSION = '0.12.10-$Id$'; const LOGO = <<<'ASCII' _____ __ _ diff --git a/Library/bootstrap.php b/Library/bootstrap.php index ffd2acfa66..15ccdb41b9 100644 --- a/Library/bootstrap.php +++ b/Library/bootstrap.php @@ -11,6 +11,13 @@ namespace Zephir; +if (\PHP_VERSION_ID >= 70300) { + // See: https://github.com/zendframework/zend-code/issues/160 + // At this time we cannot bump the version. + // TODO: Remove this code after drop PHP 7.0 support + error_reporting(E_ALL & ~E_WARNING); +} + set_error_handler( static function ($code, $message, $file = '', $line = -1) { if (error_reporting() & $code) { @@ -19,7 +26,7 @@ static function ($code, $message, $file = '', $line = -1) { } ); -if (!\in_array(getenv('ZEPHIR_DEBUG'), ['true', 'TRUE', '1', 'on', 'ON'], true)) { +if (filter_var(getenv('ZEPHIR_DEBUG'), FILTER_VALIDATE_BOOLEAN)) { set_exception_handler( static function (\Throwable $t) { fwrite(STDERR, "[ERROR] {$t->getMessage()}".PHP_EOL); diff --git a/appveyor.yml b/appveyor.yml index 5b98574ec2..d3d78c8611 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -version: 0.12.9-{build} +version: 0.12.10-{build} environment: matrix: @@ -18,8 +18,8 @@ environment: NO_INTERACTION: 1 REPORT_EXIT_STATUS: 1 COMPOSER_NO_INTERACTION: 1 - PARSER_VERSION: 1.3.0 - PARSER_RELEASE: 476 + PARSER_VERSION: 1.3.2 + PARSER_RELEASE: 505 PSR_VERSION: 0.6.1 matrix: diff --git a/box.json.dist b/box.json.dist index 3150129874..423e3d6da0 100644 --- a/box.json.dist +++ b/box.json.dist @@ -47,16 +47,24 @@ "README", "Tests", "behat", + "ext", "bin", "build", "doc", "docs", + "doc-template", "fixtures", "test", - "tests" + "tests", + "test_old", + "vendor-bin" ] } ], + "compression": "GZ", + "compactors": [ + "KevinGH\\Box\\Compactor\\Php" + ], "replacement-sigil": "$", "git-commit-short": "Id" } diff --git a/composer.json b/composer.json index a0c52f83c4..749b27faa4 100644 --- a/composer.json +++ b/composer.json @@ -29,6 +29,7 @@ "ext-mbstring": "*", "ext-pcre": "*", "ext-xml": "*", + "ext-zlib": "*", "ocramius/proxy-manager": "2.0.4", "oneup/flysystem-bundle": "^1.14 || ^3.0", "symfony/cache": "3.4.*", diff --git a/ext/config.m4 b/ext/config.m4 index bccd6f23a9..8075ac8ce2 100644 --- a/ext/config.m4 +++ b/ext/config.m4 @@ -73,6 +73,7 @@ if test "$PHP_TEST" = "yes"; then test/globals.zep.c test/globals/env.zep.c test/globals/post.zep.c + test/globals/server.zep.c test/globals/serverrequestfactory.zep.c test/globals/session/child.zep.c test/instance.zep.c diff --git a/ext/config.w32 b/ext/config.w32 index 34662a7f19..b37269ec67 100644 --- a/ext/config.w32 +++ b/ext/config.w32 @@ -22,7 +22,7 @@ if (PHP_TEST != "no") { ADD_SOURCES(configure_module_dirname + "/test/bench", "foo.zep.c", "test"); ADD_SOURCES(configure_module_dirname + "/test/builtin", "arraymethods.zep.c charmethods.zep.c intmethods.zep.c stringmethods.zep.c", "test"); ADD_SOURCES(configure_module_dirname + "/test/flow", "switchflow.zep.c", "test"); - ADD_SOURCES(configure_module_dirname + "/test/globals", "env.zep.c post.zep.c serverrequestfactory.zep.c", "test"); + ADD_SOURCES(configure_module_dirname + "/test/globals", "env.zep.c post.zep.c server.zep.c serverrequestfactory.zep.c", "test"); ADD_SOURCES(configure_module_dirname + "/test/integration/psr/http/message", "messageinterfaceex.zep.c", "test"); ADD_SOURCES(configure_module_dirname + "/test/mcall", "caller.zep.c", "test"); ADD_SOURCES(configure_module_dirname + "/test/oo/extend/db/query/placeholder", "exception.zep.c", "test"); diff --git a/ext/kernel/fcall_internal.h b/ext/kernel/fcall_internal.h index 89597caf11..55cabb753f 100644 --- a/ext/kernel/fcall_internal.h +++ b/ext/kernel/fcall_internal.h @@ -1,34 +1,40 @@ +/* + * This file was generated automatically by Zephir. + * DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN + */ + #ifndef ZEPHIR_KERNEL_FCALL_INTERNAL_H #define ZEPHIR_KERNEL_FCALL_INTERNAL_H - #define ZEPHIR_CALL_INTERNAL_METHOD_P0(return_value_ptr, object, method) \ - do { \ - ZEPHIR_BACKUP_SCOPE(); \ - ZEPHIR_BACKUP_THIS_PTR(); \ - ZEPHIR_SET_THIS(object); \ - ZEPHIR_SET_SCOPE((Z_OBJ_P(object) ? Z_OBJCE_P(object) : NULL), (Z_OBJ_P(object) ? Z_OBJCE_P(object) : NULL)); \ - ZEPHIR_INIT_NVAR((return_value_ptr)); \ - method(0, return_value_ptr, object, 1); \ - ZEPHIR_LAST_CALL_STATUS = EG(exception) ? FAILURE : SUCCESS; \ - ZEPHIR_RESTORE_THIS_PTR(); \ - ZEPHIR_RESTORE_SCOPE(); \ - } while (0) - - #define ZEPHIR_CALL_INTERNAL_METHOD_P2(return_value_ptr, object, method, p0, p1) \ - do { \ - ZEPHIR_BACKUP_SCOPE(); \ - ZEPHIR_BACKUP_THIS_PTR(); \ - ZEPHIR_SET_THIS(object); \ - ZEPHIR_SET_SCOPE((Z_OBJ_P(object) ? Z_OBJCE_P(object) : NULL), (Z_OBJ_P(object) ? Z_OBJCE_P(object) : NULL)); \ - zval _p0, _p1; \ - ZEPHIR_INIT_NVAR((return_value_ptr)); \ - ZVAL_COPY(&_p0, p0); \ - ZVAL_COPY(&_p1, p1); \ - method(0, return_value_ptr, object, 1, &_p0, &_p1); \ - Z_TRY_DELREF_P(p0); \ - Z_TRY_DELREF_P(p1); \ - ZEPHIR_LAST_CALL_STATUS = EG(exception) ? FAILURE : SUCCESS; \ - ZEPHIR_RESTORE_THIS_PTR(); \ - ZEPHIR_RESTORE_SCOPE(); \ - } while (0) - + +#define ZEPHIR_CALL_INTERNAL_METHOD_P0(return_value_ptr, object, method) \ + do { \ + ZEPHIR_BACKUP_SCOPE(); \ + ZEPHIR_BACKUP_THIS_PTR(); \ + ZEPHIR_SET_THIS(object); \ + ZEPHIR_SET_SCOPE((Z_OBJ_P(object) ? Z_OBJCE_P(object) : NULL), (Z_OBJ_P(object) ? Z_OBJCE_P(object) : NULL)); \ + ZEPHIR_INIT_NVAR((return_value_ptr)); \ + method(0, return_value_ptr, object, 1); \ + ZEPHIR_LAST_CALL_STATUS = EG(exception) ? FAILURE : SUCCESS; \ + ZEPHIR_RESTORE_THIS_PTR(); \ + ZEPHIR_RESTORE_SCOPE(); \ + } while (0) + +#define ZEPHIR_CALL_INTERNAL_METHOD_P2(return_value_ptr, object, method, p0, p1) \ + do { \ + ZEPHIR_BACKUP_SCOPE(); \ + ZEPHIR_BACKUP_THIS_PTR(); \ + ZEPHIR_SET_THIS(object); \ + ZEPHIR_SET_SCOPE((Z_OBJ_P(object) ? Z_OBJCE_P(object) : NULL), (Z_OBJ_P(object) ? Z_OBJCE_P(object) : NULL)); \ + zval _p0, _p1; \ + ZEPHIR_INIT_NVAR((return_value_ptr)); \ + ZVAL_COPY(&_p0, p0); \ + ZVAL_COPY(&_p1, p1); \ + method(0, return_value_ptr, object, 1, &_p0, &_p1); \ + Z_TRY_DELREF_P(p0); \ + Z_TRY_DELREF_P(p1); \ + ZEPHIR_LAST_CALL_STATUS = EG(exception) ? FAILURE : SUCCESS; \ + ZEPHIR_RESTORE_THIS_PTR(); \ + ZEPHIR_RESTORE_SCOPE(); \ + } while (0) + #endif diff --git a/ext/kernel/main.c b/ext/kernel/main.c index 8c27575fa2..ceee5b0e7f 100644 --- a/ext/kernel/main.c +++ b/ext/kernel/main.c @@ -100,11 +100,12 @@ int zephir_get_global(zval *arr, const char *global, unsigned int global_length) if ((gv = zend_hash_find_ind(&EG(symbol_table), str)) != NULL) { ZVAL_DEREF(gv); if (Z_TYPE_P(gv) == IS_ARRAY) { - ZVAL_DUP(arr, gv); - zend_hash_update(&EG(symbol_table), str, arr); - - // See: https://github.com/phalcon/zephir/pull/1965#issuecomment-541299003 - // ZVAL_COPY_VALUE(arr, gv); + if (Z_REFCOUNTED_P(gv) && Z_REFCOUNT_P(gv) <= 1) { + ZVAL_COPY_VALUE(arr, gv); + } else { + ZVAL_DUP(arr, gv); + zend_hash_update(&EG(symbol_table), str, arr); + } zend_string_release(str); return SUCCESS; diff --git a/ext/php_test.h b/ext/php_test.h index 7464dc1c05..abeab6d456 100644 --- a/ext/php_test.h +++ b/ext/php_test.h @@ -14,7 +14,7 @@ #define PHP_TEST_VERSION "1.0.0" #define PHP_TEST_EXTNAME "test" #define PHP_TEST_AUTHOR "Zephir Team and contributors" -#define PHP_TEST_ZEPVERSION "0.12.9-$Id$" +#define PHP_TEST_ZEPVERSION "0.12.10-$Id$" #define PHP_TEST_DESCRIPTION "Description test for
Test Extension." typedef struct _zephir_struct_db { diff --git a/ext/test.c b/ext/test.c index 1872ee6df7..5637bd4717 100644 --- a/ext/test.c +++ b/ext/test.c @@ -102,6 +102,7 @@ zend_class_entry *test_geometry_ce; zend_class_entry *test_globals_ce; zend_class_entry *test_globals_env_ce; zend_class_entry *test_globals_post_ce; +zend_class_entry *test_globals_server_ce; zend_class_entry *test_globals_serverrequestfactory_ce; zend_class_entry *test_globals_session_child_ce; zend_class_entry *test_instance_ce; @@ -296,6 +297,7 @@ static PHP_MINIT_FUNCTION(test) ZEPHIR_INIT(Test_Globals); ZEPHIR_INIT(Test_Globals_Env); ZEPHIR_INIT(Test_Globals_Post); + ZEPHIR_INIT(Test_Globals_Server); ZEPHIR_INIT(Test_Globals_ServerRequestFactory); ZEPHIR_INIT(Test_Globals_Session_Child); ZEPHIR_INIT(Test_Instance); @@ -480,8 +482,8 @@ static PHP_RINIT_FUNCTION(test) #endif test_globals_ptr = ZEPHIR_VGLOBAL; - php_zephir_init_globals(test_globals_ptr TSRMLS_CC); - zephir_initialize_memory(test_globals_ptr TSRMLS_CC); + php_zephir_init_globals(test_globals_ptr); + zephir_initialize_memory(test_globals_ptr); zephir_init_static_properties_Test_Properties_StaticPropertyArray(TSRMLS_C); @@ -526,8 +528,8 @@ static PHP_MINFO_FUNCTION(test) static PHP_GINIT_FUNCTION(test) { - php_zephir_init_globals(test_globals TSRMLS_CC); - php_zephir_init_module_globals(test_globals TSRMLS_CC); + php_zephir_init_globals(test_globals); + php_zephir_init_module_globals(test_globals); } static PHP_GSHUTDOWN_FUNCTION(test) diff --git a/ext/test.h b/ext/test.h index abe6d9ca50..c624dc9fc3 100644 --- a/ext/test.h +++ b/ext/test.h @@ -68,6 +68,7 @@ #include "test/globals.zep.h" #include "test/globals/env.zep.h" #include "test/globals/post.zep.h" +#include "test/globals/server.zep.h" #include "test/globals/serverrequestfactory.zep.h" #include "test/globals/session/child.zep.h" #include "test/instance.zep.h" diff --git a/ext/test/10__closure.zep.c b/ext/test/10__closure.zep.c index 337f5eb6c4..b7a20f9ae2 100644 --- a/ext/test/10__closure.zep.c +++ b/ext/test/10__closure.zep.c @@ -36,7 +36,7 @@ PHP_METHOD(test_10__closure, __invoke) { - mul_function(return_value, x, x TSRMLS_CC); + mul_function(return_value, x, x); return; } diff --git a/ext/test/8__closure.zep.c b/ext/test/8__closure.zep.c index 54b00a3f81..c8a9445ade 100644 --- a/ext/test/8__closure.zep.c +++ b/ext/test/8__closure.zep.c @@ -20,7 +20,7 @@ ZEPHIR_INIT_CLASS(test_8__closure) { ZEPHIR_REGISTER_CLASS(test, 8__closure, test, 8__closure, test_8__closure_method_entry, ZEND_ACC_FINAL_CLASS); - zend_declare_property_null(test_8__closure_ce, SL("abc"), ZEND_ACC_PUBLIC|ZEND_ACC_STATIC TSRMLS_CC); + zend_declare_property_null(test_8__closure_ce, SL("abc"), ZEND_ACC_PUBLIC|ZEND_ACC_STATIC); return SUCCESS; diff --git a/ext/test/9__closure.zep.c b/ext/test/9__closure.zep.c index 3dd5ea2d6b..a2a5b80c61 100644 --- a/ext/test/9__closure.zep.c +++ b/ext/test/9__closure.zep.c @@ -20,7 +20,7 @@ ZEPHIR_INIT_CLASS(test_9__closure) { ZEPHIR_REGISTER_CLASS(test, 9__closure, test, 9__closure, test_9__closure_method_entry, ZEND_ACC_FINAL_CLASS); - zend_declare_property_null(test_9__closure_ce, SL("abc"), ZEND_ACC_PUBLIC|ZEND_ACC_STATIC TSRMLS_CC); + zend_declare_property_null(test_9__closure_ce, SL("abc"), ZEND_ACC_PUBLIC|ZEND_ACC_STATIC); return SUCCESS; @@ -36,7 +36,7 @@ PHP_METHOD(test_9__closure, __invoke) { zephir_read_static_property_ce(&abc, test_9__closure_ce, SL("abc"), PH_NOISY_CC); - zephir_array_fetch_string(&_0, &abc, SL("a"), PH_NOISY | PH_READONLY, "test/closures.zep", 63 TSRMLS_CC); + zephir_array_fetch_string(&_0, &abc, SL("a"), PH_NOISY | PH_READONLY, "test/closures.zep", 63); RETURN_CTORW(&_0); } diff --git a/ext/test/arithmetic.zep.c b/ext/test/arithmetic.zep.c index 2dbf5be615..3521cfe56d 100644 --- a/ext/test/arithmetic.zep.c +++ b/ext/test/arithmetic.zep.c @@ -25,7 +25,7 @@ ZEPHIR_INIT_CLASS(Test_Arithmetic) { ZEPHIR_REGISTER_CLASS(Test, Arithmetic, test, arithmetic, test_arithmetic_method_entry, 0); - zend_declare_property_long(test_arithmetic_ce, SL("tmp1"), 100, ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_long(test_arithmetic_ce, SL("tmp1"), 100, ZEND_ACC_PROTECTED); return SUCCESS; @@ -2345,7 +2345,7 @@ PHP_METHOD(Test_Arithmetic, letStatementBoolMinus) { - zephir_negate(b TSRMLS_CC); + zephir_negate(b); a = zephir_is_true(b); RETURN_BOOL(a); @@ -2365,7 +2365,7 @@ PHP_METHOD(Test_Arithmetic, letStatementVarMinus) { - zephir_negate(b TSRMLS_CC); + zephir_negate(b); ZEPHIR_CPY_WRT(&a, b); RETURN_CCTOR(&a); @@ -2379,7 +2379,7 @@ PHP_METHOD(Test_Arithmetic, div1) { a = 100; - RETURN_DOUBLE(zephir_safe_div_long_long(((a - 1)), 4 TSRMLS_CC)); + RETURN_DOUBLE(zephir_safe_div_long_long(((a - 1)), 4)); } @@ -2392,7 +2392,7 @@ PHP_METHOD(Test_Arithmetic, div2) { zephir_read_property(&_0, this_ptr, SL("tmp1"), PH_NOISY_CC | PH_READONLY); - RETURN_DOUBLE(zephir_safe_div_long_long(((zephir_get_numberval(&_0) - 1)), 4 TSRMLS_CC)); + RETURN_DOUBLE(zephir_safe_div_long_long(((zephir_get_numberval(&_0) - 1)), 4)); } diff --git a/ext/test/arrayaccessobj.zep.c b/ext/test/arrayaccessobj.zep.c index df44a91c9e..db87ac4969 100644 --- a/ext/test/arrayaccessobj.zep.c +++ b/ext/test/arrayaccessobj.zep.c @@ -21,9 +21,9 @@ ZEPHIR_INIT_CLASS(Test_ArrayAccessObj) { ZEPHIR_REGISTER_CLASS(Test, ArrayAccessObj, test, arrayaccessobj, test_arrayaccessobj_method_entry, 0); - zend_declare_property_null(test_arrayaccessobj_ce, SL("test"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_arrayaccessobj_ce, SL("test"), ZEND_ACC_PROTECTED); - zend_class_implements(test_arrayaccessobj_ce TSRMLS_CC, 1, zend_ce_arrayaccess); + zend_class_implements(test_arrayaccessobj_ce, 1, zend_ce_arrayaccess); return SUCCESS; } @@ -39,7 +39,7 @@ PHP_METHOD(Test_ArrayAccessObj, __construct) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&_0); - zephir_create_array(&_0, 3, 0 TSRMLS_CC); + zephir_create_array(&_0, 3, 0); add_assoc_long_ex(&_0, SL("one"), 1); add_assoc_long_ex(&_0, SL("two"), 2); add_assoc_long_ex(&_0, SL("three"), 3); @@ -122,7 +122,7 @@ PHP_METHOD(Test_ArrayAccessObj, offsetGet) { zephir_read_property(&_1, this_ptr, SL("test"), PH_NOISY_CC | PH_READONLY); if (zephir_array_isset(&_1, offset)) { zephir_read_property(&_2, this_ptr, SL("test"), PH_NOISY_CC | PH_READONLY); - zephir_array_fetch(&_0, &_2, offset, PH_NOISY, "test/arrayaccessobj.zep", 33 TSRMLS_CC); + zephir_array_fetch(&_0, &_2, offset, PH_NOISY, "test/arrayaccessobj.zep", 33); } else { ZVAL_NULL(&_0); } diff --git a/ext/test/arrayaccesstest.zep.c b/ext/test/arrayaccesstest.zep.c index 916b267c5d..0081f96618 100644 --- a/ext/test/arrayaccesstest.zep.c +++ b/ext/test/arrayaccesstest.zep.c @@ -61,7 +61,7 @@ PHP_METHOD(Test_ArrayAccessTest, get) { object_init_ex(&arr, test_arrayaccessobj_ce); ZEPHIR_CALL_METHOD(NULL, &arr, "__construct", NULL, 3); zephir_check_call_status(); - zephir_array_fetch_string(&_0, &arr, SL("two"), PH_NOISY | PH_READONLY, "test/arrayaccesstest.zep", 18 TSRMLS_CC); + zephir_array_fetch_string(&_0, &arr, SL("two"), PH_NOISY | PH_READONLY, "test/arrayaccesstest.zep", 18); RETURN_CTOR(&_0); } diff --git a/ext/test/arrayiterator.zep.c b/ext/test/arrayiterator.zep.c index d47cabd07e..a48ad9e412 100644 --- a/ext/test/arrayiterator.zep.c +++ b/ext/test/arrayiterator.zep.c @@ -21,11 +21,11 @@ ZEPHIR_INIT_CLASS(Test_ArrayIterator) { ZEPHIR_REGISTER_CLASS(Test, ArrayIterator, test, arrayiterator, test_arrayiterator_method_entry, 0); - zend_declare_property_long(test_arrayiterator_ce, SL("position"), 0, ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_long(test_arrayiterator_ce, SL("position"), 0, ZEND_ACC_PROTECTED); - zend_declare_property_null(test_arrayiterator_ce, SL("test"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_arrayiterator_ce, SL("test"), ZEND_ACC_PROTECTED); - zend_class_implements(test_arrayiterator_ce TSRMLS_CC, 1, zend_ce_iterator); + zend_class_implements(test_arrayiterator_ce, 1, zend_ce_iterator); return SUCCESS; } @@ -44,7 +44,7 @@ PHP_METHOD(Test_ArrayIterator, __construct) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&_0); - zephir_create_array(&_0, 3, 0 TSRMLS_CC); + zephir_create_array(&_0, 3, 0); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "one"); zephir_array_fast_append(&_0, &_1); @@ -91,7 +91,7 @@ PHP_METHOD(Test_ArrayIterator, current) { zephir_read_property(&_0, this_ptr, SL("test"), PH_NOISY_CC | PH_READONLY); ZEPHIR_OBS_VAR(&_2); zephir_read_property(&_2, this_ptr, SL("position"), PH_NOISY_CC); - zephir_array_fetch(&_1, &_0, &_2, PH_NOISY | PH_READONLY, "test/arrayiterator.zep", 22 TSRMLS_CC); + zephir_array_fetch(&_1, &_0, &_2, PH_NOISY | PH_READONLY, "test/arrayiterator.zep", 22); RETURN_CTOR(&_1); } @@ -110,7 +110,7 @@ PHP_METHOD(Test_ArrayIterator, next) { zval *this_ptr = getThis(); - RETURN_ON_FAILURE(zephir_property_incr(this_ptr, SL("position") TSRMLS_CC)); + RETURN_ON_FAILURE(zephir_property_incr(this_ptr, SL("position"))); } diff --git a/ext/test/arraysearch.zep.c b/ext/test/arraysearch.zep.c index 1f1114a16b..0c992cb2e1 100644 --- a/ext/test/arraysearch.zep.c +++ b/ext/test/arraysearch.zep.c @@ -75,7 +75,7 @@ PHP_METHOD(Test_ArraySearch, searchUsingArrayInsideZephir) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&itoA64); - zephir_create_array(&itoA64, 9, 0 TSRMLS_CC); + zephir_create_array(&itoA64, 9, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "."); zephir_array_fast_append(&itoA64, &_0); diff --git a/ext/test/assign.zep.c b/ext/test/assign.zep.c index 34a667aff8..a3cc6af289 100644 --- a/ext/test/assign.zep.c +++ b/ext/test/assign.zep.c @@ -25,11 +25,11 @@ ZEPHIR_INIT_CLASS(Test_Assign) { ZEPHIR_REGISTER_CLASS(Test, Assign, test, assign, test_assign_method_entry, 0); - zend_declare_property_null(test_assign_ce, SL("testVar"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_assign_ce, SL("testVar"), ZEND_ACC_PROTECTED); - zend_declare_property_null(test_assign_ce, SL("myArray"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_assign_ce, SL("myArray"), ZEND_ACC_PROTECTED); - zend_declare_property_null(test_assign_ce, SL("testVarStatic"), ZEND_ACC_PROTECTED|ZEND_ACC_STATIC TSRMLS_CC); + zend_declare_property_null(test_assign_ce, SL("testVarStatic"), ZEND_ACC_PROTECTED|ZEND_ACC_STATIC); return SUCCESS; @@ -537,9 +537,9 @@ PHP_METHOD(Test_Assign, testAssign37) { ZEPHIR_INIT_VAR(&arr); array_init(&arr); ZEPHIR_INIT_VAR(&_0); - zephir_create_array(&_0, 1, 0 TSRMLS_CC); + zephir_create_array(&_0, 1, 0); ZEPHIR_INIT_VAR(&_1); - zephir_create_array(&_1, 2, 0 TSRMLS_CC); + zephir_create_array(&_1, 2, 0); add_assoc_stringl_ex(&_1, SL("b_key"), SL("b_val")); ZEPHIR_INIT_VAR(&_2); array_init(&_2); @@ -548,24 +548,24 @@ PHP_METHOD(Test_Assign, testAssign37) { ZEPHIR_CPY_WRT(&arr, &_0); ZEPHIR_INIT_NVAR(&_2); ZVAL_STRING(&_2, "d_val"); - zephir_array_update_multi(&arr, &_2 TSRMLS_CC, SL("sss"), 6, SL("a"), SL("b"), SL("d_key")); + zephir_array_update_multi(&arr, &_2, SL("sss"), 6, SL("a"), SL("b"), SL("d_key")); ZEPHIR_INIT_NVAR(&_2); ZVAL_LONG(&_2, 1); zephir_array_update_string(&arr, SL("s"), &_2, PH_COPY | PH_SEPARATE); ZEPHIR_INIT_VAR(&_3); ZVAL_STRING(&_3, "f"); - zephir_array_update_multi(&arr, &_3 TSRMLS_CC, SL("sssss"), 10, SL("a"), SL("b"), SL("c"), SL("d"), SL("e")); + zephir_array_update_multi(&arr, &_3, SL("sssss"), 10, SL("a"), SL("b"), SL("c"), SL("d"), SL("e")); ZEPHIR_INIT_NVAR(&_1); - zephir_create_array(&_1, 1, 0 TSRMLS_CC); + zephir_create_array(&_1, 1, 0); ZEPHIR_INIT_VAR(&_4); - zephir_create_array(&_4, 1, 0 TSRMLS_CC); + zephir_create_array(&_4, 1, 0); add_index_long(&_4, 3, 4); zephir_array_update_long(&_1, 2, &_4, PH_COPY ZEPHIR_DEBUG_PARAMS_DUMMY); zephir_array_update_long(&arr, 1, &_1, PH_COPY | PH_SEPARATE ZEPHIR_DEBUG_PARAMS_DUMMY); ZEPHIR_INIT_NVAR(&_3); ZVAL_LONG(&_3, 6); - zephir_array_update_multi(&arr, &_3 TSRMLS_CC, SL("lll"), 3, 1, 2, 5); - zephir_array_update_multi(&arr, &v TSRMLS_CC, SL("llz"), 3, 1, 2, &v); + zephir_array_update_multi(&arr, &_3, SL("lll"), 3, 1, 2, 5); + zephir_array_update_multi(&arr, &v, SL("llz"), 3, 1, 2, &v); RETURN_CCTOR(&arr); } @@ -825,7 +825,7 @@ PHP_METHOD(Test_Assign, testPropertyIncr1) { ZEPHIR_INIT_ZVAL_NREF(_0); ZVAL_LONG(&_0, 1); zephir_update_property_zval(this_ptr, SL("testVar"), &_0); - RETURN_ON_FAILURE(zephir_property_incr(this_ptr, SL("testVar") TSRMLS_CC)); + RETURN_ON_FAILURE(zephir_property_incr(this_ptr, SL("testVar"))); RETURN_MEMBER(getThis(), "testVar"); } @@ -907,7 +907,7 @@ PHP_METHOD(Test_Assign, testPropertyDecr) { ZEPHIR_INIT_ZVAL_NREF(_0); ZVAL_LONG(&_0, 2); zephir_update_property_zval(this_ptr, SL("testVar"), &_0); - RETURN_ON_FAILURE(zephir_property_decr(this_ptr, SL("testVar") TSRMLS_CC)); + RETURN_ON_FAILURE(zephir_property_decr(this_ptr, SL("testVar"))); RETURN_MEMBER(getThis(), "testVar"); } @@ -1018,7 +1018,7 @@ PHP_METHOD(Test_Assign, testPropertyAssignStringConcat) { ZEPHIR_INIT_NVAR(&_0); ZVAL_STRING(&_0, "test"); zephir_update_property_zval(this_ptr, SL("testVar"), &_0); - zephir_concat_self_str(&_0, " string", sizeof(" string")-1 TSRMLS_CC); + zephir_concat_self_str(&_0, " string", sizeof(" string") - 1); zephir_update_property_zval(this_ptr, SL("testVar"), &_0); RETURN_MM_MEMBER(getThis(), "testVar"); @@ -1287,22 +1287,22 @@ PHP_METHOD(Test_Assign, testPropertyArray6) { zephir_update_property_zval(this_ptr, SL("myArray"), &_0); ZEPHIR_INIT_VAR(&_1); ZVAL_LONG(&_1, 1); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1 TSRMLS_CC, SL("ll"), 2, 0, 1); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1, SL("ll"), 2, 0, 1); ZEPHIR_INIT_NVAR(&_1); ZVAL_DOUBLE(&_1, 1.5); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1 TSRMLS_CC, SL("ll"), 2, 0, 1); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$null TSRMLS_CC, SL("ll"), 2, 0, 1); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$false TSRMLS_CC, SL("ll"), 2, 0, 1); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$true TSRMLS_CC, SL("ll"), 2, 0, 1); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1, SL("ll"), 2, 0, 1); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$null, SL("ll"), 2, 0, 1); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$false, SL("ll"), 2, 0, 1); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$true, SL("ll"), 2, 0, 1); ZEPHIR_INIT_NVAR(&_1); ZVAL_LONG(&_1, 'A'); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1 TSRMLS_CC, SL("ll"), 2, 0, 1); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1, SL("ll"), 2, 0, 1); ZEPHIR_INIT_NVAR(&_1); ZVAL_STRING(&_1, "hello"); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1 TSRMLS_CC, SL("ll"), 2, 0, 1); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1, SL("ll"), 2, 0, 1); ZEPHIR_INIT_NVAR(&_1); array_init(&_1); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1 TSRMLS_CC, SL("ll"), 2, 0, 1); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1, SL("ll"), 2, 0, 1); RETURN_MM_MEMBER(getThis(), "myArray"); } @@ -1326,22 +1326,22 @@ PHP_METHOD(Test_Assign, testPropertyArray7) { zephir_update_property_zval(this_ptr, SL("myArray"), &_0); ZEPHIR_INIT_VAR(&_1); ZVAL_LONG(&_1, 1); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1 TSRMLS_CC, SL("ss"), 4, SL("hello"), SL("hello")); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1, SL("ss"), 4, SL("hello"), SL("hello")); ZEPHIR_INIT_NVAR(&_1); ZVAL_DOUBLE(&_1, 1.5); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1 TSRMLS_CC, SL("ss"), 4, SL("hello"), SL("hello")); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$null TSRMLS_CC, SL("ss"), 4, SL("hello"), SL("hello")); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$false TSRMLS_CC, SL("ss"), 4, SL("hello"), SL("hello")); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$true TSRMLS_CC, SL("ss"), 4, SL("hello"), SL("hello")); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1, SL("ss"), 4, SL("hello"), SL("hello")); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$null, SL("ss"), 4, SL("hello"), SL("hello")); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$false, SL("ss"), 4, SL("hello"), SL("hello")); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$true, SL("ss"), 4, SL("hello"), SL("hello")); ZEPHIR_INIT_NVAR(&_1); ZVAL_LONG(&_1, 'A'); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1 TSRMLS_CC, SL("ss"), 4, SL("hello"), SL("hello")); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1, SL("ss"), 4, SL("hello"), SL("hello")); ZEPHIR_INIT_NVAR(&_1); ZVAL_STRING(&_1, "hello"); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1 TSRMLS_CC, SL("ss"), 4, SL("hello"), SL("hello")); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1, SL("ss"), 4, SL("hello"), SL("hello")); ZEPHIR_INIT_NVAR(&_1); array_init(&_1); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1 TSRMLS_CC, SL("ss"), 4, SL("hello"), SL("hello")); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1, SL("ss"), 4, SL("hello"), SL("hello")); RETURN_MM_MEMBER(getThis(), "myArray"); } @@ -1369,22 +1369,22 @@ PHP_METHOD(Test_Assign, testPropertyArray8) { zephir_update_property_zval(this_ptr, SL("myArray"), &_0); ZEPHIR_INIT_VAR(&_1); ZVAL_LONG(&_1, 1); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1 TSRMLS_CC, SL("zz"), 2, index, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1, SL("zz"), 2, index, index); ZEPHIR_INIT_NVAR(&_1); ZVAL_DOUBLE(&_1, 1.5); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1 TSRMLS_CC, SL("zz"), 2, index, index); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$null TSRMLS_CC, SL("zz"), 2, index, index); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$false TSRMLS_CC, SL("zz"), 2, index, index); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$true TSRMLS_CC, SL("zz"), 2, index, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1, SL("zz"), 2, index, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$null, SL("zz"), 2, index, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$false, SL("zz"), 2, index, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$true, SL("zz"), 2, index, index); ZEPHIR_INIT_NVAR(&_1); ZVAL_LONG(&_1, 'A'); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1 TSRMLS_CC, SL("zz"), 2, index, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1, SL("zz"), 2, index, index); ZEPHIR_INIT_NVAR(&_1); ZVAL_STRING(&_1, "hello"); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1 TSRMLS_CC, SL("zz"), 2, index, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1, SL("zz"), 2, index, index); ZEPHIR_INIT_NVAR(&_1); array_init(&_1); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1 TSRMLS_CC, SL("zz"), 2, index, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1, SL("zz"), 2, index, index); RETURN_MM_MEMBER(getThis(), "myArray"); } @@ -1413,22 +1413,22 @@ PHP_METHOD(Test_Assign, testPropertyArray9) { zephir_update_property_zval(this_ptr, SL("myArray"), &_0); ZEPHIR_INIT_VAR(&_1); ZVAL_LONG(&_1, 1); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1 TSRMLS_CC, SL("ll"), 2, index, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1, SL("ll"), 2, index, index); ZEPHIR_INIT_NVAR(&_1); ZVAL_DOUBLE(&_1, 1.5); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1 TSRMLS_CC, SL("ll"), 2, index, index); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$null TSRMLS_CC, SL("ll"), 2, index, index); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$false TSRMLS_CC, SL("ll"), 2, index, index); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$true TSRMLS_CC, SL("ll"), 2, index, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1, SL("ll"), 2, index, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$null, SL("ll"), 2, index, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$false, SL("ll"), 2, index, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$true, SL("ll"), 2, index, index); ZEPHIR_INIT_NVAR(&_1); ZVAL_LONG(&_1, 'A'); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1 TSRMLS_CC, SL("ll"), 2, index, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1, SL("ll"), 2, index, index); ZEPHIR_INIT_NVAR(&_1); ZVAL_STRING(&_1, "hello"); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1 TSRMLS_CC, SL("ll"), 2, index, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1, SL("ll"), 2, index, index); ZEPHIR_INIT_NVAR(&_1); array_init(&_1); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1 TSRMLS_CC, SL("ll"), 2, index, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1, SL("ll"), 2, index, index); RETURN_MM_MEMBER(getThis(), "myArray"); } @@ -1458,22 +1458,22 @@ PHP_METHOD(Test_Assign, testPropertyArray10) { zephir_update_property_zval(this_ptr, SL("myArray"), &_0); ZEPHIR_INIT_VAR(&_1); ZVAL_LONG(&_1, 1); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1 TSRMLS_CC, SL("zz"), 2, &index, &index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1, SL("zz"), 2, &index, &index); ZEPHIR_INIT_NVAR(&_1); ZVAL_DOUBLE(&_1, 1.5); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1 TSRMLS_CC, SL("zz"), 2, &index, &index); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$null TSRMLS_CC, SL("zz"), 2, &index, &index); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$false TSRMLS_CC, SL("zz"), 2, &index, &index); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$true TSRMLS_CC, SL("zz"), 2, &index, &index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1, SL("zz"), 2, &index, &index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$null, SL("zz"), 2, &index, &index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$false, SL("zz"), 2, &index, &index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$true, SL("zz"), 2, &index, &index); ZEPHIR_INIT_NVAR(&_1); ZVAL_LONG(&_1, 'A'); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1 TSRMLS_CC, SL("zz"), 2, &index, &index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1, SL("zz"), 2, &index, &index); ZEPHIR_INIT_NVAR(&_1); ZVAL_STRING(&_1, "hello"); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1 TSRMLS_CC, SL("zz"), 2, &index, &index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1, SL("zz"), 2, &index, &index); ZEPHIR_INIT_NVAR(&_1); array_init(&_1); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1 TSRMLS_CC, SL("zz"), 2, &index, &index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1, SL("zz"), 2, &index, &index); RETURN_MM_MEMBER(getThis(), "myArray"); } @@ -1501,22 +1501,22 @@ PHP_METHOD(Test_Assign, testPropertyArray11) { ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, 1); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_0 TSRMLS_CC, SL("zza"), 3, index, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_0, SL("zza"), 3, index, index); ZEPHIR_INIT_VAR(&_1); ZVAL_DOUBLE(&_1, 1.5); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1 TSRMLS_CC, SL("zza"), 3, index, index); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$null TSRMLS_CC, SL("zza"), 3, index, index); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$false TSRMLS_CC, SL("zza"), 3, index, index); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$true TSRMLS_CC, SL("zza"), 3, index, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1, SL("zza"), 3, index, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$null, SL("zza"), 3, index, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$false, SL("zza"), 3, index, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$true, SL("zza"), 3, index, index); ZEPHIR_INIT_VAR(&_2); ZVAL_LONG(&_2, 'A'); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_2 TSRMLS_CC, SL("zza"), 3, index, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_2, SL("zza"), 3, index, index); ZEPHIR_INIT_VAR(&_3); ZVAL_STRING(&_3, "hello"); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_3 TSRMLS_CC, SL("zza"), 3, index, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_3, SL("zza"), 3, index, index); ZEPHIR_INIT_VAR(&_4); array_init(&_4); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_4 TSRMLS_CC, SL("zza"), 3, index, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_4, SL("zza"), 3, index, index); RETURN_MM_MEMBER(getThis(), "myArray"); } @@ -1549,30 +1549,30 @@ PHP_METHOD(Test_Assign, testPropertyArray12) { ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, 1); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_0 TSRMLS_CC, SL("zza"), 3, index, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_0, SL("zza"), 3, index, index); ZEPHIR_INIT_VAR(&_1); ZVAL_DOUBLE(&_1, 1.5); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1 TSRMLS_CC, SL("zza"), 3, index, index); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$null TSRMLS_CC, SL("zza"), 3, index, index); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$false TSRMLS_CC, SL("zza"), 3, index, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1, SL("zza"), 3, index, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$null, SL("zza"), 3, index, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$false, SL("zza"), 3, index, index); zephir_read_property(&_2, this_ptr, SL("myArray"), PH_NOISY_CC | PH_READONLY); ZEPHIR_OBS_VAR(&temp1); - zephir_array_fetch(&temp1, &_2, index, PH_NOISY, "test/assign.zep", 657 TSRMLS_CC); + zephir_array_fetch(&temp1, &_2, index, PH_NOISY, "test/assign.zep", 657); ZEPHIR_OBS_VAR(&temp2); zephir_read_property(&temp2, this_ptr, SL("myArray"), PH_NOISY_CC); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$true TSRMLS_CC, SL("zza"), 3, index, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$true, SL("zza"), 3, index, index); ZEPHIR_INIT_VAR(&_3); ZVAL_LONG(&_3, 'A'); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_3 TSRMLS_CC, SL("zza"), 3, index, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_3, SL("zza"), 3, index, index); ZEPHIR_INIT_VAR(&_4); ZVAL_STRING(&_4, "hello"); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_4 TSRMLS_CC, SL("zza"), 3, index, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_4, SL("zza"), 3, index, index); ZEPHIR_INIT_VAR(&_5); array_init(&_5); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_5 TSRMLS_CC, SL("zza"), 3, index, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_5, SL("zza"), 3, index, index); zephir_read_property(&_6, this_ptr, SL("myArray"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&temp3); - ZVAL_LONG(&temp3, zephir_fast_count_int(&_6 TSRMLS_CC)); + ZVAL_LONG(&temp3, zephir_fast_count_int(&_6)); RETURN_MM_MEMBER(getThis(), "myArray"); } @@ -1605,30 +1605,30 @@ PHP_METHOD(Test_Assign, testPropertyArray13) { ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, 1); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_0 TSRMLS_CC, SL("za"), 2, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_0, SL("za"), 2, index); ZEPHIR_INIT_VAR(&_1); ZVAL_DOUBLE(&_1, 1.5); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1 TSRMLS_CC, SL("za"), 2, index); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$null TSRMLS_CC, SL("za"), 2, index); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$false TSRMLS_CC, SL("za"), 2, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_1, SL("za"), 2, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$null, SL("za"), 2, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$false, SL("za"), 2, index); zephir_read_property(&_2, this_ptr, SL("myArray"), PH_NOISY_CC | PH_READONLY); ZEPHIR_OBS_VAR(&temp1); - zephir_array_fetch(&temp1, &_2, index, PH_NOISY, "test/assign.zep", 674 TSRMLS_CC); + zephir_array_fetch(&temp1, &_2, index, PH_NOISY, "test/assign.zep", 674); ZEPHIR_OBS_VAR(&temp2); zephir_read_property(&temp2, this_ptr, SL("myArray"), PH_NOISY_CC); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$true TSRMLS_CC, SL("za"), 2, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &__$true, SL("za"), 2, index); ZEPHIR_INIT_VAR(&_3); ZVAL_LONG(&_3, 'A'); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_3 TSRMLS_CC, SL("za"), 2, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_3, SL("za"), 2, index); ZEPHIR_INIT_VAR(&_4); ZVAL_STRING(&_4, "hello"); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_4 TSRMLS_CC, SL("za"), 2, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_4, SL("za"), 2, index); ZEPHIR_INIT_VAR(&_5); array_init(&_5); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_5 TSRMLS_CC, SL("za"), 2, index); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_5, SL("za"), 2, index); zephir_read_property(&_6, this_ptr, SL("myArray"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&temp3); - ZVAL_LONG(&temp3, zephir_fast_count_int(&_6 TSRMLS_CC)); + ZVAL_LONG(&temp3, zephir_fast_count_int(&_6)); RETURN_MM_MEMBER(getThis(), "myArray"); } @@ -1654,19 +1654,19 @@ PHP_METHOD(Test_Assign, testPropertyArray14) { ZEPHIR_INIT_VAR(&v); ZVAL_STRING(&v, "abc"); ZEPHIR_INIT_VAR(&_0); - zephir_create_array(&_0, 1, 0 TSRMLS_CC); + zephir_create_array(&_0, 1, 0); ZEPHIR_INIT_VAR(&_1); - zephir_create_array(&_1, 1, 0 TSRMLS_CC); + zephir_create_array(&_1, 1, 0); add_assoc_stringl_ex(&_1, SL("b_key"), SL("b_val")); zephir_array_update_string(&_0, SL("a"), &_1, PH_COPY | PH_SEPARATE); zephir_update_property_zval(this_ptr, SL("myArray"), &_0); ZEPHIR_INIT_VAR(&_2); ZVAL_STRING(&_2, "d_val"); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_2 TSRMLS_CC, SL("sss"), 6, SL("a"), SL("b"), SL("d_key")); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_2, SL("sss"), 6, SL("a"), SL("b"), SL("d_key")); ZEPHIR_INIT_NVAR(&_1); - zephir_create_array(&_1, 1, 0 TSRMLS_CC); + zephir_create_array(&_1, 1, 0); ZEPHIR_INIT_VAR(&_3); - zephir_create_array(&_3, 1, 0 TSRMLS_CC); + zephir_create_array(&_3, 1, 0); add_index_long(&_3, 3, 4); zephir_array_update_long(&_1, 2, &_3, PH_COPY ZEPHIR_DEBUG_PARAMS_DUMMY); ZEPHIR_INIT_NVAR(&_2); @@ -1679,11 +1679,11 @@ PHP_METHOD(Test_Assign, testPropertyArray14) { zephir_update_property_array(this_ptr, SL("myArray"), &_4, &_5); ZEPHIR_INIT_VAR(&_6); ZVAL_STRING(&_6, "f"); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_6 TSRMLS_CC, SL("sssss"), 10, SL("a"), SL("b"), SL("c"), SL("d"), SL("e")); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_6, SL("sssss"), 10, SL("a"), SL("b"), SL("c"), SL("d"), SL("e")); ZEPHIR_INIT_NVAR(&_6); ZVAL_LONG(&_6, 6); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &_6 TSRMLS_CC, SL("lll"), 3, 1, 2, 5); - zephir_update_property_array_multi(this_ptr, SL("myArray"), &v TSRMLS_CC, SL("llz"), 3, 1, 2, &v); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &_6, SL("lll"), 3, 1, 2, 5); + zephir_update_property_array_multi(this_ptr, SL("myArray"), &v, SL("llz"), 3, 1, 2, &v); RETURN_MM_MEMBER(getThis(), "myArray"); } @@ -1725,7 +1725,7 @@ PHP_METHOD(Test_Assign, testStaticPropertyAssign1) { array_init(&_1); zephir_update_static_property_ce(test_assign_ce, ZEND_STRL("testVarStatic"), &_1); ZEPHIR_INIT_VAR(&_2); - zephir_create_array(&_2, 3, 0 TSRMLS_CC); + zephir_create_array(&_2, 3, 0); ZEPHIR_INIT_VAR(&_3); ZVAL_LONG(&_3, 1); zephir_array_fast_append(&_2, &_3); @@ -1805,22 +1805,22 @@ PHP_METHOD(Test_Assign, testStaticPropertyArray1) { zephir_update_static_property_ce(test_assign_ce, ZEND_STRL("testVarStatic"), &_0); ZEPHIR_INIT_VAR(&_1); ZVAL_LONG(&_1, 1); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("l"), 1, 0); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("l"), 1, 0); ZEPHIR_INIT_NVAR(&_1); ZVAL_DOUBLE(&_1, 1.5); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("l"), 1, 0); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$null TSRMLS_CC, SL("l"), 1, 0); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$false TSRMLS_CC, SL("l"), 1, 0); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$true TSRMLS_CC, SL("l"), 1, 0); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("l"), 1, 0); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$null, SL("l"), 1, 0); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$false, SL("l"), 1, 0); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$true, SL("l"), 1, 0); ZEPHIR_INIT_NVAR(&_1); ZVAL_LONG(&_1, 'A'); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("l"), 1, 0); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("l"), 1, 0); ZEPHIR_INIT_NVAR(&_1); ZVAL_STRING(&_1, "hello"); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("l"), 1, 0); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("l"), 1, 0); ZEPHIR_INIT_NVAR(&_1); array_init(&_1); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("l"), 1, 0); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("l"), 1, 0); zephir_read_static_property_ce(&_2, test_assign_ce, SL("testVarStatic"), PH_NOISY_CC | PH_READONLY); RETURN_CTOR(&_2); @@ -1846,22 +1846,22 @@ PHP_METHOD(Test_Assign, testStaticPropertyArray2) { zephir_update_static_property_ce(test_assign_ce, ZEND_STRL("testVarStatic"), &_0); ZEPHIR_INIT_VAR(&_1); ZVAL_LONG(&_1, 1); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("s"), 2, SL("hello")); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("s"), 2, SL("hello")); ZEPHIR_INIT_NVAR(&_1); ZVAL_DOUBLE(&_1, 1.5); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("s"), 2, SL("hello")); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$null TSRMLS_CC, SL("s"), 2, SL("hello")); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$false TSRMLS_CC, SL("s"), 2, SL("hello")); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$true TSRMLS_CC, SL("s"), 2, SL("hello")); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("s"), 2, SL("hello")); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$null, SL("s"), 2, SL("hello")); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$false, SL("s"), 2, SL("hello")); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$true, SL("s"), 2, SL("hello")); ZEPHIR_INIT_NVAR(&_1); ZVAL_LONG(&_1, 'A'); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("s"), 2, SL("hello")); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("s"), 2, SL("hello")); ZEPHIR_INIT_NVAR(&_1); ZVAL_STRING(&_1, "hello"); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("s"), 2, SL("hello")); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("s"), 2, SL("hello")); ZEPHIR_INIT_NVAR(&_1); array_init(&_1); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("s"), 2, SL("hello")); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("s"), 2, SL("hello")); zephir_read_static_property_ce(&_2, test_assign_ce, SL("testVarStatic"), PH_NOISY_CC | PH_READONLY); RETURN_CTOR(&_2); @@ -1891,22 +1891,22 @@ PHP_METHOD(Test_Assign, testStaticPropertyArray3) { zephir_update_static_property_ce(test_assign_ce, ZEND_STRL("testVarStatic"), &_0); ZEPHIR_INIT_VAR(&_1); ZVAL_LONG(&_1, 1); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("z"), 1, index); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("z"), 1, index); ZEPHIR_INIT_NVAR(&_1); ZVAL_DOUBLE(&_1, 1.5); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("z"), 1, index); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$null TSRMLS_CC, SL("z"), 1, index); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$false TSRMLS_CC, SL("z"), 1, index); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$true TSRMLS_CC, SL("z"), 1, index); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("z"), 1, index); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$null, SL("z"), 1, index); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$false, SL("z"), 1, index); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$true, SL("z"), 1, index); ZEPHIR_INIT_NVAR(&_1); ZVAL_LONG(&_1, 'A'); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("z"), 1, index); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("z"), 1, index); ZEPHIR_INIT_NVAR(&_1); ZVAL_STRING(&_1, "hello"); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("z"), 1, index); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("z"), 1, index); ZEPHIR_INIT_NVAR(&_1); array_init(&_1); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("z"), 1, index); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("z"), 1, index); zephir_read_static_property_ce(&_2, test_assign_ce, SL("testVarStatic"), PH_NOISY_CC | PH_READONLY); RETURN_CTOR(&_2); @@ -1930,17 +1930,17 @@ PHP_METHOD(Test_Assign, testStaticPropertyArrayAppend) { zephir_update_static_property_ce(test_assign_ce, ZEND_STRL("testVarStatic"), &_0); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "test"); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("a"), 1); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("a"), 1); ZEPHIR_INIT_NVAR(&_1); ZVAL_LONG(&_1, 1); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("a"), 1); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("a"), 1); ZEPHIR_INIT_NVAR(&_1); ZVAL_DOUBLE(&_1, 1.5); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("a"), 1); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$false TSRMLS_CC, SL("a"), 1); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("a"), 1); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$false, SL("a"), 1); ZEPHIR_INIT_NVAR(&_1); array_init(&_1); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("a"), 1); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("a"), 1); zephir_read_static_property_ce(&_2, test_assign_ce, SL("testVarStatic"), PH_NOISY_CC | PH_READONLY); RETURN_CTOR(&_2); @@ -1966,22 +1966,22 @@ PHP_METHOD(Test_Assign, testStaticPropertyArrayMutli1) { zephir_update_static_property_ce(test_assign_ce, ZEND_STRL("testVarStatic"), &_0); ZEPHIR_INIT_VAR(&_1); ZVAL_LONG(&_1, 1); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("ll"), 2, 0, 0); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("ll"), 2, 0, 0); ZEPHIR_INIT_NVAR(&_1); ZVAL_DOUBLE(&_1, 1.5); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("ll"), 2, 0, 0); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$null TSRMLS_CC, SL("ll"), 2, 0, 0); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$false TSRMLS_CC, SL("ll"), 2, 0, 0); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$true TSRMLS_CC, SL("ll"), 2, 0, 0); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("ll"), 2, 0, 0); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$null, SL("ll"), 2, 0, 0); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$false, SL("ll"), 2, 0, 0); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$true, SL("ll"), 2, 0, 0); ZEPHIR_INIT_NVAR(&_1); ZVAL_LONG(&_1, 'A'); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("ll"), 2, 0, 0); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("ll"), 2, 0, 0); ZEPHIR_INIT_NVAR(&_1); ZVAL_STRING(&_1, "hello"); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("ll"), 2, 0, 0); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("ll"), 2, 0, 0); ZEPHIR_INIT_NVAR(&_1); array_init(&_1); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("ll"), 2, 0, 0); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("ll"), 2, 0, 0); zephir_read_static_property_ce(&_2, test_assign_ce, SL("testVarStatic"), PH_NOISY_CC | PH_READONLY); RETURN_CTOR(&_2); @@ -2007,22 +2007,22 @@ PHP_METHOD(Test_Assign, testStaticPropertyArrayMutli2) { zephir_update_static_property_ce(test_assign_ce, ZEND_STRL("testVarStatic"), &_0); ZEPHIR_INIT_VAR(&_1); ZVAL_LONG(&_1, 1); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("ss"), 4, SL("hello"), SL("hello")); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("ss"), 4, SL("hello"), SL("hello")); ZEPHIR_INIT_NVAR(&_1); ZVAL_DOUBLE(&_1, 1.5); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("ss"), 4, SL("hello"), SL("hello")); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$null TSRMLS_CC, SL("ss"), 4, SL("hello"), SL("hello")); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$false TSRMLS_CC, SL("ss"), 4, SL("hello"), SL("hello")); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$true TSRMLS_CC, SL("ss"), 4, SL("hello"), SL("hello")); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("ss"), 4, SL("hello"), SL("hello")); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$null, SL("ss"), 4, SL("hello"), SL("hello")); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$false, SL("ss"), 4, SL("hello"), SL("hello")); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$true, SL("ss"), 4, SL("hello"), SL("hello")); ZEPHIR_INIT_NVAR(&_1); ZVAL_LONG(&_1, 'A'); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("ss"), 4, SL("hello"), SL("hello")); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("ss"), 4, SL("hello"), SL("hello")); ZEPHIR_INIT_NVAR(&_1); ZVAL_STRING(&_1, "hello"); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("ss"), 4, SL("hello"), SL("hello")); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("ss"), 4, SL("hello"), SL("hello")); ZEPHIR_INIT_NVAR(&_1); array_init(&_1); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("ss"), 4, SL("hello"), SL("hello")); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("ss"), 4, SL("hello"), SL("hello")); zephir_read_static_property_ce(&_2, test_assign_ce, SL("testVarStatic"), PH_NOISY_CC | PH_READONLY); RETURN_CTOR(&_2); @@ -2052,22 +2052,22 @@ PHP_METHOD(Test_Assign, testStaticPropertyArrayMutli3) { zephir_update_static_property_ce(test_assign_ce, ZEND_STRL("testVarStatic"), &_0); ZEPHIR_INIT_VAR(&_1); ZVAL_LONG(&_1, 1); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("zz"), 2, index, index); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("zz"), 2, index, index); ZEPHIR_INIT_NVAR(&_1); ZVAL_DOUBLE(&_1, 1.5); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("zz"), 2, index, index); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$null TSRMLS_CC, SL("zz"), 2, index, index); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$false TSRMLS_CC, SL("zz"), 2, index, index); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$true TSRMLS_CC, SL("zz"), 2, index, index); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("zz"), 2, index, index); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$null, SL("zz"), 2, index, index); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$false, SL("zz"), 2, index, index); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$true, SL("zz"), 2, index, index); ZEPHIR_INIT_NVAR(&_1); ZVAL_LONG(&_1, 'A'); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("zz"), 2, index, index); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("zz"), 2, index, index); ZEPHIR_INIT_NVAR(&_1); ZVAL_STRING(&_1, "hello"); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("zz"), 2, index, index); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("zz"), 2, index, index); ZEPHIR_INIT_NVAR(&_1); array_init(&_1); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("zz"), 2, index, index); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("zz"), 2, index, index); zephir_read_static_property_ce(&_2, test_assign_ce, SL("testVarStatic"), PH_NOISY_CC | PH_READONLY); RETURN_CTOR(&_2); @@ -2092,32 +2092,32 @@ PHP_METHOD(Test_Assign, testStaticPropertyArrayMulti4) { ZEPHIR_INIT_VAR(&v); ZVAL_STRING(&v, "abc"); ZEPHIR_INIT_VAR(&_0); - zephir_create_array(&_0, 1, 0 TSRMLS_CC); + zephir_create_array(&_0, 1, 0); ZEPHIR_INIT_VAR(&_1); - zephir_create_array(&_1, 1, 0 TSRMLS_CC); + zephir_create_array(&_1, 1, 0); add_assoc_stringl_ex(&_1, SL("b_key"), SL("b_val")); zephir_array_update_string(&_0, SL("a"), &_1, PH_COPY | PH_SEPARATE); zephir_update_static_property_ce(test_assign_ce, ZEND_STRL("testVarStatic"), &_0); ZEPHIR_INIT_VAR(&_2); ZVAL_STRING(&_2, "d_val"); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_2 TSRMLS_CC, SL("sss"), 6, SL("a"), SL("b"), SL("d_key")); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_2, SL("sss"), 6, SL("a"), SL("b"), SL("d_key")); ZEPHIR_INIT_NVAR(&_1); - zephir_create_array(&_1, 1, 0 TSRMLS_CC); + zephir_create_array(&_1, 1, 0); ZEPHIR_INIT_VAR(&_3); - zephir_create_array(&_3, 1, 0 TSRMLS_CC); + zephir_create_array(&_3, 1, 0); add_index_long(&_3, 3, 4); zephir_array_update_long(&_1, 2, &_3, PH_COPY ZEPHIR_DEBUG_PARAMS_DUMMY); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("l"), 1, 1); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("l"), 1, 1); ZEPHIR_INIT_NVAR(&_2); ZVAL_LONG(&_2, 1); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_2 TSRMLS_CC, SL("s"), 2, SL("s")); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_2, SL("s"), 2, SL("s")); ZEPHIR_INIT_NVAR(&_2); ZVAL_STRING(&_2, "f"); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_2 TSRMLS_CC, SL("sssss"), 10, SL("a"), SL("b"), SL("c"), SL("d"), SL("e")); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_2, SL("sssss"), 10, SL("a"), SL("b"), SL("c"), SL("d"), SL("e")); ZEPHIR_INIT_NVAR(&_2); ZVAL_LONG(&_2, 6); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_2 TSRMLS_CC, SL("lll"), 3, 1, 2, 5); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &v TSRMLS_CC, SL("llz"), 3, 1, 2, &v); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_2, SL("lll"), 3, 1, 2, 5); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &v, SL("llz"), 3, 1, 2, &v); zephir_read_static_property_ce(&_4, test_assign_ce, SL("testVarStatic"), PH_NOISY_CC | PH_READONLY); RETURN_CTOR(&_4); @@ -2143,22 +2143,22 @@ PHP_METHOD(Test_Assign, testStaticPropertyArrayAppend1) { zephir_update_static_property_ce(test_assign_ce, ZEND_STRL("testVarStatic"), &_0); ZEPHIR_INIT_VAR(&_1); ZVAL_LONG(&_1, 1); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("la"), 2, 0); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("la"), 2, 0); ZEPHIR_INIT_NVAR(&_1); ZVAL_DOUBLE(&_1, 1.5); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("la"), 2, 0); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$null TSRMLS_CC, SL("la"), 2, 0); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$false TSRMLS_CC, SL("la"), 2, 0); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$true TSRMLS_CC, SL("la"), 2, 0); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("la"), 2, 0); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$null, SL("la"), 2, 0); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$false, SL("la"), 2, 0); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &__$true, SL("la"), 2, 0); ZEPHIR_INIT_NVAR(&_1); ZVAL_LONG(&_1, 'A'); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("la"), 2, 0); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("la"), 2, 0); ZEPHIR_INIT_NVAR(&_1); ZVAL_STRING(&_1, "hello"); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("la"), 2, 0); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("la"), 2, 0); ZEPHIR_INIT_NVAR(&_1); array_init(&_1); - zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1 TSRMLS_CC, SL("la"), 2, 0); + zephir_update_static_property_array_multi_ce(test_assign_ce, SL("testVarStatic"), &_1, SL("la"), 2, 0); zephir_read_static_property_ce(&_2, test_assign_ce, SL("testVarStatic"), PH_NOISY_CC | PH_READONLY); RETURN_CTOR(&_2); @@ -2265,7 +2265,7 @@ PHP_METHOD(Test_Assign, testConstantKeyAssign) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&elements); - zephir_create_array(&elements, 3, 0 TSRMLS_CC); + zephir_create_array(&elements, 3, 0); add_assoc_long_ex(&elements, SL("abc"), 1); add_index_long(&elements, 131072, 131079); add_index_long(&elements, 131073, 131080); @@ -2368,10 +2368,10 @@ PHP_METHOD(Test_Assign, testAssignSuperGlobalsSERVER) { ZEPHIR_INIT_VAR(&_0); ZEPHIR_INIT_VAR(&_1); - zephir_create_array(&_1, 2, 0 TSRMLS_CC); + zephir_create_array(&_1, 2, 0); add_assoc_stringl_ex(&_1, SL("g1"), SL("aaa")); add_assoc_stringl_ex(&_1, SL("g2"), SL("bbb")); - zephir_fast_array_merge(&_0, &_SERVER, &_1 TSRMLS_CC); + zephir_fast_array_merge(&_0, &_SERVER, &_1); ZEPHIR_HASH_COPY(&_SERVER, &_0); ZEPHIR_MM_RESTORE(); @@ -2396,10 +2396,10 @@ PHP_METHOD(Test_Assign, testAssignSuperGlobalsGET) { ZEPHIR_INIT_VAR(&_0); ZEPHIR_INIT_VAR(&_1); - zephir_create_array(&_1, 2, 0 TSRMLS_CC); + zephir_create_array(&_1, 2, 0); add_assoc_stringl_ex(&_1, SL("g1"), SL("aaa")); add_assoc_stringl_ex(&_1, SL("g2"), SL("bbb")); - zephir_fast_array_merge(&_0, &_GET, &_1 TSRMLS_CC); + zephir_fast_array_merge(&_0, &_GET, &_1); ZEPHIR_HASH_COPY(&_GET, &_0); ZEPHIR_MM_RESTORE(); diff --git a/ext/test/bench/foo.zep.c b/ext/test/bench/foo.zep.c index ffee31be19..fe381ca428 100644 --- a/ext/test/bench/foo.zep.c +++ b/ext/test/bench/foo.zep.c @@ -22,9 +22,9 @@ ZEPHIR_INIT_CLASS(Test_Bench_Foo) { ZEPHIR_REGISTER_CLASS(Test\\Bench, Foo, test, bench_foo, test_bench_foo_method_entry, 0); - zend_declare_property_long(test_bench_foo_ce, SL("a"), 0, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC TSRMLS_CC); + zend_declare_property_long(test_bench_foo_ce, SL("a"), 0, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC); - zend_declare_property_long(test_bench_foo_ce, SL("b"), 0, ZEND_ACC_PUBLIC TSRMLS_CC); + zend_declare_property_long(test_bench_foo_ce, SL("b"), 0, ZEND_ACC_PUBLIC); zephir_declare_class_constant_long(test_bench_foo_ce, SL("TEST"), 0); @@ -409,7 +409,7 @@ PHP_METHOD(Test_Bench_Foo, postIncProp) { } ZEPHIR_INIT_NVAR(&i); ZVAL_LONG(&i, _1); - RETURN_ON_FAILURE(zephir_property_incr(this_ptr, SL("b") TSRMLS_CC)); + RETURN_ON_FAILURE(zephir_property_incr(this_ptr, SL("b"))); } } ZEPHIR_MM_RESTORE(); @@ -448,7 +448,7 @@ PHP_METHOD(Test_Bench_Foo, postDecProp) { } ZEPHIR_INIT_NVAR(&i); ZVAL_LONG(&i, _1); - RETURN_ON_FAILURE(zephir_property_decr(this_ptr, SL("b") TSRMLS_CC)); + RETURN_ON_FAILURE(zephir_property_decr(this_ptr, SL("b"))); } } ZEPHIR_MM_RESTORE(); diff --git a/ext/test/bitwise.zep.c b/ext/test/bitwise.zep.c index d096e74559..bbc74e08e9 100644 --- a/ext/test/bitwise.zep.c +++ b/ext/test/bitwise.zep.c @@ -298,7 +298,7 @@ PHP_METHOD(Test_Bitwise, intVarImplicitCastAnd) { ZEPHIR_INIT_VAR(&b); ZVAL_STRING(&b, "2"); ZEPHIR_INIT_VAR(&_0); - zephir_bitwise_and_function(&_0, &b, &a TSRMLS_CC); + zephir_bitwise_and_function(&_0, &b, &a); c = zephir_get_numberval(&_0); RETURN_MM_LONG(c); @@ -950,7 +950,7 @@ PHP_METHOD(Test_Bitwise, intVarImplicitCastOr) { ZEPHIR_INIT_VAR(&b); ZVAL_STRING(&b, "2"); ZEPHIR_INIT_VAR(&_0); - zephir_bitwise_or_function(&_0, &b, &a TSRMLS_CC); + zephir_bitwise_or_function(&_0, &b, &a); c = zephir_get_numberval(&_0); RETURN_MM_LONG(c); @@ -1470,7 +1470,7 @@ PHP_METHOD(Test_Bitwise, testbitwiseXor) { ZVAL_LONG(&_0, 321); ZEPHIR_CALL_METHOD(&j, this_ptr, "getint", NULL, 0, &_0); zephir_check_call_status(); - zephir_bitwise_xor_function(return_value, &i, &j TSRMLS_CC); + zephir_bitwise_xor_function(return_value, &i, &j); RETURN_MM(); } diff --git a/ext/test/builtin/arraymethods.zep.c b/ext/test/builtin/arraymethods.zep.c index 5d34e7e082..5f08cdacca 100644 --- a/ext/test/builtin/arraymethods.zep.c +++ b/ext/test/builtin/arraymethods.zep.c @@ -40,7 +40,7 @@ PHP_METHOD(Test_BuiltIn_ArrayMethods, getJoin1) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&_0); - zephir_create_array(&_0, 3, 0 TSRMLS_CC); + zephir_create_array(&_0, 3, 0); ZEPHIR_INIT_VAR(&_1); ZVAL_LONG(&_1, 1); zephir_array_fast_append(&_0, &_1); @@ -51,7 +51,7 @@ PHP_METHOD(Test_BuiltIn_ArrayMethods, getJoin1) { ZVAL_LONG(&_1, 3); zephir_array_fast_append(&_0, &_1); ZEPHIR_INIT_NVAR(&_1); - zephir_fast_join_str(&_1, SL("-"), &_0 TSRMLS_CC); + zephir_fast_join_str(&_1, SL("-"), &_0); RETURN_CCTOR(&_1); } @@ -71,7 +71,7 @@ PHP_METHOD(Test_BuiltIn_ArrayMethods, getReversed1) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&_0); - zephir_create_array(&_0, 3, 0 TSRMLS_CC); + zephir_create_array(&_0, 3, 0); ZEPHIR_INIT_VAR(&_1); ZVAL_LONG(&_1, 1); zephir_array_fast_append(&_0, &_1); @@ -102,7 +102,7 @@ PHP_METHOD(Test_BuiltIn_ArrayMethods, getMap1) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&_0); - zephir_create_array(&_0, 3, 0 TSRMLS_CC); + zephir_create_array(&_0, 3, 0); ZEPHIR_INIT_VAR(&_1); ZVAL_LONG(&_1, 1); zephir_array_fast_append(&_0, &_1); diff --git a/ext/test/builtin/charmethods.zep.c b/ext/test/builtin/charmethods.zep.c index 8b52646755..36e7e3302a 100644 --- a/ext/test/builtin/charmethods.zep.c +++ b/ext/test/builtin/charmethods.zep.c @@ -74,7 +74,7 @@ PHP_METHOD(Test_BuiltIn_CharMethods, getHexForString) { ZEPHIR_INIT_NVAR(&_3$$3); ZVAL_STRINGL(&_3$$3, &ch, 1); zephir_string_to_hex(&_2$$3, &_3$$3); - zephir_concat_self(&o, &_2$$3 TSRMLS_CC); + zephir_concat_self(&o, &_2$$3); } RETURN_CCTOR(&o); diff --git a/ext/test/builtin/stringmethods.zep.c b/ext/test/builtin/stringmethods.zep.c index f26258c6e6..7d9b3e90d2 100644 --- a/ext/test/builtin/stringmethods.zep.c +++ b/ext/test/builtin/stringmethods.zep.c @@ -239,7 +239,7 @@ PHP_METHOD(Test_BuiltIn_StringMethods, getTrimmed) { ZEPHIR_INIT_VAR(&_0); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, " hello \t\n"); - zephir_fast_trim(&_0, &_1, NULL , ZEPHIR_TRIM_BOTH TSRMLS_CC); + zephir_fast_trim(&_0, &_1, NULL , ZEPHIR_TRIM_BOTH); RETURN_CCTOR(&_0); } @@ -261,7 +261,7 @@ PHP_METHOD(Test_BuiltIn_StringMethods, getTrimmed1) { ZEPHIR_INIT_VAR(&_0); - zephir_fast_trim(&_0, &str, NULL , ZEPHIR_TRIM_BOTH TSRMLS_CC); + zephir_fast_trim(&_0, &str, NULL , ZEPHIR_TRIM_BOTH); RETURN_CCTOR(&_0); } @@ -283,7 +283,7 @@ PHP_METHOD(Test_BuiltIn_StringMethods, getLeftTrimmed) { ZEPHIR_INIT_VAR(&_0); - zephir_fast_trim(&_0, &str, NULL , ZEPHIR_TRIM_LEFT TSRMLS_CC); + zephir_fast_trim(&_0, &str, NULL , ZEPHIR_TRIM_LEFT); RETURN_CCTOR(&_0); } @@ -305,7 +305,7 @@ PHP_METHOD(Test_BuiltIn_StringMethods, getRightTrimmed) { ZEPHIR_INIT_VAR(&_0); - zephir_fast_trim(&_0, &str, NULL , ZEPHIR_TRIM_RIGHT TSRMLS_CC); + zephir_fast_trim(&_0, &str, NULL , ZEPHIR_TRIM_RIGHT); RETURN_CCTOR(&_0); } diff --git a/ext/test/cast.zep.c b/ext/test/cast.zep.c index c8265fca06..70315a5798 100644 --- a/ext/test/cast.zep.c +++ b/ext/test/cast.zep.c @@ -214,7 +214,7 @@ PHP_METHOD(Test_Cast, testIntCastFromVariableArray) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 4, 0 TSRMLS_CC); + zephir_create_array(&a, 4, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, 1); zephir_array_fast_append(&a, &_0); @@ -244,7 +244,7 @@ PHP_METHOD(Test_Cast, testIntCastFromArray) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&_0); - zephir_create_array(&_0, 4, 0 TSRMLS_CC); + zephir_create_array(&_0, 4, 0); ZEPHIR_INIT_VAR(&_1); ZVAL_LONG(&_1, 1); zephir_array_fast_append(&_0, &_1); @@ -434,7 +434,7 @@ PHP_METHOD(Test_Cast, testFloatCastFromVariableArray) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 4, 0 TSRMLS_CC); + zephir_create_array(&a, 4, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, 1); zephir_array_fast_append(&a, &_0); @@ -464,7 +464,7 @@ PHP_METHOD(Test_Cast, testFloatCastFromArray) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&_0); - zephir_create_array(&_0, 4, 0 TSRMLS_CC); + zephir_create_array(&_0, 4, 0); ZEPHIR_INIT_VAR(&_1); ZVAL_LONG(&_1, 1); zephir_array_fast_append(&_0, &_1); @@ -593,7 +593,7 @@ PHP_METHOD(Test_Cast, testBooleanCastFromArray) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 4, 0 TSRMLS_CC); + zephir_create_array(&a, 4, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, 1); zephir_array_fast_append(&a, &_0); @@ -745,7 +745,7 @@ PHP_METHOD(Test_Cast, testObjectCastFromArray) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&_0); - zephir_create_array(&_0, 4, 0 TSRMLS_CC); + zephir_create_array(&_0, 4, 0); ZEPHIR_INIT_VAR(&_1); ZVAL_LONG(&_1, 1); zephir_array_fast_append(&_0, &_1); @@ -862,7 +862,7 @@ PHP_METHOD(Test_Cast, testArrayCastFromVariableArray) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&uids); - zephir_create_array(&uids, 3, 0 TSRMLS_CC); + zephir_create_array(&uids, 3, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, 1); zephir_array_fast_append(&uids, &_0); diff --git a/ext/test/compare.zep.c b/ext/test/compare.zep.c index e4753362d1..1793a3064a 100644 --- a/ext/test/compare.zep.c +++ b/ext/test/compare.zep.c @@ -128,7 +128,7 @@ PHP_METHOD(Test_Compare, testVarWithStringEquals) { zephir_fetch_params(1, 1, 0, &str_param); if (UNEXPECTED(Z_TYPE_P(str_param) != IS_STRING && Z_TYPE_P(str_param) != IS_NULL)) { - zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'str' must be of the type string") TSRMLS_CC); + zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'str' must be of the type string")); RETURN_MM_NULL(); } if (EXPECTED(Z_TYPE_P(str_param) == IS_STRING)) { diff --git a/ext/test/concat.zep.c b/ext/test/concat.zep.c index d3697abc70..2b1ce8cf6e 100644 --- a/ext/test/concat.zep.c +++ b/ext/test/concat.zep.c @@ -22,7 +22,7 @@ ZEPHIR_INIT_CLASS(Test_Concat) { ZEPHIR_REGISTER_CLASS(Test, Concat, test, concat, test_concat_method_entry, 0); - zend_declare_property_null(test_concat_ce, SL("testProperty"), ZEND_ACC_PROTECTED|ZEND_ACC_STATIC TSRMLS_CC); + zend_declare_property_null(test_concat_ce, SL("testProperty"), ZEND_ACC_PROTECTED|ZEND_ACC_STATIC); return SUCCESS; @@ -132,7 +132,7 @@ PHP_METHOD(Test_Concat, testConcat3) { ZVAL_STRING(&a, "1"); ZEPHIR_INIT_VAR(&b); ZVAL_STRING(&b, "2"); - zephir_concat_self(&b, &a TSRMLS_CC); + zephir_concat_self(&b, &a); RETURN_CCTOR(&b); } @@ -162,18 +162,18 @@ PHP_METHOD(Test_Concat, testConcat4) { ZEPHIR_INIT_VAR(&query); ZVAL_STRING(&query, ""); - min = (zephir_safe_div_zval_long(value, 100 TSRMLS_CC) * (double) (25)); - max = (zephir_safe_div_zval_long(value, 100 TSRMLS_CC) * (double) (50)); + min = (zephir_safe_div_zval_long(value, 100) * (double) (25)); + max = (zephir_safe_div_zval_long(value, 100) * (double) (50)); ZEPHIR_INIT_VAR(&_0); ZVAL_DOUBLE(&_0, max); ZEPHIR_INIT_VAR(&_1); ZEPHIR_CONCAT_SV(&_1, "SELECT * FROM TEST WHERE value <= ", &_0); - zephir_concat_self(&query, &_1 TSRMLS_CC); + zephir_concat_self(&query, &_1); ZEPHIR_INIT_VAR(&_2); ZVAL_DOUBLE(&_2, min); ZEPHIR_INIT_VAR(&_3); ZEPHIR_CONCAT_SV(&_3, " AND value >= ", &_2); - zephir_concat_self(&query, &_3 TSRMLS_CC); + zephir_concat_self(&query, &_3); RETURN_CTOR(&query); } diff --git a/ext/test/constants.zep.c b/ext/test/constants.zep.c index 0febe017dc..d532317e56 100644 --- a/ext/test/constants.zep.c +++ b/ext/test/constants.zep.c @@ -20,30 +20,30 @@ ZEPHIR_INIT_CLASS(Test_Constants) { ZEPHIR_REGISTER_CLASS_EX(Test, Constants, test, constants, test_constantsparent_ce, test_constants_method_entry, 0); - zend_declare_property_string(test_constants_ce, SL("propWsVarsAssigned"), "$SOME/CSRF/KEY$", ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_string(test_constants_ce, SL("propWsVarsAssigned"), "$SOME/CSRF/KEY$", ZEND_ACC_PROTECTED); - zend_declare_property_string(test_constants_ce, SL("propWsVarsGet"), "$SOME/CSRF/KEY$", ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_string(test_constants_ce, SL("propWsVarsGet"), "$SOME/CSRF/KEY$", ZEND_ACC_PROTECTED); - zend_declare_property_null(test_constants_ce, SL("propertyC1"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_constants_ce, SL("propertyC1"), ZEND_ACC_PROTECTED); - zend_declare_property_bool(test_constants_ce, SL("propertyC2"), 0, ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_bool(test_constants_ce, SL("propertyC2"), 0, ZEND_ACC_PROTECTED); - zend_declare_property_bool(test_constants_ce, SL("propertyC3"), 1, ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_bool(test_constants_ce, SL("propertyC3"), 1, ZEND_ACC_PROTECTED); - zend_declare_property_long(test_constants_ce, SL("propertyC4"), 10, ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_long(test_constants_ce, SL("propertyC4"), 10, ZEND_ACC_PROTECTED); - zend_declare_property_double(test_constants_ce, SL("propertyC5"), 10.25, ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_double(test_constants_ce, SL("propertyC5"), 10.25, ZEND_ACC_PROTECTED); - zend_declare_property_string(test_constants_ce, SL("propertyC6"), "test", ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_string(test_constants_ce, SL("propertyC6"), "test", ZEND_ACC_PROTECTED); - zend_declare_property_null(test_constants_ce, SL("propertyC7"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_constants_ce, SL("propertyC7"), ZEND_ACC_PROTECTED); - zend_declare_property_null(test_constants_ce, SL("propertyC8"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_constants_ce, SL("propertyC8"), ZEND_ACC_PROTECTED); /** * @var \Phalcon\Cache\FrontendInterface */ - zend_declare_property_string(test_constants_ce, SL("propertyC9"), "some-value", ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_string(test_constants_ce, SL("propertyC9"), "some-value", ZEND_ACC_PROTECTED); zephir_declare_class_constant_null(test_constants_ce, SL("C1")); diff --git a/ext/test/constantsinterface.zep.c b/ext/test/constantsinterface.zep.c index 9f568fe022..26ddb3a04f 100644 --- a/ext/test/constantsinterface.zep.c +++ b/ext/test/constantsinterface.zep.c @@ -19,7 +19,7 @@ ZEPHIR_INIT_CLASS(Test_ConstantsInterface) { ZEPHIR_REGISTER_CLASS(Test, ConstantsInterface, test, constantsinterface, test_constantsinterface_method_entry, 0); - zend_class_implements(test_constantsinterface_ce TSRMLS_CC, 1, test_testinterface_ce); + zend_class_implements(test_constantsinterface_ce, 1, test_testinterface_ce); return SUCCESS; } diff --git a/ext/test/constantsinterfacea.zep.c b/ext/test/constantsinterfacea.zep.c index bf919dfa21..4251d7a3f1 100644 --- a/ext/test/constantsinterfacea.zep.c +++ b/ext/test/constantsinterfacea.zep.c @@ -19,7 +19,7 @@ ZEPHIR_INIT_CLASS(Test_ConstantsInterfaceA) { ZEPHIR_REGISTER_CLASS(Test, ConstantsInterfaceA, test, constantsinterfacea, test_constantsinterfacea_method_entry, 0); - zend_class_implements(test_constantsinterfacea_ce TSRMLS_CC, 1, test_testinterface_ce); + zend_class_implements(test_constantsinterfacea_ce, 1, test_testinterface_ce); return SUCCESS; } diff --git a/ext/test/constantsinterfaceb.zep.c b/ext/test/constantsinterfaceb.zep.c index 0ce2166a13..8ad54635ab 100644 --- a/ext/test/constantsinterfaceb.zep.c +++ b/ext/test/constantsinterfaceb.zep.c @@ -19,7 +19,7 @@ ZEPHIR_INIT_CLASS(Test_ConstantsInterfaceB) { ZEPHIR_REGISTER_CLASS(Test, ConstantsInterfaceB, test, constantsinterfaceb, test_constantsinterfaceb_method_entry, 0); - zend_class_implements(test_constantsinterfaceb_ce TSRMLS_CC, 1, test_testinterface_ce); + zend_class_implements(test_constantsinterfaceb_ce, 1, test_testinterface_ce); return SUCCESS; } diff --git a/ext/test/emptytest.zep.c b/ext/test/emptytest.zep.c index f92dca673b..a1bbb1fce8 100644 --- a/ext/test/emptytest.zep.c +++ b/ext/test/emptytest.zep.c @@ -60,7 +60,7 @@ PHP_METHOD(Test_EmptyTest, testDynamicVarArrayNotEmpty) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 4, 0 TSRMLS_CC); + zephir_create_array(&a, 4, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, 1); zephir_array_fast_append(&a, &_0); diff --git a/ext/test/evaltest.zep.c b/ext/test/evaltest.zep.c index faf92c4e13..e57a298659 100644 --- a/ext/test/evaltest.zep.c +++ b/ext/test/evaltest.zep.c @@ -41,7 +41,7 @@ PHP_METHOD(Test_EvalTest, evalCode) { zephir_get_strval(&code, code_param); - zephir_eval_php(&code, return_value, "test/evaltest.zep:7" TSRMLS_CC); + zephir_eval_php(&code, return_value, "test/evaltest.zep:7"); RETURN_MM(); } diff --git a/ext/test/exception.zep.c b/ext/test/exception.zep.c index 96639db429..142a3aac11 100644 --- a/ext/test/exception.zep.c +++ b/ext/test/exception.zep.c @@ -46,7 +46,7 @@ PHP_METHOD(Test_Exception, testRuntimePropertyFetch) { zephir_fetch_params(1, 1, 0, &message_param); if (UNEXPECTED(Z_TYPE_P(message_param) != IS_STRING && Z_TYPE_P(message_param) != IS_NULL)) { - zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'message' must be of the type string") TSRMLS_CC); + zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'message' must be of the type string")); RETURN_MM_NULL(); } if (EXPECTED(Z_TYPE_P(message_param) == IS_STRING)) { diff --git a/ext/test/exceptions.zep.c b/ext/test/exceptions.zep.c index be1bd3cdd7..a6294d2ef3 100644 --- a/ext/test/exceptions.zep.c +++ b/ext/test/exceptions.zep.c @@ -24,9 +24,9 @@ ZEPHIR_INIT_CLASS(Test_Exceptions) { ZEPHIR_REGISTER_CLASS(Test, Exceptions, test, exceptions, test_exceptions_method_entry, 0); - zend_declare_property_null(test_exceptions_ce, SL("internalExceptionCallable"), ZEND_ACC_PUBLIC TSRMLS_CC); + zend_declare_property_null(test_exceptions_ce, SL("internalExceptionCallable"), ZEND_ACC_PUBLIC); - zend_declare_property_null(test_exceptions_ce, SL("exceptionCallable"), ZEND_ACC_PUBLIC TSRMLS_CC); + zend_declare_property_null(test_exceptions_ce, SL("exceptionCallable"), ZEND_ACC_PUBLIC); return SUCCESS; @@ -70,7 +70,7 @@ PHP_METHOD(Test_Exceptions, testException2) { object_init_ex(&_0, test_exception_ce); ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 28, &msg); zephir_check_call_status(); - zephir_throw_exception_debug(&_0, "test/exceptions.zep", 23 TSRMLS_CC); + zephir_throw_exception_debug(&_0, "test/exceptions.zep", 23); ZEPHIR_MM_RESTORE(); return; @@ -94,7 +94,7 @@ PHP_METHOD(Test_Exceptions, testException3) { object_init_ex(&ex, test_exception_ce); ZEPHIR_CALL_METHOD(NULL, &ex, "__construct", NULL, 28, &msg); zephir_check_call_status(); - zephir_throw_exception_debug(&ex, "test/exceptions.zep", 31 TSRMLS_CC); + zephir_throw_exception_debug(&ex, "test/exceptions.zep", 31); ZEPHIR_MM_RESTORE(); return; @@ -133,7 +133,7 @@ PHP_METHOD(Test_Exceptions, testException4) { ZEPHIR_CALL_METHOD(&_0, this_ptr, "getexception", NULL, 0); zephir_check_call_status(); - zephir_throw_exception_debug(&_0, "test/exceptions.zep", 41 TSRMLS_CC); + zephir_throw_exception_debug(&_0, "test/exceptions.zep", 41); ZEPHIR_MM_RESTORE(); return; @@ -157,7 +157,7 @@ PHP_METHOD(Test_Exceptions, testException5) { ZVAL_STRING(&_0, "hello5"); ZEPHIR_CALL_METHOD(NULL, &exception, "__construct", NULL, 28, &_0); zephir_check_call_status(); - zephir_throw_exception_debug(&exception, "test/exceptions.zep", 49 TSRMLS_CC); + zephir_throw_exception_debug(&exception, "test/exceptions.zep", 49); ZEPHIR_MM_RESTORE(); return; @@ -223,7 +223,7 @@ PHP_METHOD(Test_Exceptions, testExceptionSprintf) { ZVAL_STRING(&_0, "Hello, %s"); ZEPHIR_CALL_FUNCTION(&_1, "sprintf", NULL, 17, &_0, &name); zephir_check_call_status(); - zephir_throw_exception_debug(&_1, "test/exceptions.zep", 68 TSRMLS_CC); + zephir_throw_exception_debug(&_1, "test/exceptions.zep", 68); ZEPHIR_MM_RESTORE(); return; @@ -249,7 +249,7 @@ PHP_METHOD(Test_Exceptions, testExceptionConcat) { ZEPHIR_INIT_VAR(&_0); ZEPHIR_CONCAT_SVSV(&_0, "Framework ", &framework, " written using ", &language); - zephir_throw_exception_debug(&_0, "test/exceptions.zep", 73 TSRMLS_CC); + zephir_throw_exception_debug(&_0, "test/exceptions.zep", 73); ZEPHIR_MM_RESTORE(); return; @@ -279,10 +279,10 @@ PHP_METHOD(Test_Exceptions, testExceptionRethrow) { ZEPHIR_INIT_VAR(&_0); ZVAL_OBJ(&_0, EG(exception)); Z_ADDREF_P(&_0); - if (zephir_instance_of_ev(&_0, zend_exception_get_default(TSRMLS_C) TSRMLS_CC)) { + if (zephir_instance_of_ev(&_0, zend_exception_get_default(TSRMLS_C))) { zend_clear_exception(TSRMLS_C); ZEPHIR_CPY_WRT(&e, &_0); - zephir_throw_exception_debug(&e, "test/exceptions.zep", 83 TSRMLS_CC); + zephir_throw_exception_debug(&e, "test/exceptions.zep", 83); ZEPHIR_MM_RESTORE(); return; } @@ -323,7 +323,7 @@ PHP_METHOD(Test_Exceptions, testMultiException) { /* try_start_1: */ - zephir_throw_exception_debug(exception, "test/exceptions.zep", 95 TSRMLS_CC); + zephir_throw_exception_debug(exception, "test/exceptions.zep", 95); goto try_end_1; @@ -333,10 +333,10 @@ PHP_METHOD(Test_Exceptions, testMultiException) { ZEPHIR_INIT_VAR(&_0); ZVAL_OBJ(&_0, EG(exception)); Z_ADDREF_P(&_0); - if (zephir_instance_of_ev(&_0, test_exception_ce TSRMLS_CC)) { + if (zephir_instance_of_ev(&_0, test_exception_ce)) { zend_clear_exception(TSRMLS_C); ZEPHIR_CPY_WRT(&e, &_0); - _1$$4 = zephir_is_callable(&iexc TSRMLS_CC); + _1$$4 = zephir_is_callable(&iexc); if (_1$$4) { ZEPHIR_CALL_ZVAL_FUNCTION(&_2$$4, &iexc, NULL, 0); zephir_check_call_status(); @@ -344,15 +344,15 @@ PHP_METHOD(Test_Exceptions, testMultiException) { } if (_1$$4) { } else { - zephir_throw_exception_debug(&e, "test/exceptions.zep", 101 TSRMLS_CC); + zephir_throw_exception_debug(&e, "test/exceptions.zep", 101); ZEPHIR_MM_RESTORE(); return; } } else { - if (zephir_instance_of_ev(&_0, zend_exception_get_default(TSRMLS_C) TSRMLS_CC)) { + if (zephir_instance_of_ev(&_0, zend_exception_get_default(TSRMLS_C))) { zend_clear_exception(TSRMLS_C); ZEPHIR_CPY_WRT(&e, &_0); - _3$$7 = zephir_is_callable(&exc TSRMLS_CC); + _3$$7 = zephir_is_callable(&exc); if (_3$$7) { ZEPHIR_CALL_ZVAL_FUNCTION(&_4$$7, &exc, NULL, 0); zephir_check_call_status(); @@ -360,15 +360,15 @@ PHP_METHOD(Test_Exceptions, testMultiException) { } if (_3$$7) { } else { - zephir_throw_exception_debug(&e, "test/exceptions.zep", 108 TSRMLS_CC); + zephir_throw_exception_debug(&e, "test/exceptions.zep", 108); ZEPHIR_MM_RESTORE(); return; } } else { - if (zephir_is_instance_of(&_0, SL("RuntimeError") TSRMLS_CC)) { + if (zephir_is_instance_of(&_0, SL("RuntimeError"))) { zend_clear_exception(TSRMLS_C); ZEPHIR_CPY_WRT(&f, &_0); - _5$$10 = zephir_is_callable(&exc TSRMLS_CC); + _5$$10 = zephir_is_callable(&exc); if (_5$$10) { ZEPHIR_CALL_ZVAL_FUNCTION(&_6$$10, &exc, NULL, 0); zephir_check_call_status(); @@ -376,15 +376,15 @@ PHP_METHOD(Test_Exceptions, testMultiException) { } if (_5$$10) { } else { - zephir_throw_exception_debug(&f, "test/exceptions.zep", 115 TSRMLS_CC); + zephir_throw_exception_debug(&f, "test/exceptions.zep", 115); ZEPHIR_MM_RESTORE(); return; } } else { - if (zephir_is_instance_of(&_0, SL("LogicError") TSRMLS_CC)) { + if (zephir_is_instance_of(&_0, SL("LogicError"))) { zend_clear_exception(TSRMLS_C); ZEPHIR_CPY_WRT(&f, &_0); - _7$$13 = zephir_is_callable(&exc TSRMLS_CC); + _7$$13 = zephir_is_callable(&exc); if (_7$$13) { ZEPHIR_CALL_ZVAL_FUNCTION(&_8$$13, &exc, NULL, 0); zephir_check_call_status(); @@ -392,7 +392,7 @@ PHP_METHOD(Test_Exceptions, testMultiException) { } if (_7$$13) { } else { - zephir_throw_exception_debug(&f, "test/exceptions.zep", 115 TSRMLS_CC); + zephir_throw_exception_debug(&f, "test/exceptions.zep", 115); ZEPHIR_MM_RESTORE(); return; } @@ -431,7 +431,7 @@ PHP_METHOD(Test_Exceptions, issue1325) { ZEPHIR_INIT_VAR(&_0); ZVAL_OBJ(&_0, EG(exception)); Z_ADDREF_P(&_0); - if (zephir_instance_of_ev(&_0, zend_exception_get_default(TSRMLS_C) TSRMLS_CC)) { + if (zephir_instance_of_ev(&_0, zend_exception_get_default(TSRMLS_C))) { zend_clear_exception(TSRMLS_C); ZEPHIR_CPY_WRT(&e, &_0); ZEPHIR_INIT_NVAR(&status); diff --git a/ext/test/exists.zep.c b/ext/test/exists.zep.c index 1137a3b099..4567da7e66 100644 --- a/ext/test/exists.zep.c +++ b/ext/test/exists.zep.c @@ -45,7 +45,7 @@ PHP_METHOD(Test_Exists, testClassExists) { ZVAL_BOOL(&_0, (autoload ? 1 : 0)); - RETURN_BOOL(zephir_class_exists(className, zephir_is_true(&_0) TSRMLS_CC)); + RETURN_BOOL(zephir_class_exists(className, zephir_is_true(&_0) )); } @@ -68,7 +68,7 @@ PHP_METHOD(Test_Exists, testInterfaceExists) { ZVAL_BOOL(&_0, (autoload ? 1 : 0)); - RETURN_BOOL(zephir_interface_exists(interfaceName, zephir_is_true(&_0) TSRMLS_CC)); + RETURN_BOOL(zephir_interface_exists(interfaceName, zephir_is_true(&_0) )); } @@ -84,7 +84,7 @@ PHP_METHOD(Test_Exists, testMethodExists) { - RETURN_BOOL((zephir_method_exists(obj, methodName TSRMLS_CC) == SUCCESS)); + RETURN_BOOL((zephir_method_exists(obj, methodName) == SUCCESS)); } @@ -99,7 +99,7 @@ PHP_METHOD(Test_Exists, testFileExists) { - RETURN_BOOL((zephir_file_exists(fileName TSRMLS_CC) == SUCCESS)); + RETURN_BOOL((zephir_file_exists(fileName) == SUCCESS)); } diff --git a/ext/test/extendedinterface.zep.c b/ext/test/extendedinterface.zep.c index 25ab7f24e1..5c2257c2fc 100644 --- a/ext/test/extendedinterface.zep.c +++ b/ext/test/extendedinterface.zep.c @@ -16,8 +16,8 @@ ZEPHIR_INIT_CLASS(Test_ExtendedInterface) { ZEPHIR_REGISTER_INTERFACE(Test, ExtendedInterface, test, extendedinterface, NULL); - zend_class_implements(test_extendedinterface_ce TSRMLS_CC, 1, zend_ce_aggregate); - zend_class_implements(test_extendedinterface_ce TSRMLS_CC, 1, spl_ce_Countable); + zend_class_implements(test_extendedinterface_ce, 1, zend_ce_aggregate); + zend_class_implements(test_extendedinterface_ce, 1, spl_ce_Countable); return SUCCESS; } diff --git a/ext/test/fannkuch.zep.c b/ext/test/fannkuch.zep.c index d96a88925b..6571e446cd 100644 --- a/ext/test/fannkuch.zep.c +++ b/ext/test/fannkuch.zep.c @@ -120,21 +120,21 @@ PHP_METHOD(Test_Fannkuch, process) { _5$$4 = 1; } i = _6$$4; - zephir_array_fetch_long(&_8$$7, &perm1, i, PH_NOISY | PH_READONLY, "test/fannkuch.zep", 43 TSRMLS_CC); + zephir_array_fetch_long(&_8$$7, &perm1, i, PH_NOISY | PH_READONLY, "test/fannkuch.zep", 43); zephir_array_update_long(&perm, i, &_8$$7, PH_COPY | PH_SEPARATE ZEPHIR_DEBUG_PARAMS_DUMMY); } } flipsCount = 0; k = 0; while (1) { - zephir_array_fetch_long(&_9$$4, &perm, 0, PH_NOISY | PH_READONLY, "test/fannkuch.zep", 48 TSRMLS_CC); + zephir_array_fetch_long(&_9$$4, &perm, 0, PH_NOISY | PH_READONLY, "test/fannkuch.zep", 48); if (!(!ZEPHIR_IS_LONG(&_9$$4, 0))) { break; } ZEPHIR_OBS_NVAR(&_10$$8); - zephir_array_fetch_long(&_10$$8, &perm, 0, PH_NOISY, "test/fannkuch.zep", 49 TSRMLS_CC); + zephir_array_fetch_long(&_10$$8, &perm, 0, PH_NOISY, "test/fannkuch.zep", 49); k = zephir_get_intval(&_10$$8); - k2 = (long) (((zephir_safe_div_long_long(((k + 1)), 2 TSRMLS_CC)) - (double) (1))); + k2 = (long) (((zephir_safe_div_long_long(((k + 1)), 2)) - (double) (1))); _13$$8 = k2; _12$$8 = 0; _11$$8 = 0; @@ -149,8 +149,8 @@ PHP_METHOD(Test_Fannkuch, process) { _11$$8 = 1; } i = _12$$8; - zephir_array_fetch_long(&temp, &perm, i, PH_NOISY | PH_READONLY, "test/fannkuch.zep", 51 TSRMLS_CC); - zephir_array_fetch_long(&_14$$9, &perm, (k - i), PH_NOISY | PH_READONLY, "test/fannkuch.zep", 51 TSRMLS_CC); + zephir_array_fetch_long(&temp, &perm, i, PH_NOISY | PH_READONLY, "test/fannkuch.zep", 51); + zephir_array_fetch_long(&_14$$9, &perm, (k - i), PH_NOISY | PH_READONLY, "test/fannkuch.zep", 51); zephir_array_update_long(&perm, i, &_14$$9, PH_COPY | PH_SEPARATE ZEPHIR_DEBUG_PARAMS_DUMMY); zephir_array_update_long(&perm, (k - i), &temp, PH_COPY | PH_SEPARATE ZEPHIR_DEBUG_PARAMS_DUMMY); } @@ -160,14 +160,14 @@ PHP_METHOD(Test_Fannkuch, process) { if (maxFlipsCount < flipsCount) { maxFlipsCount = flipsCount; } - if (zephir_safe_mod_long_long(permCount, 2 TSRMLS_CC) == 0) { + if (zephir_safe_mod_long_long(permCount, 2) == 0) { checksum += flipsCount; } else { checksum -= flipsCount; } while (1) { if (r == n) { - zephir_create_array(return_value, 3, 0 TSRMLS_CC); + zephir_create_array(return_value, 3, 0); ZEPHIR_INIT_NVAR(&_15$$14); ZVAL_LONG(&_15$$14, checksum); zephir_array_fast_append(return_value, &_15$$14); @@ -179,23 +179,23 @@ PHP_METHOD(Test_Fannkuch, process) { zephir_array_fast_append(return_value, &_15$$14); RETURN_MM(); } - zephir_array_fetch_long(&perm0, &perm1, 0, PH_NOISY | PH_READONLY, "test/fannkuch.zep", 75 TSRMLS_CC); + zephir_array_fetch_long(&perm0, &perm1, 0, PH_NOISY | PH_READONLY, "test/fannkuch.zep", 75); i = 0; while (1) { if (!(i < r)) { break; } j = (i + 1); - zephir_array_fetch_long(&_16$$15, &perm1, j, PH_NOISY | PH_READONLY, "test/fannkuch.zep", 78 TSRMLS_CC); + zephir_array_fetch_long(&_16$$15, &perm1, j, PH_NOISY | PH_READONLY, "test/fannkuch.zep", 78); zephir_array_update_long(&perm1, i, &_16$$15, PH_COPY | PH_SEPARATE ZEPHIR_DEBUG_PARAMS_DUMMY); i = j; } zephir_array_update_long(&perm1, r, &perm0, PH_COPY | PH_SEPARATE ZEPHIR_DEBUG_PARAMS_DUMMY); - zephir_array_fetch_long(&_17$$13, &count, r, PH_NOISY | PH_READONLY, "test/fannkuch.zep", 82 TSRMLS_CC); + zephir_array_fetch_long(&_17$$13, &count, r, PH_NOISY | PH_READONLY, "test/fannkuch.zep", 82); ZEPHIR_INIT_NVAR(&_18$$13); ZVAL_LONG(&_18$$13, (zephir_get_numberval(&_17$$13) - 1)); zephir_array_update_long(&count, r, &_18$$13, PH_COPY | PH_SEPARATE ZEPHIR_DEBUG_PARAMS_DUMMY); - zephir_array_fetch_long(&_19$$13, &count, r, PH_NOISY | PH_READONLY, "test/fannkuch.zep", 83 TSRMLS_CC); + zephir_array_fetch_long(&_19$$13, &count, r, PH_NOISY | PH_READONLY, "test/fannkuch.zep", 83); if (ZEPHIR_GT_LONG(&_19$$13, 0)) { break; } diff --git a/ext/test/fasta.zep.c b/ext/test/fasta.zep.c index 09e131f399..028c72ca51 100644 --- a/ext/test/fasta.zep.c +++ b/ext/test/fasta.zep.c @@ -76,18 +76,18 @@ PHP_METHOD(Test_Fasta, fastaRepeat) { ZVAL_LONG(&len, zephir_fast_strlen_ev(&seq)); ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_1, ((zephir_get_numberval(&len) * 60) + 1)); - zephir_create_array(&_0, zephir_get_intval(&_1), 1 TSRMLS_CC); + zephir_create_array(&_0, zephir_get_intval(&_1), 1); zephir_get_arrval(&_2, &_0); ZEPHIR_INIT_VAR(&str); - zephir_fast_join(&str, &seq, &_2 TSRMLS_CC); + zephir_fast_join(&str, &seq, &_2); ZEPHIR_INIT_VAR(&_3); ZEPHIR_INIT_VAR(&_4); - mul_function(&_4, &len, &len TSRMLS_CC); - zephir_create_array(&_3, zephir_get_intval(&_4), 1 TSRMLS_CC); + mul_function(&_4, &len, &len); + zephir_create_array(&_3, zephir_get_intval(&_4), 1); zephir_get_arrval(&_5, &_3); ZEPHIR_CPY_WRT(&lines, &_5); ZEPHIR_INIT_VAR(&j); - mul_function(&j, &len, &len TSRMLS_CC); + mul_function(&j, &len, &len); i = zephir_get_numberval(&j); while (1) { if (ZEPHIR_LE_LONG(&j, -1)) { @@ -103,14 +103,14 @@ PHP_METHOD(Test_Fasta, fastaRepeat) { } ZEPHIR_INIT_NVAR(&j); ZVAL_LONG(&j, 0); - ZVAL_DOUBLE(&_9, zephir_safe_div_zval_long(n, 60 TSRMLS_CC)); + ZVAL_DOUBLE(&_9, zephir_safe_div_zval_long(n, 60)); ZEPHIR_INIT_VAR(&l); - ZVAL_DOUBLE(&l, zephir_floor(&_9 TSRMLS_CC)); - ZVAL_DOUBLE(&_10, zephir_safe_div_zval_long(&l, i TSRMLS_CC)); + ZVAL_DOUBLE(&l, zephir_floor(&_9)); + ZVAL_DOUBLE(&_10, zephir_safe_div_zval_long(&l, i)); ZEPHIR_INIT_VAR(&k); - ZVAL_DOUBLE(&k, zephir_floor(&_10 TSRMLS_CC)); + ZVAL_DOUBLE(&k, zephir_floor(&_10)); ZEPHIR_INIT_VAR(&block); - zephir_fast_join_str(&block, SL("\n"), &lines TSRMLS_CC); + zephir_fast_join_str(&block, SL("\n"), &lines); while (1) { if (!(ZEPHIR_LT(&j, &k))) { break; @@ -122,20 +122,20 @@ PHP_METHOD(Test_Fasta, fastaRepeat) { ZEPHIR_INIT_NVAR(&j); ZVAL_LONG(&j, 0); ZEPHIR_INIT_NVAR(&k); - ZVAL_DOUBLE(&k, zephir_safe_mod_zval_long(&l, i TSRMLS_CC)); + ZVAL_DOUBLE(&k, zephir_safe_mod_zval_long(&l, i)); while (1) { if (!(ZEPHIR_LT(&j, &k))) { break; } - zephir_array_fetch(&_11$$6, &lines, &j, PH_NOISY | PH_READONLY, "test/fasta.zep", 38 TSRMLS_CC); + zephir_array_fetch(&_11$$6, &lines, &j, PH_NOISY | PH_READONLY, "test/fasta.zep", 38); zend_print_zval(&_11$$6, 0); ZEPHIR_SEPARATE(&j); zephir_increment(&j); } - if (zephir_safe_mod_zval_long(n, 60 TSRMLS_CC) > 0) { - zephir_array_fetch(&_12$$7, &lines, &k, PH_NOISY | PH_READONLY, "test/fasta.zep", 43 TSRMLS_CC); + if (zephir_safe_mod_zval_long(n, 60) > 0) { + zephir_array_fetch(&_12$$7, &lines, &k, PH_NOISY | PH_READONLY, "test/fasta.zep", 43); ZVAL_LONG(&_13$$7, 0); - ZVAL_DOUBLE(&_14$$7, zephir_safe_mod_zval_long(n, 60 TSRMLS_CC)); + ZVAL_DOUBLE(&_14$$7, zephir_safe_mod_zval_long(n, 60)); ZEPHIR_INIT_VAR(&_15$$7); zephir_substr(&_15$$7, &_12$$7, 0 , zephir_get_intval(&_14$$7), 0); zend_print_zval(&_15$$7, 0); @@ -176,7 +176,7 @@ PHP_METHOD(Test_Fasta, main) { ZEPHIR_CONCAT_SSSSSSS(&_0, "GGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGG", "GAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGA", "CCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAAT", "ACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCA", "GCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGG", "AGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCC", "AGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAA"); ZEPHIR_CPY_WRT(&alu, &_0); ZEPHIR_INIT_VAR(&iub); - zephir_create_array(&iub, 15, 0 TSRMLS_CC); + zephir_create_array(&iub, 15, 0); add_assoc_double_ex(&iub, SL("a"), 0.27); add_assoc_double_ex(&iub, SL("c"), 0.12); add_assoc_double_ex(&iub, SL("g"), 0.12); @@ -193,7 +193,7 @@ PHP_METHOD(Test_Fasta, main) { add_assoc_double_ex(&iub, SL("W"), 0.02); add_assoc_double_ex(&iub, SL("Y"), 0.02); ZEPHIR_INIT_VAR(&homoSap); - zephir_create_array(&homoSap, 4, 0 TSRMLS_CC); + zephir_create_array(&homoSap, 4, 0); add_assoc_double_ex(&homoSap, SL("a"), 0.3029549426680); add_assoc_double_ex(&homoSap, SL("c"), 0.1979883004921); add_assoc_double_ex(&homoSap, SL("g"), 0.1975473066391); diff --git a/ext/test/fcall.zep.c b/ext/test/fcall.zep.c index 2f3b272db5..29c74456c2 100644 --- a/ext/test/fcall.zep.c +++ b/ext/test/fcall.zep.c @@ -71,7 +71,7 @@ PHP_METHOD(Test_Fcall, testCall2) { while (1) { ZVAL_LONG(&_0$$3, 0); ZVAL_LONG(&_1$$3, 100); - RETURN_LONG(zephir_mt_rand(zephir_get_intval(&_0$$3), zephir_get_intval(&_1$$3) TSRMLS_CC)); + RETURN_LONG(zephir_mt_rand(zephir_get_intval(&_0$$3), zephir_get_intval(&_1$$3))); } } @@ -113,10 +113,10 @@ PHP_METHOD(Test_Fcall, testCall3) { if (ZEPHIR_IS_FALSE_IDENTICAL(&buffer)) { break; } - zephir_fwrite(NULL, &handle2, &buffer TSRMLS_CC); + zephir_fwrite(NULL, &handle2, &buffer); } - zephir_fclose(&handle TSRMLS_CC); - zephir_fclose(&handle2 TSRMLS_CC); + zephir_fclose(&handle); + zephir_fclose(&handle2); } ZEPHIR_MM_RESTORE(); @@ -159,10 +159,10 @@ PHP_METHOD(Test_Fcall, testCall4) { if (ZEPHIR_IS_FALSE_IDENTICAL(&buffer)) { break; } - zephir_fwrite(NULL, &handle2, &buffer TSRMLS_CC); + zephir_fwrite(NULL, &handle2, &buffer); } - zephir_fclose(&handle TSRMLS_CC); - zephir_fclose(&handle2 TSRMLS_CC); + zephir_fclose(&handle); + zephir_fclose(&handle2); } ZEPHIR_MM_RESTORE(); @@ -378,7 +378,7 @@ PHP_METHOD(Test_Fcall, testFunctionGetArg) { - zephir_create_array(return_value, 2, 0 TSRMLS_CC); + zephir_create_array(return_value, 2, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_1, 0); zephir_get_arg(&_0, zephir_get_intval(&_1)); @@ -403,7 +403,7 @@ PHP_METHOD(Test_Fcall, testFunctionGetArgAllExtra) { ZEPHIR_MM_GROW(); - zephir_create_array(return_value, 2, 0 TSRMLS_CC); + zephir_create_array(return_value, 2, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_1, 0); zephir_get_arg(&_0, zephir_get_intval(&_1)); @@ -428,7 +428,7 @@ PHP_METHOD(Test_Fcall, testStaticFunctionGetArgAllExtra) { ZEPHIR_MM_GROW(); - zephir_create_array(return_value, 2, 0 TSRMLS_CC); + zephir_create_array(return_value, 2, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_1, 0); zephir_get_arg(&_0, zephir_get_intval(&_1)); @@ -469,7 +469,7 @@ PHP_METHOD(Test_Fcall, testArrayFill) { ZVAL_STRING(&_2, "?"); ZEPHIR_CALL_FUNCTION(&v2, "array_fill", &_3, 36, &_0, &_1, &_2); zephir_check_call_status(); - zephir_create_array(return_value, 2, 0 TSRMLS_CC); + zephir_create_array(return_value, 2, 0); zephir_array_fast_append(return_value, &v1); zephir_array_fast_append(return_value, &v2); RETURN_MM(); @@ -490,7 +490,7 @@ PHP_FUNCTION(g_test_zephir_global_method_test) { ZEPHIR_INIT_VAR(&_0); object_init_ex(&_0, test_fcall_ce); - if (zephir_has_constructor(&_0 TSRMLS_CC)) { + if (zephir_has_constructor(&_0)) { ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 0); zephir_check_call_status(); } @@ -528,7 +528,7 @@ PHP_FUNCTION(f_Test_zephir_namespaced_method_test) { ZEPHIR_INIT_VAR(&_0); object_init_ex(&_0, test_fcall_ce); - if (zephir_has_constructor(&_0 TSRMLS_CC)) { + if (zephir_has_constructor(&_0)) { ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 0); zephir_check_call_status(); } diff --git a/ext/test/fetchtest.zep.c b/ext/test/fetchtest.zep.c index 751d51e369..7f1ceb1777 100644 --- a/ext/test/fetchtest.zep.c +++ b/ext/test/fetchtest.zep.c @@ -25,7 +25,7 @@ ZEPHIR_INIT_CLASS(Test_FetchTest) { ZEPHIR_REGISTER_CLASS(Test, FetchTest, test, fetchtest, test_fetchtest_method_entry, 0); - zend_declare_property_null(test_fetchtest_ce, SL("values"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_fetchtest_ce, SL("values"), ZEND_ACC_PROTECTED); return SUCCESS; @@ -69,7 +69,7 @@ PHP_METHOD(Test_FetchTest, testFetchArray1) { - RETURN_BOOL(zephir_array_isset_fetch(&c, a, b, 1 TSRMLS_CC)); + RETURN_BOOL(zephir_array_isset_fetch(&c, a, b, 1)); } @@ -89,7 +89,7 @@ PHP_METHOD(Test_FetchTest, testFetchArray2) { ZEPHIR_OBS_NVAR(a); - RETURN_MM_BOOL(zephir_array_isset_fetch(a, a, b, 0 TSRMLS_CC)); + RETURN_MM_BOOL(zephir_array_isset_fetch(a, a, b, 0)); } @@ -107,7 +107,7 @@ PHP_METHOD(Test_FetchTest, testFetchArray3) { b = zephir_get_intval(b_param); - RETURN_BOOL(zephir_array_isset_long_fetch(&c, a, b, 1 TSRMLS_CC)); + RETURN_BOOL(zephir_array_isset_long_fetch(&c, a, b, 1)); } @@ -128,7 +128,7 @@ PHP_METHOD(Test_FetchTest, testFetchArray4) { ZEPHIR_OBS_NVAR(a); - RETURN_MM_BOOL(zephir_array_isset_long_fetch(a, a, b, 0 TSRMLS_CC)); + RETURN_MM_BOOL(zephir_array_isset_long_fetch(a, a, b, 0)); } @@ -149,7 +149,7 @@ PHP_METHOD(Test_FetchTest, testFetchArray5) { zephir_get_strval(&b, b_param); - RETURN_MM_BOOL(zephir_array_isset_fetch(&c, a, &b, 1 TSRMLS_CC)); + RETURN_MM_BOOL(zephir_array_isset_fetch(&c, a, &b, 1)); } @@ -171,7 +171,7 @@ PHP_METHOD(Test_FetchTest, testFetchArray6) { ZEPHIR_OBS_NVAR(a); - RETURN_MM_BOOL(zephir_array_isset_fetch(a, a, &b, 0 TSRMLS_CC)); + RETURN_MM_BOOL(zephir_array_isset_fetch(a, a, &b, 0)); } @@ -229,7 +229,7 @@ PHP_METHOD(Test_FetchTest, testFetchPost) { - if (!(zephir_array_isset_fetch(&c, &_POST, b, 1 TSRMLS_CC))) { + if (!(zephir_array_isset_fetch(&c, &_POST, b, 1))) { RETURN_BOOL(0); } RETURN_CTORW(&c); @@ -286,10 +286,10 @@ PHP_METHOD(Test_FetchTest, getValue) { ZEPHIR_OBS_VAR(&value); - if (!(zephir_array_isset_fetch(&value, &_POST, &name, 0 TSRMLS_CC))) { + if (!(zephir_array_isset_fetch(&value, &_POST, &name, 0))) { ZEPHIR_OBS_NVAR(&value); zephir_read_property(&_0$$3, this_ptr, SL("values"), PH_NOISY_CC | PH_READONLY); - if (!(zephir_array_isset_fetch(&value, &_0$$3, &name, 0 TSRMLS_CC))) { + if (!(zephir_array_isset_fetch(&value, &_0$$3, &name, 0))) { RETURN_MM_NULL(); } } diff --git a/ext/test/fibonnaci.zep.c b/ext/test/fibonnaci.zep.c index 3f14ec3321..beaa738ff0 100644 --- a/ext/test/fibonnaci.zep.c +++ b/ext/test/fibonnaci.zep.c @@ -89,7 +89,7 @@ PHP_METHOD(Test_Fibonnaci, fibArray) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&fib); - zephir_create_array(&fib, 2, 0 TSRMLS_CC); + zephir_create_array(&fib, 2, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, 0); zephir_array_fast_append(&fib, &_0); @@ -104,8 +104,8 @@ PHP_METHOD(Test_Fibonnaci, fibArray) { } k = (i - 1); j = (i - 2); - zephir_array_fetch_long(&a, &fib, k, PH_NOISY | PH_READONLY, "test/fibonnaci.zep", 51 TSRMLS_CC); - zephir_array_fetch_long(&b, &fib, j, PH_NOISY | PH_READONLY, "test/fibonnaci.zep", 52 TSRMLS_CC); + zephir_array_fetch_long(&a, &fib, k, PH_NOISY | PH_READONLY, "test/fibonnaci.zep", 51); + zephir_array_fetch_long(&b, &fib, j, PH_NOISY | PH_READONLY, "test/fibonnaci.zep", 52); ZEPHIR_INIT_NVAR(&c); zephir_add_function(&c, &a, &b); zephir_array_update_long(&fib, i, &c, PH_COPY | PH_SEPARATE ZEPHIR_DEBUG_PARAMS_DUMMY); @@ -131,7 +131,7 @@ PHP_METHOD(Test_Fibonnaci, fibArray2) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&fib); - zephir_create_array(&fib, 2, 0 TSRMLS_CC); + zephir_create_array(&fib, 2, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, 0); zephir_array_fast_append(&fib, &_0); @@ -144,8 +144,8 @@ PHP_METHOD(Test_Fibonnaci, fibArray2) { if (!(i < n)) { break; } - zephir_array_fetch_long(&_1$$3, &fib, (i - 1), PH_NOISY | PH_READONLY, "test/fibonnaci.zep", 67 TSRMLS_CC); - zephir_array_fetch_long(&_2$$3, &fib, (i - 2), PH_NOISY | PH_READONLY, "test/fibonnaci.zep", 67 TSRMLS_CC); + zephir_array_fetch_long(&_1$$3, &fib, (i - 1), PH_NOISY | PH_READONLY, "test/fibonnaci.zep", 67); + zephir_array_fetch_long(&_2$$3, &fib, (i - 2), PH_NOISY | PH_READONLY, "test/fibonnaci.zep", 67); ZEPHIR_INIT_NVAR(&_3$$3); zephir_add_function(&_3$$3, &_1$$3, &_2$$3); zephir_array_update_long(&fib, i, &_3$$3, PH_COPY | PH_SEPARATE ZEPHIR_DEBUG_PARAMS_DUMMY); diff --git a/ext/test/flow.zep.c b/ext/test/flow.zep.c index 142a2467d5..cb4b78f5a9 100644 --- a/ext/test/flow.zep.c +++ b/ext/test/flow.zep.c @@ -812,7 +812,7 @@ PHP_METHOD(Test_Flow, testFor1) { c = 0; ZEPHIR_INIT_VAR(&b); - zephir_create_array(&b, 4, 0 TSRMLS_CC); + zephir_create_array(&b, 4, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, 1); zephir_array_fast_append(&b, &_0); @@ -874,7 +874,7 @@ PHP_METHOD(Test_Flow, testFor2) { c = (double) (0); ZEPHIR_INIT_VAR(&b); - zephir_create_array(&b, 4, 0 TSRMLS_CC); + zephir_create_array(&b, 4, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, 1); zephir_array_fast_append(&b, &_0); @@ -943,7 +943,7 @@ PHP_METHOD(Test_Flow, testFor3) { ZEPHIR_INIT_VAR(&c); array_init(&c); ZEPHIR_INIT_VAR(&b); - zephir_create_array(&b, 4, 0 TSRMLS_CC); + zephir_create_array(&b, 4, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, 1); zephir_array_fast_append(&b, &_0); @@ -1250,7 +1250,7 @@ PHP_METHOD(Test_Flow, testFor11) { _0 = 1; } a = _1; - zephir_concat_self_char(&b, a TSRMLS_CC); + zephir_concat_self_char(&b, a); } } RETURN_CTOR(&b); @@ -1285,7 +1285,7 @@ PHP_METHOD(Test_Flow, testFor12) { _0 = 1; } a = _1; - zephir_concat_self_char(&b, a TSRMLS_CC); + zephir_concat_self_char(&b, a); } } RETURN_CTOR(&b); @@ -1320,7 +1320,7 @@ PHP_METHOD(Test_Flow, testFor13) { _0 = 1; } a = _1; - zephir_concat_self_char(&b, a TSRMLS_CC); + zephir_concat_self_char(&b, a); } } RETURN_CTOR(&b); @@ -1355,7 +1355,7 @@ PHP_METHOD(Test_Flow, testFor14) { _0 = 1; } a = _1; - zephir_concat_self_char(&b, a TSRMLS_CC); + zephir_concat_self_char(&b, a); } } RETURN_CTOR(&b); @@ -1706,7 +1706,7 @@ PHP_METHOD(Test_Flow, testFor23) { ZEPHIR_INIT_NVAR(&a); ZVAL_LONG(&a, _1); _3$$3 = (char) zephir_get_intval(&a); - zephir_concat_self_char(&b, _3$$3 TSRMLS_CC); + zephir_concat_self_char(&b, _3$$3); } } RETURN_CTOR(&b); @@ -1733,7 +1733,7 @@ PHP_METHOD(Test_Flow, testFor24) { ZEPHIR_INIT_VAR(&b); ZVAL_STRING(&b, ""); ZEPHIR_INIT_VAR(&_0); - zephir_create_array(&_0, 4, 0 TSRMLS_CC); + zephir_create_array(&_0, 4, 0); ZEPHIR_INIT_VAR(&_1); ZVAL_LONG(&_1, 'a'); zephir_array_fast_append(&_0, &_1); @@ -1752,7 +1752,7 @@ PHP_METHOD(Test_Flow, testFor24) { { ZEPHIR_INIT_NVAR(&a); ZVAL_COPY(&a, _2); - zephir_concat_self(&b, &a TSRMLS_CC); + zephir_concat_self(&b, &a); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &_0, "rewind", NULL, 0); @@ -1765,7 +1765,7 @@ PHP_METHOD(Test_Flow, testFor24) { } ZEPHIR_CALL_METHOD(&a, &_0, "current", NULL, 0); zephir_check_call_status(); - zephir_concat_self(&b, &a TSRMLS_CC); + zephir_concat_self(&b, &a); ZEPHIR_CALL_METHOD(NULL, &_0, "next", NULL, 0); zephir_check_call_status(); } @@ -1899,9 +1899,9 @@ PHP_METHOD(Test_Flow, testFor33) { ZEPHIR_INIT_VAR(&result); array_init(&result); - _0 = zephir_get_iterator(e TSRMLS_CC); - _0->funcs->rewind(_0 TSRMLS_CC); - for (;_0->funcs->valid(_0 TSRMLS_CC) == SUCCESS && !EG(exception); _0->funcs->move_forward(_0 TSRMLS_CC)) { + _0 = zephir_get_iterator(e); + _0->funcs->rewind(_0); + for (;_0->funcs->valid(_0) == SUCCESS && !EG(exception); _0->funcs->move_forward(_0)) { { ZEPHIR_ITERATOR_COPY(&v, _0); } @@ -1936,9 +1936,9 @@ PHP_METHOD(Test_Flow, testFor34) { ZEPHIR_INIT_VAR(&result); array_init(&result); if (Z_TYPE_P(e) == IS_OBJECT) { - _0$$3 = zephir_get_iterator(e TSRMLS_CC); - _0$$3->funcs->rewind(_0$$3 TSRMLS_CC); - for (;_0$$3->funcs->valid(_0$$3 TSRMLS_CC) == SUCCESS && !EG(exception); _0$$3->funcs->move_forward(_0$$3 TSRMLS_CC)) { + _0$$3 = zephir_get_iterator(e); + _0$$3->funcs->rewind(_0$$3); + for (;_0$$3->funcs->valid(_0$$3) == SUCCESS && !EG(exception); _0$$3->funcs->move_forward(_0$$3)) { { ZEPHIR_ITERATOR_COPY(&v, _0$$3); } @@ -2016,7 +2016,7 @@ PHP_METHOD(Test_Flow, testFor36Aux) { - zephir_create_array(return_value, 1, 0 TSRMLS_CC); + zephir_create_array(return_value, 1, 0); zephir_array_fast_append(return_value, hello); return; @@ -2186,7 +2186,7 @@ PHP_METHOD(Test_Flow, testFor40) { ZEPHIR_INIT_NVAR(&a); ZVAL_LONG(&a, _1); ZEPHIR_INIT_NVAR(&_3$$3); - ZVAL_DOUBLE(&_3$$3, zephir_sqrt(&a TSRMLS_CC)); + ZVAL_DOUBLE(&_3$$3, zephir_sqrt(&a)); ZEPHIR_ADD_ASSIGN(&b, &_3$$3); } } diff --git a/ext/test/flow/switchflow.zep.c b/ext/test/flow/switchflow.zep.c index 5eac065410..4640c05ffc 100644 --- a/ext/test/flow/switchflow.zep.c +++ b/ext/test/flow/switchflow.zep.c @@ -278,7 +278,7 @@ PHP_METHOD(Test_Flow_SwitchFlow, testSwitch13) { ZVAL_LONG(&_0, 1); ZVAL_LONG(&_1, 2); do { - _2 = zephir_mt_rand(zephir_get_intval(&_0), zephir_get_intval(&_1) TSRMLS_CC); + _2 = zephir_mt_rand(zephir_get_intval(&_0), zephir_get_intval(&_1)); if (_2 == 100) { RETURN_LONG(1); } diff --git a/ext/test/fortytwo.zep.c b/ext/test/fortytwo.zep.c index b384667525..169fa77d3b 100644 --- a/ext/test/fortytwo.zep.c +++ b/ext/test/fortytwo.zep.c @@ -51,9 +51,9 @@ PHP_METHOD(Test_FortyTwo, proof) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&box); - zephir_create_array(&box, 15, 0 TSRMLS_CC); + zephir_create_array(&box, 15, 0); ZEPHIR_INIT_VAR(&_0); - zephir_create_array(&_0, 3, 0 TSRMLS_CC); + zephir_create_array(&_0, 3, 0); ZEPHIR_INIT_VAR(&_1); ZVAL_LONG(&_1, 10); zephir_array_fast_append(&_0, &_1); @@ -65,7 +65,7 @@ PHP_METHOD(Test_FortyTwo, proof) { zephir_array_fast_append(&_0, &_1); zephir_array_fast_append(&box, &_0); ZEPHIR_INIT_NVAR(&_0); - zephir_create_array(&_0, 3, 0 TSRMLS_CC); + zephir_create_array(&_0, 3, 0); ZEPHIR_INIT_NVAR(&_1); ZVAL_LONG(&_1, 8); zephir_array_fast_append(&_0, &_1); @@ -77,7 +77,7 @@ PHP_METHOD(Test_FortyTwo, proof) { zephir_array_fast_append(&_0, &_1); zephir_array_fast_append(&box, &_0); ZEPHIR_INIT_NVAR(&_0); - zephir_create_array(&_0, 3, 0 TSRMLS_CC); + zephir_create_array(&_0, 3, 0); ZEPHIR_INIT_NVAR(&_1); ZVAL_LONG(&_1, 19); zephir_array_fast_append(&_0, &_1); @@ -89,7 +89,7 @@ PHP_METHOD(Test_FortyTwo, proof) { zephir_array_fast_append(&_0, &_1); zephir_array_fast_append(&box, &_0); ZEPHIR_INIT_NVAR(&_0); - zephir_create_array(&_0, 3, 0 TSRMLS_CC); + zephir_create_array(&_0, 3, 0); ZEPHIR_INIT_NVAR(&_1); ZVAL_LONG(&_1, 6); zephir_array_fast_append(&_0, &_1); @@ -101,7 +101,7 @@ PHP_METHOD(Test_FortyTwo, proof) { zephir_array_fast_append(&_0, &_1); zephir_array_fast_append(&box, &_0); ZEPHIR_INIT_NVAR(&_0); - zephir_create_array(&_0, 3, 0 TSRMLS_CC); + zephir_create_array(&_0, 3, 0); ZEPHIR_INIT_NVAR(&_1); ZVAL_LONG(&_1, 20); zephir_array_fast_append(&_0, &_1); @@ -113,7 +113,7 @@ PHP_METHOD(Test_FortyTwo, proof) { zephir_array_fast_append(&_0, &_1); zephir_array_fast_append(&box, &_0); ZEPHIR_INIT_NVAR(&_0); - zephir_create_array(&_0, 3, 0 TSRMLS_CC); + zephir_create_array(&_0, 3, 0); ZEPHIR_INIT_NVAR(&_1); ZVAL_LONG(&_1, 9); zephir_array_fast_append(&_0, &_1); @@ -125,7 +125,7 @@ PHP_METHOD(Test_FortyTwo, proof) { zephir_array_fast_append(&_0, &_1); zephir_array_fast_append(&box, &_0); ZEPHIR_INIT_NVAR(&_0); - zephir_create_array(&_0, 3, 0 TSRMLS_CC); + zephir_create_array(&_0, 3, 0); ZEPHIR_INIT_NVAR(&_1); ZVAL_LONG(&_1, 22); zephir_array_fast_append(&_0, &_1); @@ -137,7 +137,7 @@ PHP_METHOD(Test_FortyTwo, proof) { zephir_array_fast_append(&_0, &_1); zephir_array_fast_append(&box, &_0); ZEPHIR_INIT_NVAR(&_0); - zephir_create_array(&_0, 3, 0 TSRMLS_CC); + zephir_create_array(&_0, 3, 0); ZEPHIR_INIT_NVAR(&_1); ZVAL_LONG(&_1, 18); zephir_array_fast_append(&_0, &_1); @@ -149,7 +149,7 @@ PHP_METHOD(Test_FortyTwo, proof) { zephir_array_fast_append(&_0, &_1); zephir_array_fast_append(&box, &_0); ZEPHIR_INIT_NVAR(&_0); - zephir_create_array(&_0, 3, 0 TSRMLS_CC); + zephir_create_array(&_0, 3, 0); ZEPHIR_INIT_NVAR(&_1); ZVAL_LONG(&_1, 5); zephir_array_fast_append(&_0, &_1); @@ -161,7 +161,7 @@ PHP_METHOD(Test_FortyTwo, proof) { zephir_array_fast_append(&_0, &_1); zephir_array_fast_append(&box, &_0); ZEPHIR_INIT_NVAR(&_0); - zephir_create_array(&_0, 3, 0 TSRMLS_CC); + zephir_create_array(&_0, 3, 0); ZEPHIR_INIT_NVAR(&_1); ZVAL_LONG(&_1, 16); zephir_array_fast_append(&_0, &_1); @@ -173,7 +173,7 @@ PHP_METHOD(Test_FortyTwo, proof) { zephir_array_fast_append(&_0, &_1); zephir_array_fast_append(&box, &_0); ZEPHIR_INIT_NVAR(&_0); - zephir_create_array(&_0, 3, 0 TSRMLS_CC); + zephir_create_array(&_0, 3, 0); ZEPHIR_INIT_NVAR(&_1); ZVAL_LONG(&_1, 23); zephir_array_fast_append(&_0, &_1); @@ -185,7 +185,7 @@ PHP_METHOD(Test_FortyTwo, proof) { zephir_array_fast_append(&_0, &_1); zephir_array_fast_append(&box, &_0); ZEPHIR_INIT_NVAR(&_0); - zephir_create_array(&_0, 3, 0 TSRMLS_CC); + zephir_create_array(&_0, 3, 0); ZEPHIR_INIT_NVAR(&_1); ZVAL_LONG(&_1, 12); zephir_array_fast_append(&_0, &_1); @@ -197,7 +197,7 @@ PHP_METHOD(Test_FortyTwo, proof) { zephir_array_fast_append(&_0, &_1); zephir_array_fast_append(&box, &_0); ZEPHIR_INIT_NVAR(&_0); - zephir_create_array(&_0, 3, 0 TSRMLS_CC); + zephir_create_array(&_0, 3, 0); ZEPHIR_INIT_NVAR(&_1); ZVAL_LONG(&_1, 24); zephir_array_fast_append(&_0, &_1); @@ -209,7 +209,7 @@ PHP_METHOD(Test_FortyTwo, proof) { zephir_array_fast_append(&_0, &_1); zephir_array_fast_append(&box, &_0); ZEPHIR_INIT_NVAR(&_0); - zephir_create_array(&_0, 3, 0 TSRMLS_CC); + zephir_create_array(&_0, 3, 0); ZEPHIR_INIT_NVAR(&_1); ZVAL_LONG(&_1, 11); zephir_array_fast_append(&_0, &_1); @@ -221,7 +221,7 @@ PHP_METHOD(Test_FortyTwo, proof) { zephir_array_fast_append(&_0, &_1); zephir_array_fast_append(&box, &_0); ZEPHIR_INIT_NVAR(&_0); - zephir_create_array(&_0, 3, 0 TSRMLS_CC); + zephir_create_array(&_0, 3, 0); ZEPHIR_INIT_NVAR(&_1); ZVAL_LONG(&_1, 11); zephir_array_fast_append(&_0, &_1); @@ -253,7 +253,7 @@ PHP_METHOD(Test_FortyTwo, proof) { _4$$3 = 1; } i = _5$$3; - zephir_array_fetch_long(&_7$$4, &side, i, PH_NOISY | PH_READONLY, "test/fortytwo.zep", 26 TSRMLS_CC); + zephir_array_fetch_long(&_7$$4, &side, i, PH_NOISY | PH_READONLY, "test/fortytwo.zep", 26); j += zephir_get_numberval(&_7$$4); } } @@ -288,7 +288,7 @@ PHP_METHOD(Test_FortyTwo, proof) { _8$$6 = 1; } i = _9$$6; - zephir_array_fetch_long(&_11$$7, &side, i, PH_NOISY | PH_READONLY, "test/fortytwo.zep", 26 TSRMLS_CC); + zephir_array_fetch_long(&_11$$7, &side, i, PH_NOISY | PH_READONLY, "test/fortytwo.zep", 26); j += zephir_get_numberval(&_11$$7); } } diff --git a/ext/test/functionexists.zep.c b/ext/test/functionexists.zep.c index 43670eb7d9..46f4bf784b 100644 --- a/ext/test/functionexists.zep.c +++ b/ext/test/functionexists.zep.c @@ -42,7 +42,7 @@ PHP_METHOD(Test_FunctionExists, testWithPassedName) { zephir_get_strval(&func, func_param); - RETURN_MM_BOOL((zephir_function_exists(&func TSRMLS_CC) == SUCCESS)); + RETURN_MM_BOOL((zephir_function_exists(&func) == SUCCESS)); } @@ -67,7 +67,7 @@ PHP_METHOD(Test_FunctionExists, testBuiltInFunctions) { ZEPHIR_INIT_VAR(&result); array_init(&result); ZEPHIR_INIT_VAR(&functions); - zephir_create_array(&functions, 8, 0 TSRMLS_CC); + zephir_create_array(&functions, 8, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "substr"); zephir_array_fast_append(&functions, &_0); @@ -99,7 +99,7 @@ PHP_METHOD(Test_FunctionExists, testBuiltInFunctions) { ZEPHIR_INIT_NVAR(&func); ZVAL_COPY(&func, _1); ZEPHIR_INIT_NVAR(&_3$$3); - ZVAL_BOOL(&_3$$3, (zephir_function_exists(&func TSRMLS_CC) == SUCCESS)); + ZVAL_BOOL(&_3$$3, (zephir_function_exists(&func) == SUCCESS)); zephir_array_update_zval(&result, &func, &_3$$3, PH_COPY | PH_SEPARATE); } ZEND_HASH_FOREACH_END(); } else { @@ -114,7 +114,7 @@ PHP_METHOD(Test_FunctionExists, testBuiltInFunctions) { ZEPHIR_CALL_METHOD(&func, &functions, "current", NULL, 0); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_4$$4); - ZVAL_BOOL(&_4$$4, (zephir_function_exists(&func TSRMLS_CC) == SUCCESS)); + ZVAL_BOOL(&_4$$4, (zephir_function_exists(&func) == SUCCESS)); zephir_array_update_zval(&result, &func, &_4$$4, PH_COPY | PH_SEPARATE); ZEPHIR_CALL_METHOD(NULL, &functions, "next", NULL, 0); zephir_check_call_status(); @@ -130,7 +130,7 @@ PHP_METHOD(Test_FunctionExists, testWithString) { zval *this_ptr = getThis(); - RETURN_BOOL((zephir_function_exists_ex(SL("substr") TSRMLS_CC) == SUCCESS)); + RETURN_BOOL((zephir_function_exists_ex(SL("substr")) == SUCCESS)); } diff --git a/ext/test/geometry.zep.c b/ext/test/geometry.zep.c index 11f191b2cf..79d58c83fc 100644 --- a/ext/test/geometry.zep.c +++ b/ext/test/geometry.zep.c @@ -59,14 +59,14 @@ PHP_METHOD(Test_Geometry, run) { if (!(i < count)) { break; } - zephir_array_fetch_long(&_1$$3, &list, i, PH_NOISY | PH_READONLY, "test/geometry.zep", 11 TSRMLS_CC); - zephir_array_fetch_long(&_2$$3, &_1$$3, 0, PH_NOISY | PH_READONLY, "test/geometry.zep", 11 TSRMLS_CC); - zephir_array_fetch_long(&_3$$3, &list, i, PH_NOISY | PH_READONLY, "test/geometry.zep", 11 TSRMLS_CC); - zephir_array_fetch_long(&_4$$3, &_3$$3, 1, PH_NOISY | PH_READONLY, "test/geometry.zep", 11 TSRMLS_CC); - zephir_array_fetch_long(&_5$$3, &list, i, PH_NOISY | PH_READONLY, "test/geometry.zep", 11 TSRMLS_CC); - zephir_array_fetch_long(&_6$$3, &_5$$3, 2, PH_NOISY | PH_READONLY, "test/geometry.zep", 11 TSRMLS_CC); - zephir_array_fetch_long(&_7$$3, &list, i, PH_NOISY | PH_READONLY, "test/geometry.zep", 11 TSRMLS_CC); - zephir_array_fetch_long(&_8$$3, &_7$$3, 3, PH_NOISY | PH_READONLY, "test/geometry.zep", 11 TSRMLS_CC); + zephir_array_fetch_long(&_1$$3, &list, i, PH_NOISY | PH_READONLY, "test/geometry.zep", 11); + zephir_array_fetch_long(&_2$$3, &_1$$3, 0, PH_NOISY | PH_READONLY, "test/geometry.zep", 11); + zephir_array_fetch_long(&_3$$3, &list, i, PH_NOISY | PH_READONLY, "test/geometry.zep", 11); + zephir_array_fetch_long(&_4$$3, &_3$$3, 1, PH_NOISY | PH_READONLY, "test/geometry.zep", 11); + zephir_array_fetch_long(&_5$$3, &list, i, PH_NOISY | PH_READONLY, "test/geometry.zep", 11); + zephir_array_fetch_long(&_6$$3, &_5$$3, 2, PH_NOISY | PH_READONLY, "test/geometry.zep", 11); + zephir_array_fetch_long(&_7$$3, &list, i, PH_NOISY | PH_READONLY, "test/geometry.zep", 11); + zephir_array_fetch_long(&_8$$3, &_7$$3, 3, PH_NOISY | PH_READONLY, "test/geometry.zep", 11); ZEPHIR_CALL_STATIC(NULL, "distancestatic", &_0, 0, &_2$$3, &_4$$3, &_6$$3, &_8$$3); zephir_check_call_status(); i = (i + 1); @@ -104,11 +104,11 @@ PHP_METHOD(Test_Geometry, runOptimize) { break; } ZEPHIR_OBS_NVAR(&item); - zephir_array_fetch_long(&item, &list, i, PH_NOISY, "test/geometry.zep", 22 TSRMLS_CC); - zephir_array_fetch_long(&_1$$3, &item, 0, PH_NOISY | PH_READONLY, "test/geometry.zep", 24 TSRMLS_CC); - zephir_array_fetch_long(&_2$$3, &item, 1, PH_NOISY | PH_READONLY, "test/geometry.zep", 24 TSRMLS_CC); - zephir_array_fetch_long(&_3$$3, &item, 2, PH_NOISY | PH_READONLY, "test/geometry.zep", 24 TSRMLS_CC); - zephir_array_fetch_long(&_4$$3, &item, 3, PH_NOISY | PH_READONLY, "test/geometry.zep", 24 TSRMLS_CC); + zephir_array_fetch_long(&item, &list, i, PH_NOISY, "test/geometry.zep", 22); + zephir_array_fetch_long(&_1$$3, &item, 0, PH_NOISY | PH_READONLY, "test/geometry.zep", 24); + zephir_array_fetch_long(&_2$$3, &item, 1, PH_NOISY | PH_READONLY, "test/geometry.zep", 24); + zephir_array_fetch_long(&_3$$3, &item, 2, PH_NOISY | PH_READONLY, "test/geometry.zep", 24); + zephir_array_fetch_long(&_4$$3, &item, 3, PH_NOISY | PH_READONLY, "test/geometry.zep", 24); ZEPHIR_CALL_STATIC(NULL, "distancestatic", &_0, 0, &_1$$3, &_2$$3, &_3$$3, &_4$$3); zephir_check_call_status(); i++; diff --git a/ext/test/globals/env.zep.c b/ext/test/globals/env.zep.c index 23ee73b00c..c6d28c7184 100644 --- a/ext/test/globals/env.zep.c +++ b/ext/test/globals/env.zep.c @@ -44,7 +44,7 @@ PHP_METHOD(Test_Globals_Env, read) { zephir_get_strval(&name, name_param); - zephir_array_fetch(&_0, &_ENV, &name, PH_NOISY | PH_READONLY, "test/globals/env.zep", 8 TSRMLS_CC); + zephir_array_fetch(&_0, &_ENV, &name, PH_NOISY | PH_READONLY, "test/globals/env.zep", 8); RETURN_CTOR(&_0); } diff --git a/ext/test/globals/server.zep.c b/ext/test/globals/server.zep.c new file mode 100644 index 0000000000..25156f6303 --- /dev/null +++ b/ext/test/globals/server.zep.c @@ -0,0 +1,88 @@ + +#ifdef HAVE_CONFIG_H +#include "../../ext_config.h" +#endif + +#include +#include "../../php_ext.h" +#include "../../ext.h" + +#include +#include +#include + +#include "kernel/main.h" +#include "kernel/array.h" +#include "kernel/fcall.h" +#include "kernel/object.h" +#include "kernel/memory.h" + + +ZEPHIR_INIT_CLASS(Test_Globals_Server) { + + ZEPHIR_REGISTER_CLASS(Test\\Globals, Server, test, globals_server, test_globals_server_method_entry, 0); + + return SUCCESS; + +} + +/** + * @see https://github.com/phalcon/zephir/issues/1961 + */ +PHP_METHOD(Test_Globals_Server, f1) { + + zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; + zend_long ZEPHIR_LAST_CALL_STATUS; + zval _SERVER, _0, _1; + zval *this_ptr = getThis(); + + ZVAL_UNDEF(&_SERVER); + ZVAL_UNDEF(&_0); + ZVAL_UNDEF(&_1); + + ZEPHIR_MM_GROW(); + zephir_get_global(&_SERVER, SL("_SERVER")); + + zephir_array_fetch_string(&_0, &_SERVER, SL("PHP_SELF"), PH_NOISY | PH_READONLY, "test/globals/server.zep", 10); + zend_print_zval(&_0, 0); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "f2", NULL, 0); + zephir_check_call_status(); + zephir_array_fetch_string(&_1, &_SERVER, SL("PHP_SELF"), PH_NOISY | PH_READONLY, "test/globals/server.zep", 12); + zend_print_zval(&_1, 0); + ZEPHIR_MM_RESTORE(); + +} + +PHP_METHOD(Test_Globals_Server, f2) { + + zval _SERVER, _0; + zval *this_ptr = getThis(); + + ZVAL_UNDEF(&_SERVER); + ZVAL_UNDEF(&_0); + + zephir_get_global(&_SERVER, SL("_SERVER")); + + zephir_array_fetch_string(&_0, &_SERVER, SL("SCRIPT_NAME"), PH_NOISY | PH_READONLY, "test/globals/server.zep", 17); + zend_print_zval(&_0, 0); + +} + +/** + * @see https://github.com/phalcon/zephir/issues/1970 + */ +PHP_METHOD(Test_Globals_Server, check) { + + zval _SERVER, _0; + zval *this_ptr = getThis(); + + ZVAL_UNDEF(&_SERVER); + ZVAL_UNDEF(&_0); + + zephir_get_global(&_SERVER, SL("_SERVER")); + + zephir_array_fetch_string(&_0, &_SERVER, SL("HTTP_USER_AGENT"), PH_NOISY | PH_READONLY, "test/globals/server.zep", 25); + RETURN_CTORW(&_0); + +} + diff --git a/ext/test/globals/server.zep.h b/ext/test/globals/server.zep.h new file mode 100644 index 0000000000..e94484513b --- /dev/null +++ b/ext/test/globals/server.zep.h @@ -0,0 +1,37 @@ + +extern zend_class_entry *test_globals_server_ce; + +ZEPHIR_INIT_CLASS(Test_Globals_Server); + +PHP_METHOD(Test_Globals_Server, f1); +PHP_METHOD(Test_Globals_Server, f2); +PHP_METHOD(Test_Globals_Server, check); + +#if PHP_VERSION_ID >= 70100 +#if PHP_VERSION_ID >= 70200 +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_test_globals_server_f1, 0, 0, IS_VOID, 0) +#else +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_test_globals_server_f1, 0, 0, IS_VOID, NULL, 0) +#endif +ZEND_END_ARG_INFO() +#else +#define arginfo_test_globals_server_f1 NULL +#endif + +#if PHP_VERSION_ID >= 70100 +#if PHP_VERSION_ID >= 70200 +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_test_globals_server_f2, 0, 0, IS_VOID, 0) +#else +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_test_globals_server_f2, 0, 0, IS_VOID, NULL, 0) +#endif +ZEND_END_ARG_INFO() +#else +#define arginfo_test_globals_server_f2 NULL +#endif + +ZEPHIR_INIT_FUNCS(test_globals_server_method_entry) { + PHP_ME(Test_Globals_Server, f1, arginfo_test_globals_server_f1, ZEND_ACC_PUBLIC) + PHP_ME(Test_Globals_Server, f2, arginfo_test_globals_server_f2, ZEND_ACC_PUBLIC) + PHP_ME(Test_Globals_Server, check, NULL, ZEND_ACC_PUBLIC) + PHP_FE_END +}; diff --git a/ext/test/globals/serverrequestfactory.zep.c b/ext/test/globals/serverrequestfactory.zep.c index bcb8104e33..3a4f8965a9 100644 --- a/ext/test/globals/serverrequestfactory.zep.c +++ b/ext/test/globals/serverrequestfactory.zep.c @@ -140,7 +140,7 @@ PHP_METHOD(Test_Globals_ServerRequestFactory, load) { ZEPHIR_CALL_METHOD(&_5, this_ptr, "checknullarray", &_1, 43, &post, &globalPost); zephir_check_call_status(); ZEPHIR_CPY_WRT(&post, &_5); - zephir_create_array(return_value, 5, 0 TSRMLS_CC); + zephir_create_array(return_value, 5, 0); zephir_array_update_string(return_value, SL("server"), &server, PH_COPY | PH_SEPARATE); zephir_array_update_string(return_value, SL("files"), &files, PH_COPY | PH_SEPARATE); zephir_array_update_string(return_value, SL("cookies"), &cookies, PH_COPY | PH_SEPARATE); diff --git a/ext/test/instance.zep.c b/ext/test/instance.zep.c index 6c04b203c6..33086bbde6 100644 --- a/ext/test/instance.zep.c +++ b/ext/test/instance.zep.c @@ -67,10 +67,10 @@ PHP_METHOD(Test_Instance, testIssue1339) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(¶meters); - zephir_create_array(¶meters, 11, 0 TSRMLS_CC); + zephir_create_array(¶meters, 11, 0); ZEPHIR_INIT_VAR(&_0); object_init_ex(&_0, test_arithmetic_ce); - if (zephir_has_constructor(&_0 TSRMLS_CC)) { + if (zephir_has_constructor(&_0)) { ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 0); zephir_check_call_status(); } @@ -82,70 +82,70 @@ PHP_METHOD(Test_Instance, testIssue1339) { zephir_array_fast_append(¶meters, &_0); ZEPHIR_INIT_NVAR(&_0); object_init_ex(&_0, test_assign_ce); - if (zephir_has_constructor(&_0 TSRMLS_CC)) { + if (zephir_has_constructor(&_0)) { ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 0); zephir_check_call_status(); } zephir_array_fast_append(¶meters, &_0); ZEPHIR_INIT_NVAR(&_0); object_init_ex(&_0, test_bitwise_ce); - if (zephir_has_constructor(&_0 TSRMLS_CC)) { + if (zephir_has_constructor(&_0)) { ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 0); zephir_check_call_status(); } zephir_array_fast_append(¶meters, &_0); ZEPHIR_INIT_NVAR(&_0); object_init_ex(&_0, test_branchprediction_ce); - if (zephir_has_constructor(&_0 TSRMLS_CC)) { + if (zephir_has_constructor(&_0)) { ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 0); zephir_check_call_status(); } zephir_array_fast_append(¶meters, &_0); ZEPHIR_INIT_NVAR(&_0); object_init_ex(&_0, test_cast_ce); - if (zephir_has_constructor(&_0 TSRMLS_CC)) { + if (zephir_has_constructor(&_0)) { ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 0); zephir_check_call_status(); } zephir_array_fast_append(¶meters, &_0); ZEPHIR_INIT_NVAR(&_0); object_init_ex(&_0, test_cblock_ce); - if (zephir_has_constructor(&_0 TSRMLS_CC)) { + if (zephir_has_constructor(&_0)) { ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 0); zephir_check_call_status(); } zephir_array_fast_append(¶meters, &_0); ZEPHIR_INIT_NVAR(&_0); object_init_ex(&_0, test_chars_ce); - if (zephir_has_constructor(&_0 TSRMLS_CC)) { + if (zephir_has_constructor(&_0)) { ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 0); zephir_check_call_status(); } zephir_array_fast_append(¶meters, &_0); ZEPHIR_INIT_NVAR(&_0); object_init_ex(&_0, test_closures_ce); - if (zephir_has_constructor(&_0 TSRMLS_CC)) { + if (zephir_has_constructor(&_0)) { ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 0); zephir_check_call_status(); } zephir_array_fast_append(¶meters, &_0); ZEPHIR_INIT_NVAR(&_0); object_init_ex(&_0, test_compare_ce); - if (zephir_has_constructor(&_0 TSRMLS_CC)) { + if (zephir_has_constructor(&_0)) { ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 0); zephir_check_call_status(); } zephir_array_fast_append(¶meters, &_0); ZEPHIR_INIT_NVAR(&_0); object_init_ex(&_0, test_concat_ce); - if (zephir_has_constructor(&_0 TSRMLS_CC)) { + if (zephir_has_constructor(&_0)) { ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 0); zephir_check_call_status(); } zephir_array_fast_append(¶meters, &_0); ZEPHIR_INIT_NVAR(&_0); ZVAL_STRING(&_0, "Test\\Instance"); - ZEPHIR_LAST_CALL_STATUS = zephir_create_instance_params(return_value, &_0, ¶meters TSRMLS_CC); + ZEPHIR_LAST_CALL_STATUS = zephir_create_instance_params(return_value, &_0, ¶meters); zephir_check_call_status(); RETURN_MM(); @@ -167,7 +167,7 @@ PHP_METHOD(Test_Instance, testInstanceCreate) { zephir_get_strval(&className, className_param); - ZEPHIR_LAST_CALL_STATUS = zephir_create_instance(return_value, &className TSRMLS_CC); + ZEPHIR_LAST_CALL_STATUS = zephir_create_instance(return_value, &className); zephir_check_call_status(); RETURN_MM(); diff --git a/ext/test/instanceoff.zep.c b/ext/test/instanceoff.zep.c index 94dc4aae70..ef2d0b7508 100644 --- a/ext/test/instanceoff.zep.c +++ b/ext/test/instanceoff.zep.c @@ -41,7 +41,7 @@ PHP_METHOD(Test_Instanceoff, testInstanceOf1) { ZEPHIR_INIT_VAR(&a); object_init(&a); - RETURN_MM_BOOL(zephir_instance_of_ev(&a, zend_standard_class_def TSRMLS_CC)); + RETURN_MM_BOOL(zephir_instance_of_ev(&a, zend_standard_class_def)); } @@ -58,11 +58,11 @@ PHP_METHOD(Test_Instanceoff, testInstanceOf2) { ZEPHIR_INIT_VAR(&a); object_init_ex(&a, test_instanceoff_ce); - if (zephir_has_constructor(&a TSRMLS_CC)) { + if (zephir_has_constructor(&a)) { ZEPHIR_CALL_METHOD(NULL, &a, "__construct", NULL, 0); zephir_check_call_status(); } - RETURN_MM_BOOL(zephir_instance_of_ev(&a, test_instanceoff_ce TSRMLS_CC)); + RETURN_MM_BOOL(zephir_instance_of_ev(&a, test_instanceoff_ce)); } @@ -78,7 +78,7 @@ PHP_METHOD(Test_Instanceoff, testInstanceOf3) { ZEPHIR_INIT_VAR(&a); object_init(&a); - RETURN_MM_BOOL(zephir_instance_of_ev(&a, test_unknownclass_ce TSRMLS_CC)); + RETURN_MM_BOOL(zephir_instance_of_ev(&a, test_unknownclass_ce)); } @@ -93,7 +93,7 @@ PHP_METHOD(Test_Instanceoff, testInstanceOf4) { - if (zephir_zval_is_traversable(a TSRMLS_CC)) { + if (zephir_zval_is_traversable(a)) { RETURN_BOOL(1); } RETURN_BOOL(0); @@ -111,7 +111,7 @@ PHP_METHOD(Test_Instanceoff, testInstanceOf5) { - if (zephir_instance_of_ev(a, test_instanceoff_ce TSRMLS_CC)) { + if (zephir_instance_of_ev(a, test_instanceoff_ce)) { RETURN_BOOL(1); } RETURN_BOOL(0); @@ -131,11 +131,11 @@ PHP_METHOD(Test_Instanceoff, testInstanceOf6) { ZEPHIR_INIT_VAR(&a); object_init_ex(&a, test_instanceoff_ce); - if (zephir_has_constructor(&a TSRMLS_CC)) { + if (zephir_has_constructor(&a)) { ZEPHIR_CALL_METHOD(NULL, &a, "__construct", NULL, 0); zephir_check_call_status(); } - RETURN_MM_BOOL(zephir_instance_of_ev(&a, test_instanceoff_ce TSRMLS_CC)); + RETURN_MM_BOOL(zephir_instance_of_ev(&a, test_instanceoff_ce)); } @@ -150,7 +150,7 @@ PHP_METHOD(Test_Instanceoff, testInstanceOf7) { - RETURN_BOOL(zephir_instance_of_ev(test, test_instanceoff_ce TSRMLS_CC)); + RETURN_BOOL(zephir_instance_of_ev(test, test_instanceoff_ce)); } @@ -173,11 +173,11 @@ PHP_METHOD(Test_Instanceoff, testInstanceOf8) { ZEPHIR_INIT_VAR(&a); object_init_ex(&a, test_instanceoff_ce); - if (zephir_has_constructor(&a TSRMLS_CC)) { + if (zephir_has_constructor(&a)) { ZEPHIR_CALL_METHOD(NULL, &a, "__construct", NULL, 0); zephir_check_call_status(); } - RETURN_MM_BOOL(zephir_is_instance_of(&a, Z_STRVAL_P(&test), Z_STRLEN_P(&test) TSRMLS_CC)); + RETURN_MM_BOOL(zephir_is_instance_of(&a, Z_STRVAL_P(&test), Z_STRLEN_P(&test))); } @@ -197,7 +197,7 @@ PHP_METHOD(Test_Instanceoff, testInstanceOf9) { zephir_get_strval(&test, test_param); - RETURN_MM_BOOL(zephir_is_instance_of(a, Z_STRVAL_P(&test), Z_STRLEN_P(&test) TSRMLS_CC)); + RETURN_MM_BOOL(zephir_is_instance_of(a, Z_STRVAL_P(&test), Z_STRLEN_P(&test))); } diff --git a/ext/test/integration/psr/http/message/messageinterfaceex.zep.c b/ext/test/integration/psr/http/message/messageinterfaceex.zep.c index 7baf3ff7eb..19b95adc91 100644 --- a/ext/test/integration/psr/http/message/messageinterfaceex.zep.c +++ b/ext/test/integration/psr/http/message/messageinterfaceex.zep.c @@ -16,7 +16,7 @@ ZEPHIR_INIT_CLASS(Test_Integration_Psr_Http_Message_MessageInterfaceEx) { ZEPHIR_REGISTER_INTERFACE(Test\\Integration\\Psr\\Http\\Message, MessageInterfaceEx, test, integration_psr_http_message_messageinterfaceex, NULL); - zend_class_implements(test_integration_psr_http_message_messageinterfaceex_ce TSRMLS_CC, 1, zephir_get_internal_ce(SL("psr\\http\\message\\messageinterface"))); + zend_class_implements(test_integration_psr_http_message_messageinterfaceex_ce, 1, zephir_get_internal_ce(SL("psr\\http\\message\\messageinterface"))); return SUCCESS; } diff --git a/ext/test/internalinterfaces.zep.c b/ext/test/internalinterfaces.zep.c index ddf7060998..8c3671bd1c 100644 --- a/ext/test/internalinterfaces.zep.c +++ b/ext/test/internalinterfaces.zep.c @@ -20,7 +20,7 @@ ZEPHIR_INIT_CLASS(Test_InternalInterfaces) { ZEPHIR_REGISTER_CLASS(Test, InternalInterfaces, test, internalinterfaces, test_internalinterfaces_method_entry, 0); - zend_class_implements(test_internalinterfaces_ce TSRMLS_CC, 1, spl_ce_Countable); + zend_class_implements(test_internalinterfaces_ce, 1, spl_ce_Countable); return SUCCESS; } diff --git a/ext/test/invoke.zep.c b/ext/test/invoke.zep.c index e1e3c468ee..43a6cc915b 100644 --- a/ext/test/invoke.zep.c +++ b/ext/test/invoke.zep.c @@ -21,7 +21,7 @@ ZEPHIR_INIT_CLASS(Test_Invoke) { ZEPHIR_REGISTER_CLASS(Test, Invoke, test, invoke, test_invoke_method_entry, 0); - zend_declare_property_null(test_invoke_ce, SL("a"), ZEND_ACC_PRIVATE TSRMLS_CC); + zend_declare_property_null(test_invoke_ce, SL("a"), ZEND_ACC_PRIVATE); return SUCCESS; @@ -54,7 +54,7 @@ PHP_METHOD(Test_Invoke, __invoke) { zephir_read_property(&_0, this_ptr, SL("a"), PH_NOISY_CC | PH_READONLY); - zephir_gettype(return_value, &_0 TSRMLS_CC); + zephir_gettype(return_value, &_0); return; } diff --git a/ext/test/issettest.zep.c b/ext/test/issettest.zep.c index 56e0bb8d40..82a7dd98fe 100644 --- a/ext/test/issettest.zep.c +++ b/ext/test/issettest.zep.c @@ -25,7 +25,7 @@ ZEPHIR_INIT_CLASS(Test_IssetTest) { ZEPHIR_REGISTER_CLASS(Test, IssetTest, test, issettest, test_issettest_method_entry, 0); - zend_declare_property_null(test_issettest_ce, SL("s"), ZEND_ACC_PUBLIC TSRMLS_CC); + zend_declare_property_null(test_issettest_ce, SL("s"), ZEND_ACC_PUBLIC); test_issettest_ce->create_object = zephir_init_properties_Test_IssetTest; return SUCCESS; @@ -142,7 +142,7 @@ PHP_METHOD(Test_IssetTest, testIssetProperty2) { - RETURN_BOOL(zephir_isset_property_zval(a, b TSRMLS_CC)); + RETURN_BOOL(zephir_isset_property_zval(a, b)); } @@ -219,7 +219,7 @@ zend_object *zephir_init_properties_Test_IssetTest(zend_class_entry *class_type zephir_read_property(&_0, this_ptr, SL("s"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_0) == IS_NULL) { ZEPHIR_INIT_VAR(&_1$$3); - zephir_create_array(&_1$$3, 1, 0 TSRMLS_CC); + zephir_create_array(&_1$$3, 1, 0); add_assoc_stringl_ex(&_1$$3, SL("a"), SL("true")); zephir_update_property_zval(this_ptr, SL("s"), &_1$$3); } diff --git a/ext/test/issue1521.zep.c b/ext/test/issue1521.zep.c index d584b3c4de..4b26c71fb1 100644 --- a/ext/test/issue1521.zep.c +++ b/ext/test/issue1521.zep.c @@ -21,7 +21,7 @@ ZEPHIR_INIT_CLASS(Test_Issue1521) { ZEPHIR_REGISTER_CLASS(Test, Issue1521, test, issue1521, test_issue1521_method_entry, 0); - zend_declare_property_null(test_issue1521_ce, SL("params"), ZEND_ACC_PUBLIC TSRMLS_CC); + zend_declare_property_null(test_issue1521_ce, SL("params"), ZEND_ACC_PUBLIC); return SUCCESS; @@ -38,7 +38,7 @@ PHP_METHOD(Test_Issue1521, test) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&_0); - zephir_create_array(&_0, 2, 0 TSRMLS_CC); + zephir_create_array(&_0, 2, 0); add_assoc_stringl_ex(&_0, SL("merchantNumber"), SL("0818217122")); add_assoc_stringl_ex(&_0, SL("zero"), SL("0")); zephir_update_property_zval(this_ptr, SL("params"), &_0); diff --git a/ext/test/issues.zep.c b/ext/test/issues.zep.c index e263d3da0a..21c15ee903 100644 --- a/ext/test/issues.zep.c +++ b/ext/test/issues.zep.c @@ -21,7 +21,7 @@ ZEPHIR_INIT_CLASS(Test_Issues) { ZEPHIR_REGISTER_CLASS(Test, Issues, test, issues, test_issues_method_entry, 0); - zend_declare_property_null(test_issues_ce, SL("adapter"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_issues_ce, SL("adapter"), ZEND_ACC_PROTECTED); return SUCCESS; diff --git a/ext/test/json.zep.c b/ext/test/json.zep.c index 25b402e8fc..e9c86b97f9 100644 --- a/ext/test/json.zep.c +++ b/ext/test/json.zep.c @@ -38,7 +38,7 @@ PHP_METHOD(Test_Json, testEncodeObject) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&obj); - zephir_create_array(&obj, 3, 0 TSRMLS_CC); + zephir_create_array(&obj, 3, 0); add_assoc_stringl_ex(&obj, SL("a"), SL("hello")); add_assoc_stringl_ex(&obj, SL("b"), SL("world")); add_assoc_long_ex(&obj, SL("c"), 128); @@ -59,7 +59,7 @@ PHP_METHOD(Test_Json, testEncodeArray) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&arr); - zephir_create_array(&arr, 3, 0 TSRMLS_CC); + zephir_create_array(&arr, 3, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, 1); zephir_array_fast_append(&arr, &_0); @@ -87,7 +87,7 @@ PHP_METHOD(Test_Json, testEncodeOptions) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&arr); - zephir_create_array(&arr, 4, 0 TSRMLS_CC); + zephir_create_array(&arr, 4, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, ""); zephir_array_fast_append(&arr, &_0); diff --git a/ext/test/logical.zep.c b/ext/test/logical.zep.c index d91a309ba9..f7589d4f86 100644 --- a/ext/test/logical.zep.c +++ b/ext/test/logical.zep.c @@ -118,7 +118,7 @@ PHP_METHOD(Test_Logical, testAnd9) { _0 = zephir_array_isset_long(a, b); } if (_0) { - zephir_array_fetch_long(&_1$$3, a, b, PH_NOISY | PH_READONLY, "test/logical.zep", 35 TSRMLS_CC); + zephir_array_fetch_long(&_1$$3, a, b, PH_NOISY | PH_READONLY, "test/logical.zep", 35); RETURN_CTORW(&_1$$3); } RETURN_NULL(); @@ -197,11 +197,11 @@ PHP_METHOD(Test_Logical, testMixed2) { _0 = Z_TYPE_P(match) == IS_ARRAY; if (_0) { - _0 = zephir_fast_count_int(match TSRMLS_CC) == 2; + _0 = zephir_fast_count_int(match) == 2; } _1 = _0; if (_1) { - zephir_array_fetch_long(&_2, match, 0, PH_NOISY | PH_READONLY, "test/logical.zep", 65 TSRMLS_CC); + zephir_array_fetch_long(&_2, match, 0, PH_NOISY | PH_READONLY, "test/logical.zep", 65); _1 = ZEPHIR_LE_LONG(minLength, zephir_fast_strlen_ev(&_2)); } if (_1) { diff --git a/ext/test/mcall.zep.c b/ext/test/mcall.zep.c index f53f454466..57a59db265 100644 --- a/ext/test/mcall.zep.c +++ b/ext/test/mcall.zep.c @@ -606,7 +606,7 @@ PHP_METHOD(Test_Mcall, optionalRequereString) { zephir_fetch_params(1, 1, 0, ¶m_param); if (UNEXPECTED(Z_TYPE_P(param_param) != IS_STRING && Z_TYPE_P(param_param) != IS_NULL)) { - zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'param' must be of the type string") TSRMLS_CC); + zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'param' must be of the type string")); RETURN_MM_NULL(); } if (EXPECTED(Z_TYPE_P(param_param) == IS_STRING)) { @@ -763,7 +763,7 @@ PHP_METHOD(Test_Mcall, optionalParameterBoolean) { start = 1; } else { if (UNEXPECTED(Z_TYPE_P(start_param) != IS_TRUE && Z_TYPE_P(start_param) != IS_FALSE)) { - zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'start' must be of the type bool") TSRMLS_CC); + zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'start' must be of the type bool")); RETURN_NULL(); } start = (Z_TYPE_P(start_param) == IS_TRUE); @@ -787,7 +787,7 @@ PHP_METHOD(Test_Mcall, optionalParameterBooleanNull) { value = 0; } else { if (UNEXPECTED(Z_TYPE_P(value_param) != IS_TRUE && Z_TYPE_P(value_param) != IS_FALSE)) { - zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'value' must be of the type bool") TSRMLS_CC); + zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'value' must be of the type bool")); RETURN_NULL(); } value = (Z_TYPE_P(value_param) == IS_TRUE); @@ -923,7 +923,7 @@ PHP_METHOD(Test_Mcall, testCallablePass) { ZEPHIR_INIT_VAR(&a); object_init_ex(&a, test_oo_ooparams_ce); - if (zephir_has_constructor(&a TSRMLS_CC)) { + if (zephir_has_constructor(&a)) { ZEPHIR_CALL_METHOD(NULL, &a, "__construct", NULL, 0); zephir_check_call_status(); } @@ -952,12 +952,12 @@ PHP_METHOD(Test_Mcall, testCallableArrayThisMethodPass) { ZEPHIR_INIT_VAR(&a); object_init_ex(&a, test_oo_ooparams_ce); - if (zephir_has_constructor(&a TSRMLS_CC)) { + if (zephir_has_constructor(&a)) { ZEPHIR_CALL_METHOD(NULL, &a, "__construct", NULL, 0); zephir_check_call_status(); } ZEPHIR_INIT_VAR(&_0); - zephir_create_array(&_0, 2, 0 TSRMLS_CC); + zephir_create_array(&_0, 2, 0); zephir_array_fast_append(&_0, this_ptr); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "bb"); @@ -981,7 +981,7 @@ PHP_METHOD(Test_Mcall, aa) { ZEPHIR_INIT_VAR(&a); object_init_ex(&a, test_mcall_ce); - if (zephir_has_constructor(&a TSRMLS_CC)) { + if (zephir_has_constructor(&a)) { ZEPHIR_CALL_METHOD(NULL, &a, "__construct", NULL, 0); zephir_check_call_status(); } diff --git a/ext/test/mcallchained.zep.c b/ext/test/mcallchained.zep.c index 4060b36427..1e862a3538 100644 --- a/ext/test/mcallchained.zep.c +++ b/ext/test/mcallchained.zep.c @@ -24,7 +24,7 @@ ZEPHIR_INIT_CLASS(Test_McallChained) { ZEPHIR_REGISTER_CLASS(Test, McallChained, test, mcallchained, test_mcallchained_method_entry, 0); - zend_declare_property_null(test_mcallchained_ce, SL("temp"), ZEND_ACC_PRIVATE TSRMLS_CC); + zend_declare_property_null(test_mcallchained_ce, SL("temp"), ZEND_ACC_PRIVATE); return SUCCESS; diff --git a/ext/test/mcallinternal.zep.c b/ext/test/mcallinternal.zep.c index 8c5057f368..ebafac4e1a 100644 --- a/ext/test/mcallinternal.zep.c +++ b/ext/test/mcallinternal.zep.c @@ -222,7 +222,7 @@ void zep_Test_McallInternal_other(int ht, zval *return_value, zval *this_ptr, in b = zephir_get_intval(b_param); - RETURN_DOUBLE(zephir_safe_div_long_long(a, b TSRMLS_CC)); + RETURN_DOUBLE(zephir_safe_div_long_long(a, b)); } diff --git a/ext/test/methodabstract.zep.c b/ext/test/methodabstract.zep.c index 105de28e6e..705227b4d5 100644 --- a/ext/test/methodabstract.zep.c +++ b/ext/test/methodabstract.zep.c @@ -21,7 +21,7 @@ ZEPHIR_INIT_CLASS(Test_MethodAbstract) { ZEPHIR_REGISTER_CLASS(Test, MethodAbstract, test, methodabstract, test_methodabstract_method_entry, ZEND_ACC_EXPLICIT_ABSTRACT_CLASS); - zend_class_implements(test_methodabstract_ce TSRMLS_CC, 1, test_methodinterface_ce); + zend_class_implements(test_methodabstract_ce, 1, test_methodinterface_ce); return SUCCESS; } diff --git a/ext/test/methodargs.zep.c b/ext/test/methodargs.zep.c index 330e38919d..9fb696cc63 100644 --- a/ext/test/methodargs.zep.c +++ b/ext/test/methodargs.zep.c @@ -23,7 +23,7 @@ ZEPHIR_INIT_CLASS(Test_MethodArgs) { ZEPHIR_REGISTER_CLASS(Test, MethodArgs, test, methodargs, test_methodargs_method_entry, 0); - zend_declare_property_null(test_methodargs_ce, SL("a"), ZEND_ACC_PUBLIC TSRMLS_CC); + zend_declare_property_null(test_methodargs_ce, SL("a"), ZEND_ACC_PUBLIC); zephir_declare_class_constant_string(test_methodargs_ce, SL("GET"), "get"); @@ -76,8 +76,8 @@ PHP_METHOD(Test_MethodArgs, setCallableStrict) { zephir_fetch_params_without_memory_grow(1, 0, &a); - if (UNEXPECTED(zephir_is_callable(a TSRMLS_CC) != 1)) { - zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'a' must be of the type callable") TSRMLS_CC); + if (UNEXPECTED(zephir_is_callable(a) != 1)) { + zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'a' must be of the type callable")); RETURN_NULL(); } @@ -96,7 +96,7 @@ PHP_METHOD(Test_MethodArgs, setObjectStrict) { zephir_fetch_params_without_memory_grow(1, 0, &a); if (UNEXPECTED(Z_TYPE_P(a) != IS_OBJECT)) { - zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'a' must be of the type object") TSRMLS_CC); + zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'a' must be of the type object")); RETURN_NULL(); } @@ -115,7 +115,7 @@ PHP_METHOD(Test_MethodArgs, setResourceStrict) { zephir_fetch_params_without_memory_grow(1, 0, &a); if (UNEXPECTED(Z_TYPE_P(a) != IS_RESOURCE)) { - zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'a' must be of the type resource") TSRMLS_CC); + zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'a' must be of the type resource")); RETURN_NULL(); } diff --git a/ext/test/nativearray.zep.c b/ext/test/nativearray.zep.c index 1bd612d294..03629b1e88 100644 --- a/ext/test/nativearray.zep.c +++ b/ext/test/nativearray.zep.c @@ -24,7 +24,7 @@ ZEPHIR_INIT_CLASS(Test_NativeArray) { ZEPHIR_REGISTER_CLASS(Test, NativeArray, test, nativearray, test_nativearray_method_entry, 0); - zend_declare_property_null(test_nativearray_ce, SL("prefixes"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_nativearray_ce, SL("prefixes"), ZEND_ACC_PROTECTED); test_nativearray_ce->create_object = zephir_init_properties_Test_NativeArray; return SUCCESS; @@ -59,7 +59,7 @@ PHP_METHOD(Test_NativeArray, testArray2) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 3, 0 TSRMLS_CC); + zephir_create_array(&a, 3, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, 1); zephir_array_fast_append(&a, &_0); @@ -85,7 +85,7 @@ PHP_METHOD(Test_NativeArray, testArray3) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 3, 0 TSRMLS_CC); + zephir_create_array(&a, 3, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_DOUBLE(&_0, 1.1); zephir_array_fast_append(&a, &_0); @@ -112,7 +112,7 @@ PHP_METHOD(Test_NativeArray, testArray4) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 3, 0 TSRMLS_CC); + zephir_create_array(&a, 3, 0); zephir_array_fast_append(&a, &__$false); zephir_array_fast_append(&a, &__$true); zephir_array_fast_append(&a, &__$false); @@ -132,7 +132,7 @@ PHP_METHOD(Test_NativeArray, testArray5) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 3, 0 TSRMLS_CC); + zephir_create_array(&a, 3, 0); zephir_array_fast_append(&a, &__$null); zephir_array_fast_append(&a, &__$null); zephir_array_fast_append(&a, &__$null); @@ -152,7 +152,7 @@ PHP_METHOD(Test_NativeArray, testArray6) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 3, 0 TSRMLS_CC); + zephir_create_array(&a, 3, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "x"); zephir_array_fast_append(&a, &_0); @@ -182,7 +182,7 @@ PHP_METHOD(Test_NativeArray, testArray7) { b = 2; c = 3; ZEPHIR_INIT_VAR(&d); - zephir_create_array(&d, 3, 0 TSRMLS_CC); + zephir_create_array(&d, 3, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, a); zephir_array_fast_append(&d, &_0); @@ -212,7 +212,7 @@ PHP_METHOD(Test_NativeArray, testArray8) { b = (double) (2); c = (double) (3); ZEPHIR_INIT_VAR(&d); - zephir_create_array(&d, 3, 0 TSRMLS_CC); + zephir_create_array(&d, 3, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_DOUBLE(&_0, a); zephir_array_fast_append(&d, &_0); @@ -242,7 +242,7 @@ PHP_METHOD(Test_NativeArray, testArray9) { b = 0; c = 1; ZEPHIR_INIT_VAR(&d); - zephir_create_array(&d, 3, 0 TSRMLS_CC); + zephir_create_array(&d, 3, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_BOOL(&_0, a); zephir_array_fast_append(&d, &_0); @@ -277,7 +277,7 @@ PHP_METHOD(Test_NativeArray, testArray10) { ZEPHIR_INIT_VAR(&c); ZVAL_STRING(&c, "hello3"); ZEPHIR_INIT_VAR(&d); - zephir_create_array(&d, 3, 0 TSRMLS_CC); + zephir_create_array(&d, 3, 0); zephir_array_fast_append(&d, &a); zephir_array_fast_append(&d, &b); zephir_array_fast_append(&d, &c); @@ -299,7 +299,7 @@ PHP_METHOD(Test_NativeArray, testArray11) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 3, 0 TSRMLS_CC); + zephir_create_array(&a, 3, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, 1); zephir_array_fast_append(&a, &_0); @@ -310,7 +310,7 @@ PHP_METHOD(Test_NativeArray, testArray11) { ZVAL_LONG(&_0, 3); zephir_array_fast_append(&a, &_0); ZEPHIR_INIT_VAR(&b); - zephir_create_array(&b, 3, 0 TSRMLS_CC); + zephir_create_array(&b, 3, 0); ZEPHIR_INIT_NVAR(&_0); ZVAL_LONG(&_0, 4); zephir_array_fast_append(&b, &_0); @@ -321,7 +321,7 @@ PHP_METHOD(Test_NativeArray, testArray11) { ZVAL_LONG(&_0, 6); zephir_array_fast_append(&b, &_0); ZEPHIR_INIT_VAR(&c); - zephir_create_array(&c, 2, 0 TSRMLS_CC); + zephir_create_array(&c, 2, 0); zephir_array_fast_append(&c, &a); zephir_array_fast_append(&c, &b); RETURN_CCTOR(&c); @@ -342,7 +342,7 @@ PHP_METHOD(Test_NativeArray, testArray12) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 3, 0 TSRMLS_CC); + zephir_create_array(&a, 3, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, 1); zephir_array_fast_append(&a, &_0); @@ -353,10 +353,10 @@ PHP_METHOD(Test_NativeArray, testArray12) { ZVAL_LONG(&_0, 3); zephir_array_fast_append(&a, &_0); ZEPHIR_INIT_VAR(&b); - zephir_create_array(&b, 1, 0 TSRMLS_CC); + zephir_create_array(&b, 1, 0); zephir_array_fast_append(&b, &a); ZEPHIR_INIT_VAR(&c); - zephir_create_array(&c, 1, 0 TSRMLS_CC); + zephir_create_array(&c, 1, 0); zephir_array_fast_append(&c, &b); RETURN_CCTOR(&c); @@ -373,7 +373,7 @@ PHP_METHOD(Test_NativeArray, testArray13) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 3, 0 TSRMLS_CC); + zephir_create_array(&a, 3, 0); add_index_stringl(&a, 1, SL("hello1")); add_index_stringl(&a, 2, SL("hello2")); add_index_stringl(&a, 3, SL("hello3")); @@ -392,7 +392,7 @@ PHP_METHOD(Test_NativeArray, testArray14) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 3, 0 TSRMLS_CC); + zephir_create_array(&a, 3, 0); add_assoc_long_ex(&a, SL("hello1"), 1); add_assoc_long_ex(&a, SL("hello2"), 2); add_assoc_long_ex(&a, SL("hello3"), 3); @@ -413,7 +413,7 @@ PHP_METHOD(Test_NativeArray, testArray15) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 3, 0 TSRMLS_CC); + zephir_create_array(&a, 3, 0); zephir_array_update_string(&a, SL("hello1"), &__$true, PH_COPY | PH_SEPARATE); zephir_array_update_string(&a, SL("hello2"), &__$false, PH_COPY | PH_SEPARATE); zephir_array_update_string(&a, SL("hello3"), &__$true, PH_COPY | PH_SEPARATE); @@ -432,7 +432,7 @@ PHP_METHOD(Test_NativeArray, testArray16) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 3, 0 TSRMLS_CC); + zephir_create_array(&a, 3, 0); add_assoc_double_ex(&a, SL("hello1"), 1.0); add_assoc_double_ex(&a, SL("hello2"), 2.0); add_assoc_double_ex(&a, SL("hello3"), 3.0); @@ -452,7 +452,7 @@ PHP_METHOD(Test_NativeArray, testArray17) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 3, 0 TSRMLS_CC); + zephir_create_array(&a, 3, 0); zephir_array_update_string(&a, SL("hello1"), &__$null, PH_COPY | PH_SEPARATE); zephir_array_update_string(&a, SL("hello2"), &__$null, PH_COPY | PH_SEPARATE); zephir_array_update_string(&a, SL("hello3"), &__$null, PH_COPY | PH_SEPARATE); @@ -471,7 +471,7 @@ PHP_METHOD(Test_NativeArray, testArray18) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 3, 0 TSRMLS_CC); + zephir_create_array(&a, 3, 0); add_assoc_stringl_ex(&a, SL("hello1"), SL("a")); add_assoc_stringl_ex(&a, SL("hello2"), SL("b")); add_assoc_stringl_ex(&a, SL("hello3"), SL("c")); @@ -492,7 +492,7 @@ PHP_METHOD(Test_NativeArray, testArray19) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 3, 0 TSRMLS_CC); + zephir_create_array(&a, 3, 0); zephir_array_update_long(&a, 0, &__$true, PH_COPY ZEPHIR_DEBUG_PARAMS_DUMMY); zephir_array_update_long(&a, 1, &__$false, PH_COPY ZEPHIR_DEBUG_PARAMS_DUMMY); zephir_array_update_long(&a, 2, &__$true, PH_COPY ZEPHIR_DEBUG_PARAMS_DUMMY); @@ -511,7 +511,7 @@ PHP_METHOD(Test_NativeArray, testArray20) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 3, 0 TSRMLS_CC); + zephir_create_array(&a, 3, 0); add_index_double(&a, 0, 1.0); add_index_double(&a, 1, 2.0); add_index_double(&a, 2, 3.0); @@ -531,7 +531,7 @@ PHP_METHOD(Test_NativeArray, testArray21) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 3, 0 TSRMLS_CC); + zephir_create_array(&a, 3, 0); zephir_array_update_long(&a, 0, &__$null, PH_COPY ZEPHIR_DEBUG_PARAMS_DUMMY); zephir_array_update_long(&a, 1, &__$null, PH_COPY ZEPHIR_DEBUG_PARAMS_DUMMY); zephir_array_update_long(&a, 2, &__$null, PH_COPY ZEPHIR_DEBUG_PARAMS_DUMMY); @@ -550,7 +550,7 @@ PHP_METHOD(Test_NativeArray, testArray22) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 3, 0 TSRMLS_CC); + zephir_create_array(&a, 3, 0); add_index_long(&a, 0, 4); add_index_long(&a, 1, 5); add_index_long(&a, 2, 6); @@ -572,7 +572,7 @@ PHP_METHOD(Test_NativeArray, testArray23) { b = 0; ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 3, 0 TSRMLS_CC); + zephir_create_array(&a, 3, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, b); zephir_array_update_long(&a, 0, &_0, PH_COPY ZEPHIR_DEBUG_PARAMS_DUMMY); @@ -600,7 +600,7 @@ PHP_METHOD(Test_NativeArray, testArray24) { b = 0.0; ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 3, 0 TSRMLS_CC); + zephir_create_array(&a, 3, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_DOUBLE(&_0, b); zephir_array_update_long(&a, 0, &_0, PH_COPY ZEPHIR_DEBUG_PARAMS_DUMMY); @@ -628,7 +628,7 @@ PHP_METHOD(Test_NativeArray, testArray25) { b = 0; ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 3, 0 TSRMLS_CC); + zephir_create_array(&a, 3, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_BOOL(&_0, b); zephir_array_update_long(&a, 0, &_0, PH_COPY ZEPHIR_DEBUG_PARAMS_DUMMY); @@ -656,7 +656,7 @@ PHP_METHOD(Test_NativeArray, testArray26) { ZEPHIR_INIT_VAR(&b); ZVAL_NULL(&b); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 3, 0 TSRMLS_CC); + zephir_create_array(&a, 3, 0); zephir_array_update_long(&a, 0, &b, PH_COPY ZEPHIR_DEBUG_PARAMS_DUMMY); zephir_array_update_long(&a, 1, &b, PH_COPY ZEPHIR_DEBUG_PARAMS_DUMMY); zephir_array_update_long(&a, 2, &b, PH_COPY ZEPHIR_DEBUG_PARAMS_DUMMY); @@ -679,7 +679,7 @@ PHP_METHOD(Test_NativeArray, testArray27) { ZEPHIR_INIT_VAR(&b); ZVAL_STRING(&b, "hello"); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 3, 0 TSRMLS_CC); + zephir_create_array(&a, 3, 0); zephir_array_update_long(&a, 0, &b, PH_COPY ZEPHIR_DEBUG_PARAMS_DUMMY); zephir_array_update_long(&a, 1, &b, PH_COPY ZEPHIR_DEBUG_PARAMS_DUMMY); zephir_array_update_long(&a, 2, &b, PH_COPY ZEPHIR_DEBUG_PARAMS_DUMMY); @@ -702,7 +702,7 @@ PHP_METHOD(Test_NativeArray, testArray28) { ZEPHIR_INIT_VAR(&b); ZVAL_STRING(&b, "hello"); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 3, 0 TSRMLS_CC); + zephir_create_array(&a, 3, 0); zephir_array_update_long(&a, 0, &b, PH_COPY ZEPHIR_DEBUG_PARAMS_DUMMY); zephir_array_update_long(&a, 1, &b, PH_COPY ZEPHIR_DEBUG_PARAMS_DUMMY); zephir_array_update_long(&a, 2, &b, PH_COPY ZEPHIR_DEBUG_PARAMS_DUMMY); @@ -723,7 +723,7 @@ PHP_METHOD(Test_NativeArray, testArray29) { b = 1; ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 1, 0 TSRMLS_CC); + zephir_create_array(&a, 1, 0); add_index_stringl(&a, b, SL("hello")); RETURN_CCTOR(&a); @@ -744,7 +744,7 @@ PHP_METHOD(Test_NativeArray, testArray30) { ZEPHIR_INIT_VAR(&b); ZVAL_STRING(&b, "hello"); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 1, 0 TSRMLS_CC); + zephir_create_array(&a, 1, 0); add_assoc_stringl_ex(&a, Z_STRVAL_P(&b), Z_STRLEN_P(&b), SL("hello")); RETURN_CCTOR(&a); @@ -763,7 +763,7 @@ PHP_METHOD(Test_NativeArray, testArrayAccess1) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 3, 0 TSRMLS_CC); + zephir_create_array(&a, 3, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, 1); zephir_array_fast_append(&a, &_0); @@ -773,7 +773,7 @@ PHP_METHOD(Test_NativeArray, testArrayAccess1) { ZEPHIR_INIT_NVAR(&_0); ZVAL_LONG(&_0, 3); zephir_array_fast_append(&a, &_0); - zephir_array_fetch_long(&b, &a, 0, PH_NOISY | PH_READONLY, "test/nativearray.zep", 245 TSRMLS_CC); + zephir_array_fetch_long(&b, &a, 0, PH_NOISY | PH_READONLY, "test/nativearray.zep", 245); RETURN_CTOR(&b); } @@ -790,11 +790,11 @@ PHP_METHOD(Test_NativeArray, testArrayAccess2) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 3, 0 TSRMLS_CC); + zephir_create_array(&a, 3, 0); add_assoc_long_ex(&a, SL("a"), 1); add_assoc_long_ex(&a, SL("b"), 2); add_assoc_long_ex(&a, SL("c"), 3); - zephir_array_fetch_string(&b, &a, SL("a"), PH_NOISY | PH_READONLY, "test/nativearray.zep", 255 TSRMLS_CC); + zephir_array_fetch_string(&b, &a, SL("a"), PH_NOISY | PH_READONLY, "test/nativearray.zep", 255); RETURN_CTOR(&b); } @@ -813,7 +813,7 @@ PHP_METHOD(Test_NativeArray, testArrayAccess3) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 3, 0 TSRMLS_CC); + zephir_create_array(&a, 3, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, 1); zephir_array_fast_append(&a, &_0); @@ -824,7 +824,7 @@ PHP_METHOD(Test_NativeArray, testArrayAccess3) { ZVAL_LONG(&_0, 3); zephir_array_fast_append(&a, &_0); c = 0; - zephir_array_fetch_long(&b, &a, c, PH_NOISY | PH_READONLY, "test/nativearray.zep", 267 TSRMLS_CC); + zephir_array_fetch_long(&b, &a, c, PH_NOISY | PH_READONLY, "test/nativearray.zep", 267); RETURN_CTOR(&b); } @@ -843,13 +843,13 @@ PHP_METHOD(Test_NativeArray, testArrayAccess4) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 3, 0 TSRMLS_CC); + zephir_create_array(&a, 3, 0); add_assoc_long_ex(&a, SL("a"), 1); add_assoc_long_ex(&a, SL("b"), 2); add_assoc_long_ex(&a, SL("c"), 3); ZEPHIR_INIT_VAR(&c); ZVAL_STRING(&c, "a"); - zephir_array_fetch(&b, &a, &c, PH_NOISY | PH_READONLY, "test/nativearray.zep", 279 TSRMLS_CC); + zephir_array_fetch(&b, &a, &c, PH_NOISY | PH_READONLY, "test/nativearray.zep", 279); RETURN_CTOR(&b); } @@ -867,13 +867,13 @@ PHP_METHOD(Test_NativeArray, testArrayAccess5) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 3, 0 TSRMLS_CC); + zephir_create_array(&a, 3, 0); add_assoc_long_ex(&a, SL("a"), 1); add_assoc_long_ex(&a, SL("b"), 2); add_assoc_long_ex(&a, SL("c"), 3); ZEPHIR_INIT_VAR(&c); ZVAL_STRING(&c, "a"); - zephir_array_fetch(&b, &a, &c, PH_NOISY | PH_READONLY, "test/nativearray.zep", 290 TSRMLS_CC); + zephir_array_fetch(&b, &a, &c, PH_NOISY | PH_READONLY, "test/nativearray.zep", 290); RETURN_CTOR(&b); } @@ -892,12 +892,12 @@ PHP_METHOD(Test_NativeArray, testArrayAccess6) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 3, 0 TSRMLS_CC); + zephir_create_array(&a, 3, 0); add_assoc_long_ex(&a, SL("a"), 1); add_assoc_long_ex(&a, SL("b"), 2); add_assoc_long_ex(&a, SL("c"), 3); - zephir_array_fetch_string(&_0, &a, SL("a"), PH_NOISY | PH_READONLY, "test/nativearray.zep", 300 TSRMLS_CC); - zephir_array_fetch_string(&_1, &a, SL("b"), PH_NOISY | PH_READONLY, "test/nativearray.zep", 300 TSRMLS_CC); + zephir_array_fetch_string(&_0, &a, SL("a"), PH_NOISY | PH_READONLY, "test/nativearray.zep", 300); + zephir_array_fetch_string(&_1, &a, SL("b"), PH_NOISY | PH_READONLY, "test/nativearray.zep", 300); ZEPHIR_INIT_VAR(&b); zephir_add_function(&b, &_0, &_1); RETURN_CCTOR(&b); @@ -919,14 +919,14 @@ PHP_METHOD(Test_NativeArray, testArrayMultipleAccess1) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 1, 0 TSRMLS_CC); + zephir_create_array(&a, 1, 0); ZEPHIR_INIT_VAR(&_0); - zephir_create_array(&_0, 2, 0 TSRMLS_CC); + zephir_create_array(&_0, 2, 0); add_index_stringl(&_0, 0, SL("a")); add_index_stringl(&_0, 1, SL("b")); zephir_array_update_long(&a, 0, &_0, PH_COPY ZEPHIR_DEBUG_PARAMS_DUMMY); - zephir_array_fetch_long(&_1, &a, 0, PH_NOISY | PH_READONLY, "test/nativearray.zep", 310 TSRMLS_CC); - zephir_array_fetch_long(&b, &_1, 0, PH_NOISY | PH_READONLY, "test/nativearray.zep", 310 TSRMLS_CC); + zephir_array_fetch_long(&_1, &a, 0, PH_NOISY | PH_READONLY, "test/nativearray.zep", 310); + zephir_array_fetch_long(&b, &_1, 0, PH_NOISY | PH_READONLY, "test/nativearray.zep", 310); RETURN_CTOR(&b); } @@ -947,9 +947,9 @@ PHP_METHOD(Test_NativeArray, testArrayMultipleAccess2) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 1, 0 TSRMLS_CC); + zephir_create_array(&a, 1, 0); ZEPHIR_INIT_VAR(&_0); - zephir_create_array(&_0, 2, 0 TSRMLS_CC); + zephir_create_array(&_0, 2, 0); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "a"); zephir_array_fast_append(&_0, &_1); @@ -957,8 +957,8 @@ PHP_METHOD(Test_NativeArray, testArrayMultipleAccess2) { ZVAL_STRING(&_1, "b"); zephir_array_fast_append(&_0, &_1); zephir_array_fast_append(&a, &_0); - zephir_array_fetch_long(&_2, &a, 0, PH_NOISY | PH_READONLY, "test/nativearray.zep", 320 TSRMLS_CC); - zephir_array_fetch_long(&b, &_2, 1, PH_NOISY | PH_READONLY, "test/nativearray.zep", 320 TSRMLS_CC); + zephir_array_fetch_long(&_2, &a, 0, PH_NOISY | PH_READONLY, "test/nativearray.zep", 320); + zephir_array_fetch_long(&b, &_2, 1, PH_NOISY | PH_READONLY, "test/nativearray.zep", 320); RETURN_CTOR(&b); } @@ -981,11 +981,11 @@ PHP_METHOD(Test_NativeArray, testArrayMultipleAccess3) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 1, 0 TSRMLS_CC); + zephir_create_array(&a, 1, 0); ZEPHIR_INIT_VAR(&_0); - zephir_create_array(&_0, 1, 0 TSRMLS_CC); + zephir_create_array(&_0, 1, 0); ZEPHIR_INIT_VAR(&_1); - zephir_create_array(&_1, 2, 0 TSRMLS_CC); + zephir_create_array(&_1, 2, 0); ZEPHIR_INIT_VAR(&_2); ZVAL_STRING(&_2, "a"); zephir_array_fast_append(&_1, &_2); @@ -994,9 +994,9 @@ PHP_METHOD(Test_NativeArray, testArrayMultipleAccess3) { zephir_array_fast_append(&_1, &_2); zephir_array_fast_append(&_0, &_1); zephir_array_fast_append(&a, &_0); - zephir_array_fetch_long(&_3, &a, 0, PH_NOISY | PH_READONLY, "test/nativearray.zep", 330 TSRMLS_CC); - zephir_array_fetch_long(&_4, &_3, 0, PH_NOISY | PH_READONLY, "test/nativearray.zep", 330 TSRMLS_CC); - zephir_array_fetch_long(&b, &_4, 1, PH_NOISY | PH_READONLY, "test/nativearray.zep", 330 TSRMLS_CC); + zephir_array_fetch_long(&_3, &a, 0, PH_NOISY | PH_READONLY, "test/nativearray.zep", 330); + zephir_array_fetch_long(&_4, &_3, 0, PH_NOISY | PH_READONLY, "test/nativearray.zep", 330); + zephir_array_fetch_long(&b, &_4, 1, PH_NOISY | PH_READONLY, "test/nativearray.zep", 330); RETURN_CTOR(&b); } @@ -1019,11 +1019,11 @@ PHP_METHOD(Test_NativeArray, testArrayMultipleAccess4) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 1, 0 TSRMLS_CC); + zephir_create_array(&a, 1, 0); ZEPHIR_INIT_VAR(&_0); - zephir_create_array(&_0, 1, 0 TSRMLS_CC); + zephir_create_array(&_0, 1, 0); ZEPHIR_INIT_VAR(&_1); - zephir_create_array(&_1, 2, 0 TSRMLS_CC); + zephir_create_array(&_1, 2, 0); ZEPHIR_INIT_VAR(&_2); ZVAL_STRING(&_2, "a"); zephir_array_fast_append(&_1, &_2); @@ -1032,9 +1032,9 @@ PHP_METHOD(Test_NativeArray, testArrayMultipleAccess4) { zephir_array_fast_append(&_1, &_2); zephir_array_fast_append(&_0, &_1); zephir_array_fast_append(&a, &_0); - zephir_array_fetch_long(&_3, &a, 0, PH_NOISY | PH_READONLY, "test/nativearray.zep", 340 TSRMLS_CC); - zephir_array_fetch_long(&_4, &_3, 0, PH_NOISY | PH_READONLY, "test/nativearray.zep", 340 TSRMLS_CC); - zephir_array_fetch_long(&b, &_4, 1, PH_NOISY | PH_READONLY, "test/nativearray.zep", 340 TSRMLS_CC); + zephir_array_fetch_long(&_3, &a, 0, PH_NOISY | PH_READONLY, "test/nativearray.zep", 340); + zephir_array_fetch_long(&_4, &_3, 0, PH_NOISY | PH_READONLY, "test/nativearray.zep", 340); + zephir_array_fetch_long(&b, &_4, 1, PH_NOISY | PH_READONLY, "test/nativearray.zep", 340); RETURN_CTOR(&b); } @@ -1056,18 +1056,18 @@ PHP_METHOD(Test_NativeArray, testArrayMultipleAccess5) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 1, 0 TSRMLS_CC); + zephir_create_array(&a, 1, 0); ZEPHIR_INIT_VAR(&_0); - zephir_create_array(&_0, 1, 0 TSRMLS_CC); + zephir_create_array(&_0, 1, 0); ZEPHIR_INIT_VAR(&_1); - zephir_create_array(&_1, 2, 0 TSRMLS_CC); + zephir_create_array(&_1, 2, 0); add_assoc_long_ex(&_1, SL("c"), 0); add_assoc_long_ex(&_1, SL("d"), 1); zephir_array_update_string(&_0, SL("b"), &_1, PH_COPY | PH_SEPARATE); zephir_array_update_string(&a, SL("a"), &_0, PH_COPY | PH_SEPARATE); - zephir_array_fetch_string(&_2, &a, SL("a"), PH_NOISY | PH_READONLY, "test/nativearray.zep", 350 TSRMLS_CC); - zephir_array_fetch_string(&_3, &_2, SL("b"), PH_NOISY | PH_READONLY, "test/nativearray.zep", 350 TSRMLS_CC); - zephir_array_fetch_string(&b, &_3, SL("c"), PH_NOISY | PH_READONLY, "test/nativearray.zep", 350 TSRMLS_CC); + zephir_array_fetch_string(&_2, &a, SL("a"), PH_NOISY | PH_READONLY, "test/nativearray.zep", 350); + zephir_array_fetch_string(&_3, &_2, SL("b"), PH_NOISY | PH_READONLY, "test/nativearray.zep", 350); + zephir_array_fetch_string(&b, &_3, SL("c"), PH_NOISY | PH_READONLY, "test/nativearray.zep", 350); RETURN_CTOR(&b); } @@ -1084,7 +1084,7 @@ PHP_METHOD(Test_NativeArray, testArrayUpdate1) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 3, 0 TSRMLS_CC); + zephir_create_array(&a, 3, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, 1); zephir_array_fast_append(&a, &_0); @@ -1114,7 +1114,7 @@ PHP_METHOD(Test_NativeArray, testArrayUpdate2) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 3, 0 TSRMLS_CC); + zephir_create_array(&a, 3, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, 1); zephir_array_fast_append(&a, &_0); @@ -1146,7 +1146,7 @@ PHP_METHOD(Test_NativeArray, testArrayUpdate3) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 3, 0 TSRMLS_CC); + zephir_create_array(&a, 3, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, 1); zephir_array_fast_append(&a, &_0); @@ -1180,7 +1180,7 @@ PHP_METHOD(Test_NativeArray, testArrayUpdate4) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 3, 0 TSRMLS_CC); + zephir_create_array(&a, 3, 0); add_assoc_long_ex(&a, SL("a"), 1); add_assoc_long_ex(&a, SL("b"), 2); add_assoc_long_ex(&a, SL("c"), 3); @@ -1207,7 +1207,7 @@ PHP_METHOD(Test_NativeArray, testArrayUpdate5) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 3, 0 TSRMLS_CC); + zephir_create_array(&a, 3, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, 1); zephir_array_fast_append(&a, &_0); @@ -1218,7 +1218,7 @@ PHP_METHOD(Test_NativeArray, testArrayUpdate5) { ZVAL_LONG(&_0, 3); zephir_array_fast_append(&a, &_0); ZEPHIR_INIT_VAR(&_1); - zephir_create_array(&_1, 3, 0 TSRMLS_CC); + zephir_create_array(&_1, 3, 0); ZEPHIR_INIT_NVAR(&_0); ZVAL_LONG(&_0, 1); zephir_array_fast_append(&_1, &_0); @@ -1230,7 +1230,7 @@ PHP_METHOD(Test_NativeArray, testArrayUpdate5) { zephir_array_fast_append(&_1, &_0); zephir_array_update_long(&a, 0, &_1, PH_COPY | PH_SEPARATE ZEPHIR_DEBUG_PARAMS_DUMMY); ZEPHIR_INIT_VAR(&_2); - zephir_create_array(&_2, 3, 0 TSRMLS_CC); + zephir_create_array(&_2, 3, 0); ZEPHIR_INIT_NVAR(&_0); ZVAL_LONG(&_0, 1); zephir_array_fast_append(&_2, &_0); @@ -1242,7 +1242,7 @@ PHP_METHOD(Test_NativeArray, testArrayUpdate5) { zephir_array_fast_append(&_2, &_0); zephir_array_update_long(&a, 1, &_2, PH_COPY | PH_SEPARATE ZEPHIR_DEBUG_PARAMS_DUMMY); ZEPHIR_INIT_VAR(&_3); - zephir_create_array(&_3, 3, 0 TSRMLS_CC); + zephir_create_array(&_3, 3, 0); ZEPHIR_INIT_NVAR(&_0); ZVAL_LONG(&_0, 1); zephir_array_fast_append(&_3, &_0); @@ -1287,7 +1287,7 @@ PHP_METHOD(Test_NativeArray, testArrayAppend1) { ZVAL_LONG(&_0, 5); zephir_array_append(&a, &_0, PH_SEPARATE, "test/nativearray.zep", 402); ZEPHIR_INIT_VAR(&_1); - zephir_create_array(&_1, 3, 0 TSRMLS_CC); + zephir_create_array(&_1, 3, 0); ZEPHIR_INIT_NVAR(&_0); ZVAL_LONG(&_0, 1); zephir_array_fast_append(&_1, &_0); @@ -1328,7 +1328,7 @@ PHP_METHOD(Test_NativeArray, testArrayAppend2) { e = 1.10; f = 5; ZEPHIR_INIT_VAR(&g); - zephir_create_array(&g, 3, 0 TSRMLS_CC); + zephir_create_array(&g, 3, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, 1); zephir_array_fast_append(&g, &_0); @@ -1369,7 +1369,7 @@ PHP_METHOD(Test_NativeArray, testMultipleArrayUpdate1) { ZEPHIR_INIT_VAR(&a); array_init(&a); - zephir_array_update_multi(&a, &__$null TSRMLS_CC, SL("ss"), 4, SL("x"), SL("y")); + zephir_array_update_multi(&a, &__$null, SL("ss"), 4, SL("x"), SL("y")); RETURN_CCTOR(&a); } @@ -1387,7 +1387,7 @@ PHP_METHOD(Test_NativeArray, testMultipleArrayUpdate2) { ZEPHIR_INIT_VAR(&a); array_init(&a); - zephir_array_update_multi(&a, &__$null TSRMLS_CC, SL("sss"), 6, SL("x"), SL("y"), SL("z")); + zephir_array_update_multi(&a, &__$null, SL("sss"), 6, SL("x"), SL("y"), SL("z")); RETURN_CCTOR(&a); } @@ -1405,7 +1405,7 @@ PHP_METHOD(Test_NativeArray, testMultipleArrayUpdate3) { ZEPHIR_INIT_VAR(&a); array_init(&a); - zephir_array_update_multi(&a, &__$null TSRMLS_CC, SL("ll"), 2, 0, 1); + zephir_array_update_multi(&a, &__$null, SL("ll"), 2, 0, 1); RETURN_CCTOR(&a); } @@ -1423,7 +1423,7 @@ PHP_METHOD(Test_NativeArray, testMultipleArrayUpdate4) { ZEPHIR_INIT_VAR(&a); array_init(&a); - zephir_array_update_multi(&a, &__$null TSRMLS_CC, SL("lll"), 3, 0, 1, 2); + zephir_array_update_multi(&a, &__$null, SL("lll"), 3, 0, 1, 2); RETURN_CCTOR(&a); } @@ -1441,7 +1441,7 @@ PHP_METHOD(Test_NativeArray, testMultipleArrayUpdate5) { ZEPHIR_INIT_VAR(&a); array_init(&a); - zephir_array_update_multi(&a, &__$null TSRMLS_CC, SL("sls"), 5, SL("a"), 1, SL("c")); + zephir_array_update_multi(&a, &__$null, SL("sls"), 5, SL("a"), 1, SL("c")); RETURN_CCTOR(&a); } @@ -1459,7 +1459,7 @@ PHP_METHOD(Test_NativeArray, testMultipleArrayUpdate6) { ZEPHIR_INIT_VAR(&a); array_init(&a); - zephir_array_update_multi(&a, &__$null TSRMLS_CC, SL("lsl"), 4, 0, SL("b"), 2); + zephir_array_update_multi(&a, &__$null, SL("lsl"), 4, 0, SL("b"), 2); RETURN_CCTOR(&a); } @@ -1478,8 +1478,8 @@ PHP_METHOD(Test_NativeArray, testMultipleArrayUpdate7) { ZEPHIR_INIT_VAR(&a); array_init(&a); - zephir_array_update_multi(&a, &__$true TSRMLS_CC, SL("sls"), 5, SL("a"), 1, SL("c")); - zephir_array_update_multi(&a, &__$false TSRMLS_CC, SL("lsl"), 4, 0, SL("b"), 2); + zephir_array_update_multi(&a, &__$true, SL("sls"), 5, SL("a"), 1, SL("c")); + zephir_array_update_multi(&a, &__$false, SL("lsl"), 4, 0, SL("b"), 2); RETURN_CCTOR(&a); } @@ -1499,9 +1499,9 @@ PHP_METHOD(Test_NativeArray, testMultipleArrayUpdate8) { ZEPHIR_INIT_VAR(&a); array_init(&a); - zephir_array_update_multi(&a, &__$null TSRMLS_CC, SL("sl"), 3, SL("a"), 0); - zephir_array_update_multi(&a, &__$true TSRMLS_CC, SL("sl"), 3, SL("a"), 1); - zephir_array_update_multi(&a, &__$false TSRMLS_CC, SL("sl"), 3, SL("a"), 2); + zephir_array_update_multi(&a, &__$null, SL("sl"), 3, SL("a"), 0); + zephir_array_update_multi(&a, &__$true, SL("sl"), 3, SL("a"), 1); + zephir_array_update_multi(&a, &__$false, SL("sl"), 3, SL("a"), 2); RETURN_CCTOR(&a); } @@ -1521,9 +1521,9 @@ PHP_METHOD(Test_NativeArray, testMultipleArrayUpdate9) { ZEPHIR_INIT_VAR(&a); array_init(&a); - zephir_array_update_multi(&a, &__$null TSRMLS_CC, SL("sl"), 3, SL("a"), 0); - zephir_array_update_multi(&a, &__$true TSRMLS_CC, SL("sl"), 3, SL("a"), 1); - zephir_array_update_multi(&a, &__$false TSRMLS_CC, SL("sl"), 3, SL("a"), 1); + zephir_array_update_multi(&a, &__$null, SL("sl"), 3, SL("a"), 0); + zephir_array_update_multi(&a, &__$true, SL("sl"), 3, SL("a"), 1); + zephir_array_update_multi(&a, &__$false, SL("sl"), 3, SL("a"), 1); RETURN_CCTOR(&a); } @@ -1543,9 +1543,9 @@ PHP_METHOD(Test_NativeArray, testMultipleArrayUpdate10) { ZEPHIR_INIT_VAR(&a); array_init(&a); - zephir_array_update_multi(&a, &__$null TSRMLS_CC, SL("sl"), 3, SL("a"), 0); - zephir_array_update_multi(&a, &__$true TSRMLS_CC, SL("sl"), 3, SL("a"), 1); - zephir_array_update_multi(&a, &__$false TSRMLS_CC, SL("sls"), 5, SL("a"), 1, SL("c")); + zephir_array_update_multi(&a, &__$null, SL("sl"), 3, SL("a"), 0); + zephir_array_update_multi(&a, &__$true, SL("sl"), 3, SL("a"), 1); + zephir_array_update_multi(&a, &__$false, SL("sls"), 5, SL("a"), 1, SL("c")); RETURN_CCTOR(&a); } @@ -1569,7 +1569,7 @@ PHP_METHOD(Test_NativeArray, testMultipleArrayUpdate11) { ZVAL_STRING(&c, "x"); ZEPHIR_INIT_VAR(&a); array_init(&a); - zephir_array_update_multi(&a, &__$null TSRMLS_CC, SL("zz"), 2, &b, &c); + zephir_array_update_multi(&a, &__$null, SL("zz"), 2, &b, &c); RETURN_CCTOR(&a); } @@ -1596,7 +1596,7 @@ PHP_METHOD(Test_NativeArray, testMultipleArrayUpdate12) { ZVAL_STRING(&d, "z"); ZEPHIR_INIT_VAR(&a); array_init(&a); - zephir_array_update_multi(&a, &__$null TSRMLS_CC, SL("zzz"), 3, &b, &c, &d); + zephir_array_update_multi(&a, &__$null, SL("zzz"), 3, &b, &c, &d); RETURN_CCTOR(&a); } @@ -1619,26 +1619,26 @@ PHP_METHOD(Test_NativeArray, testMultipleArrayUpdate13) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&d); - zephir_create_array(&d, 3, 0 TSRMLS_CC); + zephir_create_array(&d, 3, 0); zephir_array_update_string(&d, SL("x"), &__$null, PH_COPY | PH_SEPARATE); zephir_array_update_string(&d, SL("y"), &__$null, PH_COPY | PH_SEPARATE); zephir_array_update_string(&d, SL("z"), &__$null, PH_COPY | PH_SEPARATE); ZEPHIR_INIT_VAR(&b); - zephir_create_array(&b, 3, 0 TSRMLS_CC); + zephir_create_array(&b, 3, 0); add_assoc_long_ex(&b, SL("a"), 1); add_assoc_long_ex(&b, SL("b"), 2); zephir_array_update_string(&b, SL("c"), &d, PH_COPY | PH_SEPARATE); ZEPHIR_CPY_WRT(&c, &b); ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 2, 0 TSRMLS_CC); + zephir_create_array(&a, 2, 0); zephir_array_update_long(&a, 0, &b, PH_COPY ZEPHIR_DEBUG_PARAMS_DUMMY); ZEPHIR_INIT_VAR(&_0); - zephir_create_array(&_0, 3, 0 TSRMLS_CC); + zephir_create_array(&_0, 3, 0); add_assoc_long_ex(&_0, SL("a"), 1); add_assoc_long_ex(&_0, SL("b"), 2); add_assoc_long_ex(&_0, SL("c"), 3); zephir_array_update_long(&a, 1, &_0, PH_COPY ZEPHIR_DEBUG_PARAMS_DUMMY); - zephir_array_update_multi(&a, &__$false TSRMLS_CC, SL("lss"), 5, 0, SL("a"), SL("y")); + zephir_array_update_multi(&a, &__$false, SL("lss"), 5, 0, SL("a"), SL("y")); RETURN_CCTOR(&a); } @@ -1659,7 +1659,7 @@ PHP_METHOD(Test_NativeArray, testMultipleArrayAppend1) { array_init(&a); ZEPHIR_INIT_VAR(&b); ZVAL_STRING(&b, "y"); - zephir_array_update_multi(&a, &__$null TSRMLS_CC, SL("lsza"), 5, 0, SL("hello"), &b); + zephir_array_update_multi(&a, &__$null, SL("lsza"), 5, 0, SL("hello"), &b); RETURN_CCTOR(&a); } @@ -1683,7 +1683,7 @@ PHP_METHOD(Test_NativeArray, testMultipleArrayAppend2) { b = 100; ZEPHIR_INIT_VAR(&x); ZVAL_STRING(&x, "hello"); - zephir_array_update_multi(&a, &__$null TSRMLS_CC, SL("lslza"), 6, 0, SL("hello"), b, &x); + zephir_array_update_multi(&a, &__$null, SL("lslza"), 6, 0, SL("hello"), b, &x); RETURN_CCTOR(&a); } @@ -1710,16 +1710,16 @@ PHP_METHOD(Test_NativeArray, testMultipleArrayAppend3) { array_init(&a); ZEPHIR_INIT_VAR(&b); ZVAL_STRING(&b, "y"); - zephir_array_update_multi(&a, &__$null TSRMLS_CC, SL("lsz"), 4, 0, SL("hello"), &b); + zephir_array_update_multi(&a, &__$null, SL("lsz"), 4, 0, SL("hello"), &b); ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, 100); - zephir_array_update_multi(&a, &_0 TSRMLS_CC, SL("lsza"), 5, 0, SL("hello"), &b); - zephir_array_update_multi(&a, &__$false TSRMLS_CC, SL("lsza"), 5, 0, SL("hello"), &b); + zephir_array_update_multi(&a, &_0, SL("lsza"), 5, 0, SL("hello"), &b); + zephir_array_update_multi(&a, &__$false, SL("lsza"), 5, 0, SL("hello"), &b); ZEPHIR_INIT_VAR(&_1); ZVAL_DOUBLE(&_1, 1.2); - zephir_array_update_multi(&a, &_1 TSRMLS_CC, SL("lsza"), 5, 0, SL("hello"), &b); + zephir_array_update_multi(&a, &_1, SL("lsza"), 5, 0, SL("hello"), &b); ZEPHIR_INIT_VAR(&_2); - zephir_create_array(&_2, 3, 0 TSRMLS_CC); + zephir_create_array(&_2, 3, 0); ZEPHIR_INIT_VAR(&_3); ZVAL_LONG(&_3, 1); zephir_array_fast_append(&_2, &_3); @@ -1729,7 +1729,7 @@ PHP_METHOD(Test_NativeArray, testMultipleArrayAppend3) { ZEPHIR_INIT_NVAR(&_3); ZVAL_LONG(&_3, 3); zephir_array_fast_append(&_2, &_3); - zephir_array_update_multi(&a, &_2 TSRMLS_CC, SL("lsza"), 5, 0, SL("hello"), &b); + zephir_array_update_multi(&a, &_2, SL("lsza"), 5, 0, SL("hello"), &b); RETURN_CCTOR(&a); } @@ -1745,7 +1745,7 @@ PHP_METHOD(Test_NativeArray, testArrayKeys) { - zephir_array_keys(return_value, param TSRMLS_CC); + zephir_array_keys(return_value, param); return; } @@ -1765,8 +1765,8 @@ PHP_METHOD(Test_NativeArray, testImplodeArray) { ZEPHIR_INIT_VAR(&_0); - zephir_array_keys(&_0, param TSRMLS_CC); - zephir_fast_join_str(return_value, SL("|"), &_0 TSRMLS_CC); + zephir_array_keys(&_0, param); + zephir_fast_join_str(return_value, SL("|"), &_0); RETURN_MM(); } @@ -1786,7 +1786,7 @@ PHP_METHOD(Test_NativeArray, issue110) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&byteUnits); - zephir_create_array(&byteUnits, 9, 0 TSRMLS_CC); + zephir_create_array(&byteUnits, 9, 0); add_assoc_long_ex(&byteUnits, SL("B"), 0); add_assoc_long_ex(&byteUnits, SL("K"), 10); add_assoc_long_ex(&byteUnits, SL("M"), 20); @@ -1797,8 +1797,8 @@ PHP_METHOD(Test_NativeArray, issue110) { add_assoc_long_ex(&byteUnits, SL("GB"), 30); add_assoc_long_ex(&byteUnits, SL("TB"), 40); ZEPHIR_INIT_VAR(&_0); - zephir_array_keys(&_0, &byteUnits TSRMLS_CC); - zephir_fast_join_str(return_value, SL("|"), &_0 TSRMLS_CC); + zephir_array_keys(&_0, &byteUnits); + zephir_fast_join_str(return_value, SL("|"), &_0); RETURN_MM(); } @@ -1840,7 +1840,7 @@ PHP_METHOD(Test_NativeArray, issue743a) { ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "ok"); - zephir_array_update_multi(¤t743a, &_0 TSRMLS_CC, SL("ls"), 3, 42, SL("str")); + zephir_array_update_multi(¤t743a, &_0, SL("ls"), 3, 42, SL("str")); RETURN_CTOR(¤t743a); } @@ -1863,7 +1863,7 @@ PHP_METHOD(Test_NativeArray, issue743b) { ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "ok"); - zephir_array_update_multi(¤t, &_0 TSRMLS_CC, SL("sl"), 3, SL("str"), 42); + zephir_array_update_multi(¤t, &_0, SL("sl"), 3, SL("str"), 42); RETURN_CTOR(¤t); } @@ -1889,7 +1889,7 @@ PHP_METHOD(Test_NativeArray, issue743c) { ZVAL_STRING(&key, "hey"); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "ok"); - zephir_array_update_multi(¤t, &_0 TSRMLS_CC, SL("sz"), 3, SL("str"), &key); + zephir_array_update_multi(¤t, &_0, SL("sz"), 3, SL("str"), &key); RETURN_CTOR(¤t); } @@ -1931,7 +1931,7 @@ PHP_METHOD(Test_NativeArray, issue709) { ZEPHIR_INIT_NVAR(&c); ZVAL_LONG(&c, _1); ZEPHIR_INIT_NVAR(&arr); - zephir_create_array(&arr, 2, 0 TSRMLS_CC); + zephir_create_array(&arr, 2, 0); ZEPHIR_INIT_NVAR(&_3$$3); ZVAL_LONG(&_3$$3, 1); zephir_array_fast_append(&arr, &_3$$3); @@ -1940,7 +1940,7 @@ PHP_METHOD(Test_NativeArray, issue709) { zephir_array_fast_append(&arr, &_3$$3); ZEPHIR_CALL_FUNCTION(&_5$$3, "array_rand", &_6, 53, &arr); zephir_check_call_status(); - zephir_array_fetch(&_4$$3, &arr, &_5$$3, PH_NOISY | PH_READONLY, "test/nativearray.zep", 626 TSRMLS_CC); + zephir_array_fetch(&_4$$3, &arr, &_5$$3, PH_NOISY | PH_READONLY, "test/nativearray.zep", 626); ZEPHIR_CPY_WRT(&arr, &_4$$3); _7$$3 = ZEPHIR_LT_LONG(&arr, 0); if (!(_7$$3)) { @@ -1984,7 +1984,7 @@ PHP_METHOD(Test_NativeArray, Issue1140) { zephir_update_property_array(this_ptr, SL("prefixes"), &prefix, &_1$$3); } zephir_read_property(&_2, this_ptr, SL("prefixes"), PH_NOISY_CC | PH_READONLY); - zephir_array_fetch(&_3, &_2, &prefix, PH_NOISY | PH_READONLY, "test/nativearray.zep", 639 TSRMLS_CC); + zephir_array_fetch(&_3, &_2, &prefix, PH_NOISY | PH_READONLY, "test/nativearray.zep", 639); ZEPHIR_MAKE_REF(&_3); ZEPHIR_CALL_FUNCTION(NULL, "array_push", NULL, 54, &_3, &baseDir); ZEPHIR_UNREF(&_3); @@ -2007,7 +2007,7 @@ PHP_METHOD(Test_NativeArray, Issue1159) { ZEPHIR_INIT_VAR(&myvar); ZVAL_LONG(&myvar, 1); ZEPHIR_INIT_VAR(&_0); - zephir_create_array(&_0, 1, 0 TSRMLS_CC); + zephir_create_array(&_0, 1, 0); zephir_array_fast_append(&_0, &myvar); ZEPHIR_CPY_WRT(&myvar, &_0); RETURN_CCTOR(&myvar); diff --git a/ext/test/oo.zep.c b/ext/test/oo.zep.c index afda5086ed..24b5190b5d 100644 --- a/ext/test/oo.zep.c +++ b/ext/test/oo.zep.c @@ -78,7 +78,7 @@ PHP_METHOD(Test_Oo, testInstance3) { ZEPHIR_INIT_VAR(&o); object_init_ex(&o, test_oo_oonoconstruct_ce); - if (zephir_has_constructor(&o TSRMLS_CC)) { + if (zephir_has_constructor(&o)) { ZEPHIR_CALL_METHOD(NULL, &o, "__construct", NULL, 0); zephir_check_call_status(); } @@ -310,7 +310,7 @@ PHP_METHOD(Test_Oo, createInstancesInLoop) { ZEPHIR_INIT_VAR(&result); array_init(&result); ZEPHIR_INIT_VAR(&_0); - zephir_create_array(&_0, 2, 0 TSRMLS_CC); + zephir_create_array(&_0, 2, 0); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "OoDynamicA"); zephir_array_fast_append(&_0, &_1); @@ -332,7 +332,7 @@ PHP_METHOD(Test_Oo, createInstancesInLoop) { RETURN_MM_NULL(); } object_init_ex(&instance, _5$$3); - if (zephir_has_constructor(&instance TSRMLS_CC)) { + if (zephir_has_constructor(&instance)) { ZEPHIR_CALL_METHOD(NULL, &instance, "__construct", NULL, 0); zephir_check_call_status(); } @@ -363,7 +363,7 @@ PHP_METHOD(Test_Oo, createInstancesInLoop) { RETURN_MM_NULL(); } object_init_ex(&instance, _9$$4); - if (zephir_has_constructor(&instance TSRMLS_CC)) { + if (zephir_has_constructor(&instance)) { ZEPHIR_CALL_METHOD(NULL, &instance, "__construct", NULL, 0); zephir_check_call_status(); } diff --git a/ext/test/oo/abstractstatic.zep.c b/ext/test/oo/abstractstatic.zep.c index a192a2e4db..2d3b94ab72 100644 --- a/ext/test/oo/abstractstatic.zep.c +++ b/ext/test/oo/abstractstatic.zep.c @@ -28,7 +28,7 @@ PHP_METHOD(Test_Oo_AbstractStatic, getCalledClass) { zval *this_ptr = getThis(); - zephir_get_called_class(return_value TSRMLS_CC); + zephir_get_called_class(return_value); return; } diff --git a/ext/test/oo/constantsinterface.zep.c b/ext/test/oo/constantsinterface.zep.c index fd80dc7aa8..3a70786aae 100644 --- a/ext/test/oo/constantsinterface.zep.c +++ b/ext/test/oo/constantsinterface.zep.c @@ -23,7 +23,7 @@ ZEPHIR_INIT_CLASS(Test_Oo_ConstantsInterface) { zephir_declare_class_constant_string(test_oo_constantsinterface_ce, SL("NAMESPACENAME"), "Test\\Oo"); - zend_class_implements(test_oo_constantsinterface_ce TSRMLS_CC, 1, test_testinterface_ce); + zend_class_implements(test_oo_constantsinterface_ce, 1, test_testinterface_ce); return SUCCESS; } diff --git a/ext/test/oo/dynamicprop.zep.c b/ext/test/oo/dynamicprop.zep.c index 756e3ec5f2..541a65cae8 100644 --- a/ext/test/oo/dynamicprop.zep.c +++ b/ext/test/oo/dynamicprop.zep.c @@ -26,7 +26,7 @@ ZEPHIR_INIT_CLASS(Test_Oo_DynamicProp) { ZEPHIR_REGISTER_CLASS(Test\\Oo, DynamicProp, test, oo_dynamicprop, test_oo_dynamicprop_method_entry, 0); - zend_declare_property_null(test_oo_dynamicprop_ce, SL("test"), ZEND_ACC_PUBLIC TSRMLS_CC); + zend_declare_property_null(test_oo_dynamicprop_ce, SL("test"), ZEND_ACC_PUBLIC); return SUCCESS; @@ -46,7 +46,7 @@ PHP_METHOD(Test_Oo_DynamicProp, setPropertyInt) { zephir_fetch_params(1, 1, 0, &property_param); if (UNEXPECTED(Z_TYPE_P(property_param) != IS_STRING && Z_TYPE_P(property_param) != IS_NULL)) { - zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'property' must be of the type string") TSRMLS_CC); + zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'property' must be of the type string")); RETURN_MM_NULL(); } if (EXPECTED(Z_TYPE_P(property_param) == IS_STRING)) { @@ -59,7 +59,7 @@ PHP_METHOD(Test_Oo_DynamicProp, setPropertyInt) { ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, 10); - zephir_update_property_zval_zval(this_ptr, &property, &_0 TSRMLS_CC); + zephir_update_property_zval_zval(this_ptr, &property, &_0); ZEPHIR_MM_RESTORE(); } @@ -78,7 +78,7 @@ PHP_METHOD(Test_Oo_DynamicProp, setPropertyBoolTrue) { zephir_fetch_params(1, 1, 0, &property_param); if (UNEXPECTED(Z_TYPE_P(property_param) != IS_STRING && Z_TYPE_P(property_param) != IS_NULL)) { - zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'property' must be of the type string") TSRMLS_CC); + zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'property' must be of the type string")); RETURN_MM_NULL(); } if (EXPECTED(Z_TYPE_P(property_param) == IS_STRING)) { @@ -89,7 +89,7 @@ PHP_METHOD(Test_Oo_DynamicProp, setPropertyBoolTrue) { } - zephir_update_property_zval_zval(this_ptr, &property, &__$true TSRMLS_CC); + zephir_update_property_zval_zval(this_ptr, &property, &__$true); ZEPHIR_MM_RESTORE(); } @@ -108,7 +108,7 @@ PHP_METHOD(Test_Oo_DynamicProp, setPropertyBoolFalse) { zephir_fetch_params(1, 1, 0, &property_param); if (UNEXPECTED(Z_TYPE_P(property_param) != IS_STRING && Z_TYPE_P(property_param) != IS_NULL)) { - zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'property' must be of the type string") TSRMLS_CC); + zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'property' must be of the type string")); RETURN_MM_NULL(); } if (EXPECTED(Z_TYPE_P(property_param) == IS_STRING)) { @@ -119,7 +119,7 @@ PHP_METHOD(Test_Oo_DynamicProp, setPropertyBoolFalse) { } - zephir_update_property_zval_zval(this_ptr, &property, &__$false TSRMLS_CC); + zephir_update_property_zval_zval(this_ptr, &property, &__$false); ZEPHIR_MM_RESTORE(); } @@ -138,7 +138,7 @@ PHP_METHOD(Test_Oo_DynamicProp, setPropertyString) { zephir_fetch_params(1, 1, 0, &property_param); if (UNEXPECTED(Z_TYPE_P(property_param) != IS_STRING && Z_TYPE_P(property_param) != IS_NULL)) { - zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'property' must be of the type string") TSRMLS_CC); + zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'property' must be of the type string")); RETURN_MM_NULL(); } if (EXPECTED(Z_TYPE_P(property_param) == IS_STRING)) { @@ -151,7 +151,7 @@ PHP_METHOD(Test_Oo_DynamicProp, setPropertyString) { ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "string"); - zephir_update_property_zval_zval(this_ptr, &property, &_0 TSRMLS_CC); + zephir_update_property_zval_zval(this_ptr, &property, &_0); ZEPHIR_MM_RESTORE(); } @@ -171,7 +171,7 @@ PHP_METHOD(Test_Oo_DynamicProp, setPropertyChar) { zephir_fetch_params(1, 1, 0, &property_param); if (UNEXPECTED(Z_TYPE_P(property_param) != IS_STRING && Z_TYPE_P(property_param) != IS_NULL)) { - zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'property' must be of the type string") TSRMLS_CC); + zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'property' must be of the type string")); RETURN_MM_NULL(); } if (EXPECTED(Z_TYPE_P(property_param) == IS_STRING)) { @@ -185,7 +185,7 @@ PHP_METHOD(Test_Oo_DynamicProp, setPropertyChar) { a = 'A'; ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, a); - zephir_update_property_zval_zval(this_ptr, &property, &_0 TSRMLS_CC); + zephir_update_property_zval_zval(this_ptr, &property, &_0); ZEPHIR_MM_RESTORE(); } @@ -205,7 +205,7 @@ PHP_METHOD(Test_Oo_DynamicProp, setPropertyUChar) { zephir_fetch_params(1, 1, 0, &property_param); if (UNEXPECTED(Z_TYPE_P(property_param) != IS_STRING && Z_TYPE_P(property_param) != IS_NULL)) { - zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'property' must be of the type string") TSRMLS_CC); + zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'property' must be of the type string")); RETURN_MM_NULL(); } if (EXPECTED(Z_TYPE_P(property_param) == IS_STRING)) { @@ -219,7 +219,7 @@ PHP_METHOD(Test_Oo_DynamicProp, setPropertyUChar) { a = 'A'; ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, a); - zephir_update_property_zval_zval(this_ptr, &property, &_0 TSRMLS_CC); + zephir_update_property_zval_zval(this_ptr, &property, &_0); ZEPHIR_MM_RESTORE(); } @@ -238,7 +238,7 @@ PHP_METHOD(Test_Oo_DynamicProp, setPropertyNull) { zephir_fetch_params(1, 1, 0, &property_param); if (UNEXPECTED(Z_TYPE_P(property_param) != IS_STRING && Z_TYPE_P(property_param) != IS_NULL)) { - zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'property' must be of the type string") TSRMLS_CC); + zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'property' must be of the type string")); RETURN_MM_NULL(); } if (EXPECTED(Z_TYPE_P(property_param) == IS_STRING)) { @@ -249,7 +249,7 @@ PHP_METHOD(Test_Oo_DynamicProp, setPropertyNull) { } - zephir_update_property_zval_zval(this_ptr, &property, &__$null TSRMLS_CC); + zephir_update_property_zval_zval(this_ptr, &property, &__$null); ZEPHIR_MM_RESTORE(); } @@ -269,7 +269,7 @@ PHP_METHOD(Test_Oo_DynamicProp, setPropertyVariableInt) { zephir_fetch_params(1, 1, 0, &property_param); if (UNEXPECTED(Z_TYPE_P(property_param) != IS_STRING && Z_TYPE_P(property_param) != IS_NULL)) { - zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'property' must be of the type string") TSRMLS_CC); + zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'property' must be of the type string")); RETURN_MM_NULL(); } if (EXPECTED(Z_TYPE_P(property_param) == IS_STRING)) { @@ -283,7 +283,7 @@ PHP_METHOD(Test_Oo_DynamicProp, setPropertyVariableInt) { a = 10; ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, a); - zephir_update_property_zval_zval(this_ptr, &property, &_0 TSRMLS_CC); + zephir_update_property_zval_zval(this_ptr, &property, &_0); ZEPHIR_MM_RESTORE(); } @@ -302,7 +302,7 @@ PHP_METHOD(Test_Oo_DynamicProp, setPropertyVariableString) { zephir_fetch_params(1, 1, 0, &property_param); if (UNEXPECTED(Z_TYPE_P(property_param) != IS_STRING && Z_TYPE_P(property_param) != IS_NULL)) { - zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'property' must be of the type string") TSRMLS_CC); + zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'property' must be of the type string")); RETURN_MM_NULL(); } if (EXPECTED(Z_TYPE_P(property_param) == IS_STRING)) { @@ -315,7 +315,7 @@ PHP_METHOD(Test_Oo_DynamicProp, setPropertyVariableString) { ZEPHIR_INIT_VAR(&a); ZVAL_STRING(&a, "test"); - zephir_update_property_zval_zval(this_ptr, &property, &a TSRMLS_CC); + zephir_update_property_zval_zval(this_ptr, &property, &a); ZEPHIR_MM_RESTORE(); } @@ -335,7 +335,7 @@ PHP_METHOD(Test_Oo_DynamicProp, setPropertyVariableBoolTrue) { zephir_fetch_params(1, 1, 0, &property_param); if (UNEXPECTED(Z_TYPE_P(property_param) != IS_STRING && Z_TYPE_P(property_param) != IS_NULL)) { - zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'property' must be of the type string") TSRMLS_CC); + zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'property' must be of the type string")); RETURN_MM_NULL(); } if (EXPECTED(Z_TYPE_P(property_param) == IS_STRING)) { @@ -349,7 +349,7 @@ PHP_METHOD(Test_Oo_DynamicProp, setPropertyVariableBoolTrue) { a = 1; ZEPHIR_INIT_VAR(&_0); ZVAL_BOOL(&_0, a); - zephir_update_property_zval_zval(this_ptr, &property, &_0 TSRMLS_CC); + zephir_update_property_zval_zval(this_ptr, &property, &_0); ZEPHIR_MM_RESTORE(); } @@ -369,7 +369,7 @@ PHP_METHOD(Test_Oo_DynamicProp, setPropertyVariableBoolFalse) { zephir_fetch_params(1, 1, 0, &property_param); if (UNEXPECTED(Z_TYPE_P(property_param) != IS_STRING && Z_TYPE_P(property_param) != IS_NULL)) { - zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'property' must be of the type string") TSRMLS_CC); + zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'property' must be of the type string")); RETURN_MM_NULL(); } if (EXPECTED(Z_TYPE_P(property_param) == IS_STRING)) { @@ -383,7 +383,7 @@ PHP_METHOD(Test_Oo_DynamicProp, setPropertyVariableBoolFalse) { a = 0; ZEPHIR_INIT_VAR(&_0); ZVAL_BOOL(&_0, a); - zephir_update_property_zval_zval(this_ptr, &property, &_0 TSRMLS_CC); + zephir_update_property_zval_zval(this_ptr, &property, &_0); ZEPHIR_MM_RESTORE(); } @@ -418,7 +418,7 @@ PHP_METHOD(Test_Oo_DynamicProp, setExistingStringPropertyString) { zephir_fetch_params(1, 1, 0, &value_param); if (UNEXPECTED(Z_TYPE_P(value_param) != IS_STRING && Z_TYPE_P(value_param) != IS_NULL)) { - zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'value' must be of the type string") TSRMLS_CC); + zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'value' must be of the type string")); RETURN_MM_NULL(); } if (EXPECTED(Z_TYPE_P(value_param) == IS_STRING)) { diff --git a/ext/test/oo/extendpdoclass.zep.c b/ext/test/oo/extendpdoclass.zep.c index 001aefd260..4fb9861114 100644 --- a/ext/test/oo/extendpdoclass.zep.c +++ b/ext/test/oo/extendpdoclass.zep.c @@ -70,7 +70,7 @@ PHP_METHOD(Test_Oo_ExtendPdoClass, __construct) { ZEPHIR_INIT_VAR(&_0); - zephir_create_array(&_0, 1, 0 TSRMLS_CC); + zephir_create_array(&_0, 1, 0); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "Test\\PdoStatement"); zephir_array_fast_append(&_0, &_1); diff --git a/ext/test/oo/ooconstructparams.zep.c b/ext/test/oo/ooconstructparams.zep.c index 536e880d1b..9f88da20ce 100644 --- a/ext/test/oo/ooconstructparams.zep.c +++ b/ext/test/oo/ooconstructparams.zep.c @@ -23,9 +23,9 @@ ZEPHIR_INIT_CLASS(Test_Oo_OoConstructParams) { ZEPHIR_REGISTER_CLASS(Test\\Oo, OoConstructParams, test, oo_ooconstructparams, test_oo_ooconstructparams_method_entry, 0); - zend_declare_property_null(test_oo_ooconstructparams_ce, SL("a"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_oo_ooconstructparams_ce, SL("a"), ZEND_ACC_PROTECTED); - zend_declare_property_null(test_oo_ooconstructparams_ce, SL("b"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_oo_ooconstructparams_ce, SL("b"), ZEND_ACC_PROTECTED); return SUCCESS; diff --git a/ext/test/oo/oodestruct.zep.c b/ext/test/oo/oodestruct.zep.c index 6e5e285b91..a50a44d30d 100644 --- a/ext/test/oo/oodestruct.zep.c +++ b/ext/test/oo/oodestruct.zep.c @@ -31,27 +31,27 @@ ZEPHIR_INIT_CLASS(Test_Oo_OoDestruct) { ZEPHIR_REGISTER_CLASS(Test\\Oo, OoDestruct, test, oo_oodestruct, test_oo_oodestruct_method_entry, 0); - zend_declare_property_bool(test_oo_oodestruct_ce, SL("checked"), 0, ZEND_ACC_PROTECTED|ZEND_ACC_STATIC TSRMLS_CC); + zend_declare_property_bool(test_oo_oodestruct_ce, SL("checked"), 0, ZEND_ACC_PROTECTED|ZEND_ACC_STATIC); - zend_declare_property_null(test_oo_oodestruct_ce, SL("file"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_oo_oodestruct_ce, SL("file"), ZEND_ACC_PROTECTED); /** * Image height * * @var int */ - zend_declare_property_null(test_oo_oodestruct_ce, SL("height"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_oo_oodestruct_ce, SL("height"), ZEND_ACC_PROTECTED); - zend_declare_property_null(test_oo_oodestruct_ce, SL("image"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_oo_oodestruct_ce, SL("image"), ZEND_ACC_PROTECTED); /** * Image mime type * * @var string */ - zend_declare_property_null(test_oo_oodestruct_ce, SL("mime"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_oo_oodestruct_ce, SL("mime"), ZEND_ACC_PROTECTED); - zend_declare_property_null(test_oo_oodestruct_ce, SL("realpath"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_oo_oodestruct_ce, SL("realpath"), ZEND_ACC_PROTECTED); /** * Image type @@ -60,14 +60,14 @@ ZEPHIR_INIT_CLASS(Test_Oo_OoDestruct) { * * @var int */ - zend_declare_property_null(test_oo_oodestruct_ce, SL("type"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_oo_oodestruct_ce, SL("type"), ZEND_ACC_PROTECTED); /** * Image width * * @var int */ - zend_declare_property_null(test_oo_oodestruct_ce, SL("width"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_oo_oodestruct_ce, SL("width"), ZEND_ACC_PROTECTED); return SUCCESS; @@ -210,7 +210,7 @@ PHP_METHOD(Test_Oo_OoDestruct, __construct) { zephir_fetch_params(1, 1, 2, &file_param, &width_param, &height_param); if (UNEXPECTED(Z_TYPE_P(file_param) != IS_STRING && Z_TYPE_P(file_param) != IS_NULL)) { - zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'file' must be of the type string") TSRMLS_CC); + zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'file' must be of the type string")); RETURN_MM_NULL(); } if (EXPECTED(Z_TYPE_P(file_param) == IS_STRING)) { @@ -238,7 +238,7 @@ PHP_METHOD(Test_Oo_OoDestruct, __construct) { } zephir_update_property_zval(this_ptr, SL("file"), &file); zephir_read_property(&_1, this_ptr, SL("file"), PH_NOISY_CC | PH_READONLY); - if ((zephir_file_exists(&_1 TSRMLS_CC) == SUCCESS)) { + if ((zephir_file_exists(&_1) == SUCCESS)) { zephir_read_property(&_2$$4, this_ptr, SL("file"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_FUNCTION(&_3$$4, "realpath", NULL, 58, &_2$$4); zephir_check_call_status(); @@ -247,13 +247,13 @@ PHP_METHOD(Test_Oo_OoDestruct, __construct) { ZEPHIR_CALL_FUNCTION(&imageinfo, "getimagesize", NULL, 59, &_4$$4); zephir_check_call_status(); if (zephir_is_true(&imageinfo)) { - zephir_array_fetch_long(&_5$$5, &imageinfo, 0, PH_NOISY | PH_READONLY, "test/oo/oodestruct.zep", 62 TSRMLS_CC); + zephir_array_fetch_long(&_5$$5, &imageinfo, 0, PH_NOISY | PH_READONLY, "test/oo/oodestruct.zep", 62); zephir_update_property_zval(this_ptr, SL("width"), &_5$$5); - zephir_array_fetch_long(&_6$$5, &imageinfo, 1, PH_NOISY | PH_READONLY, "test/oo/oodestruct.zep", 63 TSRMLS_CC); + zephir_array_fetch_long(&_6$$5, &imageinfo, 1, PH_NOISY | PH_READONLY, "test/oo/oodestruct.zep", 63); zephir_update_property_zval(this_ptr, SL("height"), &_6$$5); - zephir_array_fetch_long(&_7$$5, &imageinfo, 2, PH_NOISY | PH_READONLY, "test/oo/oodestruct.zep", 64 TSRMLS_CC); + zephir_array_fetch_long(&_7$$5, &imageinfo, 2, PH_NOISY | PH_READONLY, "test/oo/oodestruct.zep", 64); zephir_update_property_zval(this_ptr, SL("type"), &_7$$5); - zephir_array_fetch_string(&_8$$5, &imageinfo, SL("mime"), PH_NOISY | PH_READONLY, "test/oo/oodestruct.zep", 65 TSRMLS_CC); + zephir_array_fetch_string(&_8$$5, &imageinfo, SL("mime"), PH_NOISY | PH_READONLY, "test/oo/oodestruct.zep", 65); zephir_update_property_zval(this_ptr, SL("mime"), &_8$$5); } zephir_read_property(&_9$$4, this_ptr, SL("type"), PH_NOISY_CC | PH_READONLY); @@ -300,14 +300,14 @@ PHP_METHOD(Test_Oo_OoDestruct, __construct) { _22$$12 = zephir_fetch_class_str_ex(SL("Test\\Oo\\Exception"), ZEND_FETCH_CLASS_AUTO); } object_init_ex(&_21$$12, _22$$12); - if (zephir_has_constructor(&_21$$12 TSRMLS_CC)) { + if (zephir_has_constructor(&_21$$12)) { zephir_read_property(&_23$$12, this_ptr, SL("mime"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_24$$12); ZEPHIR_CONCAT_SVS(&_24$$12, "Installed GD does not support ", &_23$$12, " images"); ZEPHIR_CALL_METHOD(NULL, &_21$$12, "__construct", NULL, 0, &_24$$12); zephir_check_call_status(); } - zephir_throw_exception_debug(&_21$$12, "test/oo/oodestruct.zep", 93 TSRMLS_CC); + zephir_throw_exception_debug(&_21$$12, "test/oo/oodestruct.zep", 93); ZEPHIR_MM_RESTORE(); return; } @@ -316,13 +316,13 @@ PHP_METHOD(Test_Oo_OoDestruct, __construct) { _26$$11 = zephir_fetch_class_str_ex(SL("Test\\Oo\\Exception"), ZEND_FETCH_CLASS_AUTO); } object_init_ex(&_25$$11, _26$$11); - if (zephir_has_constructor(&_25$$11 TSRMLS_CC)) { + if (zephir_has_constructor(&_25$$11)) { ZEPHIR_INIT_VAR(&_27$$11); ZVAL_STRING(&_27$$11, "Installed GD does not support such images"); ZEPHIR_CALL_METHOD(NULL, &_25$$11, "__construct", NULL, 0, &_27$$11); zephir_check_call_status(); } - zephir_throw_exception_debug(&_25$$11, "test/oo/oodestruct.zep", 98 TSRMLS_CC); + zephir_throw_exception_debug(&_25$$11, "test/oo/oodestruct.zep", 98); ZEPHIR_MM_RESTORE(); return; } while(0); @@ -341,14 +341,14 @@ PHP_METHOD(Test_Oo_OoDestruct, __construct) { _32$$14 = zephir_fetch_class_str_ex(SL("Test\\Oo\\Exception"), ZEND_FETCH_CLASS_AUTO); } object_init_ex(&_31$$14, _32$$14); - if (zephir_has_constructor(&_31$$14 TSRMLS_CC)) { + if (zephir_has_constructor(&_31$$14)) { zephir_read_property(&_33$$14, this_ptr, SL("file"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_34$$14); ZEPHIR_CONCAT_SV(&_34$$14, "Failed to create image from file ", &_33$$14); ZEPHIR_CALL_METHOD(NULL, &_31$$14, "__construct", NULL, 0, &_34$$14); zephir_check_call_status(); } - zephir_throw_exception_debug(&_31$$14, "test/oo/oodestruct.zep", 107 TSRMLS_CC); + zephir_throw_exception_debug(&_31$$14, "test/oo/oodestruct.zep", 107); ZEPHIR_MM_RESTORE(); return; } @@ -431,19 +431,19 @@ PHP_METHOD(Test_Oo_OoDestruct, check) { if (zephir_is_true(&_0)) { RETURN_MM_BOOL(1); } - if (UNEXPECTED(!((zephir_function_exists_ex(SL("gd_info") TSRMLS_CC) == SUCCESS)))) { + if (UNEXPECTED(!((zephir_function_exists_ex(SL("gd_info")) == SUCCESS)))) { ZEPHIR_INIT_VAR(&_1$$4); if (!_2$$4) { _2$$4 = zephir_fetch_class_str_ex(SL("Test\\Oo\\Exception"), ZEND_FETCH_CLASS_AUTO); } object_init_ex(&_1$$4, _2$$4); - if (zephir_has_constructor(&_1$$4 TSRMLS_CC)) { + if (zephir_has_constructor(&_1$$4)) { ZEPHIR_INIT_VAR(&_3$$4); ZVAL_STRING(&_3$$4, "GD is either not installed or not enabled, check your configuration"); ZEPHIR_CALL_METHOD(NULL, &_1$$4, "__construct", NULL, 0, &_3$$4); zephir_check_call_status(); } - zephir_throw_exception_debug(&_1$$4, "test/oo/oodestruct.zep", 146 TSRMLS_CC); + zephir_throw_exception_debug(&_1$$4, "test/oo/oodestruct.zep", 146); ZEPHIR_MM_RESTORE(); return; } @@ -461,13 +461,13 @@ PHP_METHOD(Test_Oo_OoDestruct, check) { _8$$5 = zephir_fetch_class_str_ex(SL("Test\\Oo\\Exception"), ZEND_FETCH_CLASS_AUTO); } object_init_ex(&_7$$5, _8$$5); - if (zephir_has_constructor(&_7$$5 TSRMLS_CC)) { + if (zephir_has_constructor(&_7$$5)) { ZEPHIR_INIT_VAR(&_9$$5); ZEPHIR_CONCAT_SV(&_9$$5, "Requires GD version '2.0.1' or greater, you have ", &version); ZEPHIR_CALL_METHOD(NULL, &_7$$5, "__construct", NULL, 0, &_9$$5); zephir_check_call_status(); } - zephir_throw_exception_debug(&_7$$5, "test/oo/oodestruct.zep", 154 TSRMLS_CC); + zephir_throw_exception_debug(&_7$$5, "test/oo/oodestruct.zep", 154); ZEPHIR_MM_RESTORE(); return; } @@ -499,19 +499,19 @@ PHP_METHOD(Test_Oo_OoDestruct, getVersion) { ZEPHIR_MM_GROW(); - if (UNEXPECTED(!((zephir_function_exists_ex(SL("gd_info") TSRMLS_CC) == SUCCESS)))) { + if (UNEXPECTED(!((zephir_function_exists_ex(SL("gd_info")) == SUCCESS)))) { ZEPHIR_INIT_VAR(&_0$$3); if (!_1$$3) { _1$$3 = zephir_fetch_class_str_ex(SL("Test\\Oo\\Exception"), ZEND_FETCH_CLASS_AUTO); } object_init_ex(&_0$$3, _1$$3); - if (zephir_has_constructor(&_0$$3 TSRMLS_CC)) { + if (zephir_has_constructor(&_0$$3)) { ZEPHIR_INIT_VAR(&_2$$3); ZVAL_STRING(&_2$$3, "GD is either not installed or not enabled, check your configuration"); ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 0, &_2$$3); zephir_check_call_status(); } - zephir_throw_exception_debug(&_0$$3, "test/oo/oodestruct.zep", 171 TSRMLS_CC); + zephir_throw_exception_debug(&_0$$3, "test/oo/oodestruct.zep", 171); ZEPHIR_MM_RESTORE(); return; } @@ -529,16 +529,16 @@ PHP_METHOD(Test_Oo_OoDestruct, getVersion) { zephir_check_call_status(); ZEPHIR_INIT_VAR(&matches); ZVAL_NULL(&matches); - zephir_array_fetch_string(&_5$$5, &info, SL("GD Version"), PH_NOISY | PH_READONLY, "test/oo/oodestruct.zep", 182 TSRMLS_CC); + zephir_array_fetch_string(&_5$$5, &info, SL("GD Version"), PH_NOISY | PH_READONLY, "test/oo/oodestruct.zep", 182); ZEPHIR_INIT_VAR(&_6$$5); ZVAL_STRING(&_6$$5, "/\\d+\\.\\d+(?:\\.\\d+)?/"); ZEPHIR_INIT_VAR(&_7$$5); ZEPHIR_INIT_VAR(&_8$$5); ZVAL_STRING(&_8$$5, "/\\d+\\.\\d+(?:\\.\\d+)?/"); - zephir_preg_match(&_7$$5, &_8$$5, &_5$$5, &matches, 0, 0 , 0 TSRMLS_CC); + zephir_preg_match(&_7$$5, &_8$$5, &_5$$5, &matches, 0, 0 , 0 ); if (zephir_is_true(&_7$$5)) { ZEPHIR_OBS_NVAR(&version); - zephir_array_fetch_long(&version, &matches, 0, PH_NOISY, "test/oo/oodestruct.zep", 183 TSRMLS_CC); + zephir_array_fetch_long(&version, &matches, 0, PH_NOISY, "test/oo/oodestruct.zep", 183); } } RETURN_CCTOR(&version); diff --git a/ext/test/oo/oodynamica.zep.c b/ext/test/oo/oodynamica.zep.c index c79fb47e38..af81eb50ef 100644 --- a/ext/test/oo/oodynamica.zep.c +++ b/ext/test/oo/oodynamica.zep.c @@ -44,7 +44,7 @@ PHP_METHOD(Test_Oo_OoDynamicA, getNew) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&className); - zephir_get_called_class(&className TSRMLS_CC); + zephir_get_called_class(&className); ZEPHIR_INIT_VAR(&fullClassName); ZEPHIR_CONCAT_SV(&fullClassName, "\\", &className); zephir_fetch_safe_class(&_0, &fullClassName); @@ -53,7 +53,7 @@ PHP_METHOD(Test_Oo_OoDynamicA, getNew) { RETURN_MM_NULL(); } object_init_ex(return_value, _1); - if (zephir_has_constructor(return_value TSRMLS_CC)) { + if (zephir_has_constructor(return_value)) { ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 0); zephir_check_call_status(); } diff --git a/ext/test/oo/oonativeimplements.zep.c b/ext/test/oo/oonativeimplements.zep.c index 2c07cd93b2..d1688d81d5 100644 --- a/ext/test/oo/oonativeimplements.zep.c +++ b/ext/test/oo/oonativeimplements.zep.c @@ -25,12 +25,12 @@ ZEPHIR_INIT_CLASS(Test_Oo_OoNativeImplements) { ZEPHIR_REGISTER_CLASS(Test\\Oo, OoNativeImplements, test, oo_oonativeimplements, test_oo_oonativeimplements_method_entry, 0); - zend_class_implements(test_oo_oonativeimplements_ce TSRMLS_CC, 1, spl_ce_Countable); - zend_class_implements(test_oo_oonativeimplements_ce TSRMLS_CC, 1, zend_ce_iterator); - zend_class_implements(test_oo_oonativeimplements_ce TSRMLS_CC, 1, spl_ce_OuterIterator); - zend_class_implements(test_oo_oonativeimplements_ce TSRMLS_CC, 1, spl_ce_RecursiveIterator); - zend_class_implements(test_oo_oonativeimplements_ce TSRMLS_CC, 1, spl_ce_SeekableIterator); - zend_class_implements(test_oo_oonativeimplements_ce TSRMLS_CC, 1, zend_ce_aggregate); + zend_class_implements(test_oo_oonativeimplements_ce, 1, spl_ce_Countable); + zend_class_implements(test_oo_oonativeimplements_ce, 1, zend_ce_iterator); + zend_class_implements(test_oo_oonativeimplements_ce, 1, spl_ce_OuterIterator); + zend_class_implements(test_oo_oonativeimplements_ce, 1, spl_ce_RecursiveIterator); + zend_class_implements(test_oo_oonativeimplements_ce, 1, spl_ce_SeekableIterator); + zend_class_implements(test_oo_oonativeimplements_ce, 1, zend_ce_aggregate); return SUCCESS; } diff --git a/ext/test/oo/ooparams.zep.c b/ext/test/oo/ooparams.zep.c index cba1a6b5d3..e5c72fda5d 100644 --- a/ext/test/oo/ooparams.zep.c +++ b/ext/test/oo/ooparams.zep.c @@ -41,7 +41,7 @@ PHP_METHOD(Test_Oo_OoParams, createThisClassWithoutWriteCurrentNamespace) { ZEPHIR_MM_GROW(); object_init_ex(return_value, test_oo_ooparams_ce); - if (zephir_has_constructor(return_value TSRMLS_CC)) { + if (zephir_has_constructor(return_value)) { ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 0); zephir_check_call_status(); } @@ -59,7 +59,7 @@ PHP_METHOD(Test_Oo_OoParams, createOtherClassWithoutWriteCurrentNamespace) { ZEPHIR_MM_GROW(); object_init_ex(return_value, test_oo_oodynamica_ce); - if (zephir_has_constructor(return_value TSRMLS_CC)) { + if (zephir_has_constructor(return_value)) { ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 0); zephir_check_call_status(); } @@ -163,7 +163,7 @@ PHP_METHOD(Test_Oo_OoParams, setStrictAge) { zephir_fetch_params_without_memory_grow(1, 0, &age_param); if (UNEXPECTED(Z_TYPE_P(age_param) != IS_LONG)) { - zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'age' must be of the type int") TSRMLS_CC); + zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'age' must be of the type int")); RETURN_NULL(); } age = Z_LVAL_P(age_param); @@ -183,7 +183,7 @@ PHP_METHOD(Test_Oo_OoParams, setStrictAverage) { zephir_fetch_params_without_memory_grow(1, 0, &average_param); if (UNEXPECTED(Z_TYPE_P(average_param) != IS_DOUBLE)) { - zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'average' must be of the type double") TSRMLS_CC); + zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'average' must be of the type double")); RETURN_NULL(); } average = Z_DVAL_P(average_param); @@ -224,7 +224,7 @@ PHP_METHOD(Test_Oo_OoParams, setStrictName) { zephir_fetch_params(1, 1, 0, &name_param); if (UNEXPECTED(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) { - zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'name' must be of the type string") TSRMLS_CC); + zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'name' must be of the type string")); RETURN_MM_NULL(); } if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) { diff --git a/ext/test/oo/param.zep.c b/ext/test/oo/param.zep.c index 8283ab53f8..6ea2b51d50 100644 --- a/ext/test/oo/param.zep.c +++ b/ext/test/oo/param.zep.c @@ -21,7 +21,7 @@ ZEPHIR_INIT_CLASS(Test_Oo_Param) { ZEPHIR_REGISTER_CLASS(Test\\Oo, Param, test, oo_param, NULL, 0); - zend_declare_property_null(test_oo_param_ce, SL("value"), ZEND_ACC_PUBLIC TSRMLS_CC); + zend_declare_property_null(test_oo_param_ce, SL("value"), ZEND_ACC_PUBLIC); return SUCCESS; diff --git a/ext/test/oo/propertyaccess.zep.c b/ext/test/oo/propertyaccess.zep.c index 3a485aeadd..8ca02f28ff 100644 --- a/ext/test/oo/propertyaccess.zep.c +++ b/ext/test/oo/propertyaccess.zep.c @@ -24,11 +24,11 @@ ZEPHIR_INIT_CLASS(Test_Oo_PropertyAccess) { ZEPHIR_REGISTER_CLASS(Test\\Oo, PropertyAccess, test, oo_propertyaccess, test_oo_propertyaccess_method_entry, 0); - zend_declare_property_null(test_oo_propertyaccess_ce, SL("a"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_oo_propertyaccess_ce, SL("a"), ZEND_ACC_PROTECTED); - zend_declare_property_null(test_oo_propertyaccess_ce, SL("b"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_oo_propertyaccess_ce, SL("b"), ZEND_ACC_PROTECTED); - zend_declare_property_null(test_oo_propertyaccess_ce, SL("privateVariable"), ZEND_ACC_PRIVATE TSRMLS_CC); + zend_declare_property_null(test_oo_propertyaccess_ce, SL("privateVariable"), ZEND_ACC_PRIVATE); return SUCCESS; @@ -60,7 +60,7 @@ PHP_METHOD(Test_Oo_PropertyAccess, __construct) { ZEPHIR_INIT_VAR(&test); object_init(&test); ZEPHIR_INIT_VAR(&_0); - zephir_create_array(&_0, 5, 0 TSRMLS_CC); + zephir_create_array(&_0, 5, 0); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "1"); zephir_array_fast_append(&_0, &_1); @@ -78,16 +78,16 @@ PHP_METHOD(Test_Oo_PropertyAccess, __construct) { zephir_array_fast_append(&_0, &_1); zephir_update_property_zval(&test, SL("test"), &_0); zephir_read_property(&_2, &test, SL("test"), PH_NOISY_CC | PH_READONLY); - zephir_array_fetch_long(&_3, &_2, 0, PH_NOISY | PH_READONLY, "test/oo/propertyaccess.zep", 21 TSRMLS_CC); + zephir_array_fetch_long(&_3, &_2, 0, PH_NOISY | PH_READONLY, "test/oo/propertyaccess.zep", 21); zephir_update_property_zval(&test, SL("test2"), &_3); zephir_read_property(&_4, &test, SL("test"), PH_NOISY_CC | PH_READONLY); - zephir_array_fetch_long(&_5, &_4, 1, PH_NOISY | PH_READONLY, "test/oo/propertyaccess.zep", 22 TSRMLS_CC); + zephir_array_fetch_long(&_5, &_4, 1, PH_NOISY | PH_READONLY, "test/oo/propertyaccess.zep", 22); zephir_update_property_zval(&test, SL("test3"), &_5); ZEPHIR_INIT_VAR(&_6); - zephir_create_array(&_6, 4, 0 TSRMLS_CC); + zephir_create_array(&_6, 4, 0); zephir_read_property(&_7, &test, SL("test"), PH_NOISY_CC | PH_READONLY); ZEPHIR_OBS_VAR(&_8); - zephir_array_fetch_long(&_8, &_7, 1, PH_NOISY, "test/oo/propertyaccess.zep", 23 TSRMLS_CC); + zephir_array_fetch_long(&_8, &_7, 1, PH_NOISY, "test/oo/propertyaccess.zep", 23); zephir_array_fast_append(&_6, &_8); ZEPHIR_INIT_NVAR(&_1); ZVAL_LONG(&_1, 1); diff --git a/ext/test/oo/scopes/privatescopetester.zep.c b/ext/test/oo/scopes/privatescopetester.zep.c index 943ae21046..f541567d47 100644 --- a/ext/test/oo/scopes/privatescopetester.zep.c +++ b/ext/test/oo/scopes/privatescopetester.zep.c @@ -21,7 +21,7 @@ ZEPHIR_INIT_CLASS(Test_Oo_Scopes_PrivateScopeTester) { ZEPHIR_REGISTER_CLASS_EX(Test\\Oo\\Scopes, PrivateScopeTester, test, oo_scopes_privatescopetester, test_oo_scopes_hasprivatemethod_ce, test_oo_scopes_privatescopetester_method_entry, 0); - zend_class_implements(test_oo_scopes_privatescopetester_ce TSRMLS_CC, 1, test_oo_scopes_scopetesterinterface_ce); + zend_class_implements(test_oo_scopes_privatescopetester_ce, 1, test_oo_scopes_scopetesterinterface_ce); return SUCCESS; } diff --git a/ext/test/ooimpl/abeginning.zep.c b/ext/test/ooimpl/abeginning.zep.c index bece9a1c23..7db3f896cc 100644 --- a/ext/test/ooimpl/abeginning.zep.c +++ b/ext/test/ooimpl/abeginning.zep.c @@ -16,7 +16,7 @@ ZEPHIR_INIT_CLASS(Test_OoImpl_ABeginning) { ZEPHIR_REGISTER_INTERFACE(Test\\OoImpl, ABeginning, test, ooimpl_abeginning, NULL); - zend_class_implements(test_ooimpl_abeginning_ce TSRMLS_CC, 1, test_ooimpl_zbeginning_ce); + zend_class_implements(test_ooimpl_abeginning_ce, 1, test_ooimpl_zbeginning_ce); return SUCCESS; } diff --git a/ext/test/operator.zep.c b/ext/test/operator.zep.c index 90f5771c9f..a93d067d22 100644 --- a/ext/test/operator.zep.c +++ b/ext/test/operator.zep.c @@ -60,10 +60,10 @@ PHP_METHOD(Test_Operator, testIdenticalIfComplex) { ZEPHIR_INIT_VAR(&a); - zephir_create_array(&a, 1, 0 TSRMLS_CC); + zephir_create_array(&a, 1, 0); zephir_array_update_string(&a, SL("1"), input, PH_COPY | PH_SEPARATE); b = 0; - zephir_array_fetch_string(&_0, &a, SL("1"), PH_NOISY | PH_READONLY, "test/operator.zep", 16 TSRMLS_CC); + zephir_array_fetch_string(&_0, &a, SL("1"), PH_NOISY | PH_READONLY, "test/operator.zep", 16); if (!ZEPHIR_IS_FALSE_IDENTICAL(&_0)) { RETURN_MM_BOOL(1); } @@ -119,7 +119,7 @@ PHP_METHOD(Test_Operator, testBoolComparison) { var1 = 1; var2 = 0; - zephir_create_array(return_value, 8, 0 TSRMLS_CC); + zephir_create_array(return_value, 8, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_BOOL(&_0, ZEPHIR_IS_BOOL_VALUE(varTrue, var1)); zephir_array_fast_append(return_value, &_0); @@ -170,7 +170,7 @@ PHP_METHOD(Test_Operator, testNewInstanceOperator) { RETURN_MM_NULL(); } object_init_ex(return_value, _1); - if (zephir_has_constructor(return_value TSRMLS_CC)) { + if (zephir_has_constructor(return_value)) { ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 0); zephir_check_call_status(); } diff --git a/ext/test/optimizers/arraymerge.zep.c b/ext/test/optimizers/arraymerge.zep.c index 597ed4601c..457e3d05bf 100644 --- a/ext/test/optimizers/arraymerge.zep.c +++ b/ext/test/optimizers/arraymerge.zep.c @@ -43,7 +43,7 @@ PHP_METHOD(Test_Optimizers_ArrayMerge, mergeTwoRequiredArrays) { zephir_get_arrval(&arr2, arr2_param); - zephir_fast_array_merge(return_value, &arr1, &arr2 TSRMLS_CC); + zephir_fast_array_merge(return_value, &arr1, &arr2); RETURN_MM(); } diff --git a/ext/test/optimizers/cos.zep.c b/ext/test/optimizers/cos.zep.c index 9fb5ba6e5a..0ebd51f1c0 100644 --- a/ext/test/optimizers/cos.zep.c +++ b/ext/test/optimizers/cos.zep.c @@ -112,7 +112,7 @@ PHP_METHOD(Test_Optimizers_Cos, testVarParameter) { - RETURN_DOUBLE(zephir_cos(a TSRMLS_CC)); + RETURN_DOUBLE(zephir_cos(a)); } diff --git a/ext/test/optimizers/createarray.zep.c b/ext/test/optimizers/createarray.zep.c index f7a3458dfa..176140cfb3 100644 --- a/ext/test/optimizers/createarray.zep.c +++ b/ext/test/optimizers/createarray.zep.c @@ -33,7 +33,7 @@ PHP_METHOD(Test_Optimizers_CreateArray, createNoSize) { - zephir_create_array(return_value, 0, 1 TSRMLS_CC); + zephir_create_array(return_value, 0, 1); return; } @@ -52,7 +52,7 @@ PHP_METHOD(Test_Optimizers_CreateArray, createSize) { ZVAL_LONG(&_0, n); - zephir_create_array(return_value, zephir_get_intval(&_0), 1 TSRMLS_CC); + zephir_create_array(return_value, zephir_get_intval(&_0), 1); return; } diff --git a/ext/test/optimizers/ldexp.zep.c b/ext/test/optimizers/ldexp.zep.c index 91ce53e838..058834d02a 100644 --- a/ext/test/optimizers/ldexp.zep.c +++ b/ext/test/optimizers/ldexp.zep.c @@ -40,7 +40,7 @@ PHP_METHOD(Test_Optimizers_Ldexp, testInt) { exponent = 3; ZVAL_LONG(&_0, x); ZVAL_LONG(&_1, exponent); - RETURN_DOUBLE(zephir_ldexp(&_0, &_1 TSRMLS_CC)); + RETURN_DOUBLE(zephir_ldexp(&_0, &_1)); } @@ -59,7 +59,7 @@ PHP_METHOD(Test_Optimizers_Ldexp, testDoubleInt) { exponent = 3; ZVAL_DOUBLE(&_0, x); ZVAL_LONG(&_1, exponent); - RETURN_DOUBLE(zephir_ldexp(&_0, &_1 TSRMLS_CC)); + RETURN_DOUBLE(zephir_ldexp(&_0, &_1)); } @@ -77,7 +77,7 @@ PHP_METHOD(Test_Optimizers_Ldexp, testDouble) { exponent = 3.0; ZVAL_DOUBLE(&_0, x); ZVAL_DOUBLE(&_1, exponent); - RETURN_DOUBLE(zephir_ldexp(&_0, &_1 TSRMLS_CC)); + RETURN_DOUBLE(zephir_ldexp(&_0, &_1)); } @@ -95,7 +95,7 @@ PHP_METHOD(Test_Optimizers_Ldexp, testVar) { exponent = 3; ZVAL_LONG(&_0, x); ZVAL_LONG(&_1, exponent); - RETURN_DOUBLE(zephir_ldexp(&_0, &_1 TSRMLS_CC)); + RETURN_DOUBLE(zephir_ldexp(&_0, &_1)); } @@ -110,7 +110,7 @@ PHP_METHOD(Test_Optimizers_Ldexp, testIntValue1) { ZVAL_LONG(&_0, 2); ZVAL_LONG(&_1, 3); - RETURN_DOUBLE(zephir_ldexp(&_0, &_1 TSRMLS_CC)); + RETURN_DOUBLE(zephir_ldexp(&_0, &_1)); } @@ -131,7 +131,7 @@ PHP_METHOD(Test_Optimizers_Ldexp, testIntParameter) { ZVAL_LONG(&_0, x); ZVAL_LONG(&_1, exponent); - RETURN_DOUBLE(zephir_ldexp(&_0, &_1 TSRMLS_CC)); + RETURN_DOUBLE(zephir_ldexp(&_0, &_1)); } @@ -147,7 +147,7 @@ PHP_METHOD(Test_Optimizers_Ldexp, testVarParameter) { - RETURN_DOUBLE(zephir_ldexp(x, exponent TSRMLS_CC)); + RETURN_DOUBLE(zephir_ldexp(x, exponent)); } diff --git a/ext/test/optimizers/sin.zep.c b/ext/test/optimizers/sin.zep.c index 605df4e8dd..063c5c4b7e 100644 --- a/ext/test/optimizers/sin.zep.c +++ b/ext/test/optimizers/sin.zep.c @@ -112,7 +112,7 @@ PHP_METHOD(Test_Optimizers_Sin, testVarParameter) { - RETURN_DOUBLE(zephir_sin(a TSRMLS_CC)); + RETURN_DOUBLE(zephir_sin(a)); } diff --git a/ext/test/optimizers/sqrt.zep.c b/ext/test/optimizers/sqrt.zep.c index bb80e99d4c..dab8c044be 100644 --- a/ext/test/optimizers/sqrt.zep.c +++ b/ext/test/optimizers/sqrt.zep.c @@ -112,7 +112,7 @@ PHP_METHOD(Test_Optimizers_Sqrt, testVarParameter) { - RETURN_DOUBLE(zephir_sqrt(a TSRMLS_CC)); + RETURN_DOUBLE(zephir_sqrt(a)); } diff --git a/ext/test/optimizers/strreplace.zep.c b/ext/test/optimizers/strreplace.zep.c index 2b2797a3f5..09c723aacb 100644 --- a/ext/test/optimizers/strreplace.zep.c +++ b/ext/test/optimizers/strreplace.zep.c @@ -45,19 +45,19 @@ PHP_METHOD(Test_Optimizers_StrReplace, issue1055) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&_0); - zephir_create_array(&_0, 1, 0 TSRMLS_CC); + zephir_create_array(&_0, 1, 0); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "aa"); zephir_array_fast_append(&_0, &_1); ZEPHIR_INIT_VAR(&_2); - zephir_create_array(&_2, 1, 0 TSRMLS_CC); + zephir_create_array(&_2, 1, 0); ZEPHIR_INIT_NVAR(&_1); ZVAL_STRING(&_1, "aaa"); zephir_array_fast_append(&_2, &_1); ZEPHIR_INIT_NVAR(&_1); ZVAL_STRING(&_1, "bla bla aa aaa askks"); ZEPHIR_INIT_VAR(&_3); - zephir_fast_str_replace(&_3, &_0, &_2, &_1 TSRMLS_CC); + zephir_fast_str_replace(&_3, &_0, &_2, &_1); RETURN_CCTOR(&_3); } @@ -78,7 +78,7 @@ PHP_METHOD(Test_Optimizers_StrReplace, issue1087) { ZEPHIR_INIT_VAR(&filtered); ZVAL_STRING(&filtered, "test_test"); ZEPHIR_INIT_VAR(&sanitize); - zephir_create_array(&sanitize, 8, 0 TSRMLS_CC); + zephir_create_array(&sanitize, 8, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "/"); zephir_array_fast_append(&sanitize, &_0); @@ -106,7 +106,7 @@ PHP_METHOD(Test_Optimizers_StrReplace, issue1087) { ZEPHIR_INIT_NVAR(&_0); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, ""); - zephir_fast_str_replace(&_0, &sanitize, &_1, &filtered TSRMLS_CC); + zephir_fast_str_replace(&_0, &sanitize, &_1, &filtered); ZEPHIR_CPY_WRT(&filtered, &_0); RETURN_CCTOR(&filtered); @@ -128,7 +128,7 @@ PHP_METHOD(Test_Optimizers_StrReplace, issue732A) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&search); - zephir_create_array(&search, 5, 0 TSRMLS_CC); + zephir_create_array(&search, 5, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "A"); zephir_array_fast_append(&search, &_0); @@ -145,7 +145,7 @@ PHP_METHOD(Test_Optimizers_StrReplace, issue732A) { ZVAL_STRING(&_0, "E"); zephir_array_fast_append(&search, &_0); ZEPHIR_INIT_VAR(&replace); - zephir_create_array(&replace, 5, 0 TSRMLS_CC); + zephir_create_array(&replace, 5, 0); ZEPHIR_INIT_NVAR(&_0); ZVAL_STRING(&_0, "B"); zephir_array_fast_append(&replace, &_0); @@ -164,7 +164,7 @@ PHP_METHOD(Test_Optimizers_StrReplace, issue732A) { ZEPHIR_INIT_VAR(&subject); ZVAL_STRING(&subject, "A"); ZEPHIR_INIT_NVAR(&_0); - zephir_fast_str_replace(&_0, &search, &replace, &subject TSRMLS_CC); + zephir_fast_str_replace(&_0, &search, &replace, &subject); RETURN_CCTOR(&_0); } @@ -186,7 +186,7 @@ PHP_METHOD(Test_Optimizers_StrReplace, issue732B) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&patterns); - zephir_create_array(&patterns, 3, 0 TSRMLS_CC); + zephir_create_array(&patterns, 3, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "/quick/"); zephir_array_fast_append(&patterns, &_0); @@ -197,7 +197,7 @@ PHP_METHOD(Test_Optimizers_StrReplace, issue732B) { ZVAL_STRING(&_0, "/fox/"); zephir_array_fast_append(&patterns, &_0); ZEPHIR_INIT_VAR(&replacements); - zephir_create_array(&replacements, 3, 0 TSRMLS_CC); + zephir_create_array(&replacements, 3, 0); ZEPHIR_INIT_NVAR(&_0); ZVAL_STRING(&_0, "bear"); zephir_array_fast_append(&replacements, &_0); diff --git a/ext/test/optimizers/tan.zep.c b/ext/test/optimizers/tan.zep.c index 0f32d22c33..7cc1537d10 100644 --- a/ext/test/optimizers/tan.zep.c +++ b/ext/test/optimizers/tan.zep.c @@ -127,7 +127,7 @@ PHP_METHOD(Test_Optimizers_Tan, testVarParameter) { - RETURN_DOUBLE(zephir_tan(a TSRMLS_CC)); + RETURN_DOUBLE(zephir_tan(a)); } diff --git a/ext/test/pregmatch.zep.c b/ext/test/pregmatch.zep.c index 2e7dc9af14..f616de50dd 100644 --- a/ext/test/pregmatch.zep.c +++ b/ext/test/pregmatch.zep.c @@ -48,9 +48,9 @@ PHP_METHOD(Test_Pregmatch, testWithoutReturnAndMatches) { ZVAL_STRING(&subject, "abcdef"); ZEPHIR_INIT_VAR(&_0); ZEPHIR_INIT_VAR(&_1); - zephir_preg_match(&_1, &pattern, &subject, &_0, 0, 0 , 0 TSRMLS_CC); + zephir_preg_match(&_1, &pattern, &subject, &_0, 0, 0 , 0 ); ZEPHIR_INIT_VAR(&_2); - zephir_preg_match(return_value, &pattern, &subject, &_2, 0, 0 , 0 TSRMLS_CC); + zephir_preg_match(return_value, &pattern, &subject, &_2, 0, 0 , 0 ); RETURN_MM(); } @@ -75,7 +75,7 @@ PHP_METHOD(Test_Pregmatch, testWithoutReturns) { ZEPHIR_INIT_VAR(&subject); ZVAL_STRING(&subject, "abcdef"); ZEPHIR_INIT_VAR(&_0); - zephir_preg_match(&_0, &pattern, &subject, &matches, 0, 0 , 0 TSRMLS_CC); + zephir_preg_match(&_0, &pattern, &subject, &matches, 0, 0 , 0 ); RETURN_CCTOR(&matches); } @@ -99,7 +99,7 @@ PHP_METHOD(Test_Pregmatch, testWithoutMatches) { ZVAL_STRING(&subject, "abcdef"); ZEPHIR_INIT_VAR(&_0); ZEPHIR_INIT_VAR(&matched); - zephir_preg_match(&matched, &pattern, &subject, &_0, 0, 0 , 0 TSRMLS_CC); + zephir_preg_match(&matched, &pattern, &subject, &_0, 0, 0 , 0 ); RETURN_CCTOR(&matched); } @@ -122,7 +122,7 @@ PHP_METHOD(Test_Pregmatch, testPregMatchAll) { ZVAL_STRING(&subject, "abcdef"); ZEPHIR_INIT_VAR(&results); array_init(&results); - zephir_preg_match(return_value, &pattern, &subject, &results, 1, 0 , 0 TSRMLS_CC); + zephir_preg_match(return_value, &pattern, &subject, &results, 1, 0 , 0 ); RETURN_MM(); } @@ -147,7 +147,7 @@ PHP_METHOD(Test_Pregmatch, testPregMatchFallback) { ZVAL_STRING(&pattern, "/def$/"); ZEPHIR_INIT_VAR(&subject); ZVAL_STRING(&subject, "abcdef"); - zephir_preg_match(return_value, &pattern, &subject, &matches, 0, 0 , 0 TSRMLS_CC); + zephir_preg_match(return_value, &pattern, &subject, &matches, 0, 0 , 0 ); RETURN_MM(); } @@ -168,7 +168,7 @@ PHP_METHOD(Test_Pregmatch, testPregMatch2Params) { ZEPHIR_INIT_VAR(&_0); - zephir_preg_match(return_value, pattern, subject, &_0, 0, 0 , 0 TSRMLS_CC); + zephir_preg_match(return_value, pattern, subject, &_0, 0, 0 , 0 ); RETURN_MM(); } @@ -186,7 +186,7 @@ PHP_METHOD(Test_Pregmatch, testPregMatch3Params) { - zephir_preg_match(return_value, pattern, subject, matches, 0, 0 , 0 TSRMLS_CC); + zephir_preg_match(return_value, pattern, subject, matches, 0, 0 , 0 ); return; } @@ -205,7 +205,7 @@ PHP_METHOD(Test_Pregmatch, testPregMatch4Params) { - zephir_preg_match(return_value, pattern, subject, matches, 0, zephir_get_intval(flags) , 0 TSRMLS_CC); + zephir_preg_match(return_value, pattern, subject, matches, 0, zephir_get_intval(flags) , 0 ); return; } @@ -225,7 +225,7 @@ PHP_METHOD(Test_Pregmatch, testPregMatch5Params) { - zephir_preg_match(return_value, pattern, subject, matches, 0, zephir_get_intval(flags) , zephir_get_intval(offset) TSRMLS_CC); + zephir_preg_match(return_value, pattern, subject, matches, 0, zephir_get_intval(flags) , zephir_get_intval(offset) ); return; } @@ -255,7 +255,7 @@ PHP_METHOD(Test_Pregmatch, testPregMatchSaveMatches) { ZEPHIR_INIT_VAR(&matches); ZVAL_NULL(&matches); ZEPHIR_INIT_VAR(&_0); - zephir_preg_match(&_0, &pattern, &str, &matches, 0, 0 , 0 TSRMLS_CC); + zephir_preg_match(&_0, &pattern, &str, &matches, 0, 0 , 0 ); RETURN_CCTOR(&matches); } @@ -287,7 +287,7 @@ PHP_METHOD(Test_Pregmatch, testMatchAll) { ZEPHIR_INIT_VAR(&_1); ZEPHIR_INIT_VAR(&_2); ZVAL_STRING(&_2, "/(test[0-9]+)/"); - zephir_preg_match(&_1, &_2, &text, &matches, 1, zephir_get_intval(flags) , 0 TSRMLS_CC); + zephir_preg_match(&_1, &_2, &text, &matches, 1, zephir_get_intval(flags) , 0 ); RETURN_CCTOR(&matches); } @@ -312,7 +312,7 @@ PHP_METHOD(Test_Pregmatch, testMatchAllInZep) { ZVAL_LONG(&_0, 2); ZEPHIR_CALL_METHOD(&m2, this_ptr, "testmatchall", &_1, 0, &_0); zephir_check_call_status(); - zephir_create_array(return_value, 2, 0 TSRMLS_CC); + zephir_create_array(return_value, 2, 0); zephir_array_fast_append(return_value, &m1); zephir_array_fast_append(return_value, &m2); RETURN_MM(); diff --git a/ext/test/properties/app.zep.c b/ext/test/properties/app.zep.c index c29c78ec97..355f6f8373 100644 --- a/ext/test/properties/app.zep.c +++ b/ext/test/properties/app.zep.c @@ -22,7 +22,7 @@ ZEPHIR_INIT_CLASS(Test_Properties_App) { ZEPHIR_REGISTER_CLASS(Test\\Properties, App, test, properties_app, test_properties_app_method_entry, 0); /** @var \Test\Properties\StaticPrivateProperties */ - zend_declare_property_null(test_properties_app_ce, SL("instance"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_properties_app_ce, SL("instance"), ZEND_ACC_PROTECTED); return SUCCESS; diff --git a/ext/test/properties/extendspublicproperties.zep.c b/ext/test/properties/extendspublicproperties.zep.c index 91858d9ee3..2ffb10389c 100644 --- a/ext/test/properties/extendspublicproperties.zep.c +++ b/ext/test/properties/extendspublicproperties.zep.c @@ -22,9 +22,9 @@ ZEPHIR_INIT_CLASS(Test_Properties_ExtendsPublicProperties) { ZEPHIR_REGISTER_CLASS_EX(Test\\Properties, ExtendsPublicProperties, test, properties_extendspublicproperties, test_properties_publicproperties_ce, NULL, 0); - zend_declare_property_long(test_properties_extendspublicproperties_ce, SL("testPropertyFromClassNameConstantValue"), 123, ZEND_ACC_PUBLIC TSRMLS_CC); + zend_declare_property_long(test_properties_extendspublicproperties_ce, SL("testPropertyFromClassNameConstantValue"), 123, ZEND_ACC_PUBLIC); - zend_declare_property_null(test_properties_extendspublicproperties_ce, SL("someGetterSetterArray"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_properties_extendspublicproperties_ce, SL("someGetterSetterArray"), ZEND_ACC_PROTECTED); test_properties_extendspublicproperties_ce->create_object = zephir_init_properties_Test_Properties_ExtendsPublicProperties; return SUCCESS; @@ -58,21 +58,21 @@ zend_object *zephir_init_properties_Test_Properties_ExtendsPublicProperties(zend zephir_read_property(&_0, this_ptr, SL("someArrayWithSubArray"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_0) == IS_NULL) { ZEPHIR_INIT_VAR(&_1$$3); - zephir_create_array(&_1$$3, 4, 0 TSRMLS_CC); + zephir_create_array(&_1$$3, 4, 0); ZEPHIR_INIT_VAR(&_2$$3); - zephir_create_array(&_2$$3, 1, 0 TSRMLS_CC); + zephir_create_array(&_2$$3, 1, 0); add_assoc_stringl_ex(&_2$$3, SL("class"), SL("alert alert-success")); zephir_array_update_string(&_1$$3, SL("success"), &_2$$3, PH_COPY | PH_SEPARATE); ZEPHIR_INIT_NVAR(&_2$$3); - zephir_create_array(&_2$$3, 1, 0 TSRMLS_CC); + zephir_create_array(&_2$$3, 1, 0); add_assoc_stringl_ex(&_2$$3, SL("class"), SL("alert alert-info")); zephir_array_update_string(&_1$$3, SL("info"), &_2$$3, PH_COPY | PH_SEPARATE); ZEPHIR_INIT_NVAR(&_2$$3); - zephir_create_array(&_2$$3, 1, 0 TSRMLS_CC); + zephir_create_array(&_2$$3, 1, 0); add_assoc_stringl_ex(&_2$$3, SL("class"), SL("alert alert-warning")); zephir_array_update_string(&_1$$3, SL("warning"), &_2$$3, PH_COPY | PH_SEPARATE); ZEPHIR_INIT_NVAR(&_2$$3); - zephir_create_array(&_2$$3, 1, 0 TSRMLS_CC); + zephir_create_array(&_2$$3, 1, 0); add_assoc_stringl_ex(&_2$$3, SL("class"), SL("alert alert-danger")); zephir_array_update_string(&_1$$3, SL("danger"), &_2$$3, PH_COPY | PH_SEPARATE); zephir_update_property_zval(this_ptr, SL("someArrayWithSubArray"), &_1$$3); @@ -80,7 +80,7 @@ zend_object *zephir_init_properties_Test_Properties_ExtendsPublicProperties(zend zephir_read_property(&_3, this_ptr, SL("someArrayWithSpecifyKeys"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_3) == IS_NULL) { ZEPHIR_INIT_VAR(&_4$$4); - zephir_create_array(&_4$$4, 3, 0 TSRMLS_CC); + zephir_create_array(&_4$$4, 3, 0); add_assoc_stringl_ex(&_4$$4, SL("a"), SL("A")); add_assoc_stringl_ex(&_4$$4, SL("b"), SL("B")); add_assoc_stringl_ex(&_4$$4, SL("c"), SL("C")); @@ -89,7 +89,7 @@ zend_object *zephir_init_properties_Test_Properties_ExtendsPublicProperties(zend zephir_read_property(&_5, this_ptr, SL("someArray"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_5) == IS_NULL) { ZEPHIR_INIT_VAR(&_6$$5); - zephir_create_array(&_6$$5, 4, 0 TSRMLS_CC); + zephir_create_array(&_6$$5, 4, 0); ZEPHIR_INIT_VAR(&_7$$5); ZVAL_LONG(&_7$$5, 1); zephir_array_fast_append(&_6$$5, &_7$$5); @@ -113,7 +113,7 @@ zend_object *zephir_init_properties_Test_Properties_ExtendsPublicProperties(zend zephir_read_property(&_10, this_ptr, SL("someGetterSetterArray"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_10) == IS_NULL) { ZEPHIR_INIT_VAR(&_11$$7); - zephir_create_array(&_11$$7, 1, 0 TSRMLS_CC); + zephir_create_array(&_11$$7, 1, 0); ZEPHIR_INIT_VAR(&_12$$7); ZVAL_STRING(&_12$$7, "holy"); zephir_array_fast_append(&_11$$7, &_12$$7); diff --git a/ext/test/properties/privateproperties.zep.c b/ext/test/properties/privateproperties.zep.c index 1057650fcf..5177ca3d06 100644 --- a/ext/test/properties/privateproperties.zep.c +++ b/ext/test/properties/privateproperties.zep.c @@ -22,37 +22,37 @@ ZEPHIR_INIT_CLASS(Test_Properties_PrivateProperties) { /** * This is a private property with no initial value */ - zend_declare_property_null(test_properties_privateproperties_ce, SL("someNull"), ZEND_ACC_PRIVATE TSRMLS_CC); + zend_declare_property_null(test_properties_privateproperties_ce, SL("someNull"), ZEND_ACC_PRIVATE); /** * This is a private property with initial null value */ - zend_declare_property_null(test_properties_privateproperties_ce, SL("someNullInitial"), ZEND_ACC_PRIVATE TSRMLS_CC); + zend_declare_property_null(test_properties_privateproperties_ce, SL("someNullInitial"), ZEND_ACC_PRIVATE); /** * This is a private property with initial boolean false */ - zend_declare_property_bool(test_properties_privateproperties_ce, SL("someFalse"), 0, ZEND_ACC_PRIVATE TSRMLS_CC); + zend_declare_property_bool(test_properties_privateproperties_ce, SL("someFalse"), 0, ZEND_ACC_PRIVATE); /** * This is a private property with initial boolean true */ - zend_declare_property_bool(test_properties_privateproperties_ce, SL("someTrue"), 1, ZEND_ACC_PRIVATE TSRMLS_CC); + zend_declare_property_bool(test_properties_privateproperties_ce, SL("someTrue"), 1, ZEND_ACC_PRIVATE); /** * This is a private property with an initial integer value */ - zend_declare_property_long(test_properties_privateproperties_ce, SL("someInteger"), 10, ZEND_ACC_PRIVATE TSRMLS_CC); + zend_declare_property_long(test_properties_privateproperties_ce, SL("someInteger"), 10, ZEND_ACC_PRIVATE); /** * This is a private property with an initial double value */ - zend_declare_property_double(test_properties_privateproperties_ce, SL("someDouble"), 10.25, ZEND_ACC_PRIVATE TSRMLS_CC); + zend_declare_property_double(test_properties_privateproperties_ce, SL("someDouble"), 10.25, ZEND_ACC_PRIVATE); /** * This is a private property with an initial string value */ - zend_declare_property_string(test_properties_privateproperties_ce, SL("someString"), "test", ZEND_ACC_PRIVATE TSRMLS_CC); + zend_declare_property_string(test_properties_privateproperties_ce, SL("someString"), "test", ZEND_ACC_PRIVATE); return SUCCESS; diff --git a/ext/test/properties/propertyarray.zep.c b/ext/test/properties/propertyarray.zep.c index 17600c9cab..f05aad2039 100644 --- a/ext/test/properties/propertyarray.zep.c +++ b/ext/test/properties/propertyarray.zep.c @@ -29,17 +29,17 @@ ZEPHIR_INIT_CLASS(Test_Properties_PropertyArray) { /** * This is a public property with an initial empty-array value */ - zend_declare_property_null(test_properties_propertyarray_ce, SL("someEmptyArray"), ZEND_ACC_PUBLIC TSRMLS_CC); + zend_declare_property_null(test_properties_propertyarray_ce, SL("someEmptyArray"), ZEND_ACC_PUBLIC); /** * This is a public property with an initial array value */ - zend_declare_property_null(test_properties_propertyarray_ce, SL("someArray"), ZEND_ACC_PUBLIC TSRMLS_CC); + zend_declare_property_null(test_properties_propertyarray_ce, SL("someArray"), ZEND_ACC_PUBLIC); /** * This is a protected property with an initial empty-array value */ - zend_declare_property_null(test_properties_propertyarray_ce, SL("otherArray"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_properties_propertyarray_ce, SL("otherArray"), ZEND_ACC_PROTECTED); test_properties_propertyarray_ce->create_object = zephir_init_properties_Test_Properties_PropertyArray; return SUCCESS; @@ -59,7 +59,7 @@ PHP_METHOD(Test_Properties_PropertyArray, __construct) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&_0); - zephir_create_array(&_0, 1, 0 TSRMLS_CC); + zephir_create_array(&_0, 1, 0); ZEPHIR_INIT_VAR(&_1); ZVAL_LONG(&_1, 1); zephir_array_fast_append(&_0, &_1); @@ -188,7 +188,7 @@ zend_object *zephir_init_properties_Test_Properties_PropertyArray(zend_class_ent zephir_read_property(&_2, this_ptr, SL("someArray"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_2) == IS_NULL) { ZEPHIR_INIT_VAR(&_3$$4); - zephir_create_array(&_3$$4, 4, 0 TSRMLS_CC); + zephir_create_array(&_3$$4, 4, 0); ZEPHIR_INIT_VAR(&_4$$4); ZVAL_LONG(&_4$$4, 1); zephir_array_fast_append(&_3$$4, &_4$$4); diff --git a/ext/test/properties/propertyupdate.zep.c b/ext/test/properties/propertyupdate.zep.c index 803688920c..bb302b8f57 100644 --- a/ext/test/properties/propertyupdate.zep.c +++ b/ext/test/properties/propertyupdate.zep.c @@ -20,7 +20,7 @@ ZEPHIR_INIT_CLASS(Test_Properties_PropertyUpdate) { ZEPHIR_REGISTER_CLASS(Test\\Properties, PropertyUpdate, test, properties_propertyupdate, test_properties_propertyupdate_method_entry, 0); - zend_declare_property_null(test_properties_propertyupdate_ce, SL("p1"), ZEND_ACC_PUBLIC TSRMLS_CC); + zend_declare_property_null(test_properties_propertyupdate_ce, SL("p1"), ZEND_ACC_PUBLIC); return SUCCESS; diff --git a/ext/test/properties/protectedproperties.zep.c b/ext/test/properties/protectedproperties.zep.c index a1a6667e64..ab26d4b7ec 100644 --- a/ext/test/properties/protectedproperties.zep.c +++ b/ext/test/properties/protectedproperties.zep.c @@ -23,39 +23,39 @@ ZEPHIR_INIT_CLASS(Test_Properties_ProtectedProperties) { /** * This is a protected property with no initial value */ - zend_declare_property_null(test_properties_protectedproperties_ce, SL("someNull"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_properties_protectedproperties_ce, SL("someNull"), ZEND_ACC_PROTECTED); /** * This is a protected property with initial null value */ - zend_declare_property_null(test_properties_protectedproperties_ce, SL("someNullInitial"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_properties_protectedproperties_ce, SL("someNullInitial"), ZEND_ACC_PROTECTED); /** * This is a protected property with initial boolean false */ - zend_declare_property_bool(test_properties_protectedproperties_ce, SL("someFalse"), 0, ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_bool(test_properties_protectedproperties_ce, SL("someFalse"), 0, ZEND_ACC_PROTECTED); /** * This is a protected property with initial boolean true */ - zend_declare_property_bool(test_properties_protectedproperties_ce, SL("someTrue"), 1, ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_bool(test_properties_protectedproperties_ce, SL("someTrue"), 1, ZEND_ACC_PROTECTED); /** * This is a protected property with an initial integer value */ - zend_declare_property_long(test_properties_protectedproperties_ce, SL("someInteger"), 10, ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_long(test_properties_protectedproperties_ce, SL("someInteger"), 10, ZEND_ACC_PROTECTED); /** * This is a protected property with an initial double value */ - zend_declare_property_double(test_properties_protectedproperties_ce, SL("someDouble"), 10.25, ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_double(test_properties_protectedproperties_ce, SL("someDouble"), 10.25, ZEND_ACC_PROTECTED); /** * This is a protected property with an initial string value */ - zend_declare_property_string(test_properties_protectedproperties_ce, SL("someString"), "test", ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_string(test_properties_protectedproperties_ce, SL("someString"), "test", ZEND_ACC_PROTECTED); - zend_declare_property_null(test_properties_protectedproperties_ce, SL("someVar"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_properties_protectedproperties_ce, SL("someVar"), ZEND_ACC_PROTECTED); return SUCCESS; diff --git a/ext/test/properties/publicproperties.zep.c b/ext/test/properties/publicproperties.zep.c index 70ef3f1e5d..f17e25abc5 100644 --- a/ext/test/properties/publicproperties.zep.c +++ b/ext/test/properties/publicproperties.zep.c @@ -25,65 +25,65 @@ ZEPHIR_INIT_CLASS(Test_Properties_PublicProperties) { /** * This is a public property with no initial value */ - zend_declare_property_null(test_properties_publicproperties_ce, SL("someNull"), ZEND_ACC_PUBLIC TSRMLS_CC); + zend_declare_property_null(test_properties_publicproperties_ce, SL("someNull"), ZEND_ACC_PUBLIC); /** * This is a public property with initial null value */ - zend_declare_property_null(test_properties_publicproperties_ce, SL("someNullInitial"), ZEND_ACC_PUBLIC TSRMLS_CC); + zend_declare_property_null(test_properties_publicproperties_ce, SL("someNullInitial"), ZEND_ACC_PUBLIC); /** * This is a public property with initial boolean false */ - zend_declare_property_bool(test_properties_publicproperties_ce, SL("someFalse"), 0, ZEND_ACC_PUBLIC TSRMLS_CC); + zend_declare_property_bool(test_properties_publicproperties_ce, SL("someFalse"), 0, ZEND_ACC_PUBLIC); /** * This is a public property with initial boolean true */ - zend_declare_property_bool(test_properties_publicproperties_ce, SL("someTrue"), 1, ZEND_ACC_PUBLIC TSRMLS_CC); + zend_declare_property_bool(test_properties_publicproperties_ce, SL("someTrue"), 1, ZEND_ACC_PUBLIC); /** * This is a public property with an initial integer value */ - zend_declare_property_long(test_properties_publicproperties_ce, SL("someInteger"), 10, ZEND_ACC_PUBLIC TSRMLS_CC); + zend_declare_property_long(test_properties_publicproperties_ce, SL("someInteger"), 10, ZEND_ACC_PUBLIC); /** * This is a public property with an initial double value */ - zend_declare_property_double(test_properties_publicproperties_ce, SL("someDouble"), 10.25, ZEND_ACC_PUBLIC TSRMLS_CC); + zend_declare_property_double(test_properties_publicproperties_ce, SL("someDouble"), 10.25, ZEND_ACC_PUBLIC); /** * This is a public property with an initial string value */ - zend_declare_property_string(test_properties_publicproperties_ce, SL("someString"), "test", ZEND_ACC_PUBLIC TSRMLS_CC); + zend_declare_property_string(test_properties_publicproperties_ce, SL("someString"), "test", ZEND_ACC_PUBLIC); /** * This is a public property with an initial empty-array value */ - zend_declare_property_null(test_properties_publicproperties_ce, SL("someEmptyArray"), ZEND_ACC_PUBLIC TSRMLS_CC); + zend_declare_property_null(test_properties_publicproperties_ce, SL("someEmptyArray"), ZEND_ACC_PUBLIC); /** * This is a public property with an initial array value */ - zend_declare_property_null(test_properties_publicproperties_ce, SL("someArray"), ZEND_ACC_PUBLIC TSRMLS_CC); + zend_declare_property_null(test_properties_publicproperties_ce, SL("someArray"), ZEND_ACC_PUBLIC); /** * It's needed to test ide stubs * @link https://github.com/phalcon/zephir/issues/731 */ - zend_declare_property_null(test_properties_publicproperties_ce, SL("someArrayWithSpecifyKeys"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_properties_publicproperties_ce, SL("someArrayWithSpecifyKeys"), ZEND_ACC_PROTECTED); /** * It's needed to test ide stubs * @link https://github.com/phalcon/zephir/issues/731 */ - zend_declare_property_null(test_properties_publicproperties_ce, SL("someArrayWithSubArray"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_properties_publicproperties_ce, SL("someArrayWithSubArray"), ZEND_ACC_PROTECTED); - zend_declare_property_null(test_properties_publicproperties_ce, SL("someGetterSetterArray"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_properties_publicproperties_ce, SL("someGetterSetterArray"), ZEND_ACC_PROTECTED); - zend_declare_property_long(test_properties_publicproperties_ce, SL("testPropertyFromSelfConstantValue"), 123, ZEND_ACC_PUBLIC TSRMLS_CC); + zend_declare_property_long(test_properties_publicproperties_ce, SL("testPropertyFromSelfConstantValue"), 123, ZEND_ACC_PUBLIC); - zend_declare_property_long(test_properties_publicproperties_ce, SL("testPropertyFromClassNameConstantValue"), 123, ZEND_ACC_PUBLIC TSRMLS_CC); + zend_declare_property_long(test_properties_publicproperties_ce, SL("testPropertyFromClassNameConstantValue"), 123, ZEND_ACC_PUBLIC); test_properties_publicproperties_ce->create_object = zephir_init_properties_Test_Properties_PublicProperties; zephir_declare_class_constant_long(test_properties_publicproperties_ce, SL("TEST_CONST"), 123); @@ -165,21 +165,21 @@ zend_object *zephir_init_properties_Test_Properties_PublicProperties(zend_class_ zephir_read_property(&_2, this_ptr, SL("someArrayWithSubArray"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_2) == IS_NULL) { ZEPHIR_INIT_VAR(&_3$$4); - zephir_create_array(&_3$$4, 4, 0 TSRMLS_CC); + zephir_create_array(&_3$$4, 4, 0); ZEPHIR_INIT_VAR(&_4$$4); - zephir_create_array(&_4$$4, 1, 0 TSRMLS_CC); + zephir_create_array(&_4$$4, 1, 0); add_assoc_stringl_ex(&_4$$4, SL("class"), SL("alert alert-success")); zephir_array_update_string(&_3$$4, SL("success"), &_4$$4, PH_COPY | PH_SEPARATE); ZEPHIR_INIT_NVAR(&_4$$4); - zephir_create_array(&_4$$4, 1, 0 TSRMLS_CC); + zephir_create_array(&_4$$4, 1, 0); add_assoc_stringl_ex(&_4$$4, SL("class"), SL("alert alert-info")); zephir_array_update_string(&_3$$4, SL("info"), &_4$$4, PH_COPY | PH_SEPARATE); ZEPHIR_INIT_NVAR(&_4$$4); - zephir_create_array(&_4$$4, 1, 0 TSRMLS_CC); + zephir_create_array(&_4$$4, 1, 0); add_assoc_stringl_ex(&_4$$4, SL("class"), SL("alert alert-warning")); zephir_array_update_string(&_3$$4, SL("warning"), &_4$$4, PH_COPY | PH_SEPARATE); ZEPHIR_INIT_NVAR(&_4$$4); - zephir_create_array(&_4$$4, 1, 0 TSRMLS_CC); + zephir_create_array(&_4$$4, 1, 0); add_assoc_stringl_ex(&_4$$4, SL("class"), SL("alert alert-danger")); zephir_array_update_string(&_3$$4, SL("danger"), &_4$$4, PH_COPY | PH_SEPARATE); zephir_update_property_zval(this_ptr, SL("someArrayWithSubArray"), &_3$$4); @@ -187,7 +187,7 @@ zend_object *zephir_init_properties_Test_Properties_PublicProperties(zend_class_ zephir_read_property(&_5, this_ptr, SL("someArrayWithSpecifyKeys"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_5) == IS_NULL) { ZEPHIR_INIT_VAR(&_6$$5); - zephir_create_array(&_6$$5, 3, 0 TSRMLS_CC); + zephir_create_array(&_6$$5, 3, 0); add_assoc_stringl_ex(&_6$$5, SL("a"), SL("A")); add_assoc_stringl_ex(&_6$$5, SL("b"), SL("B")); add_assoc_stringl_ex(&_6$$5, SL("c"), SL("C")); @@ -196,7 +196,7 @@ zend_object *zephir_init_properties_Test_Properties_PublicProperties(zend_class_ zephir_read_property(&_7, this_ptr, SL("someArray"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_7) == IS_NULL) { ZEPHIR_INIT_VAR(&_8$$6); - zephir_create_array(&_8$$6, 4, 0 TSRMLS_CC); + zephir_create_array(&_8$$6, 4, 0); ZEPHIR_INIT_VAR(&_9$$6); ZVAL_LONG(&_9$$6, 1); zephir_array_fast_append(&_8$$6, &_9$$6); diff --git a/ext/test/properties/staticprivateproperties.zep.c b/ext/test/properties/staticprivateproperties.zep.c index fee0876212..4690923cbe 100644 --- a/ext/test/properties/staticprivateproperties.zep.c +++ b/ext/test/properties/staticprivateproperties.zep.c @@ -21,7 +21,7 @@ ZEPHIR_INIT_CLASS(Test_Properties_StaticPrivateProperties) { ZEPHIR_REGISTER_CLASS(Test\\Properties, StaticPrivateProperties, test, properties_staticprivateproperties, test_properties_staticprivateproperties_method_entry, 0); - zend_declare_property_null(test_properties_staticprivateproperties_ce, SL("instance"), ZEND_ACC_PRIVATE|ZEND_ACC_STATIC TSRMLS_CC); + zend_declare_property_null(test_properties_staticprivateproperties_ce, SL("instance"), ZEND_ACC_PRIVATE|ZEND_ACC_STATIC); return SUCCESS; @@ -44,7 +44,7 @@ PHP_METHOD(Test_Properties_StaticPrivateProperties, getInstance) { if (UNEXPECTED(Z_TYPE_P(&localInstance) != IS_OBJECT)) { ZEPHIR_INIT_NVAR(&localInstance); object_init_ex(&localInstance, test_properties_staticprivateproperties_ce); - if (zephir_has_constructor(&localInstance TSRMLS_CC)) { + if (zephir_has_constructor(&localInstance)) { ZEPHIR_CALL_METHOD(NULL, &localInstance, "__construct", NULL, 0); zephir_check_call_status(); } diff --git a/ext/test/properties/staticpropertyarray.zep.c b/ext/test/properties/staticpropertyarray.zep.c index 5f22748931..d467b44469 100644 --- a/ext/test/properties/staticpropertyarray.zep.c +++ b/ext/test/properties/staticpropertyarray.zep.c @@ -28,12 +28,12 @@ ZEPHIR_INIT_CLASS(Test_Properties_StaticPropertyArray) { /** * This is a public property with an initial empty-array value */ - zend_declare_property_null(test_properties_staticpropertyarray_ce, SL("someEmptyArray"), ZEND_ACC_PUBLIC|ZEND_ACC_STATIC TSRMLS_CC); + zend_declare_property_null(test_properties_staticpropertyarray_ce, SL("someEmptyArray"), ZEND_ACC_PUBLIC|ZEND_ACC_STATIC); /** * This is a public property with an initial array value */ - zend_declare_property_null(test_properties_staticpropertyarray_ce, SL("someArray"), ZEND_ACC_PUBLIC|ZEND_ACC_STATIC TSRMLS_CC); + zend_declare_property_null(test_properties_staticpropertyarray_ce, SL("someArray"), ZEND_ACC_PUBLIC|ZEND_ACC_STATIC); return SUCCESS; @@ -50,7 +50,7 @@ void zephir_init_static_properties_Test_Properties_StaticPropertyArray(TSRMLS_D) ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&_0); - zephir_create_array(&_0, 4, 0 TSRMLS_CC); + zephir_create_array(&_0, 4, 0); ZEPHIR_INIT_VAR(&_1); ZVAL_LONG(&_1, 1); zephir_array_fast_append(&_0, &_1); diff --git a/ext/test/properties/staticprotectedproperties.zep.c b/ext/test/properties/staticprotectedproperties.zep.c index a06e765d67..4b109d06b1 100644 --- a/ext/test/properties/staticprotectedproperties.zep.c +++ b/ext/test/properties/staticprotectedproperties.zep.c @@ -23,39 +23,39 @@ ZEPHIR_INIT_CLASS(Test_Properties_StaticProtectedProperties) { /** * This is a protected property with no initial value */ - zend_declare_property_null(test_properties_staticprotectedproperties_ce, SL("someNull"), ZEND_ACC_PROTECTED|ZEND_ACC_STATIC TSRMLS_CC); + zend_declare_property_null(test_properties_staticprotectedproperties_ce, SL("someNull"), ZEND_ACC_PROTECTED|ZEND_ACC_STATIC); /** * This is a protected property with initial null value */ - zend_declare_property_null(test_properties_staticprotectedproperties_ce, SL("someNullInitial"), ZEND_ACC_PROTECTED|ZEND_ACC_STATIC TSRMLS_CC); + zend_declare_property_null(test_properties_staticprotectedproperties_ce, SL("someNullInitial"), ZEND_ACC_PROTECTED|ZEND_ACC_STATIC); /** * This is a protected property with initial boolean false */ - zend_declare_property_bool(test_properties_staticprotectedproperties_ce, SL("someFalse"), 0, ZEND_ACC_PROTECTED|ZEND_ACC_STATIC TSRMLS_CC); + zend_declare_property_bool(test_properties_staticprotectedproperties_ce, SL("someFalse"), 0, ZEND_ACC_PROTECTED|ZEND_ACC_STATIC); /** * This is a protected property with initial boolean true */ - zend_declare_property_bool(test_properties_staticprotectedproperties_ce, SL("someTrue"), 1, ZEND_ACC_PROTECTED|ZEND_ACC_STATIC TSRMLS_CC); + zend_declare_property_bool(test_properties_staticprotectedproperties_ce, SL("someTrue"), 1, ZEND_ACC_PROTECTED|ZEND_ACC_STATIC); /** * This is a protected property with an initial integer value */ - zend_declare_property_long(test_properties_staticprotectedproperties_ce, SL("someInteger"), 10, ZEND_ACC_PROTECTED|ZEND_ACC_STATIC TSRMLS_CC); + zend_declare_property_long(test_properties_staticprotectedproperties_ce, SL("someInteger"), 10, ZEND_ACC_PROTECTED|ZEND_ACC_STATIC); /** * This is a protected property with an initial double value */ - zend_declare_property_double(test_properties_staticprotectedproperties_ce, SL("someDouble"), 10.25, ZEND_ACC_PROTECTED|ZEND_ACC_STATIC TSRMLS_CC); + zend_declare_property_double(test_properties_staticprotectedproperties_ce, SL("someDouble"), 10.25, ZEND_ACC_PROTECTED|ZEND_ACC_STATIC); /** * This is a protected property with an initial string value */ - zend_declare_property_string(test_properties_staticprotectedproperties_ce, SL("someString"), "test", ZEND_ACC_PROTECTED|ZEND_ACC_STATIC TSRMLS_CC); + zend_declare_property_string(test_properties_staticprotectedproperties_ce, SL("someString"), "test", ZEND_ACC_PROTECTED|ZEND_ACC_STATIC); - zend_declare_property_null(test_properties_staticprotectedproperties_ce, SL("someVar"), ZEND_ACC_PROTECTED|ZEND_ACC_STATIC TSRMLS_CC); + zend_declare_property_null(test_properties_staticprotectedproperties_ce, SL("someVar"), ZEND_ACC_PROTECTED|ZEND_ACC_STATIC); return SUCCESS; diff --git a/ext/test/properties/staticpublicproperties.zep.c b/ext/test/properties/staticpublicproperties.zep.c index e963826f91..3e0f9f2be5 100644 --- a/ext/test/properties/staticpublicproperties.zep.c +++ b/ext/test/properties/staticpublicproperties.zep.c @@ -23,37 +23,37 @@ ZEPHIR_INIT_CLASS(Test_Properties_StaticPublicProperties) { /** * This is a public property with no initial value */ - zend_declare_property_null(test_properties_staticpublicproperties_ce, SL("someNull"), ZEND_ACC_PUBLIC|ZEND_ACC_STATIC TSRMLS_CC); + zend_declare_property_null(test_properties_staticpublicproperties_ce, SL("someNull"), ZEND_ACC_PUBLIC|ZEND_ACC_STATIC); /** * This is a public property with initial null value */ - zend_declare_property_null(test_properties_staticpublicproperties_ce, SL("someNullInitial"), ZEND_ACC_PUBLIC|ZEND_ACC_STATIC TSRMLS_CC); + zend_declare_property_null(test_properties_staticpublicproperties_ce, SL("someNullInitial"), ZEND_ACC_PUBLIC|ZEND_ACC_STATIC); /** * This is a public property with initial boolean false */ - zend_declare_property_bool(test_properties_staticpublicproperties_ce, SL("someFalse"), 0, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC TSRMLS_CC); + zend_declare_property_bool(test_properties_staticpublicproperties_ce, SL("someFalse"), 0, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC); /** * This is a public property with initial boolean true */ - zend_declare_property_bool(test_properties_staticpublicproperties_ce, SL("someTrue"), 1, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC TSRMLS_CC); + zend_declare_property_bool(test_properties_staticpublicproperties_ce, SL("someTrue"), 1, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC); /** * This is a public property with an initial integer value */ - zend_declare_property_long(test_properties_staticpublicproperties_ce, SL("someInteger"), 10, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC TSRMLS_CC); + zend_declare_property_long(test_properties_staticpublicproperties_ce, SL("someInteger"), 10, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC); /** * This is a public property with an initial double value */ - zend_declare_property_double(test_properties_staticpublicproperties_ce, SL("someDouble"), 10.25, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC TSRMLS_CC); + zend_declare_property_double(test_properties_staticpublicproperties_ce, SL("someDouble"), 10.25, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC); /** * This is a public property with an initial string value */ - zend_declare_property_string(test_properties_staticpublicproperties_ce, SL("someString"), "test", ZEND_ACC_PUBLIC|ZEND_ACC_STATIC TSRMLS_CC); + zend_declare_property_string(test_properties_staticpublicproperties_ce, SL("someString"), "test", ZEND_ACC_PUBLIC|ZEND_ACC_STATIC); return SUCCESS; diff --git a/ext/test/quantum.zep.c b/ext/test/quantum.zep.c index 62350510cb..4751023948 100644 --- a/ext/test/quantum.zep.c +++ b/ext/test/quantum.zep.c @@ -107,9 +107,9 @@ PHP_METHOD(Test_Quantum, harmos) { dx = 0.02; k0 = (3.0 * 3.14159265358979323846); - dt = zephir_safe_div_double_long((dx * dx), 4.0 TSRMLS_CC); + dt = zephir_safe_div_double_long((dx * dx), 4.0); ZEPHIR_INIT_VAR(¶mater); - zephir_create_array(¶mater, 4, 0 TSRMLS_CC); + zephir_create_array(¶mater, 4, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_DOUBLE(&_0, dx); zephir_array_fast_append(¶mater, &_0); @@ -148,26 +148,26 @@ PHP_METHOD(Test_Quantum, harmos) { ZVAL_DOUBLE(&_3$$4, ((x * x) * 2.0)); ZEPHIR_CALL_FUNCTION(&_4$$4, "exp", &_5, 2, &_3$$4); zephir_check_call_status(); - item_psi = zephir_safe_div_double_zval(sin((k0 * x)), &_4$$4 TSRMLS_CC); + item_psi = zephir_safe_div_double_zval(sin((k0 * x)), &_4$$4); ZVAL_DOUBLE(&_3$$4, (k0 * x)); ZVAL_DOUBLE(&_6$$4, ((x * x) * 2.0)); ZEPHIR_CALL_FUNCTION(&_7$$4, "exp", &_5, 2, &_6$$4); zephir_check_call_status(); - item_psr = zephir_safe_div_double_zval(cos((k0 * x)), &_7$$4 TSRMLS_CC); + item_psr = zephir_safe_div_double_zval(cos((k0 * x)), &_7$$4); ZEPHIR_INIT_NVAR(&_8$$4); - zephir_create_array(&_8$$4, 1, 0 TSRMLS_CC); + zephir_create_array(&_8$$4, 1, 0); ZEPHIR_INIT_NVAR(&_9$$4); ZVAL_DOUBLE(&_9$$4, item_psr); zephir_array_fast_append(&_8$$4, &_9$$4); zephir_array_update_long(&psr, i, &_8$$4, PH_COPY | PH_SEPARATE ZEPHIR_DEBUG_PARAMS_DUMMY); ZEPHIR_INIT_NVAR(&_10$$4); - zephir_create_array(&_10$$4, 1, 0 TSRMLS_CC); + zephir_create_array(&_10$$4, 1, 0); ZEPHIR_INIT_NVAR(&_9$$4); ZVAL_DOUBLE(&_9$$4, item_psi); zephir_array_fast_append(&_10$$4, &_9$$4); zephir_array_update_long(&psi, i, &_10$$4, PH_COPY | PH_SEPARATE ZEPHIR_DEBUG_PARAMS_DUMMY); ZEPHIR_INIT_NVAR(&_11$$4); - zephir_create_array(&_11$$4, 1, 0 TSRMLS_CC); + zephir_create_array(&_11$$4, 1, 0); ZEPHIR_INIT_NVAR(&_9$$4); ZVAL_DOUBLE(&_9$$4, (double) ((double) (5.0 * x) * x)); zephir_array_fast_append(&_11$$4, &_9$$4); @@ -178,7 +178,7 @@ PHP_METHOD(Test_Quantum, harmos) { i = 1; j = 1; ZEPHIR_INIT_VAR(&tmp); - zephir_create_array(&tmp, 1, 0 TSRMLS_CC); + zephir_create_array(&tmp, 1, 0); ZEPHIR_INIT_NVAR(&_0); ZVAL_DOUBLE(&_0, 2.0); zephir_array_fast_append(&tmp, &_0); @@ -210,56 +210,56 @@ PHP_METHOD(Test_Quantum, harmos) { _15$$5 = 1; } i = _16$$5; - zephir_array_fetch_long(&_18$$6, &psr, i, PH_NOISY | PH_READONLY, "test/quantum.zep", 50 TSRMLS_CC); - zephir_array_fetch_long(&_19$$6, &_18$$6, 0, PH_NOISY | PH_READONLY, "test/quantum.zep", 50 TSRMLS_CC); - zephir_array_fetch_long(&_20$$6, ¶mater, 2, PH_NOISY | PH_READONLY, "test/quantum.zep", 50 TSRMLS_CC); - zephir_array_fetch_long(&_21$$6, &psi, (i + 1), PH_NOISY | PH_READONLY, "test/quantum.zep", 50 TSRMLS_CC); - zephir_array_fetch_long(&_22$$6, &_21$$6, 0, PH_NOISY | PH_READONLY, "test/quantum.zep", 50 TSRMLS_CC); - zephir_array_fetch_long(&_23$$6, &psi, (i - 1), PH_NOISY | PH_READONLY, "test/quantum.zep", 50 TSRMLS_CC); - zephir_array_fetch_long(&_24$$6, &_23$$6, 0, PH_NOISY | PH_READONLY, "test/quantum.zep", 51 TSRMLS_CC); + zephir_array_fetch_long(&_18$$6, &psr, i, PH_NOISY | PH_READONLY, "test/quantum.zep", 50); + zephir_array_fetch_long(&_19$$6, &_18$$6, 0, PH_NOISY | PH_READONLY, "test/quantum.zep", 50); + zephir_array_fetch_long(&_20$$6, ¶mater, 2, PH_NOISY | PH_READONLY, "test/quantum.zep", 50); + zephir_array_fetch_long(&_21$$6, &psi, (i + 1), PH_NOISY | PH_READONLY, "test/quantum.zep", 50); + zephir_array_fetch_long(&_22$$6, &_21$$6, 0, PH_NOISY | PH_READONLY, "test/quantum.zep", 50); + zephir_array_fetch_long(&_23$$6, &psi, (i - 1), PH_NOISY | PH_READONLY, "test/quantum.zep", 50); + zephir_array_fetch_long(&_24$$6, &_23$$6, 0, PH_NOISY | PH_READONLY, "test/quantum.zep", 51); ZEPHIR_INIT_NVAR(&_25$$6); zephir_add_function(&_25$$6, &_22$$6, &_24$$6); - zephir_array_fetch_long(&_22$$6, &tmp, 0, PH_NOISY | PH_READONLY, "test/quantum.zep", 51 TSRMLS_CC); - zephir_array_fetch_long(&_24$$6, &psi, i, PH_NOISY | PH_READONLY, "test/quantum.zep", 51 TSRMLS_CC); - zephir_array_fetch_long(&_26$$6, &_24$$6, 0, PH_NOISY | PH_READONLY, "test/quantum.zep", 51 TSRMLS_CC); + zephir_array_fetch_long(&_22$$6, &tmp, 0, PH_NOISY | PH_READONLY, "test/quantum.zep", 51); + zephir_array_fetch_long(&_24$$6, &psi, i, PH_NOISY | PH_READONLY, "test/quantum.zep", 51); + zephir_array_fetch_long(&_26$$6, &_24$$6, 0, PH_NOISY | PH_READONLY, "test/quantum.zep", 51); ZEPHIR_INIT_NVAR(&_27$$6); - mul_function(&_27$$6, &_22$$6, &_26$$6 TSRMLS_CC); + mul_function(&_27$$6, &_22$$6, &_26$$6); ZEPHIR_INIT_NVAR(&_28$$6); zephir_sub_function(&_28$$6, &_25$$6, &_27$$6); ZEPHIR_INIT_NVAR(&_25$$6); - mul_function(&_25$$6, &_20$$6, &_28$$6 TSRMLS_CC); - zephir_array_fetch_long(&_20$$6, ¶mater, 0, PH_NOISY | PH_READONLY, "test/quantum.zep", 51 TSRMLS_CC); - zephir_array_fetch_long(&_22$$6, ¶mater, 0, PH_NOISY | PH_READONLY, "test/quantum.zep", 51 TSRMLS_CC); + mul_function(&_25$$6, &_20$$6, &_28$$6); + zephir_array_fetch_long(&_20$$6, ¶mater, 0, PH_NOISY | PH_READONLY, "test/quantum.zep", 51); + zephir_array_fetch_long(&_22$$6, ¶mater, 0, PH_NOISY | PH_READONLY, "test/quantum.zep", 51); ZEPHIR_INIT_NVAR(&_28$$6); - mul_function(&_28$$6, &_20$$6, &_22$$6 TSRMLS_CC); + mul_function(&_28$$6, &_20$$6, &_22$$6); ZEPHIR_INIT_NVAR(&_27$$6); - div_function(&_27$$6, &_25$$6, &_28$$6 TSRMLS_CC); + div_function(&_27$$6, &_25$$6, &_28$$6); ZEPHIR_INIT_NVAR(&_25$$6); zephir_sub_function(&_25$$6, &_19$$6, &_27$$6); - zephir_array_fetch_long(&_19$$6, ¶mater, 2, PH_NOISY | PH_READONLY, "test/quantum.zep", 51 TSRMLS_CC); - zephir_array_fetch_long(&_20$$6, &v, i, PH_NOISY | PH_READONLY, "test/quantum.zep", 51 TSRMLS_CC); - zephir_array_fetch_long(&_22$$6, &_20$$6, 0, PH_NOISY | PH_READONLY, "test/quantum.zep", 51 TSRMLS_CC); + zephir_array_fetch_long(&_19$$6, ¶mater, 2, PH_NOISY | PH_READONLY, "test/quantum.zep", 51); + zephir_array_fetch_long(&_20$$6, &v, i, PH_NOISY | PH_READONLY, "test/quantum.zep", 51); + zephir_array_fetch_long(&_22$$6, &_20$$6, 0, PH_NOISY | PH_READONLY, "test/quantum.zep", 51); ZEPHIR_INIT_NVAR(&_27$$6); - mul_function(&_27$$6, &_19$$6, &_22$$6 TSRMLS_CC); - zephir_array_fetch_long(&_19$$6, &psi, i, PH_NOISY | PH_READONLY, "test/quantum.zep", 51 TSRMLS_CC); - zephir_array_fetch_long(&_22$$6, &_19$$6, 0, PH_NOISY | PH_READONLY, "test/quantum.zep", 51 TSRMLS_CC); + mul_function(&_27$$6, &_19$$6, &_22$$6); + zephir_array_fetch_long(&_19$$6, &psi, i, PH_NOISY | PH_READONLY, "test/quantum.zep", 51); + zephir_array_fetch_long(&_22$$6, &_19$$6, 0, PH_NOISY | PH_READONLY, "test/quantum.zep", 51); ZEPHIR_INIT_NVAR(&_29$$6); - mul_function(&_29$$6, &_27$$6, &_22$$6 TSRMLS_CC); + mul_function(&_29$$6, &_27$$6, &_22$$6); ZEPHIR_INIT_NVAR(&_28$$6); zephir_add_function(&_28$$6, &_25$$6, &_29$$6); - zephir_array_update_multi(&psr, &_28$$6 TSRMLS_CC, SL("ll"), 2, i, 1); - zephir_array_fetch_long(&_22$$6, &psr, i, PH_NOISY | PH_READONLY, "test/quantum.zep", 53 TSRMLS_CC); - zephir_array_fetch_long(&_26$$6, &_22$$6, 0, PH_NOISY | PH_READONLY, "test/quantum.zep", 53 TSRMLS_CC); - zephir_array_fetch_long(&_30$$6, &psr, i, PH_NOISY | PH_READONLY, "test/quantum.zep", 53 TSRMLS_CC); - zephir_array_fetch_long(&_31$$6, &_30$$6, 1, PH_NOISY | PH_READONLY, "test/quantum.zep", 53 TSRMLS_CC); + zephir_array_update_multi(&psr, &_28$$6, SL("ll"), 2, i, 1); + zephir_array_fetch_long(&_22$$6, &psr, i, PH_NOISY | PH_READONLY, "test/quantum.zep", 53); + zephir_array_fetch_long(&_26$$6, &_22$$6, 0, PH_NOISY | PH_READONLY, "test/quantum.zep", 53); + zephir_array_fetch_long(&_30$$6, &psr, i, PH_NOISY | PH_READONLY, "test/quantum.zep", 53); + zephir_array_fetch_long(&_31$$6, &_30$$6, 1, PH_NOISY | PH_READONLY, "test/quantum.zep", 53); ZEPHIR_INIT_NVAR(&_25$$6); - mul_function(&_25$$6, &_26$$6, &_31$$6 TSRMLS_CC); - zephir_array_fetch_long(&_26$$6, &psi, i, PH_NOISY | PH_READONLY, "test/quantum.zep", 53 TSRMLS_CC); - zephir_array_fetch_long(&_31$$6, &_26$$6, 0, PH_NOISY | PH_READONLY, "test/quantum.zep", 53 TSRMLS_CC); - zephir_array_fetch_long(&_32$$6, &psi, i, PH_NOISY | PH_READONLY, "test/quantum.zep", 53 TSRMLS_CC); - zephir_array_fetch_long(&_33$$6, &_32$$6, 0, PH_NOISY | PH_READONLY, "test/quantum.zep", 53 TSRMLS_CC); + mul_function(&_25$$6, &_26$$6, &_31$$6); + zephir_array_fetch_long(&_26$$6, &psi, i, PH_NOISY | PH_READONLY, "test/quantum.zep", 53); + zephir_array_fetch_long(&_31$$6, &_26$$6, 0, PH_NOISY | PH_READONLY, "test/quantum.zep", 53); + zephir_array_fetch_long(&_32$$6, &psi, i, PH_NOISY | PH_READONLY, "test/quantum.zep", 53); + zephir_array_fetch_long(&_33$$6, &_32$$6, 0, PH_NOISY | PH_READONLY, "test/quantum.zep", 53); ZEPHIR_INIT_NVAR(&_27$$6); - mul_function(&_27$$6, &_31$$6, &_33$$6 TSRMLS_CC); + mul_function(&_27$$6, &_31$$6, &_33$$6); ZEPHIR_INIT_NVAR(&_28$$6); zephir_add_function(&_28$$6, &_25$$6, &_27$$6); zephir_array_update_long(&p2, i, &_28$$6, PH_COPY | PH_SEPARATE ZEPHIR_DEBUG_PARAMS_DUMMY); @@ -281,53 +281,53 @@ PHP_METHOD(Test_Quantum, harmos) { j = _35$$5; ZEPHIR_INIT_NVAR(&_37$$7); ZVAL_LONG(&_37$$7, 0); - zephir_array_update_multi(&psr, &_37$$7 TSRMLS_CC, SL("ll"), 2, 0, 1); + zephir_array_update_multi(&psr, &_37$$7, SL("ll"), 2, 0, 1); ZEPHIR_INIT_NVAR(&_37$$7); ZVAL_LONG(&_37$$7, 0); - zephir_array_update_multi(&psr, &_37$$7 TSRMLS_CC, SL("ll"), 2, 751, 1); - zephir_array_fetch_long(&_38$$7, &psi, j, PH_NOISY | PH_READONLY, "test/quantum.zep", 58 TSRMLS_CC); - zephir_array_fetch_long(&_39$$7, &_38$$7, 0, PH_NOISY | PH_READONLY, "test/quantum.zep", 58 TSRMLS_CC); - zephir_array_fetch_long(&_40$$7, ¶mater, 2, PH_NOISY | PH_READONLY, "test/quantum.zep", 58 TSRMLS_CC); - zephir_array_fetch_long(&_41$$7, &psr, (j + 1), PH_NOISY | PH_READONLY, "test/quantum.zep", 58 TSRMLS_CC); - zephir_array_fetch_long(&_42$$7, &_41$$7, 1, PH_NOISY | PH_READONLY, "test/quantum.zep", 58 TSRMLS_CC); - zephir_array_fetch_long(&_43$$7, &psr, (j - 1), PH_NOISY | PH_READONLY, "test/quantum.zep", 58 TSRMLS_CC); - zephir_array_fetch_long(&_44$$7, &_43$$7, 1, PH_NOISY | PH_READONLY, "test/quantum.zep", 59 TSRMLS_CC); + zephir_array_update_multi(&psr, &_37$$7, SL("ll"), 2, 751, 1); + zephir_array_fetch_long(&_38$$7, &psi, j, PH_NOISY | PH_READONLY, "test/quantum.zep", 58); + zephir_array_fetch_long(&_39$$7, &_38$$7, 0, PH_NOISY | PH_READONLY, "test/quantum.zep", 58); + zephir_array_fetch_long(&_40$$7, ¶mater, 2, PH_NOISY | PH_READONLY, "test/quantum.zep", 58); + zephir_array_fetch_long(&_41$$7, &psr, (j + 1), PH_NOISY | PH_READONLY, "test/quantum.zep", 58); + zephir_array_fetch_long(&_42$$7, &_41$$7, 1, PH_NOISY | PH_READONLY, "test/quantum.zep", 58); + zephir_array_fetch_long(&_43$$7, &psr, (j - 1), PH_NOISY | PH_READONLY, "test/quantum.zep", 58); + zephir_array_fetch_long(&_44$$7, &_43$$7, 1, PH_NOISY | PH_READONLY, "test/quantum.zep", 59); ZEPHIR_INIT_NVAR(&_45$$7); zephir_add_function(&_45$$7, &_42$$7, &_44$$7); - zephir_array_fetch_long(&_42$$7, &tmp, 0, PH_NOISY | PH_READONLY, "test/quantum.zep", 59 TSRMLS_CC); - zephir_array_fetch_long(&_44$$7, &psr, j, PH_NOISY | PH_READONLY, "test/quantum.zep", 59 TSRMLS_CC); - zephir_array_fetch_long(&_46$$7, &_44$$7, 1, PH_NOISY | PH_READONLY, "test/quantum.zep", 59 TSRMLS_CC); + zephir_array_fetch_long(&_42$$7, &tmp, 0, PH_NOISY | PH_READONLY, "test/quantum.zep", 59); + zephir_array_fetch_long(&_44$$7, &psr, j, PH_NOISY | PH_READONLY, "test/quantum.zep", 59); + zephir_array_fetch_long(&_46$$7, &_44$$7, 1, PH_NOISY | PH_READONLY, "test/quantum.zep", 59); ZEPHIR_INIT_NVAR(&_47$$7); - mul_function(&_47$$7, &_42$$7, &_46$$7 TSRMLS_CC); + mul_function(&_47$$7, &_42$$7, &_46$$7); ZEPHIR_INIT_NVAR(&_48$$7); zephir_sub_function(&_48$$7, &_45$$7, &_47$$7); ZEPHIR_INIT_NVAR(&_45$$7); - mul_function(&_45$$7, &_40$$7, &_48$$7 TSRMLS_CC); - zephir_array_fetch_long(&_40$$7, ¶mater, 0, PH_NOISY | PH_READONLY, "test/quantum.zep", 59 TSRMLS_CC); - zephir_array_fetch_long(&_42$$7, ¶mater, 0, PH_NOISY | PH_READONLY, "test/quantum.zep", 59 TSRMLS_CC); + mul_function(&_45$$7, &_40$$7, &_48$$7); + zephir_array_fetch_long(&_40$$7, ¶mater, 0, PH_NOISY | PH_READONLY, "test/quantum.zep", 59); + zephir_array_fetch_long(&_42$$7, ¶mater, 0, PH_NOISY | PH_READONLY, "test/quantum.zep", 59); ZEPHIR_INIT_NVAR(&_48$$7); - mul_function(&_48$$7, &_40$$7, &_42$$7 TSRMLS_CC); + mul_function(&_48$$7, &_40$$7, &_42$$7); ZEPHIR_INIT_NVAR(&_47$$7); - div_function(&_47$$7, &_45$$7, &_48$$7 TSRMLS_CC); + div_function(&_47$$7, &_45$$7, &_48$$7); ZEPHIR_INIT_NVAR(&_45$$7); zephir_add_function(&_45$$7, &_39$$7, &_47$$7); - zephir_array_fetch_long(&_39$$7, ¶mater, 2, PH_NOISY | PH_READONLY, "test/quantum.zep", 59 TSRMLS_CC); - zephir_array_fetch_long(&_40$$7, &v, j, PH_NOISY | PH_READONLY, "test/quantum.zep", 59 TSRMLS_CC); - zephir_array_fetch_long(&_42$$7, &_40$$7, 0, PH_NOISY | PH_READONLY, "test/quantum.zep", 59 TSRMLS_CC); + zephir_array_fetch_long(&_39$$7, ¶mater, 2, PH_NOISY | PH_READONLY, "test/quantum.zep", 59); + zephir_array_fetch_long(&_40$$7, &v, j, PH_NOISY | PH_READONLY, "test/quantum.zep", 59); + zephir_array_fetch_long(&_42$$7, &_40$$7, 0, PH_NOISY | PH_READONLY, "test/quantum.zep", 59); ZEPHIR_INIT_NVAR(&_47$$7); - mul_function(&_47$$7, &_39$$7, &_42$$7 TSRMLS_CC); - zephir_array_fetch_long(&_39$$7, &psr, j, PH_NOISY | PH_READONLY, "test/quantum.zep", 59 TSRMLS_CC); - zephir_array_fetch_long(&_42$$7, &_39$$7, 1, PH_NOISY | PH_READONLY, "test/quantum.zep", 59 TSRMLS_CC); + mul_function(&_47$$7, &_39$$7, &_42$$7); + zephir_array_fetch_long(&_39$$7, &psr, j, PH_NOISY | PH_READONLY, "test/quantum.zep", 59); + zephir_array_fetch_long(&_42$$7, &_39$$7, 1, PH_NOISY | PH_READONLY, "test/quantum.zep", 59); ZEPHIR_INIT_NVAR(&_49$$7); - mul_function(&_49$$7, &_47$$7, &_42$$7 TSRMLS_CC); + mul_function(&_49$$7, &_47$$7, &_42$$7); ZEPHIR_INIT_NVAR(&_48$$7); zephir_sub_function(&_48$$7, &_45$$7, &_49$$7); - zephir_array_update_multi(&psi, &_48$$7 TSRMLS_CC, SL("ll"), 2, j, 1); + zephir_array_update_multi(&psi, &_48$$7, SL("ll"), 2, j, 1); } } _50$$5 = n == 0; if (!(_50$$5)) { - _50$$5 = zephir_safe_mod_long_long(n, 2000 TSRMLS_CC) == 0; + _50$$5 = zephir_safe_mod_long_long(n, 2000) == 0; } if (_50$$5) { i = 1; @@ -335,7 +335,7 @@ PHP_METHOD(Test_Quantum, harmos) { if (!(i < (751 - 1))) { break; } - zephir_array_fetch_long(&_51$$9, &p2, i, PH_NOISY | PH_READONLY, "test/quantum.zep", 67 TSRMLS_CC); + zephir_array_fetch_long(&_51$$9, &p2, i, PH_NOISY | PH_READONLY, "test/quantum.zep", 67); ZEPHIR_INIT_NVAR(&_52$$9); ZVAL_STRING(&_52$$9, "%16.8lf %16.8lf %16.8lf \n"); ZVAL_DOUBLE(&_53$$9, ((double) i * dx)); @@ -354,12 +354,12 @@ PHP_METHOD(Test_Quantum, harmos) { if (!(j < (751 - 1))) { break; } - zephir_array_fetch_long(&_57$$10, &psi, j, PH_NOISY | PH_READONLY, "test/quantum.zep", 76 TSRMLS_CC); - zephir_array_fetch_long(&_58$$10, &_57$$10, 1, PH_NOISY | PH_READONLY, "test/quantum.zep", 76 TSRMLS_CC); - zephir_array_update_multi(&psi, &_58$$10 TSRMLS_CC, SL("ll"), 2, j, 0); - zephir_array_fetch_long(&_58$$10, &psr, j, PH_NOISY | PH_READONLY, "test/quantum.zep", 77 TSRMLS_CC); - zephir_array_fetch_long(&_59$$10, &_58$$10, 1, PH_NOISY | PH_READONLY, "test/quantum.zep", 77 TSRMLS_CC); - zephir_array_update_multi(&psr, &_59$$10 TSRMLS_CC, SL("ll"), 2, j, 0); + zephir_array_fetch_long(&_57$$10, &psi, j, PH_NOISY | PH_READONLY, "test/quantum.zep", 76); + zephir_array_fetch_long(&_58$$10, &_57$$10, 1, PH_NOISY | PH_READONLY, "test/quantum.zep", 76); + zephir_array_update_multi(&psi, &_58$$10, SL("ll"), 2, j, 0); + zephir_array_fetch_long(&_58$$10, &psr, j, PH_NOISY | PH_READONLY, "test/quantum.zep", 77); + zephir_array_fetch_long(&_59$$10, &_58$$10, 1, PH_NOISY | PH_READONLY, "test/quantum.zep", 77); + zephir_array_update_multi(&psr, &_59$$10, SL("ll"), 2, j, 0); j++; } } diff --git a/ext/test/regexdna.zep.c b/ext/test/regexdna.zep.c index c92e8a9819..3c95c2bf34 100644 --- a/ext/test/regexdna.zep.c +++ b/ext/test/regexdna.zep.c @@ -69,7 +69,7 @@ PHP_METHOD(Test_RegexDNA, process) { ZEPHIR_INIT_VAR(&discard); ZVAL_NULL(&discard); ZEPHIR_INIT_VAR(&variants); - zephir_create_array(&variants, 9, 0 TSRMLS_CC); + zephir_create_array(&variants, 9, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "agggtaaa|tttaccct"); zephir_array_fast_append(&variants, &_0); @@ -172,7 +172,7 @@ PHP_METHOD(Test_RegexDNA, process) { ZEPHIR_INIT_NVAR(&discard); ZVAL_NULL(&discard); ZEPHIR_INIT_VAR(&contents); - zephir_file_get_contents(&contents, path TSRMLS_CC); + zephir_file_get_contents(&contents, path); ZEPHIR_INIT_VAR(&initialLength); ZVAL_LONG(&initialLength, zephir_fast_strlen_ev(&contents)); ZEPHIR_INIT_VAR(&_1); @@ -195,7 +195,7 @@ PHP_METHOD(Test_RegexDNA, process) { ZEPHIR_INIT_NVAR(&_6$$3); ZEPHIR_CONCAT_SVS(&_6$$3, "/", ®ex, "/iS"); ZEPHIR_INIT_NVAR(&_7$$3); - zephir_preg_match(&_7$$3, &_6$$3, &contents, &discard, 1, 0 , 0 TSRMLS_CC); + zephir_preg_match(&_7$$3, &_6$$3, &contents, &discard, 1, 0 , 0 ); zend_print_zval(&_7$$3, 0); php_printf("%c", '\n'); } ZEND_HASH_FOREACH_END(); @@ -215,7 +215,7 @@ PHP_METHOD(Test_RegexDNA, process) { ZEPHIR_INIT_NVAR(&_8$$4); ZEPHIR_CONCAT_SVS(&_8$$4, "/", ®ex, "/iS"); ZEPHIR_INIT_NVAR(&_9$$4); - zephir_preg_match(&_9$$4, &_8$$4, &contents, &discard, 1, 0 , 0 TSRMLS_CC); + zephir_preg_match(&_9$$4, &_8$$4, &contents, &discard, 1, 0 , 0 ); zend_print_zval(&_9$$4, 0); php_printf("%c", '\n'); ZEPHIR_CALL_METHOD(NULL, &variants, "next", NULL, 0); diff --git a/ext/test/requires.zep.c b/ext/test/requires.zep.c index 865872897a..6c52b7e929 100644 --- a/ext/test/requires.zep.c +++ b/ext/test/requires.zep.c @@ -25,7 +25,7 @@ ZEPHIR_INIT_CLASS(Test_Requires) { ZEPHIR_REGISTER_CLASS(Test, Requires, test, requires, test_requires_method_entry, 0); - zend_declare_property_null(test_requires_ce, SL("content"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_requires_ce, SL("content"), ZEND_ACC_PROTECTED); return SUCCESS; @@ -46,7 +46,7 @@ PHP_METHOD(Test_Requires, requireExternal1) { ZEPHIR_OBSERVE_OR_NULLIFY_PPZV(&_0); - if (zephir_require_zval_ret(&_0, path TSRMLS_CC) == FAILURE) { + if (zephir_require_zval_ret(&_0, path) == FAILURE) { RETURN_MM_NULL(); } RETURN_CCTOR(&_0); @@ -64,7 +64,7 @@ PHP_METHOD(Test_Requires, requireExternal2) { - if (zephir_require_zval(path TSRMLS_CC) == FAILURE) { + if (zephir_require_zval(path) == FAILURE) { RETURN_NULL(); } RETURN_BOOL(1); @@ -92,7 +92,7 @@ PHP_METHOD(Test_Requires, requireExternal3) { ZEPHIR_INIT_VAR(&external3); object_init_ex(&external3, test_requires_external3_ce); - if (zephir_has_constructor(&external3 TSRMLS_CC)) { + if (zephir_has_constructor(&external3)) { ZEPHIR_CALL_METHOD(NULL, &external3, "__construct", NULL, 0); zephir_check_call_status(); } @@ -141,7 +141,7 @@ PHP_METHOD(Test_Requires, renderTemplate) { zephir_fetch_params(1, 2, 0, &templatePath_param, ¶ms); if (UNEXPECTED(Z_TYPE_P(templatePath_param) != IS_STRING && Z_TYPE_P(templatePath_param) != IS_NULL)) { - zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'templatePath' must be of the type string") TSRMLS_CC); + zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'templatePath' must be of the type string")); RETURN_MM_NULL(); } if (EXPECTED(Z_TYPE_P(templatePath_param) == IS_STRING)) { @@ -169,7 +169,7 @@ PHP_METHOD(Test_Requires, renderTemplate) { ZEPHIR_INIT_NVAR(&value); ZVAL_COPY(&value, _1$$3); ZEPHIR_CPY_WRT(&_5$$4, &value); - if (zephir_set_symbol(&key, &_5$$4 TSRMLS_CC) == FAILURE) { + if (zephir_set_symbol(&key, &_5$$4) == FAILURE) { return; } } ZEND_HASH_FOREACH_END(); @@ -187,7 +187,7 @@ PHP_METHOD(Test_Requires, renderTemplate) { ZEPHIR_CALL_METHOD(&value, params, "current", NULL, 0); zephir_check_call_status(); ZEPHIR_CPY_WRT(&_6$$5, &value); - if (zephir_set_symbol(&key, &_6$$5 TSRMLS_CC) == FAILURE) { + if (zephir_set_symbol(&key, &_6$$5) == FAILURE) { return; } ZEPHIR_CALL_METHOD(NULL, params, "next", NULL, 0); @@ -198,7 +198,7 @@ PHP_METHOD(Test_Requires, renderTemplate) { ZEPHIR_INIT_NVAR(&key); } ZEPHIR_OBSERVE_OR_NULLIFY_PPZV(&_7); - if (zephir_require_zval_ret(&_7, &templatePath TSRMLS_CC) == FAILURE) { + if (zephir_require_zval_ret(&_7, &templatePath) == FAILURE) { RETURN_MM_NULL(); } RETURN_CCTOR(&_7); diff --git a/ext/test/requires/external3.zep.c b/ext/test/requires/external3.zep.c index dc0cdf3418..b0b0267dc3 100644 --- a/ext/test/requires/external3.zep.c +++ b/ext/test/requires/external3.zep.c @@ -25,7 +25,7 @@ ZEPHIR_INIT_CLASS(Test_Requires_External3) { ZEPHIR_REGISTER_CLASS(Test\\Requires, External3, test, requires_external3, test_requires_external3_method_entry, 0); - zend_declare_property_null(test_requires_external3_ce, SL("someVariable"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_requires_external3_ce, SL("someVariable"), ZEND_ACC_PROTECTED); return SUCCESS; @@ -49,7 +49,7 @@ PHP_METHOD(Test_Requires_External3, req) { ZEPHIR_CALL_FUNCTION(NULL, "ob_clean", NULL, 79); zephir_check_call_status(); - if (zephir_require_zval(path TSRMLS_CC) == FAILURE) { + if (zephir_require_zval(path) == FAILURE) { RETURN_MM_NULL(); } ZEPHIR_CALL_FUNCTION(&_0, "ob_get_contents", NULL, 80); diff --git a/ext/test/resourcetest.zep.c b/ext/test/resourcetest.zep.c index 70a968fcca..63f8b87dfd 100644 --- a/ext/test/resourcetest.zep.c +++ b/ext/test/resourcetest.zep.c @@ -87,7 +87,7 @@ PHP_METHOD(Test_ResourceTest, testTypeOffResource) { ZEPHIR_INIT_VAR(&a); ZEPHIR_GET_CONSTANT(&a, "STDIN"); ZEPHIR_INIT_VAR(&_0); - zephir_gettype(&_0, &a TSRMLS_CC); + zephir_gettype(&_0, &a); RETURN_CCTOR(&_0); } diff --git a/ext/test/router.zep.c b/ext/test/router.zep.c index 49e92b900c..01706e0b86 100644 --- a/ext/test/router.zep.c +++ b/ext/test/router.zep.c @@ -52,41 +52,41 @@ ZEPHIR_INIT_CLASS(Test_Router) { ZEPHIR_REGISTER_CLASS(Test, Router, test, router, test_router_method_entry, 0); - zend_declare_property_null(test_router_ce, SL("_dependencyInjector"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_router_ce, SL("_dependencyInjector"), ZEND_ACC_PROTECTED); - zend_declare_property_null(test_router_ce, SL("_uriSource"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_router_ce, SL("_uriSource"), ZEND_ACC_PROTECTED); - zend_declare_property_null(test_router_ce, SL("_namespace"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_router_ce, SL("_namespace"), ZEND_ACC_PROTECTED); - zend_declare_property_null(test_router_ce, SL("_module"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_router_ce, SL("_module"), ZEND_ACC_PROTECTED); - zend_declare_property_null(test_router_ce, SL("_controller"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_router_ce, SL("_controller"), ZEND_ACC_PROTECTED); - zend_declare_property_null(test_router_ce, SL("_action"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_router_ce, SL("_action"), ZEND_ACC_PROTECTED); - zend_declare_property_null(test_router_ce, SL("_params"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_router_ce, SL("_params"), ZEND_ACC_PROTECTED); - zend_declare_property_null(test_router_ce, SL("_routes"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_router_ce, SL("_routes"), ZEND_ACC_PROTECTED); - zend_declare_property_null(test_router_ce, SL("_matchedRoute"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_router_ce, SL("_matchedRoute"), ZEND_ACC_PROTECTED); - zend_declare_property_null(test_router_ce, SL("_matches"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_router_ce, SL("_matches"), ZEND_ACC_PROTECTED); - zend_declare_property_bool(test_router_ce, SL("_wasMatched"), 0, ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_bool(test_router_ce, SL("_wasMatched"), 0, ZEND_ACC_PROTECTED); - zend_declare_property_null(test_router_ce, SL("_defaultNamespace"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_router_ce, SL("_defaultNamespace"), ZEND_ACC_PROTECTED); - zend_declare_property_null(test_router_ce, SL("_defaultModule"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_router_ce, SL("_defaultModule"), ZEND_ACC_PROTECTED); - zend_declare_property_null(test_router_ce, SL("_defaultController"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_router_ce, SL("_defaultController"), ZEND_ACC_PROTECTED); - zend_declare_property_null(test_router_ce, SL("_defaultAction"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_router_ce, SL("_defaultAction"), ZEND_ACC_PROTECTED); - zend_declare_property_null(test_router_ce, SL("_defaultParams"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_router_ce, SL("_defaultParams"), ZEND_ACC_PROTECTED); - zend_declare_property_null(test_router_ce, SL("_removeExtraSlashes"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_router_ce, SL("_removeExtraSlashes"), ZEND_ACC_PROTECTED); - zend_declare_property_null(test_router_ce, SL("_notFoundPaths"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_router_ce, SL("_notFoundPaths"), ZEND_ACC_PROTECTED); zephir_declare_class_constant_long(test_router_ce, SL("URI_SOURCE_GET_URL"), 0); @@ -135,7 +135,7 @@ PHP_METHOD(Test_Router, __construct) { ZEPHIR_INIT_VAR(&_0$$3); object_init_ex(&_0$$3, test_router_route_ce); ZEPHIR_INIT_VAR(&_1$$3); - zephir_create_array(&_1$$3, 1, 0 TSRMLS_CC); + zephir_create_array(&_1$$3, 1, 0); add_assoc_long_ex(&_1$$3, SL("controller"), 1); ZEPHIR_INIT_VAR(&_2$$3); ZVAL_STRING(&_2$$3, "#^/([a-zA-Z0-9\\_\\-]+)[/]{0,1}$#"); @@ -145,7 +145,7 @@ PHP_METHOD(Test_Router, __construct) { ZEPHIR_INIT_NVAR(&_2$$3); object_init_ex(&_2$$3, test_router_route_ce); ZEPHIR_INIT_VAR(&_4$$3); - zephir_create_array(&_4$$3, 3, 0 TSRMLS_CC); + zephir_create_array(&_4$$3, 3, 0); add_assoc_long_ex(&_4$$3, SL("controller"), 1); add_assoc_long_ex(&_4$$3, SL("action"), 2); add_assoc_long_ex(&_4$$3, SL("params"), 3); @@ -231,8 +231,8 @@ PHP_METHOD(Test_Router, getRewriteUri) { ZEPHIR_OBS_NVAR(&url); if (zephir_array_isset_string_fetch(&url, &_SERVER, SL("REQUEST_URI"), 0)) { ZEPHIR_INIT_VAR(&urlParts); - zephir_fast_explode_str(&urlParts, SL("?"), &url, LONG_MAX TSRMLS_CC); - zephir_array_fetch_long(&realUri, &urlParts, 0, PH_NOISY | PH_READONLY, "test/router.zep", 142 TSRMLS_CC); + zephir_fast_explode_str(&urlParts, SL("?"), &url, LONG_MAX); + zephir_array_fetch_long(&realUri, &urlParts, 0, PH_NOISY | PH_READONLY, "test/router.zep", 142); if (!(zephir_is_true(&realUri))) { RETURN_CTOR(&realUri); } @@ -630,7 +630,7 @@ PHP_METHOD(Test_Router, handle) { } ZEPHIR_INIT_NVAR(&_8$$17); ZEPHIR_INIT_NVAR(&matched); - zephir_preg_match(&matched, ®exHostName, ¤tHostName, &_8$$17, 0, 0 , 0 TSRMLS_CC); + zephir_preg_match(&matched, ®exHostName, ¤tHostName, &_8$$17, 0, 0 , 0 ); } else { ZEPHIR_INIT_NVAR(&matched); ZVAL_BOOL(&matched, ZEPHIR_IS_EQUAL(¤tHostName, &hostname)); @@ -643,7 +643,7 @@ PHP_METHOD(Test_Router, handle) { zephir_check_call_status(); if (zephir_memnstr_str(&pattern, SL("^"), "test/router.zep", 399)) { ZEPHIR_INIT_NVAR(&routeFound); - zephir_preg_match(&routeFound, &pattern, &handledUri, &matches, 0, 0 , 0 TSRMLS_CC); + zephir_preg_match(&routeFound, &pattern, &handledUri, &matches, 0, 0 , 0 ); } else { ZEPHIR_INIT_NVAR(&routeFound); ZVAL_BOOL(&routeFound, ZEPHIR_IS_EQUAL(&pattern, &handledUri)); @@ -652,7 +652,7 @@ PHP_METHOD(Test_Router, handle) { ZEPHIR_CALL_METHOD(&beforeMatch, &route, "getbeforematch", NULL, 0); zephir_check_call_status(); if (Z_TYPE_P(&beforeMatch) != IS_NULL) { - if (zephir_is_callable(&beforeMatch TSRMLS_CC)) { + if (zephir_is_callable(&beforeMatch)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(test_router_exception_ce, "Before-Match callback is not callable in matched route", "test/router.zep", 413); return; } @@ -678,7 +678,7 @@ PHP_METHOD(Test_Router, handle) { ZEPHIR_INIT_NVAR(&position); ZVAL_COPY(&position, _9$$28); ZEPHIR_OBS_NVAR(&matchPosition); - if (zephir_array_isset_fetch(&matchPosition, &matches, &position, 0 TSRMLS_CC)) { + if (zephir_array_isset_fetch(&matchPosition, &matches, &position, 0)) { if (Z_TYPE_P(&converters) == IS_ARRAY) { if (zephir_array_isset(&converters, &part)) { continue; @@ -706,7 +706,7 @@ PHP_METHOD(Test_Router, handle) { ZEPHIR_CALL_METHOD(&position, &paths, "current", NULL, 0); zephir_check_call_status(); ZEPHIR_OBS_NVAR(&matchPosition); - if (zephir_array_isset_fetch(&matchPosition, &matches, &position, 0 TSRMLS_CC)) { + if (zephir_array_isset_fetch(&matchPosition, &matches, &position, 0)) { if (Z_TYPE_P(&converters) == IS_ARRAY) { if (zephir_array_isset(&converters, &part)) { continue; @@ -794,7 +794,7 @@ PHP_METHOD(Test_Router, handle) { } ZEPHIR_INIT_NVAR(&_17$$51); ZEPHIR_INIT_NVAR(&matched); - zephir_preg_match(&matched, ®exHostName, ¤tHostName, &_17$$51, 0, 0 , 0 TSRMLS_CC); + zephir_preg_match(&matched, ®exHostName, ¤tHostName, &_17$$51, 0, 0 , 0 ); } else { ZEPHIR_INIT_NVAR(&matched); ZVAL_BOOL(&matched, ZEPHIR_IS_EQUAL(¤tHostName, &hostname)); @@ -807,7 +807,7 @@ PHP_METHOD(Test_Router, handle) { zephir_check_call_status(); if (zephir_memnstr_str(&pattern, SL("^"), "test/router.zep", 399)) { ZEPHIR_INIT_NVAR(&routeFound); - zephir_preg_match(&routeFound, &pattern, &handledUri, &matches, 0, 0 , 0 TSRMLS_CC); + zephir_preg_match(&routeFound, &pattern, &handledUri, &matches, 0, 0 , 0 ); } else { ZEPHIR_INIT_NVAR(&routeFound); ZVAL_BOOL(&routeFound, ZEPHIR_IS_EQUAL(&pattern, &handledUri)); @@ -816,7 +816,7 @@ PHP_METHOD(Test_Router, handle) { ZEPHIR_CALL_METHOD(&beforeMatch, &route, "getbeforematch", NULL, 0); zephir_check_call_status(); if (Z_TYPE_P(&beforeMatch) != IS_NULL) { - if (zephir_is_callable(&beforeMatch TSRMLS_CC)) { + if (zephir_is_callable(&beforeMatch)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(test_router_exception_ce, "Before-Match callback is not callable in matched route", "test/router.zep", 413); return; } @@ -842,7 +842,7 @@ PHP_METHOD(Test_Router, handle) { ZEPHIR_INIT_NVAR(&position); ZVAL_COPY(&position, _18$$62); ZEPHIR_OBS_NVAR(&matchPosition); - if (zephir_array_isset_fetch(&matchPosition, &matches, &position, 0 TSRMLS_CC)) { + if (zephir_array_isset_fetch(&matchPosition, &matches, &position, 0)) { if (Z_TYPE_P(&converters) == IS_ARRAY) { if (zephir_array_isset(&converters, &part)) { continue; @@ -870,7 +870,7 @@ PHP_METHOD(Test_Router, handle) { ZEPHIR_CALL_METHOD(&position, &paths, "current", NULL, 0); zephir_check_call_status(); ZEPHIR_OBS_NVAR(&matchPosition); - if (zephir_array_isset_fetch(&matchPosition, &matches, &position, 0 TSRMLS_CC)) { + if (zephir_array_isset_fetch(&matchPosition, &matches, &position, 0)) { if (Z_TYPE_P(&converters) == IS_ARRAY) { if (zephir_array_isset(&converters, &part)) { continue; @@ -969,13 +969,13 @@ PHP_METHOD(Test_Router, handle) { zephir_substr(&strParams, ¶msStr, 1 , 0, ZEPHIR_SUBSTR_NO_LENGTH); if (zephir_is_true(&strParams)) { ZEPHIR_INIT_NVAR(¶ms); - zephir_fast_explode_str(¶ms, SL("/"), &strParams, LONG_MAX TSRMLS_CC); + zephir_fast_explode_str(¶ms, SL("/"), &strParams, LONG_MAX); } zephir_array_unset_string(&parts, SL("params"), PH_SEPARATE); } - if (zephir_fast_count_int(¶ms TSRMLS_CC)) { + if (zephir_fast_count_int(¶ms)) { ZEPHIR_INIT_VAR(¶msMerge); - zephir_fast_array_merge(¶msMerge, ¶ms, &parts TSRMLS_CC); + zephir_fast_array_merge(¶msMerge, ¶ms, &parts); } else { ZEPHIR_CPY_WRT(¶msMerge, &parts); } @@ -1329,7 +1329,7 @@ PHP_METHOD(Test_Router, mount) { } ZEPHIR_CALL_METHOD(&groupRoutes, group, "getroutes", NULL, 0); zephir_check_call_status(); - if (!(zephir_fast_count_int(&groupRoutes TSRMLS_CC))) { + if (!(zephir_fast_count_int(&groupRoutes))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(test_router_exception_ce, "The group of routes does not contain any routes", "test/router.zep", 682); return; } @@ -1399,7 +1399,7 @@ PHP_METHOD(Test_Router, mount) { zephir_read_property(&routes, this_ptr, SL("_routes"), PH_NOISY_CC); if (Z_TYPE_P(&routes) == IS_ARRAY) { ZEPHIR_INIT_VAR(&_4$$11); - zephir_fast_array_merge(&_4$$11, &routes, &groupRoutes TSRMLS_CC); + zephir_fast_array_merge(&_4$$11, &routes, &groupRoutes); zephir_update_property_zval(this_ptr, SL("_routes"), &_4$$11); } else { zephir_update_property_zval(this_ptr, SL("_routes"), &groupRoutes); diff --git a/ext/test/router/route.zep.c b/ext/test/router/route.zep.c index 8f901c4f99..12dacf41e9 100644 --- a/ext/test/router/route.zep.c +++ b/ext/test/router/route.zep.c @@ -31,23 +31,23 @@ ZEPHIR_INIT_CLASS(Test_Router_Route) { ZEPHIR_REGISTER_CLASS(Test\\Router, Route, test, router_route, test_router_route_method_entry, 0); - zend_declare_property_null(test_router_route_ce, SL("_pattern"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_router_route_ce, SL("_pattern"), ZEND_ACC_PROTECTED); - zend_declare_property_null(test_router_route_ce, SL("_compiledPattern"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_router_route_ce, SL("_compiledPattern"), ZEND_ACC_PROTECTED); - zend_declare_property_null(test_router_route_ce, SL("_paths"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_router_route_ce, SL("_paths"), ZEND_ACC_PROTECTED); - zend_declare_property_null(test_router_route_ce, SL("_methods"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_router_route_ce, SL("_methods"), ZEND_ACC_PROTECTED); - zend_declare_property_null(test_router_route_ce, SL("_hostname"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_router_route_ce, SL("_hostname"), ZEND_ACC_PROTECTED); - zend_declare_property_null(test_router_route_ce, SL("_converters"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_router_route_ce, SL("_converters"), ZEND_ACC_PROTECTED); - zend_declare_property_null(test_router_route_ce, SL("_id"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_router_route_ce, SL("_id"), ZEND_ACC_PROTECTED); - zend_declare_property_null(test_router_route_ce, SL("_name"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_router_route_ce, SL("_name"), ZEND_ACC_PROTECTED); - zend_declare_property_null(test_router_route_ce, SL("_beforeMatch"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_router_route_ce, SL("_beforeMatch"), ZEND_ACC_PROTECTED); return SUCCESS; @@ -134,28 +134,28 @@ PHP_METHOD(Test_Router_Route, compilePattern) { ZEPHIR_INIT_VAR(&_0$$4); ZEPHIR_INIT_VAR(&_1$$4); ZVAL_STRING(&_1$$4, "/:module"); - zephir_fast_str_replace(&_0$$4, &_1$$4, &idPattern, pattern TSRMLS_CC); + zephir_fast_str_replace(&_0$$4, &_1$$4, &idPattern, pattern); ZEPHIR_CPY_WRT(pattern, &_0$$4); } if (zephir_memnstr_str(pattern, SL("/:controller"), "test/router/route.zep", 67)) { ZEPHIR_INIT_VAR(&_2$$5); ZEPHIR_INIT_VAR(&_3$$5); ZVAL_STRING(&_3$$5, "/:controller"); - zephir_fast_str_replace(&_2$$5, &_3$$5, &idPattern, pattern TSRMLS_CC); + zephir_fast_str_replace(&_2$$5, &_3$$5, &idPattern, pattern); ZEPHIR_CPY_WRT(pattern, &_2$$5); } if (zephir_memnstr_str(pattern, SL("/:namespace"), "test/router/route.zep", 72)) { ZEPHIR_INIT_VAR(&_4$$6); ZEPHIR_INIT_VAR(&_5$$6); ZVAL_STRING(&_5$$6, "/:namespace"); - zephir_fast_str_replace(&_4$$6, &_5$$6, &idPattern, pattern TSRMLS_CC); + zephir_fast_str_replace(&_4$$6, &_5$$6, &idPattern, pattern); ZEPHIR_CPY_WRT(pattern, &_4$$6); } if (zephir_memnstr_str(pattern, SL("/:action"), "test/router/route.zep", 77)) { ZEPHIR_INIT_VAR(&_6$$7); ZEPHIR_INIT_VAR(&_7$$7); ZVAL_STRING(&_7$$7, "/:action"); - zephir_fast_str_replace(&_6$$7, &_7$$7, &idPattern, pattern TSRMLS_CC); + zephir_fast_str_replace(&_6$$7, &_7$$7, &idPattern, pattern); ZEPHIR_CPY_WRT(pattern, &_6$$7); } if (zephir_memnstr_str(pattern, SL("/:params"), "test/router/route.zep", 82)) { @@ -164,7 +164,7 @@ PHP_METHOD(Test_Router_Route, compilePattern) { ZVAL_STRING(&_9$$8, "/:params"); ZEPHIR_INIT_VAR(&_10$$8); ZVAL_STRING(&_10$$8, "(/.*)*"); - zephir_fast_str_replace(&_8$$8, &_9$$8, &_10$$8, pattern TSRMLS_CC); + zephir_fast_str_replace(&_8$$8, &_9$$8, &_10$$8, pattern); ZEPHIR_CPY_WRT(pattern, &_8$$8); } if (zephir_memnstr_str(pattern, SL("/:int"), "test/router/route.zep", 87)) { @@ -173,7 +173,7 @@ PHP_METHOD(Test_Router_Route, compilePattern) { ZVAL_STRING(&_12$$9, "/:int"); ZEPHIR_INIT_VAR(&_13$$9); ZVAL_STRING(&_13$$9, "/([0-9]+)"); - zephir_fast_str_replace(&_11$$9, &_12$$9, &_13$$9, pattern TSRMLS_CC); + zephir_fast_str_replace(&_11$$9, &_12$$9, &_13$$9, pattern); ZEPHIR_CPY_WRT(pattern, &_11$$9); } } @@ -403,17 +403,17 @@ PHP_METHOD(Test_Router_Route, extractNamedParams) { } } if (foundPattern != 2) { - zephir_concat_self_str(&route, "(", sizeof("(")-1 TSRMLS_CC); - zephir_concat_self(&route, ®exp TSRMLS_CC); - zephir_concat_self_str(&route, ")", sizeof(")")-1 TSRMLS_CC); + zephir_concat_self_str(&route, "(", sizeof("(") - 1); + zephir_concat_self(&route, ®exp); + zephir_concat_self_str(&route, ")", sizeof(")") - 1); } else { - zephir_concat_self(&route, ®exp TSRMLS_CC); + zephir_concat_self(&route, ®exp); } ZEPHIR_INIT_NVAR(&_27$$19); ZVAL_LONG(&_27$$19, tmp); zephir_array_update_zval(&matches, &variable, &_27$$19, PH_COPY | PH_SEPARATE); } else { - zephir_concat_self_str(&route, "([^/]*)", sizeof("([^/]*)")-1 TSRMLS_CC); + zephir_concat_self_str(&route, "([^/]*)", sizeof("([^/]*)") - 1); ZEPHIR_INIT_NVAR(&_28$$28); ZVAL_LONG(&_28$$28, tmp); zephir_array_update_zval(&matches, &item, &_28$$28, PH_COPY | PH_SEPARATE); @@ -421,7 +421,7 @@ PHP_METHOD(Test_Router_Route, extractNamedParams) { } else { ZEPHIR_INIT_NVAR(&_29$$29); ZEPHIR_CONCAT_SVS(&_29$$29, "{", &item, "}"); - zephir_concat_self(&route, &_29$$29 TSRMLS_CC); + zephir_concat_self(&route, &_29$$29); } continue; } @@ -444,10 +444,10 @@ PHP_METHOD(Test_Router_Route, extractNamedParams) { if (bracketCount > 0) { intermediate++; } else { - zephir_concat_self_char(&route, ch TSRMLS_CC); + zephir_concat_self_char(&route, ch); } } - zephir_create_array(return_value, 2, 0 TSRMLS_CC); + zephir_create_array(return_value, 2, 0); zephir_array_fast_append(return_value, &route); zephir_array_fast_append(return_value, &matches); RETURN_MM(); @@ -506,28 +506,28 @@ PHP_METHOD(Test_Router_Route, reConfigure) { ZEPHIR_INIT_VAR(&actionName); ZVAL_NULL(&actionName); ZEPHIR_INIT_VAR(&parts); - zephir_fast_explode_str(&parts, SL("::"), paths, LONG_MAX TSRMLS_CC); + zephir_fast_explode_str(&parts, SL("::"), paths, LONG_MAX); do { - _0$$5 = zephir_fast_count_int(&parts TSRMLS_CC); + _0$$5 = zephir_fast_count_int(&parts); if (_0$$5 == 3) { ZEPHIR_OBS_NVAR(&moduleName); - zephir_array_fetch_long(&moduleName, &parts, 0, PH_NOISY, "test/router/route.zep", 286 TSRMLS_CC); + zephir_array_fetch_long(&moduleName, &parts, 0, PH_NOISY, "test/router/route.zep", 286); ZEPHIR_OBS_NVAR(&controllerName); - zephir_array_fetch_long(&controllerName, &parts, 1, PH_NOISY, "test/router/route.zep", 287 TSRMLS_CC); + zephir_array_fetch_long(&controllerName, &parts, 1, PH_NOISY, "test/router/route.zep", 287); ZEPHIR_OBS_NVAR(&actionName); - zephir_array_fetch_long(&actionName, &parts, 2, PH_NOISY, "test/router/route.zep", 288 TSRMLS_CC); + zephir_array_fetch_long(&actionName, &parts, 2, PH_NOISY, "test/router/route.zep", 288); break; } if (_0$$5 == 2) { ZEPHIR_OBS_NVAR(&controllerName); - zephir_array_fetch_long(&controllerName, &parts, 0, PH_NOISY, "test/router/route.zep", 291 TSRMLS_CC); + zephir_array_fetch_long(&controllerName, &parts, 0, PH_NOISY, "test/router/route.zep", 291); ZEPHIR_OBS_NVAR(&actionName); - zephir_array_fetch_long(&actionName, &parts, 1, PH_NOISY, "test/router/route.zep", 292 TSRMLS_CC); + zephir_array_fetch_long(&actionName, &parts, 1, PH_NOISY, "test/router/route.zep", 292); break; } if (_0$$5 == 1) { ZEPHIR_OBS_NVAR(&controllerName); - zephir_array_fetch_long(&controllerName, &parts, 0, PH_NOISY, "test/router/route.zep", 295 TSRMLS_CC); + zephir_array_fetch_long(&controllerName, &parts, 0, PH_NOISY, "test/router/route.zep", 295); break; } } while(0); @@ -540,9 +540,9 @@ PHP_METHOD(Test_Router_Route, reConfigure) { if (Z_TYPE_P(&controllerName) != IS_NULL) { if (zephir_memnstr_str(&controllerName, SL("\\"), "test/router/route.zep", 310)) { ZEPHIR_INIT_VAR(&realClassName); - zephir_get_class_ns(&realClassName, &controllerName, 0 TSRMLS_CC); + zephir_get_class_ns(&realClassName, &controllerName, 0); ZEPHIR_INIT_VAR(&namespaceName); - zephir_get_ns_class(&namespaceName, &controllerName, 0 TSRMLS_CC); + zephir_get_ns_class(&namespaceName, &controllerName, 0); if (zephir_is_true(&namespaceName)) { zephir_array_update_string(&routePaths, SL("namespace"), &namespaceName, PH_COPY | PH_SEPARATE); } @@ -572,10 +572,10 @@ PHP_METHOD(Test_Router_Route, reConfigure) { ZEPHIR_CALL_METHOD(&extracted, this_ptr, "extractnamedparams", NULL, 0, pattern); zephir_check_call_status(); ZEPHIR_OBS_VAR(&pcrePattern); - zephir_array_fetch_long(&pcrePattern, &extracted, 0, PH_NOISY, "test/router/route.zep", 351 TSRMLS_CC); + zephir_array_fetch_long(&pcrePattern, &extracted, 0, PH_NOISY, "test/router/route.zep", 351); ZEPHIR_INIT_VAR(&_2$$19); - zephir_array_fetch_long(&_3$$19, &extracted, 1, PH_NOISY | PH_READONLY, "test/router/route.zep", 352 TSRMLS_CC); - zephir_fast_array_merge(&_2$$19, &routePaths, &_3$$19 TSRMLS_CC); + zephir_array_fetch_long(&_3$$19, &extracted, 1, PH_NOISY | PH_READONLY, "test/router/route.zep", 352); + zephir_fast_array_merge(&_2$$19, &routePaths, &_3$$19); ZEPHIR_CPY_WRT(&routePaths, &_2$$19); } else { ZEPHIR_CPY_WRT(&pcrePattern, pattern); diff --git a/ext/test/scall.zep.c b/ext/test/scall.zep.c index d29706d9f2..6a92442149 100644 --- a/ext/test/scall.zep.c +++ b/ext/test/scall.zep.c @@ -513,7 +513,7 @@ PHP_METHOD(Test_Scall, interpolatedStaticReturn) { ZVAL_STRING(&className, "Test\\Scall"); ZEPHIR_INIT_VAR(&methodName); ZVAL_STRING(&methodName, "testMethodStatic"); - _0 = zephir_fetch_class(&className TSRMLS_CC); + _0 = zephir_fetch_class(&className); ZEPHIR_RETURN_CALL_CE_STATIC_ZVAL(_0, methodName, NULL, 0); zephir_check_call_status(); RETURN_MM(); @@ -539,7 +539,7 @@ PHP_METHOD(Test_Scall, interpolatedStaticEcho) { ZVAL_STRING(&className, "Test\\Scall"); ZEPHIR_INIT_VAR(&methodName); ZVAL_STRING(&methodName, "testMethodStatic"); - _1 = zephir_fetch_class(&className TSRMLS_CC); + _1 = zephir_fetch_class(&className); ZEPHIR_CALL_CE_STATIC_ZVAL(&_0, _1, methodName, NULL, 0); zephir_check_call_status(); zend_print_zval(&_0, 0); diff --git a/ext/test/scallexternal.zep.c b/ext/test/scallexternal.zep.c index 2a1a212a4e..c29c523777 100644 --- a/ext/test/scallexternal.zep.c +++ b/ext/test/scallexternal.zep.c @@ -25,7 +25,7 @@ ZEPHIR_INIT_CLASS(Test_ScallExternal) { ZEPHIR_REGISTER_CLASS(Test, ScallExternal, test, scallexternal, test_scallexternal_method_entry, 0); - zend_declare_property_null(test_scallexternal_ce, SL("sproperty"), ZEND_ACC_PUBLIC|ZEND_ACC_STATIC TSRMLS_CC); + zend_declare_property_null(test_scallexternal_ce, SL("sproperty"), ZEND_ACC_PUBLIC|ZEND_ACC_STATIC); return SUCCESS; diff --git a/ext/test/scope.zep.c b/ext/test/scope.zep.c index ef49ddd59f..03f2ceab1f 100644 --- a/ext/test/scope.zep.c +++ b/ext/test/scope.zep.c @@ -81,7 +81,7 @@ PHP_METHOD(Test_Scope, test1) { if (r == 1) { ZEPHIR_INIT_VAR(&k$$3); ZVAL_STRING(&k$$3, "test"); - zephir_concat_self(&ret, &k$$3 TSRMLS_CC); + zephir_concat_self(&ret, &k$$3); } ZEPHIR_CONCAT_VV(return_value, &ret, &k); RETURN_MM(); @@ -130,7 +130,7 @@ PHP_METHOD(Test_Scope, test2) { ZEPHIR_CPY_WRT(&k, &_4$$3); } } - zephir_create_array(return_value, 2, 0 TSRMLS_CC); + zephir_create_array(return_value, 2, 0); ZEPHIR_INIT_VAR(&_5); ZVAL_LONG(&_5, p); zephir_array_fast_append(return_value, &_5); @@ -173,7 +173,7 @@ PHP_METHOD(Test_Scope, test3) { ZVAL_LONG(&c, _1); ZEPHIR_CALL_SELF(&str$$3, "getdystr", &_3, 86, &c); zephir_check_call_status(); - zephir_concat_self(&k, &str$$3 TSRMLS_CC); + zephir_concat_self(&k, &str$$3); } } RETURN_CCTOR(&k); diff --git a/ext/test/sort.zep.c b/ext/test/sort.zep.c index 29bfc9cc47..e00b05508c 100644 --- a/ext/test/sort.zep.c +++ b/ext/test/sort.zep.c @@ -55,12 +55,12 @@ PHP_METHOD(Test_Sort, quick) { zephir_get_arrval(&arr, arr_param); - length = zephir_fast_count_int(&arr TSRMLS_CC); + length = zephir_fast_count_int(&arr); if (length <= 1) { RETURN_CTOR(&arr); } ZEPHIR_OBS_VAR(&_0); - zephir_array_fetch_long(&_0, &arr, 0, PH_NOISY, "test/sort.zep", 18 TSRMLS_CC); + zephir_array_fetch_long(&_0, &arr, 0, PH_NOISY, "test/sort.zep", 18); pivot = zephir_get_intval(&_0); ZEPHIR_INIT_VAR(&left); array_init(&left); @@ -81,7 +81,7 @@ PHP_METHOD(Test_Sort, quick) { } i = _2; ZEPHIR_OBS_NVAR(&_4$$4); - zephir_array_fetch_long(&_4$$4, &arr, i, PH_NOISY, "test/sort.zep", 23 TSRMLS_CC); + zephir_array_fetch_long(&_4$$4, &arr, i, PH_NOISY, "test/sort.zep", 23); item = zephir_get_intval(&_4$$4); if (item < pivot) { ZEPHIR_INIT_NVAR(&_5$$5); @@ -97,7 +97,7 @@ PHP_METHOD(Test_Sort, quick) { ZEPHIR_CALL_METHOD(&_7, this_ptr, "quick", &_8, 87, &left); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_9); - zephir_create_array(&_9, 1, 0 TSRMLS_CC); + zephir_create_array(&_9, 1, 0); ZEPHIR_INIT_VAR(&_10); ZVAL_LONG(&_10, pivot); zephir_array_fast_append(&_9, &_10); diff --git a/ext/test/spectralnorm.zep.c b/ext/test/spectralnorm.zep.c index 8ec2336a89..5c7f4f0bb3 100644 --- a/ext/test/spectralnorm.zep.c +++ b/ext/test/spectralnorm.zep.c @@ -53,7 +53,7 @@ PHP_METHOD(Test_SpectralNorm, Ax) { zephir_add_function(&_0, i, j); ZEPHIR_INIT_VAR(&_1); zephir_add_function(&_1, i, j); - RETURN_MM_DOUBLE(zephir_safe_div_long_double((double) 1, ((zephir_safe_div_long_long((zephir_get_numberval(&_0) * (zephir_get_numberval(&_1) + 1)), 2 TSRMLS_CC) + zephir_get_numberval(i)) + (double) (1)) TSRMLS_CC)); + RETURN_MM_DOUBLE(zephir_safe_div_long_double((double) 1, ((zephir_safe_div_long_long((zephir_get_numberval(&_0) * (zephir_get_numberval(&_1) + 1)), 2) + zephir_get_numberval(i)) + (double) (1)))); } @@ -119,7 +119,7 @@ PHP_METHOD(Test_SpectralNorm, Au) { ZEPHIR_CALL_METHOD(&_10$$4, u, "offsetget", &_11, 0, &_7$$4); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_12$$4); - mul_function(&_12$$4, &_6$$4, &_10$$4 TSRMLS_CC); + mul_function(&_12$$4, &_6$$4, &_10$$4); t += zephir_get_numberval(&_12$$4); } } @@ -195,7 +195,7 @@ PHP_METHOD(Test_SpectralNorm, Atu) { ZEPHIR_CALL_METHOD(&_10$$4, u, "offsetget", &_11, 0, &_7$$4); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_12$$4); - mul_function(&_12$$4, &_6$$4, &_10$$4 TSRMLS_CC); + mul_function(&_12$$4, &_6$$4, &_10$$4); t += zephir_get_numberval(&_12$$4); } } @@ -350,7 +350,7 @@ PHP_METHOD(Test_SpectralNorm, process) { ZEPHIR_CALL_METHOD(&_18$$5, &v, "offsetget", &_17, 95, &_16$$5); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_19$$5); - mul_function(&_19$$5, &_15$$5, &_18$$5 TSRMLS_CC); + mul_function(&_19$$5, &_15$$5, &_18$$5); vBv += zephir_get_numberval(&_19$$5); ZVAL_LONG(&_16$$5, i); ZEPHIR_CALL_METHOD(&_15$$5, &v, "offsetget", &_17, 95, &_16$$5); @@ -359,12 +359,12 @@ PHP_METHOD(Test_SpectralNorm, process) { ZEPHIR_CALL_METHOD(&_18$$5, &v, "offsetget", &_17, 95, &_16$$5); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_20$$5); - mul_function(&_20$$5, &_15$$5, &_18$$5 TSRMLS_CC); + mul_function(&_20$$5, &_15$$5, &_18$$5); vv += zephir_get_numberval(&_20$$5); } } - ZVAL_DOUBLE(&_0, zephir_safe_div_long_long(vBv, vv TSRMLS_CC)); - RETURN_MM_DOUBLE(sqrt(zephir_safe_div_long_long(vBv, vv TSRMLS_CC))); + ZVAL_DOUBLE(&_0, zephir_safe_div_long_long(vBv, vv)); + RETURN_MM_DOUBLE(sqrt(zephir_safe_div_long_long(vBv, vv))); } diff --git a/ext/test/spropertyaccess.zep.c b/ext/test/spropertyaccess.zep.c index cbe72f82da..c94d1aeefd 100644 --- a/ext/test/spropertyaccess.zep.c +++ b/ext/test/spropertyaccess.zep.c @@ -25,13 +25,13 @@ ZEPHIR_INIT_CLASS(Test_SPropertyAccess) { ZEPHIR_REGISTER_CLASS(Test, SPropertyAccess, test, spropertyaccess, test_spropertyaccess_method_entry, 0); - zend_declare_property_null(test_spropertyaccess_ce, SL("a"), ZEND_ACC_PROTECTED|ZEND_ACC_STATIC TSRMLS_CC); + zend_declare_property_null(test_spropertyaccess_ce, SL("a"), ZEND_ACC_PROTECTED|ZEND_ACC_STATIC); - zend_declare_property_null(test_spropertyaccess_ce, SL("b"), ZEND_ACC_PRIVATE|ZEND_ACC_STATIC TSRMLS_CC); + zend_declare_property_null(test_spropertyaccess_ce, SL("b"), ZEND_ACC_PRIVATE|ZEND_ACC_STATIC); - zend_declare_property_string(test_spropertyaccess_ce, SL("delimiter"), ".", ZEND_ACC_PROTECTED|ZEND_ACC_STATIC TSRMLS_CC); + zend_declare_property_string(test_spropertyaccess_ce, SL("delimiter"), ".", ZEND_ACC_PROTECTED|ZEND_ACC_STATIC); - zend_declare_property_string(test_spropertyaccess_ce, SL("_delimiterWithUnderscore"), ".", ZEND_ACC_PROTECTED|ZEND_ACC_STATIC TSRMLS_CC); + zend_declare_property_string(test_spropertyaccess_ce, SL("_delimiterWithUnderscore"), ".", ZEND_ACC_PROTECTED|ZEND_ACC_STATIC); return SUCCESS; diff --git a/ext/test/statements.zep.c b/ext/test/statements.zep.c index 46210898d4..869286cfb0 100644 --- a/ext/test/statements.zep.c +++ b/ext/test/statements.zep.c @@ -26,22 +26,22 @@ ZEPHIR_INIT_CLASS(Test_Statements) { ZEPHIR_REGISTER_CLASS(Test, Statements, test, statements, test_statements_method_entry, 0); - zend_declare_property_string(test_statements_ce, SL("tmp1"), "test", ZEND_ACC_PUBLIC TSRMLS_CC); + zend_declare_property_string(test_statements_ce, SL("tmp1"), "test", ZEND_ACC_PUBLIC); - zend_declare_property_string(test_statements_ce, SL("tmp2"), "test string", ZEND_ACC_PUBLIC TSRMLS_CC); + zend_declare_property_string(test_statements_ce, SL("tmp2"), "test string", ZEND_ACC_PUBLIC); /** * @issue https://github.com/phalcon/zephir/issues/544 */ - zend_declare_property_long(test_statements_ce, SL("totalSteps"), 100, ZEND_ACC_PRIVATE TSRMLS_CC); + zend_declare_property_long(test_statements_ce, SL("totalSteps"), 100, ZEND_ACC_PRIVATE); - zend_declare_property_long(test_statements_ce, SL("width"), 100, ZEND_ACC_PRIVATE TSRMLS_CC); + zend_declare_property_long(test_statements_ce, SL("width"), 100, ZEND_ACC_PRIVATE); - zend_declare_property_string(test_statements_ce, SL("filledChar"), "=", ZEND_ACC_PRIVATE TSRMLS_CC); + zend_declare_property_string(test_statements_ce, SL("filledChar"), "=", ZEND_ACC_PRIVATE); - zend_declare_property_string(test_statements_ce, SL("unfilledChar"), ".", ZEND_ACC_PRIVATE TSRMLS_CC); + zend_declare_property_string(test_statements_ce, SL("unfilledChar"), ".", ZEND_ACC_PRIVATE); - zend_declare_property_string(test_statements_ce, SL("arrow"), ">", ZEND_ACC_PRIVATE TSRMLS_CC); + zend_declare_property_string(test_statements_ce, SL("arrow"), ">", ZEND_ACC_PRIVATE); return SUCCESS; @@ -186,7 +186,7 @@ PHP_METHOD(Test_Statements, test544Issue) { zephir_fetch_params(1, 1, 0, &step_param); if (UNEXPECTED(Z_TYPE_P(step_param) != IS_LONG)) { - zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'step' must be of the type int") TSRMLS_CC); + zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'step' must be of the type int")); RETURN_MM_NULL(); } step = Z_LVAL_P(step_param); @@ -197,7 +197,7 @@ PHP_METHOD(Test_Statements, test544Issue) { if (ZEPHIR_GT_LONG(&_0, step)) { zephir_read_property(&_2$$3, this_ptr, SL("width"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_3$$3, this_ptr, SL("totalSteps"), PH_NOISY_CC | PH_READONLY); - filledWidth = (long) ((zephir_safe_div_long_zval(((zephir_get_numberval(&_2$$3) - 1)), &_3$$3 TSRMLS_CC) * step)); + filledWidth = (long) ((zephir_safe_div_long_zval(((zephir_get_numberval(&_2$$3) - 1)), &_3$$3) * step)); zephir_read_property(&_4$$3, this_ptr, SL("width"), PH_NOISY_CC | PH_READONLY); unfilledWidth = (((zephir_get_numberval(&_4$$3) - 1)) - filledWidth); zephir_read_property(&_5$$3, this_ptr, SL("filledChar"), PH_NOISY_CC | PH_READONLY); @@ -253,7 +253,7 @@ PHP_METHOD(Test_Statements, test544IssueWithVariable) { zephir_fetch_params(1, 1, 0, &step_param); if (UNEXPECTED(Z_TYPE_P(step_param) != IS_LONG)) { - zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'step' must be of the type int") TSRMLS_CC); + zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'step' must be of the type int")); RETURN_MM_NULL(); } step = Z_LVAL_P(step_param); @@ -263,7 +263,7 @@ PHP_METHOD(Test_Statements, test544IssueWithVariable) { totalSteps = zephir_get_numberval(&_0); if (step < totalSteps) { zephir_read_property(&_1$$3, this_ptr, SL("width"), PH_NOISY_CC | PH_READONLY); - filledWidth = (long) ((zephir_safe_div_long_long(((zephir_get_numberval(&_1$$3) - 1)), totalSteps TSRMLS_CC) * step)); + filledWidth = (long) ((zephir_safe_div_long_long(((zephir_get_numberval(&_1$$3) - 1)), totalSteps) * step)); zephir_read_property(&_2$$3, this_ptr, SL("width"), PH_NOISY_CC | PH_READONLY); unfilledWidth = (((zephir_get_numberval(&_2$$3) - 1)) - filledWidth); zephir_read_property(&_3$$3, this_ptr, SL("filledChar"), PH_NOISY_CC | PH_READONLY); diff --git a/ext/test/strings.zep.c b/ext/test/strings.zep.c index 43f0da0b63..44b7182e9d 100644 --- a/ext/test/strings.zep.c +++ b/ext/test/strings.zep.c @@ -91,7 +91,7 @@ PHP_METHOD(Test_Strings, testTrim) { - zephir_fast_trim(return_value, str, NULL , ZEPHIR_TRIM_BOTH TSRMLS_CC); + zephir_fast_trim(return_value, str, NULL , ZEPHIR_TRIM_BOTH); return; } @@ -107,7 +107,7 @@ PHP_METHOD(Test_Strings, testRtrim) { - zephir_fast_trim(return_value, str, NULL , ZEPHIR_TRIM_RIGHT TSRMLS_CC); + zephir_fast_trim(return_value, str, NULL , ZEPHIR_TRIM_RIGHT); return; } @@ -123,7 +123,7 @@ PHP_METHOD(Test_Strings, testLtrim) { - zephir_fast_trim(return_value, str, NULL , ZEPHIR_TRIM_LEFT TSRMLS_CC); + zephir_fast_trim(return_value, str, NULL , ZEPHIR_TRIM_LEFT); return; } @@ -140,7 +140,7 @@ PHP_METHOD(Test_Strings, testTrim2Params) { - zephir_fast_trim(return_value, str, charlist, ZEPHIR_TRIM_BOTH TSRMLS_CC); + zephir_fast_trim(return_value, str, charlist, ZEPHIR_TRIM_BOTH); return; } @@ -157,7 +157,7 @@ PHP_METHOD(Test_Strings, testRtrim2Params) { - zephir_fast_trim(return_value, str, charlist, ZEPHIR_TRIM_RIGHT TSRMLS_CC); + zephir_fast_trim(return_value, str, charlist, ZEPHIR_TRIM_RIGHT); return; } @@ -174,7 +174,7 @@ PHP_METHOD(Test_Strings, testLtrim2Params) { - zephir_fast_trim(return_value, str, charlist, ZEPHIR_TRIM_LEFT TSRMLS_CC); + zephir_fast_trim(return_value, str, charlist, ZEPHIR_TRIM_LEFT); return; } @@ -191,7 +191,7 @@ PHP_METHOD(Test_Strings, testImplode) { - zephir_fast_join(return_value, glue, pieces TSRMLS_CC); + zephir_fast_join(return_value, glue, pieces); return; } @@ -246,7 +246,7 @@ PHP_METHOD(Test_Strings, testExplode) { - zephir_fast_explode(return_value, delimiter, str, LONG_MAX TSRMLS_CC); + zephir_fast_explode(return_value, delimiter, str, LONG_MAX); return; } @@ -262,7 +262,7 @@ PHP_METHOD(Test_Strings, testExplodeStr) { - zephir_fast_explode_str(return_value, SL(","), str, LONG_MAX TSRMLS_CC); + zephir_fast_explode_str(return_value, SL(","), str, LONG_MAX); return; } @@ -282,7 +282,7 @@ PHP_METHOD(Test_Strings, testExplodeLimit) { ZVAL_LONG(&_0, limit); - zephir_fast_explode_str(return_value, SL(","), str, zephir_get_intval(&_0) TSRMLS_CC); + zephir_fast_explode_str(return_value, SL(","), str, zephir_get_intval(&_0) ); return; } @@ -379,7 +379,7 @@ PHP_METHOD(Test_Strings, testAddslashes) { - zephir_addslashes(return_value, str TSRMLS_CC); + zephir_addslashes(return_value, str); return; } @@ -462,7 +462,7 @@ PHP_METHOD(Test_Strings, testTrimMultilineString) { ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "\n Hello world\n "); - zephir_fast_trim(return_value, &_0, NULL , ZEPHIR_TRIM_BOTH TSRMLS_CC); + zephir_fast_trim(return_value, &_0, NULL , ZEPHIR_TRIM_BOTH); RETURN_MM(); } @@ -479,7 +479,7 @@ PHP_METHOD(Test_Strings, testWellEscapedMultilineString) { ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "\n \\\"\\}\\$hello\\$\\\"\\'\n "); - zephir_fast_trim(return_value, &_0, NULL , ZEPHIR_TRIM_BOTH TSRMLS_CC); + zephir_fast_trim(return_value, &_0, NULL , ZEPHIR_TRIM_BOTH); RETURN_MM(); } @@ -507,7 +507,7 @@ PHP_METHOD(Test_Strings, testInternedString2) { ZEPHIR_INIT_VAR(&_0); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, " hello "); - zephir_fast_trim(&_0, &_1, NULL , ZEPHIR_TRIM_BOTH TSRMLS_CC); + zephir_fast_trim(&_0, &_1, NULL , ZEPHIR_TRIM_BOTH); RETURN_CCTOR(&_0); } @@ -549,7 +549,7 @@ PHP_METHOD(Test_Strings, strToHex) { zephir_check_call_status(); ZEPHIR_CALL_FUNCTION(&_5$$3, "dechex", &_6, 10, &_3$$3); zephir_check_call_status(); - zephir_concat_self(&ret, &_5$$3 TSRMLS_CC); + zephir_concat_self(&ret, &_5$$3); i++; } RETURN_CTOR(&ret); @@ -583,7 +583,7 @@ PHP_METHOD(Test_Strings, issue1267) { ZEPHIR_INIT_VAR(&_0); ZEPHIR_INIT_VAR(&_1); - zephir_create_array(&_1, 3, 0 TSRMLS_CC); + zephir_create_array(&_1, 3, 0); ZEPHIR_INIT_VAR(&_2); ZVAL_STRING(&_2, "\\"); zephir_array_fast_append(&_1, &_2); @@ -595,7 +595,7 @@ PHP_METHOD(Test_Strings, issue1267) { zephir_array_fast_append(&_1, &_2); ZEPHIR_INIT_NVAR(&_2); ZVAL_STRING(&_2, ""); - zephir_fast_str_replace(&_0, &_1, &_2, value TSRMLS_CC); + zephir_fast_str_replace(&_0, &_1, &_2, value); ZEPHIR_CPY_WRT(value, &_0); ZVAL_LONG(&_3, 513); ZEPHIR_CALL_FUNCTION(&_4, "filter_var", NULL, 97, value, &_3); @@ -606,12 +606,12 @@ PHP_METHOD(Test_Strings, issue1267) { zephir_check_call_status(); zephir_stripslashes(&_0, &_4); ZEPHIR_INIT_VAR(&x); - zephir_fast_trim(&x, &_0, NULL , ZEPHIR_TRIM_BOTH TSRMLS_CC); + zephir_fast_trim(&x, &_0, NULL , ZEPHIR_TRIM_BOTH); ZEPHIR_INIT_VAR(&_6); ZEPHIR_CALL_FUNCTION(&_7, "strip_tags", &_5, 98, value); zephir_check_call_status(); zephir_stripcslashes(&_6, &_7); - zephir_fast_trim(return_value, &_6, NULL , ZEPHIR_TRIM_BOTH TSRMLS_CC); + zephir_fast_trim(return_value, &_6, NULL , ZEPHIR_TRIM_BOTH); RETURN_MM(); } diff --git a/ext/test/stubs.zep.c b/ext/test/stubs.zep.c index f1b7f543ec..bade9b159b 100644 --- a/ext/test/stubs.zep.c +++ b/ext/test/stubs.zep.c @@ -27,14 +27,14 @@ ZEPHIR_INIT_CLASS(Test_Stubs) { ZEPHIR_REGISTER_CLASS(Test, Stubs, test, stubs, test_stubs_method_entry, 0); - zend_declare_property_string(test_stubs_ce, SL("propString"), "Zephir public", ZEND_ACC_PUBLIC TSRMLS_CC); + zend_declare_property_string(test_stubs_ce, SL("propString"), "Zephir public", ZEND_ACC_PUBLIC); /** @var integer - declared in Zephir DocBlock */ - zend_declare_property_long(test_stubs_ce, SL("propIntDeclared"), 100, ZEND_ACC_PUBLIC TSRMLS_CC); + zend_declare_property_long(test_stubs_ce, SL("propIntDeclared"), 100, ZEND_ACC_PUBLIC); - zend_declare_property_string(test_stubs_ce, SL("propStringProtected"), "Zephir protected", ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_string(test_stubs_ce, SL("propStringProtected"), "Zephir protected", ZEND_ACC_PROTECTED); - zend_declare_property_string(test_stubs_ce, SL("propStringPrivate"), "Zephir private", ZEND_ACC_PRIVATE TSRMLS_CC); + zend_declare_property_string(test_stubs_ce, SL("propStringPrivate"), "Zephir private", ZEND_ACC_PRIVATE); zephir_declare_class_constant_long(test_stubs_ce, SL("INTEGER_CONST"), 1); diff --git a/ext/test/ternary.zep.c b/ext/test/ternary.zep.c index 191e5a5189..e4c94031cc 100644 --- a/ext/test/ternary.zep.c +++ b/ext/test/ternary.zep.c @@ -169,7 +169,7 @@ PHP_METHOD(Test_Ternary, testTernaryComplex3) { ZEPHIR_INIT_NVAR(&_0); ZVAL_BOOL(&_0, 0); } - zephir_gettype(return_value, &_0 TSRMLS_CC); + zephir_gettype(return_value, &_0); RETURN_MM(); } @@ -191,7 +191,7 @@ PHP_METHOD(Test_Ternary, testTernaryWithPromotedTemporaryVariable) { ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&var2); - zephir_create_array(&var2, 2, 0 TSRMLS_CC); + zephir_create_array(&var2, 2, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "_b_"); zephir_array_fast_append(&var2, &_0); @@ -201,13 +201,13 @@ PHP_METHOD(Test_Ternary, testTernaryWithPromotedTemporaryVariable) { ZEPHIR_INIT_VAR(&_1); if (zephir_array_isset_long(&var2, 1)) { ZEPHIR_OBS_NVAR(&_1); - zephir_array_fetch_long(&_1, &var2, 1, PH_NOISY, "test/ternary.zep", 44 TSRMLS_CC); + zephir_array_fetch_long(&_1, &var2, 1, PH_NOISY, "test/ternary.zep", 44); } else { ZEPHIR_INIT_NVAR(&_1); ZVAL_STRING(&_1, ""); } ZEPHIR_INIT_VAR(&var3); - zephir_fast_explode_str(&var3, SL("_"), &_1, LONG_MAX TSRMLS_CC); + zephir_fast_explode_str(&var3, SL("_"), &_1, LONG_MAX); RETURN_CCTOR(&var3); } diff --git a/ext/test/trytest.zep.c b/ext/test/trytest.zep.c index 7a74cedeaa..10f9f94321 100644 --- a/ext/test/trytest.zep.c +++ b/ext/test/trytest.zep.c @@ -56,7 +56,7 @@ PHP_METHOD(Test_TryTest, testThrow2) { object_init_ex(&_0, zend_exception_get_default(TSRMLS_C)); ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 28, &message); zephir_check_call_status(); - zephir_throw_exception_debug(&_0, "test/trytest.zep", 16 TSRMLS_CC); + zephir_throw_exception_debug(&_0, "test/trytest.zep", 16); ZEPHIR_MM_RESTORE(); return; @@ -98,7 +98,7 @@ PHP_METHOD(Test_TryTest, testTry2) { ZVAL_STRING(&_1$$3, "error!"); ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 28, &_1$$3); zephir_check_call_status_or_jump(try_end_1); - zephir_throw_exception_debug(&_0$$3, "test/trytest.zep", 27 TSRMLS_CC); + zephir_throw_exception_debug(&_0$$3, "test/trytest.zep", 27); goto try_end_1; @@ -131,7 +131,7 @@ PHP_METHOD(Test_TryTest, testTry3) { ZVAL_STRING(&_1$$3, "error!"); ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 28, &_1$$3); zephir_check_call_status_or_jump(try_end_1); - zephir_throw_exception_debug(&_0$$3, "test/trytest.zep", 34 TSRMLS_CC); + zephir_throw_exception_debug(&_0$$3, "test/trytest.zep", 34); goto try_end_1; @@ -142,7 +142,7 @@ PHP_METHOD(Test_TryTest, testTry3) { ZVAL_OBJ(&_2, EG(exception)); Z_ADDREF_P(&_2); ZEPHIR_INIT_VAR(&_3); - if (zephir_instance_of_ev(&_2, zend_exception_get_default(TSRMLS_C) TSRMLS_CC)) { + if (zephir_instance_of_ev(&_2, zend_exception_get_default(TSRMLS_C))) { zend_clear_exception(TSRMLS_C); ZEPHIR_CPY_WRT(&_3, &_2); RETURN_MM_STRING("error"); @@ -184,7 +184,7 @@ PHP_METHOD(Test_TryTest, testTry4) { ZVAL_STRING(&_1$$4, "error!"); ZEPHIR_CALL_METHOD(NULL, &_0$$4, "__construct", NULL, 28, &_1$$4); zephir_check_call_status_or_jump(try_end_1); - zephir_throw_exception_debug(&_0$$4, "test/trytest.zep", 46 TSRMLS_CC); + zephir_throw_exception_debug(&_0$$4, "test/trytest.zep", 46); goto try_end_1; } else { @@ -194,7 +194,7 @@ PHP_METHOD(Test_TryTest, testTry4) { ZVAL_STRING(&_3$$5, "error!"); ZEPHIR_CALL_METHOD(NULL, &_2$$5, "__construct", NULL, 99, &_3$$5); zephir_check_call_status_or_jump(try_end_1); - zephir_throw_exception_debug(&_2$$5, "test/trytest.zep", 48 TSRMLS_CC); + zephir_throw_exception_debug(&_2$$5, "test/trytest.zep", 48); goto try_end_1; } @@ -207,12 +207,12 @@ PHP_METHOD(Test_TryTest, testTry4) { Z_ADDREF_P(&_4); ZEPHIR_INIT_VAR(&_5); ZEPHIR_INIT_VAR(&_6); - if (zephir_instance_of_ev(&_4, spl_ce_RuntimeException TSRMLS_CC)) { + if (zephir_instance_of_ev(&_4, spl_ce_RuntimeException)) { zend_clear_exception(TSRMLS_C); ZEPHIR_CPY_WRT(&_5, &_4); RETURN_MM_STRING("domain error"); } else { - if (zephir_instance_of_ev(&_4, zend_exception_get_default(TSRMLS_C) TSRMLS_CC)) { + if (zephir_instance_of_ev(&_4, zend_exception_get_default(TSRMLS_C))) { zend_clear_exception(TSRMLS_C); ZEPHIR_CPY_WRT(&_6, &_4); RETURN_MM_STRING("error"); @@ -254,7 +254,7 @@ PHP_METHOD(Test_TryTest, testTry5) { ZVAL_STRING(&_1$$4, "error!"); ZEPHIR_CALL_METHOD(NULL, &_0$$4, "__construct", NULL, 28, &_1$$4); zephir_check_call_status_or_jump(try_end_1); - zephir_throw_exception_debug(&_0$$4, "test/trytest.zep", 63 TSRMLS_CC); + zephir_throw_exception_debug(&_0$$4, "test/trytest.zep", 63); goto try_end_1; } else { @@ -264,7 +264,7 @@ PHP_METHOD(Test_TryTest, testTry5) { ZVAL_STRING(&_3$$5, "error!"); ZEPHIR_CALL_METHOD(NULL, &_2$$5, "__construct", NULL, 99, &_3$$5); zephir_check_call_status_or_jump(try_end_1); - zephir_throw_exception_debug(&_2$$5, "test/trytest.zep", 65 TSRMLS_CC); + zephir_throw_exception_debug(&_2$$5, "test/trytest.zep", 65); goto try_end_1; } @@ -276,12 +276,12 @@ PHP_METHOD(Test_TryTest, testTry5) { ZVAL_OBJ(&_4, EG(exception)); Z_ADDREF_P(&_4); ZEPHIR_INIT_VAR(&_5); - if (zephir_instance_of_ev(&_4, spl_ce_RuntimeException TSRMLS_CC)) { + if (zephir_instance_of_ev(&_4, spl_ce_RuntimeException)) { zend_clear_exception(TSRMLS_C); ZEPHIR_CPY_WRT(&_5, &_4); RETURN_MM_STRING("any error"); } else { - if (zephir_instance_of_ev(&_4, zend_exception_get_default(TSRMLS_C) TSRMLS_CC)) { + if (zephir_instance_of_ev(&_4, zend_exception_get_default(TSRMLS_C))) { zend_clear_exception(TSRMLS_C); ZEPHIR_CPY_WRT(&_5, &_4); RETURN_MM_STRING("any error"); @@ -323,7 +323,7 @@ PHP_METHOD(Test_TryTest, testTry6) { ZVAL_STRING(&_1$$4, "error!"); ZEPHIR_CALL_METHOD(NULL, &_0$$4, "__construct", NULL, 28, &_1$$4); zephir_check_call_status_or_jump(try_end_1); - zephir_throw_exception_debug(&_0$$4, "test/trytest.zep", 80 TSRMLS_CC); + zephir_throw_exception_debug(&_0$$4, "test/trytest.zep", 80); goto try_end_1; } else { @@ -333,7 +333,7 @@ PHP_METHOD(Test_TryTest, testTry6) { ZVAL_STRING(&_3$$5, "error!"); ZEPHIR_CALL_METHOD(NULL, &_2$$5, "__construct", NULL, 99, &_3$$5); zephir_check_call_status_or_jump(try_end_1); - zephir_throw_exception_debug(&_2$$5, "test/trytest.zep", 82 TSRMLS_CC); + zephir_throw_exception_debug(&_2$$5, "test/trytest.zep", 82); goto try_end_1; } @@ -344,12 +344,12 @@ PHP_METHOD(Test_TryTest, testTry6) { ZEPHIR_INIT_VAR(&_4); ZVAL_OBJ(&_4, EG(exception)); Z_ADDREF_P(&_4); - if (zephir_instance_of_ev(&_4, spl_ce_RuntimeException TSRMLS_CC)) { + if (zephir_instance_of_ev(&_4, spl_ce_RuntimeException)) { zend_clear_exception(TSRMLS_C); ZEPHIR_CPY_WRT(&e, &_4); RETURN_MM_STRING("domain error"); } else { - if (zephir_instance_of_ev(&_4, zend_exception_get_default(TSRMLS_C) TSRMLS_CC)) { + if (zephir_instance_of_ev(&_4, zend_exception_get_default(TSRMLS_C))) { zend_clear_exception(TSRMLS_C); ZEPHIR_CPY_WRT(&e, &_4); RETURN_MM_STRING("error"); @@ -391,7 +391,7 @@ PHP_METHOD(Test_TryTest, testTry7) { ZVAL_STRING(&_1$$4, "error!"); ZEPHIR_CALL_METHOD(NULL, &_0$$4, "__construct", NULL, 28, &_1$$4); zephir_check_call_status_or_jump(try_end_1); - zephir_throw_exception_debug(&_0$$4, "test/trytest.zep", 99 TSRMLS_CC); + zephir_throw_exception_debug(&_0$$4, "test/trytest.zep", 99); goto try_end_1; } else { @@ -401,7 +401,7 @@ PHP_METHOD(Test_TryTest, testTry7) { ZVAL_STRING(&_3$$5, "error!"); ZEPHIR_CALL_METHOD(NULL, &_2$$5, "__construct", NULL, 99, &_3$$5); zephir_check_call_status_or_jump(try_end_1); - zephir_throw_exception_debug(&_2$$5, "test/trytest.zep", 101 TSRMLS_CC); + zephir_throw_exception_debug(&_2$$5, "test/trytest.zep", 101); goto try_end_1; } @@ -412,12 +412,12 @@ PHP_METHOD(Test_TryTest, testTry7) { ZEPHIR_INIT_VAR(&_4); ZVAL_OBJ(&_4, EG(exception)); Z_ADDREF_P(&_4); - if (zephir_instance_of_ev(&_4, spl_ce_RuntimeException TSRMLS_CC)) { + if (zephir_instance_of_ev(&_4, spl_ce_RuntimeException)) { zend_clear_exception(TSRMLS_C); ZEPHIR_CPY_WRT(&e, &_4); RETURN_MM_STRING("any error"); } else { - if (zephir_instance_of_ev(&_4, zend_exception_get_default(TSRMLS_C) TSRMLS_CC)) { + if (zephir_instance_of_ev(&_4, zend_exception_get_default(TSRMLS_C))) { zend_clear_exception(TSRMLS_C); ZEPHIR_CPY_WRT(&e, &_4); RETURN_MM_STRING("any error"); @@ -448,7 +448,7 @@ PHP_METHOD(Test_TryTest, testTry8) { ZVAL_STRING(&_1$$3, "error 1!"); ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 28, &_1$$3); zephir_check_call_status_or_jump(try_end_1); - zephir_throw_exception_debug(&_0$$3, "test/trytest.zep", 111 TSRMLS_CC); + zephir_throw_exception_debug(&_0$$3, "test/trytest.zep", 111); goto try_end_1; @@ -505,7 +505,7 @@ PHP_METHOD(Test_TryTest, testTry9) { ZEPHIR_INIT_VAR(&_0); ZVAL_OBJ(&_0, EG(exception)); Z_ADDREF_P(&_0); - if (zephir_instance_of_ev(&_0, spl_ce_RuntimeException TSRMLS_CC)) { + if (zephir_instance_of_ev(&_0, spl_ce_RuntimeException)) { zend_clear_exception(TSRMLS_C); ZEPHIR_CPY_WRT(&e, &_0); RETURN_MM_STRING("domain error"); @@ -540,7 +540,7 @@ PHP_METHOD(Test_TryTest, testTry10) { ZEPHIR_INIT_VAR(&_0); ZVAL_OBJ(&_0, EG(exception)); Z_ADDREF_P(&_0); - if (zephir_instance_of_ev(&_0, spl_ce_RuntimeException TSRMLS_CC)) { + if (zephir_instance_of_ev(&_0, spl_ce_RuntimeException)) { zend_clear_exception(TSRMLS_C); ZEPHIR_CPY_WRT(&e, &_0); RETURN_MM_STRING("domain error"); @@ -572,7 +572,7 @@ PHP_METHOD(Test_TryTest, testTry11) { ZEPHIR_INIT_VAR(&_0); ZVAL_OBJ(&_0, EG(exception)); Z_ADDREF_P(&_0); - if (zephir_instance_of_ev(&_0, zend_exception_get_default(TSRMLS_C) TSRMLS_CC)) { + if (zephir_instance_of_ev(&_0, zend_exception_get_default(TSRMLS_C))) { zend_clear_exception(TSRMLS_C); ZEPHIR_CPY_WRT(&ex, &_0); } diff --git a/ext/test/typeoff.zep.c b/ext/test/typeoff.zep.c index 049e13d917..5d2e0194b3 100644 --- a/ext/test/typeoff.zep.c +++ b/ext/test/typeoff.zep.c @@ -23,7 +23,7 @@ ZEPHIR_INIT_CLASS(Test_Typeoff) { ZEPHIR_REGISTER_CLASS(Test, Typeoff, test, typeoff, test_typeoff_method_entry, 0); - zend_declare_property_null(test_typeoff_ce, SL("property"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_typeoff_ce, SL("property"), ZEND_ACC_PROTECTED); return SUCCESS; @@ -207,7 +207,7 @@ PHP_METHOD(Test_Typeoff, testUnknownTypeOf) { ZEPHIR_INIT_VAR(&_0); - zephir_gettype(&_0, u TSRMLS_CC); + zephir_gettype(&_0, u); RETURN_CCTOR(&_0); } @@ -223,7 +223,7 @@ PHP_METHOD(Test_Typeoff, testCallableTypeOf) { - RETURN_BOOL(zephir_is_callable(cb TSRMLS_CC) == 1); + RETURN_BOOL(zephir_is_callable(cb) == 1); } diff --git a/ext/test/unsettest.zep.c b/ext/test/unsettest.zep.c index 09491f3234..98ee0a6750 100644 --- a/ext/test/unsettest.zep.c +++ b/ext/test/unsettest.zep.c @@ -25,7 +25,7 @@ ZEPHIR_INIT_CLASS(Test_Unsettest) { ZEPHIR_REGISTER_CLASS(Test, Unsettest, test, unsettest, test_unsettest_method_entry, 0); - zend_declare_property_null(test_unsettest_ce, SL("property"), ZEND_ACC_PROTECTED TSRMLS_CC); + zend_declare_property_null(test_unsettest_ce, SL("property"), ZEND_ACC_PROTECTED); return SUCCESS; @@ -136,7 +136,7 @@ PHP_METHOD(Test_Unsettest, testUnsetProperty) { zval *this_ptr = getThis(); - zephir_unset_property(this_ptr, "property" TSRMLS_CC); + zephir_unset_property(this_ptr, "property"); RETURN_MEMBER(getThis(), "property"); } @@ -165,7 +165,7 @@ PHP_METHOD(Test_Unsettest, testStdClassUnset) { ZEPHIR_INIT_ZVAL_NREF(_0); ZVAL_LONG(&_0, 12345); zephir_update_property_zval(&simpleObject, SL("property3"), &_0); - zephir_unset_property(&simpleObject, "property2" TSRMLS_CC); + zephir_unset_property(&simpleObject, "property2"); RETURN_CCTOR(&simpleObject); } diff --git a/ext/test/usetest.zep.c b/ext/test/usetest.zep.c index 412a76e9b1..d697feae97 100644 --- a/ext/test/usetest.zep.c +++ b/ext/test/usetest.zep.c @@ -22,7 +22,7 @@ ZEPHIR_INIT_CLASS(Test_UseTest) { ZEPHIR_REGISTER_CLASS(Test, UseTest, test, usetest, test_usetest_method_entry, 0); - zend_class_implements(test_usetest_ce TSRMLS_CC, 1, spl_ce_Countable); + zend_class_implements(test_usetest_ce, 1, spl_ce_Countable); return SUCCESS; } @@ -59,7 +59,7 @@ PHP_METHOD(Test_UseTest, testUseClass1) { _0 = zephir_fetch_class_str_ex(SL("Oo\\OoConstruct"), ZEND_FETCH_CLASS_AUTO); } object_init_ex(return_value, _0); - if (zephir_has_constructor(return_value TSRMLS_CC)) { + if (zephir_has_constructor(return_value)) { ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 0); zephir_check_call_status(); } @@ -81,7 +81,7 @@ PHP_METHOD(Test_UseTest, testUseClass2) { _0 = zephir_fetch_class_str_ex(SL("Strings"), ZEND_FETCH_CLASS_AUTO); } object_init_ex(return_value, _0); - if (zephir_has_constructor(return_value TSRMLS_CC)) { + if (zephir_has_constructor(return_value)) { ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 0); zephir_check_call_status(); } @@ -103,7 +103,7 @@ PHP_METHOD(Test_UseTest, testUseNamespaceAlias) { _0 = zephir_fetch_class_str_ex(SL("Oo\\OoConstruct"), ZEND_FETCH_CLASS_AUTO); } object_init_ex(return_value, _0); - if (zephir_has_constructor(return_value TSRMLS_CC)) { + if (zephir_has_constructor(return_value)) { ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 0); zephir_check_call_status(); } diff --git a/ext/test/vars.zep.c b/ext/test/vars.zep.c index 7ca5063687..b60d6aa1de 100644 --- a/ext/test/vars.zep.c +++ b/ext/test/vars.zep.c @@ -55,7 +55,7 @@ PHP_METHOD(Test_Vars, testParam) { ZEPHIR_OBS_COPY_OR_DUP(&config, config_param); - zephir_array_fetch_string(&_0, &config, SL("dir"), PH_NOISY | PH_READONLY, "test/vars.zep", 8 TSRMLS_CC); + zephir_array_fetch_string(&_0, &config, SL("dir"), PH_NOISY | PH_READONLY, "test/vars.zep", 8); zephir_is_iterable(&_0, 0, "test/vars.zep", 11); if (Z_TYPE_P(&_0) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&_0), _3, _4, _1) @@ -70,7 +70,7 @@ PHP_METHOD(Test_Vars, testParam) { ZVAL_COPY(&v, _1); ZEPHIR_CALL_FUNCTION(&_5$$3, "realpath", &_6, 58, &v); zephir_check_call_status(); - zephir_array_update_multi(&config, &_5$$3 TSRMLS_CC, SL("sz"), 3, SL("dir"), &k); + zephir_array_update_multi(&config, &_5$$3, SL("sz"), 3, SL("dir"), &k); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &_0, "rewind", NULL, 0); @@ -87,7 +87,7 @@ PHP_METHOD(Test_Vars, testParam) { zephir_check_call_status(); ZEPHIR_CALL_FUNCTION(&_7$$4, "realpath", &_6, 58, &v); zephir_check_call_status(); - zephir_array_update_multi(&config, &_7$$4 TSRMLS_CC, SL("sz"), 3, SL("dir"), &k); + zephir_array_update_multi(&config, &_7$$4, SL("sz"), 3, SL("dir"), &k); ZEPHIR_CALL_METHOD(NULL, &_0, "next", NULL, 0); zephir_check_call_status(); } @@ -114,7 +114,7 @@ PHP_METHOD(Test_Vars, testVarDump) { ZEPHIR_INIT_VAR(&a); ZVAL_STRING(&a, "hello"); ZEPHIR_INIT_VAR(&ar); - zephir_create_array(&ar, 3, 0 TSRMLS_CC); + zephir_create_array(&ar, 3, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, 1); zephir_array_fast_append(&ar, &_0); @@ -122,8 +122,8 @@ PHP_METHOD(Test_Vars, testVarDump) { ZVAL_STRING(&_0, "world"); zephir_array_fast_append(&ar, &_0); zephir_array_fast_append(&ar, &__$false); - zephir_var_dump(&ar TSRMLS_CC); - zephir_var_dump(&a TSRMLS_CC); + zephir_var_dump(&ar); + zephir_var_dump(&a); ZEPHIR_MM_RESTORE(); } @@ -145,7 +145,7 @@ PHP_METHOD(Test_Vars, testVarDump2) { ZEPHIR_INIT_VAR(&_0); ZEPHIR_INIT_NVAR(&_0); ZVAL_BOOL(&_0, ZEPHIR_IS_LONG(ret, 1)); - zephir_var_dump(&_0 TSRMLS_CC); + zephir_var_dump(&_0); ZEPHIR_MM_RESTORE(); } @@ -169,7 +169,7 @@ PHP_METHOD(Test_Vars, testVarExport) { ZEPHIR_INIT_VAR(&a); ZVAL_STRING(&a, "hello"); ZEPHIR_INIT_VAR(&ar); - zephir_create_array(&ar, 3, 0 TSRMLS_CC); + zephir_create_array(&ar, 3, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, 1); zephir_array_fast_append(&ar, &_0); @@ -179,14 +179,14 @@ PHP_METHOD(Test_Vars, testVarExport) { zephir_array_fast_append(&ar, &__$false); ZEPHIR_INIT_VAR(&_1); ZEPHIR_CPY_WRT(&_1, &ar); - zephir_var_export(&_1 TSRMLS_CC); + zephir_var_export(&_1); ZEPHIR_INIT_VAR(&ret); - zephir_var_export_ex(&ret, &ar TSRMLS_CC); + zephir_var_export_ex(&ret, &ar); ZEPHIR_INIT_VAR(&_2); ZEPHIR_CPY_WRT(&_2, &a); - zephir_var_export(&_2 TSRMLS_CC); + zephir_var_export(&_2); ZEPHIR_INIT_NVAR(&ret); - zephir_var_export_ex(&ret, &a TSRMLS_CC); + zephir_var_export_ex(&ret, &a); RETURN_CCTOR(&ret); } @@ -209,7 +209,7 @@ PHP_METHOD(Test_Vars, test88Issue) { zephir_fetch_params(1, 1, 1, ¶m1_param, ¶m2_param); if (UNEXPECTED(Z_TYPE_P(param1_param) != IS_STRING && Z_TYPE_P(param1_param) != IS_NULL)) { - zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'param1' must be of the type string") TSRMLS_CC); + zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'param1' must be of the type string")); RETURN_MM_NULL(); } if (EXPECTED(Z_TYPE_P(param1_param) == IS_STRING)) { @@ -228,16 +228,16 @@ PHP_METHOD(Test_Vars, test88Issue) { ZEPHIR_INIT_VAR(&_0); ZEPHIR_CPY_WRT(&_0, ¶m1); - zephir_var_dump(&_0 TSRMLS_CC); + zephir_var_dump(&_0); ZEPHIR_INIT_VAR(&_1); ZEPHIR_CPY_WRT(&_1, ¶m2); - zephir_var_dump(&_1 TSRMLS_CC); + zephir_var_dump(&_1); ZEPHIR_INIT_VAR(&_2); ZEPHIR_CPY_WRT(&_2, ¶m1); - zephir_var_export(&_2 TSRMLS_CC); + zephir_var_export(&_2); ZEPHIR_INIT_VAR(&_3); ZEPHIR_CPY_WRT(&_3, ¶m2); - zephir_var_export(&_3 TSRMLS_CC); + zephir_var_export(&_3); ZEPHIR_MM_RESTORE(); } @@ -257,7 +257,7 @@ PHP_METHOD(Test_Vars, test88IssueParam2InitString) { zephir_fetch_params(1, 1, 1, ¶m1_param, ¶m2_param); if (UNEXPECTED(Z_TYPE_P(param1_param) != IS_STRING && Z_TYPE_P(param1_param) != IS_NULL)) { - zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'param1' must be of the type string") TSRMLS_CC); + zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'param1' must be of the type string")); RETURN_MM_NULL(); } if (EXPECTED(Z_TYPE_P(param1_param) == IS_STRING)) { @@ -276,7 +276,7 @@ PHP_METHOD(Test_Vars, test88IssueParam2InitString) { ZEPHIR_INIT_VAR(&_0); ZEPHIR_CPY_WRT(&_0, ¶m2); - zephir_var_export(&_0 TSRMLS_CC); + zephir_var_export(&_0); ZEPHIR_MM_RESTORE(); } @@ -293,8 +293,8 @@ PHP_METHOD(Test_Vars, testVarDump2param) { - zephir_var_dump(p1 TSRMLS_CC); - zephir_var_dump(p2 TSRMLS_CC); + zephir_var_dump(p1); + zephir_var_dump(p2); } @@ -311,9 +311,9 @@ PHP_METHOD(Test_Vars, testVarDump3param) { - zephir_var_dump(p1 TSRMLS_CC); - zephir_var_dump(p2 TSRMLS_CC); - zephir_var_dump(p3 TSRMLS_CC); + zephir_var_dump(p1); + zephir_var_dump(p2); + zephir_var_dump(p3); } @@ -334,12 +334,12 @@ PHP_METHOD(Test_Vars, testCountOptimizerVarDumpAndExport) { ZEPHIR_INIT_VAR(&_0); ZEPHIR_INIT_NVAR(&_0); - ZVAL_LONG(&_0, zephir_fast_count_int(testVar TSRMLS_CC)); - zephir_var_dump(&_0 TSRMLS_CC); + ZVAL_LONG(&_0, zephir_fast_count_int(testVar)); + zephir_var_dump(&_0); ZEPHIR_INIT_VAR(&_1); ZEPHIR_INIT_NVAR(&_1); - ZVAL_LONG(&_1, zephir_fast_count_int(testVar TSRMLS_CC)); - zephir_var_export(&_1 TSRMLS_CC); + ZVAL_LONG(&_1, zephir_fast_count_int(testVar)); + zephir_var_export(&_1); ZEPHIR_MM_RESTORE(); } @@ -368,10 +368,10 @@ PHP_METHOD(Test_Vars, testArrayTypeVarDumpAndExport) { ZEPHIR_INIT_VAR(&_0); ZEPHIR_CPY_WRT(&_0, &testVar); - zephir_var_dump(&_0 TSRMLS_CC); + zephir_var_dump(&_0); ZEPHIR_INIT_VAR(&_1); ZEPHIR_CPY_WRT(&_1, &testVar); - zephir_var_export(&_1 TSRMLS_CC); + zephir_var_export(&_1); ZEPHIR_MM_RESTORE(); } @@ -395,11 +395,11 @@ PHP_METHOD(Test_Vars, testIntVarDump) { ZEPHIR_INIT_VAR(&_0); ZEPHIR_INIT_NVAR(&_0); ZVAL_LONG(&_0, a); - zephir_var_dump(&_0 TSRMLS_CC); + zephir_var_dump(&_0); ZEPHIR_INIT_VAR(&_1); ZEPHIR_INIT_NVAR(&_1); ZVAL_LONG(&_1, a); - zephir_var_export(&_1 TSRMLS_CC); + zephir_var_export(&_1); ZEPHIR_MM_RESTORE(); } @@ -420,11 +420,11 @@ PHP_METHOD(Test_Vars, testDoubleVarDump) { ZEPHIR_INIT_VAR(&_0); ZEPHIR_INIT_NVAR(&_0); ZVAL_DOUBLE(&_0, a); - zephir_var_dump(&_0 TSRMLS_CC); + zephir_var_dump(&_0); ZEPHIR_INIT_VAR(&_1); ZEPHIR_INIT_NVAR(&_1); ZVAL_DOUBLE(&_1, a); - zephir_var_export(&_1 TSRMLS_CC); + zephir_var_export(&_1); ZEPHIR_MM_RESTORE(); } @@ -445,11 +445,11 @@ PHP_METHOD(Test_Vars, testBoolVarDump) { ZEPHIR_INIT_VAR(&_0); ZEPHIR_INIT_NVAR(&_0); ZVAL_BOOL(&_0, a); - zephir_var_dump(&_0 TSRMLS_CC); + zephir_var_dump(&_0); ZEPHIR_INIT_VAR(&_1); ZEPHIR_INIT_NVAR(&_1); ZVAL_BOOL(&_1, a); - zephir_var_export(&_1 TSRMLS_CC); + zephir_var_export(&_1); ZEPHIR_MM_RESTORE(); } diff --git a/kernels/ZendEngine3/main.c b/kernels/ZendEngine3/main.c index 8c27575fa2..ceee5b0e7f 100644 --- a/kernels/ZendEngine3/main.c +++ b/kernels/ZendEngine3/main.c @@ -100,11 +100,12 @@ int zephir_get_global(zval *arr, const char *global, unsigned int global_length) if ((gv = zend_hash_find_ind(&EG(symbol_table), str)) != NULL) { ZVAL_DEREF(gv); if (Z_TYPE_P(gv) == IS_ARRAY) { - ZVAL_DUP(arr, gv); - zend_hash_update(&EG(symbol_table), str, arr); - - // See: https://github.com/phalcon/zephir/pull/1965#issuecomment-541299003 - // ZVAL_COPY_VALUE(arr, gv); + if (Z_REFCOUNTED_P(gv) && Z_REFCOUNT_P(gv) <= 1) { + ZVAL_COPY_VALUE(arr, gv); + } else { + ZVAL_DUP(arr, gv); + zend_hash_update(&EG(symbol_table), str, arr); + } zend_string_release(str); return SUCCESS; diff --git a/templates/ZendEngine3/project.c b/templates/ZendEngine3/project.c index 098fef5b0d..f7b5e5a76d 100644 --- a/templates/ZendEngine3/project.c +++ b/templates/ZendEngine3/project.c @@ -85,8 +85,8 @@ static PHP_RINIT_FUNCTION(%PROJECT_LOWER%) #endif %PROJECT_LOWER%_globals_ptr = ZEPHIR_VGLOBAL; - php_zephir_init_globals(%PROJECT_LOWER%_globals_ptr TSRMLS_CC); - zephir_initialize_memory(%PROJECT_LOWER%_globals_ptr TSRMLS_CC); + php_zephir_init_globals(%PROJECT_LOWER%_globals_ptr); + zephir_initialize_memory(%PROJECT_LOWER%_globals_ptr); %REQ_INITIALIZERS% return SUCCESS; @@ -120,8 +120,8 @@ static PHP_MINFO_FUNCTION(%PROJECT_LOWER%) static PHP_GINIT_FUNCTION(%PROJECT_LOWER%) { - php_zephir_init_globals(%PROJECT_LOWER%_globals TSRMLS_CC); - php_zephir_init_module_globals(%PROJECT_LOWER%_globals TSRMLS_CC); + php_zephir_init_globals(%PROJECT_LOWER%_globals); + php_zephir_init_module_globals(%PROJECT_LOWER%_globals); } static PHP_GSHUTDOWN_FUNCTION(%PROJECT_LOWER%) diff --git a/test/globals/server.zep b/test/globals/server.zep new file mode 100644 index 0000000000..16c26b8152 --- /dev/null +++ b/test/globals/server.zep @@ -0,0 +1,27 @@ +namespace Test\Globals; + +class Server +{ + /** + * @see https://github.com/phalcon/zephir/issues/1961 + */ + public function f1() -> void + { + echo _SERVER["PHP_SELF"]; + this->f2(); + echo _SERVER["PHP_SELF"]; + } + + public function f2() -> void + { + echo _SERVER["SCRIPT_NAME"]; + } + + /** + * @see https://github.com/phalcon/zephir/issues/1970 + */ + public function check() -> var + { + return _SERVER["HTTP_USER_AGENT"]; + } +} diff --git a/unit-tests/Extension/Globals/ServerTest.php b/unit-tests/Extension/Globals/ServerTest.php new file mode 100644 index 0000000000..59f985e453 --- /dev/null +++ b/unit-tests/Extension/Globals/ServerTest.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Extension\Globals; + +use PHPUnit\Framework\TestCase; +use Test\Globals\Server; + +class ServerTest extends TestCase +{ + private $server; + + /** + * This method is called before each test. + */ + protected function setUp() + { + $this->server = $_SERVER; + } + + /** + * This method is called after each test. + */ + protected function tearDown() + { + $_SERVER = $this->server; + } + + /** + * @test + * + * @see https://github.com/phalcon/zephir/issues/1961 + */ + public function shouldPrintPhpSelf() + { + $test = new Server(); + + ob_start(); + $test->f1(); + $actual = ob_get_contents(); + ob_end_clean(); + + $this->assertSame(str_repeat($_SERVER['PHP_SELF'], 3), $actual); + } + + /** + * @test + * + * @see https://github.com/phalcon/zephir/issues/1961 + */ + public function shouldPrintUserAgent() + { + $test = new Server(); + $_SERVER['HTTP_USER_AGENT'] = 'Test'; + + $this->assertSame('Test', $test->check()); + } +} diff --git a/unit-tests/Zephir/Test/Stubs/MethodDocBlockTest.php b/unit-tests/Zephir/Test/Stubs/MethodDocBlockTest.php index 3fae26b76e..1ef39891f2 100644 --- a/unit-tests/Zephir/Test/Stubs/MethodDocBlockTest.php +++ b/unit-tests/Zephir/Test/Stubs/MethodDocBlockTest.php @@ -76,40 +76,6 @@ public function prepareMethod($params) return new MethodDocBlock($classMethod, $aliasManager); } - public function testMethodWithoutInputArgs() - { - $classDefinition = require_once ZEPHIRPATH.'/unit-tests/fixtures/class-definition-2.php'; - $testDocBlock = $this->prepareMethod($classDefinition); - $expected = <<assertSame($expected, (string) $testDocBlock); - } - - public function testMethodWithInputArgs() - { - $classDefinition = require_once ZEPHIRPATH.'/unit-tests/fixtures/class-definition-1.php'; - - $testDocBlock = $this->prepareMethod($classDefinition); - $expected = <<assertSame($expected, (string) $testDocBlock); - } - public function getDocBlock() { return [ @@ -157,43 +123,134 @@ public function getDocBlock() } /** + * @test * @dataProvider getDocBlock() * * @param array $parameters * @param string $expected */ - public function testMethodsWithDataSet(array $parameters, $expected) + public function methodsWithDataSet(array $parameters, $expected) { $baseDefinition = require ZEPHIRPATH.'/unit-tests/fixtures/base-definition.php'; $baseDefinition['method']['parameters'][] = $parameters; - $this->assertSame($expected, (string) $this->prepareMethod($baseDefinition)); + $this->assertSame($expected, $this->prepareMethod($baseDefinition)->processMethodDocBlock()); } - public function testMethodWithFullDocBlock() + public function docBlockProvider(): array { - $docblock = "Test for full filled Method\n". - "with non-ordered params\n". - "@param int \$val1\n". - "@param array \$val3 \n". - "@param string \$val2 - with additional descrription\n". - "@throws \Zephir\Compiler\CompilerException \n"; - - $testDefinition = require_once ZEPHIRPATH.'/unit-tests/fixtures/class-definition-3.php'; - $testDefinition['method']['docblock'] = $docblock; + return [ + 'with @var' => [ + '@var mixed', + '@param mixed', + ], + 'with @return' => [ + '@return int', + '@return int', + ], + 'with all types' => [ + "@var string\n * @param array data\n * @throws \Exception\n * @return boolean", + "@param string\n * @param array \$data\n * @throws \Exception\n * @return boolean", + ], + 'one Integer param' => [ + '@param int magicNumber', + '@param int $magicNumber', + ], + 'with Mixed params' => [ + '@param int|double magicNumber', + '@param int|double $magicNumber', + ], + 'with Mixed params and spaces' => [ + '@param int | double magicNumber', + '@param int | double $magicNumber', + ], + 'with Description in DocBlock' => [ + "Test description\n * @param int | double magicNumber", + "Test description\n *\n * @param int | double \$magicNumber", + ], + 'with short variable name' => [ + '@param string a', + '@param string $a', + ], + 'without any params' => [ + 'Zephir', + 'Zephir', + ], + 'with @var in @return' => [ + '@return var|array - some description of var', + '@return mixed|array - some description of var', + ], + 'with many params and Exception' => [ + // Zep + "Test for full filled Method\n". + "* with non-ordered params\n". + "*\n". + "* @param int \$val1\n". + "* @param callback callback\n". + "* @param array \$val3\n". + "* @param string \$val2 - with additional descrription\n". + "* @throws \Zephir\Compiler\CompilerException", + // Php + "Test for full filled Method\n". + " * with non-ordered params\n". + " *\n". + " * @param int \$val1\n". + " * @param callback \$callback\n". + " * @param array \$val3\n". + " * @param string \$val2 - with additional descrription\n". + " * @throws \Zephir\Compiler\CompilerException", + ], + 'with function scalar input args' => [ + // Zep + "Test function scalarInputArgs(int val1, bool val2, string val3, double val4)\n". + "* with return Integer\n". + "*\n". + "* @return int\n". + "* @param int \$val1\n". + "* @param bool \$val2\n". + "* @param string \$val3\n". + '* @param double $val4', + // Php + "Test function scalarInputArgs(int val1, bool val2, string val3, double val4)\n". + " * with return Integer\n". + " *\n". + " * @return int\n". + " * @param int \$val1\n". + " * @param bool \$val2\n". + " * @param string \$val3\n". + ' * @param double $val4', + ], + 'with multiline array' => [ + // Zep + "@param array | object config_zzz = [\n". + "* \"test\" => \"xyz\"\n". + '* ]', + // Php + "@param array | object \$config_zzz = [\n". + " * \"test\" => \"xyz\"\n". + ' * ]', + ], + ]; + } - $expected = <<assertSame($expected, (string) $this->prepareMethod($testDefinition)); + $this->assertSame($expected, $docblock->processMethodDocBlock()); } } diff --git a/unit-tests/fixtures/class-definition-1.php b/unit-tests/fixtures/class-definition-1.php deleted file mode 100644 index 444814e532..0000000000 --- a/unit-tests/fixtures/class-definition-1.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return [ - 'class' => [ - 'namespace' => 'Zephir\Stubs', - 'className' => 'Stubs', - 'classShortName' => 'get', - ], - 'method' => [ - 'visibility' => ['public', 'final'], - 'name' => 'scalarInputAgrs', - 'parameters' => [ - ['data-type' => 'int', 'name' => 'val1'], - ['data-type' => 'bool', 'name' => 'val2'], - ['data-type' => 'string', 'name' => 'val3'], - ['data-type' => 'double', 'name' => 'val4'], - ], - 'statements' => [], - 'docblock' => "Test function scalarInputArgs(int val1, bool val2, string val3, double val4)\n with return Integer\n @return int", - 'returnType' => null, - 'expression' => null, - ], -]; diff --git a/unit-tests/fixtures/class-definition-2.php b/unit-tests/fixtures/class-definition-2.php deleted file mode 100644 index e13273ceae..0000000000 --- a/unit-tests/fixtures/class-definition-2.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return [ - 'class' => [ - 'namespace' => 'Zephir\Stubs', - 'className' => 'Stubs', - 'classShortName' => 'get', - ], - 'method' => [ - 'visibility' => ['public', 'final'], - 'name' => 'fooTest', - 'parameters' => null, - 'statements' => [], - 'docblock' => 'Zephir', - 'returnType' => null, - 'expression' => null, - ], -]; diff --git a/unit-tests/fixtures/class-definition-3.php b/unit-tests/fixtures/class-definition-3.php deleted file mode 100644 index 25c81aa6ca..0000000000 --- a/unit-tests/fixtures/class-definition-3.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return [ - 'class' => [ - 'namespace' => 'Zephir\Stubs', - 'className' => 'Stubs', - 'classShortName' => 'get', - ], - 'method' => [ - 'visibility' => ['public'], - 'name' => 'testMethodWithFullDocBlock', - 'parameters' => [ - ['data-type' => 'int', 'name' => 'val1'], - ['data-type' => 'string', 'name' => 'val2'], - ['data-type' => 'array', 'name' => '$val3'], - ], - 'statements' => [], - 'docblock' => null, - 'returnType' => null, - 'expression' => null, - ], -]; diff --git a/unit-tests/fixtures/lifecycle/expected3.c b/unit-tests/fixtures/lifecycle/expected3.c index 596fd0ce56..cb15910290 100644 --- a/unit-tests/fixtures/lifecycle/expected3.c +++ b/unit-tests/fixtures/lifecycle/expected3.c @@ -91,8 +91,8 @@ static PHP_RINIT_FUNCTION(lifecycle) #endif lifecycle_globals_ptr = ZEPHIR_VGLOBAL; - php_zephir_init_globals(lifecycle_globals_ptr TSRMLS_CC); - zephir_initialize_memory(lifecycle_globals_ptr TSRMLS_CC); + php_zephir_init_globals(lifecycle_globals_ptr); + zephir_initialize_memory(lifecycle_globals_ptr); ext_setup_request(); return SUCCESS; @@ -130,8 +130,8 @@ static PHP_MINFO_FUNCTION(lifecycle) static PHP_GINIT_FUNCTION(lifecycle) { - php_zephir_init_globals(lifecycle_globals TSRMLS_CC); - php_zephir_init_module_globals(lifecycle_globals TSRMLS_CC); + php_zephir_init_globals(lifecycle_globals); + php_zephir_init_module_globals(lifecycle_globals); } static PHP_GSHUTDOWN_FUNCTION(lifecycle) diff --git a/unit-tests/fixtures/stubs/issues/expected/Exception.zep.php b/unit-tests/fixtures/stubs/issues/expected/Exception.zep.php index 802551e399..758cf09844 100644 --- a/unit-tests/fixtures/stubs/issues/expected/Exception.zep.php +++ b/unit-tests/fixtures/stubs/issues/expected/Exception.zep.php @@ -11,6 +11,8 @@ class Exception extends \Exception implements \Throwable { - public function __construct() {} + public function __construct() + { + } } diff --git a/unit-tests/fixtures/stubs/issues/expected/Issue_1778.zep.php b/unit-tests/fixtures/stubs/issues/expected/Issue_1778.zep.php index ae7dd2f6c1..14e6d849ed 100644 --- a/unit-tests/fixtures/stubs/issues/expected/Issue_1778.zep.php +++ b/unit-tests/fixtures/stubs/issues/expected/Issue_1778.zep.php @@ -36,14 +36,18 @@ class Issue_1778 * @param \Psr\Http\Message\RequestInterface $request * @param array $config */ - public function __construct(\Psr\Http\Message\RequestInterface $request, array $config) {} + public function __construct(\Psr\Http\Message\RequestInterface $request, array $config) + { + } /** * Some useful description * - * @param string $key * @return mixed|null + * @param string $key */ - public function getVar(string $key) {} + public function getVar(string $key) + { + } } diff --git a/unit-tests/fixtures/stubs/issues/expected/Issue_1907.zep.php b/unit-tests/fixtures/stubs/issues/expected/Issue_1907.zep.php index bddf9f98aa..7f983586b2 100644 --- a/unit-tests/fixtures/stubs/issues/expected/Issue_1907.zep.php +++ b/unit-tests/fixtures/stubs/issues/expected/Issue_1907.zep.php @@ -13,6 +13,8 @@ class Issue_1907 extends Exception implements \Throwable { - public function __construct() {} + public function __construct() + { + } } diff --git a/unit-tests/fixtures/stubs/issues/expected/Issue_1922.zep.php b/unit-tests/fixtures/stubs/issues/expected/Issue_1922.zep.php index 69659a1fed..e062b237a4 100644 --- a/unit-tests/fixtures/stubs/issues/expected/Issue_1922.zep.php +++ b/unit-tests/fixtures/stubs/issues/expected/Issue_1922.zep.php @@ -9,6 +9,8 @@ class Issue_1922 * @param string $key * @return mixed|null */ - public function getVar(string $key) {} + public function getVar(string $key) + { + } } diff --git a/unit-tests/fixtures/typehints/expected3.c b/unit-tests/fixtures/typehints/expected3.c index 8f6254520e..cb33f03031 100644 --- a/unit-tests/fixtures/typehints/expected3.c +++ b/unit-tests/fixtures/typehints/expected3.c @@ -90,8 +90,8 @@ static PHP_RINIT_FUNCTION(typehints) #endif typehints_globals_ptr = ZEPHIR_VGLOBAL; - php_zephir_init_globals(typehints_globals_ptr TSRMLS_CC); - zephir_initialize_memory(typehints_globals_ptr TSRMLS_CC); + php_zephir_init_globals(typehints_globals_ptr); + zephir_initialize_memory(typehints_globals_ptr); return SUCCESS; @@ -125,8 +125,8 @@ static PHP_MINFO_FUNCTION(typehints) static PHP_GINIT_FUNCTION(typehints) { - php_zephir_init_globals(typehints_globals TSRMLS_CC); - php_zephir_init_module_globals(typehints_globals TSRMLS_CC); + php_zephir_init_globals(typehints_globals); + php_zephir_init_module_globals(typehints_globals); } static PHP_GSHUTDOWN_FUNCTION(typehints)