diff --git a/.ci/install-zephir.sh b/.ci/install-zephir.sh deleted file mode 100755 index e1040a952c2..00000000000 --- a/.ci/install-zephir.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash -# -# This file is part of the Phalcon Framework. -# -# (c) Phalcon Team -# -# For the full copyright and license information, please view the -# LICENSE.txt file that was distributed with this source code. - -# TODO: Move Zephir installation to composer.json - -: "${ZEPHIR_VERSION:=master}" -: "${DEFAULT_COMPOSER_FLAGS:=}" - -mkdir -p "$HOME/bin" -if [[ ! $ZEPHIR_VERSION =~ ^(master|development)$ ]]; then - wget \ - --no-clobber \ - -O "$HOME/bin/zephir" \ - "https://github.com/phalcon/zephir/releases/download/$ZEPHIR_VERSION/zephir.phar" - chmod +x "$HOME/bin/zephir" - exit 0 -fi - -git clone -b "$ZEPHIR_VERSION" --depth 1 -q https://github.com/phalcon/zephir -pushd zephir 1>/dev/null || exit 1 - -# Executes the command in a subshell. -# It inherits everything from the calling script but does not -# transmit any change back. -(eval "composer install $DEFAULT_COMPOSER_FLAGS") - -ln -s "$(pwd)/zephir" "$HOME/bin/zephir" - -popd 1>/dev/null || exit 1 diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index b3f46d5c502..f199537a13a 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - php: [ '7.4', '8.0', '8.1', '8.2' ] + php: [ '8.0', '8.1', '8.2', '8.3' ] name: Build Dockerfile PHP ${{ matrix.php }} steps: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f8d7de18b38..01b074dfae3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,9 +19,8 @@ on: env: # All versions should be declared here - PHALCON_VERSION: 5.4.0 - ZEPHIR_PARSER_VERSION: 1.5.3 - ZEPHIR_VERSION: 0.17.0 + PHALCON_VERSION: 5.5.0 + ZEPHIR_PARSER_VERSION: 1.6.0 # For tests LANG: en_US.UTF-8 @@ -49,8 +48,7 @@ jobs: - id: setup-zephir-ext name: Setup Zephir Extensions run: | - echo "::set-output name=extensions::zephir_parser-${{ env.ZEPHIR_PARSER_VERSION }}" -# echo "extensions=zephir_parser-${{ env.ZEPHIR_PARSER_VERSION }}" >> "$GITHUB_ENV" # Need to change the templates to use this + echo "extensions=zephir_parser-${{ env.ZEPHIR_PARSER_VERSION }}" >> "$GITHUB_OUTPUT" # PHP CodeSniffer inspection @@ -71,10 +69,10 @@ jobs: generate: needs: setup_workflow - uses: zephir-lang/templates/.github/workflows/phalcon-pecl.yml@main + uses: zephir-lang/templates/.github/workflows/phalcon-pecl-zephir-composer.yml@main with: extensions: ${{ needs.setup_workflow.outputs.zephir_extensions }} - php_version: '8.2' + php_version: '8.3' secrets: composer-token: ${{ secrets.GITHUB_TOKEN }} @@ -88,7 +86,7 @@ jobs: strategy: fail-fast: false matrix: - php: [ '7.4', '8.0', '8.1', '8.2' ] + php: [ '8.0', '8.1', '8.2', '8.3' ] ts: [ 'nts', 'ts' ] arch: [ 'x64' ] @@ -104,12 +102,10 @@ jobs: # macOS - { name: macos-clang, os: macos-12, compiler: clang } # Windows - - { php: '7.4', ts: 'ts', arch: 'x64', name: 'windows2019-vc15', os: 'windows-2019', compiler: 'vc15' } - - { php: '7.4', ts: 'nts', arch: 'x64', name: 'windows2019-vc15', os: 'windows-2019', compiler: 'vc15' } - { php: '8.0', ts: 'ts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16' } - { php: '8.0', ts: 'nts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16' } - - { php: '8.1', ts: 'ts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16' } - - { php: '8.1', ts: 'nts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16' } + #- { php: '8.1', ts: 'ts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16' } + #- { php: '8.1', ts: 'nts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16' } # Most of the extensions wasn't compiled for PHP 8.2. # So it is not possible to test in this version, inside Windows OS. # List of .dlls - https://windows.php.net/downloads/pecl/releases/ @@ -182,7 +178,7 @@ jobs: $PhalconExtPath = "$(php-config --extension-dir)/phalcon.so" } echo "::set-output name=extension-path::$PhalconExtPath" -# echo "extension-path=$PhalconExtPath" >> "$GITHUB_ENV" # This needs to be checked, used below somehow +# echo "extension-path=$PhalconExtPath" >> "$GITHUB_OUTPUT" - name: Creates build artifact with Phalcon extension uses: ./.github/actions/pack-phalcon-ext @@ -272,7 +268,7 @@ jobs: strategy: fail-fast: false matrix: - php: [ '7.4', '8.0', '8.1', '8.2' ] + php: [ '8.0', '8.1', '8.2', '8.3' ] steps: - uses: actions/checkout@v3 @@ -309,7 +305,7 @@ jobs: run: composer validate --no-check-all --no-check-publish - name: "Install development dependencies with Composer" - uses: "ramsey/composer-install@v2" + uses: ramsey/composer-install@v2 with: composer-options: "--prefer-dist" diff --git a/BACKERS.md b/BACKERS.md index c535cc308c7..748d4fe5a63 100644 --- a/BACKERS.md +++ b/BACKERS.md @@ -105,13 +105,11 @@ Thanks for the support - - diff --git a/CHANGELOG-5.0.md b/CHANGELOG-5.0.md index cd3bc278d4d..e5366d16315 100644 --- a/CHANGELOG-5.0.md +++ b/CHANGELOG-5.0.md @@ -1,5 +1,25 @@ # Changelog +## [5.5.0](https://github.com/phalcon/cphalcon/releases/tag/v5.5.0) (2023-12-25) + +### Changed + +- Shifted minimal support from PHP 7.4 to PHP 8.0 [#16477](https://github.com/phalcon/cphalcon/issues/16477) +- Changed `Phalcon\Mvc\Model::toArray` to use getters if present [#16320](https://github.com/phalcon/cphalcon/issues/16320) +- Adjusted return types identical to original interface `int|false` in `Phalcon\Session\Adapter\*::gc()` [#16477](https://github.com/phalcon/cphalcon/issues/16477) +- Changed return type of `Phalcon\Config\Adapter\Ini::cast()` to `mixed` [#16477](https://github.com/phalcon/cphalcon/issues/16477) + +### Added + +- Added support for PHP 8.3 [#16477](https://github.com/phalcon/cphalcon/issues/16477) + +### Fixed + +- Fixed `Phalcon\Filter\Validation\Validator\Numericality` to return false when input has spaces [#16461](https://github.com/phalcon/cphalcon/issues/16461) +- Fixed `Phalcon\Mvc\Model\ResultsetSimple::toArray` to ignore numeric indexes in case results come as not `fetch_assoc` [#16467](https://github.com/phalcon/cphalcon/issues/16467) + +### Removed + ## [5.4.0](https://github.com/phalcon/cphalcon/releases/tag/v5.4.0) (2023-10-25) ### Changed diff --git a/composer.json b/composer.json index e06dccf65b4..48aad511f2f 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ } ], "require": { - "php": ">=7.4" + "php": ">=8.0" }, "require-dev": { "ext-apcu": "*", @@ -50,13 +50,13 @@ "codeception/module-redis": "^1.0.0", "friendsofphp/php-cs-fixer": "~3.0", "mustache/mustache": "^2.14.1", - "phalcon/ide-stubs": "^4.1", - "phalcon/zephir": "^0.17", + "phalcon/ide-stubs": "^5.4", + "phalcon/zephir": "dev-development", "phpunit/phpunit": "^9.0", "predis/predis": "^1.1", "squizlabs/php_codesniffer": "^3.4", "twig/twig": "~1.36", - "vimeo/psalm": "^4.7", + "vimeo/psalm": "^5.18", "vlucas/phpdotenv": "^v5.4" }, "config": { @@ -89,5 +89,19 @@ "source": "https://github.com/phalcon/cphalcon", "docs": "https://phalcon.io/docs/", "rss": "https://blog.phalcon.io/rss" + }, + "scripts": { + "cs": "php -d extension=ext/modules/phalcon.so ./vendor/bin/phpcs --standard=phpcs.xml", + "cs-fix": "php -d extension=ext/modules/phalcon.so ./vendor/bin/phpcbf --standard=phpcs.xml", + "test-unit": "php -d extension=ext/modules/phalcon.so ./vendor/bin/codecept run --ext DotReporter unit", + "test-cli": "php -d extension=ext/modules/phalcon.so ./vendor/bin/codecept run --ext DotReporter cli", + "test-integration": "php -d extension=ext/modules/phalcon.so ./vendor/bin/codecept run --ext DotReporter integration", + "test-db-common": "php -d extension=ext/modules/phalcon.so ./vendor/bin/codecept run --ext DotReporter database -g common", + "test-db-mysql": "php -d extension=ext/modules/phalcon.so ./vendor/bin/codecept run --ext DotReporter database --env mysql -g mysql", + "test-db-pgsql": "php -d extension=ext/modules/phalcon.so ./vendor/bin/codecept run --ext DotReporter database --env pgsql -g pgsql", + "test-db-sqlite": "php -d extension=ext/modules/phalcon.so ./vendor/bin/codecept run --ext DotReporter database --env sqlite -g sqlite", + "test-db": "composer test-db-common && composer test-db-mysql && composer test-db-sqlite", + "test-all": "composer test-unit && composer test-cli && composer test-integration && composer test-db", + "analyze": "php -d extension=ext/modules/phalcon.so ./vendor/bin/psalm" } } diff --git a/composer.lock b/composer.lock index 34ec5e5be5d..88604068286 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "4a7a516afe5b3dcf149d770fb710a6c5", + "content-hash": "b72d11dba93423cc6d6c77c01c90896e", "packages": [], "packages-dev": [ { @@ -1017,79 +1017,6 @@ }, "time": "2022-01-31T19:25:15+00:00" }, - { - "name": "composer/package-versions-deprecated", - "version": "1.11.99.5", - "source": { - "type": "git", - "url": "https://github.com/composer/package-versions-deprecated.git", - "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b4f54f74ef3453349c24a845d22392cd31e65f1d", - "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.1.0 || ^2.0", - "php": "^7 || ^8" - }, - "replace": { - "ocramius/package-versions": "1.11.99" - }, - "require-dev": { - "composer/composer": "^1.9.3 || ^2.0@dev", - "ext-zip": "^1.13", - "phpunit/phpunit": "^6.5 || ^7" - }, - "type": "composer-plugin", - "extra": { - "class": "PackageVersions\\Installer", - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "PackageVersions\\": "src/PackageVersions" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be" - } - ], - "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", - "support": { - "issues": "https://github.com/composer/package-versions-deprecated/issues", - "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.5" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-01-17T14:14:24+00:00" - }, { "name": "composer/pcre", "version": "3.1.1", @@ -1563,52 +1490,110 @@ }, "time": "2022-03-02T22:36:06+00:00" }, + { + "name": "fidry/cpu-core-counter", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/theofidry/cpu-core-counter.git", + "reference": "85193c0b0cb5c47894b5eaec906e946f054e7077" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/85193c0b0cb5c47894b5eaec906e946f054e7077", + "reference": "85193c0b0cb5c47894b5eaec906e946f054e7077", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "fidry/makefile": "^0.2.0", + "fidry/php-cs-fixer-config": "^1.1.2", + "phpstan/extension-installer": "^1.2.0", + "phpstan/phpstan": "^1.9.2", + "phpstan/phpstan-deprecation-rules": "^1.0.0", + "phpstan/phpstan-phpunit": "^1.2.2", + "phpstan/phpstan-strict-rules": "^1.4.4", + "phpunit/phpunit": "^8.5.31 || ^9.5.26", + "webmozarts/strict-phpunit": "^7.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Fidry\\CpuCoreCounter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Théo FIDRY", + "email": "theo.fidry@gmail.com" + } + ], + "description": "Tiny utility to get the number of CPU cores.", + "keywords": [ + "CPU", + "core" + ], + "support": { + "issues": "https://github.com/theofidry/cpu-core-counter/issues", + "source": "https://github.com/theofidry/cpu-core-counter/tree/1.0.0" + }, + "funding": [ + { + "url": "https://github.com/theofidry", + "type": "github" + } + ], + "time": "2023-09-17T21:38:23+00:00" + }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.35.1", + "version": "v3.42.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "ec1ccc264994b6764882669973ca435cf05bab08" + "reference": "632ef1be3447a9b890bef06147475facee535d0f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/ec1ccc264994b6764882669973ca435cf05bab08", - "reference": "ec1ccc264994b6764882669973ca435cf05bab08", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/632ef1be3447a9b890bef06147475facee535d0f", + "reference": "632ef1be3447a9b890bef06147475facee535d0f", "shasum": "" }, "require": { - "composer/semver": "^3.3", + "composer/semver": "^3.4", "composer/xdebug-handler": "^3.0.3", "ext-json": "*", "ext-tokenizer": "*", "php": "^7.4 || ^8.0", "sebastian/diff": "^4.0 || ^5.0", - "symfony/console": "^5.4 || ^6.0", - "symfony/event-dispatcher": "^5.4 || ^6.0", - "symfony/filesystem": "^5.4 || ^6.0", - "symfony/finder": "^5.4 || ^6.0", - "symfony/options-resolver": "^5.4 || ^6.0", - "symfony/polyfill-mbstring": "^1.27", - "symfony/polyfill-php80": "^1.27", - "symfony/polyfill-php81": "^1.27", - "symfony/process": "^5.4 || ^6.0", - "symfony/stopwatch": "^5.4 || ^6.0" + "symfony/console": "^5.4 || ^6.0 || ^7.0", + "symfony/event-dispatcher": "^5.4 || ^6.0 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.0 || ^7.0", + "symfony/finder": "^5.4 || ^6.0 || ^7.0", + "symfony/options-resolver": "^5.4 || ^6.0 || ^7.0", + "symfony/polyfill-mbstring": "^1.28", + "symfony/polyfill-php80": "^1.28", + "symfony/polyfill-php81": "^1.28", + "symfony/process": "^5.4 || ^6.0 || ^7.0", + "symfony/stopwatch": "^5.4 || ^6.0 || ^7.0" }, "require-dev": { "facile-it/paraunit": "^1.3 || ^2.0", "justinrainbow/json-schema": "^5.2", - "keradus/cli-executor": "^2.0", + "keradus/cli-executor": "^2.1", "mikey179/vfsstream": "^1.6.11", - "php-coveralls/php-coveralls": "^2.5.3", + "php-coveralls/php-coveralls": "^2.7", "php-cs-fixer/accessible-object": "^1.1", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", - "phpspec/prophecy": "^1.16", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5", - "symfony/phpunit-bridge": "^6.2.3", - "symfony/yaml": "^5.4 || ^6.0" + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.4", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.4", + "phpunit/phpunit": "^9.6", + "symfony/yaml": "^5.4 || ^6.0 || ^7.0" }, "suggest": { "ext-dom": "For handling output formats in XML", @@ -1646,7 +1631,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.35.1" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.42.0" }, "funding": [ { @@ -1654,28 +1639,28 @@ "type": "github" } ], - "time": "2023-10-12T13:47:26+00:00" + "time": "2023-12-24T14:38:51+00:00" }, { "name": "graham-campbell/result-type", - "version": "v1.1.1", + "version": "v1.1.2", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Result-Type.git", - "reference": "672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831" + "reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831", - "reference": "672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/fbd48bce38f73f8a4ec8583362e732e4095e5862", + "reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.1" + "phpoption/phpoption": "^1.9.2" }, "require-dev": { - "phpunit/phpunit": "^8.5.32 || ^9.6.3 || ^10.0.12" + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" }, "type": "library", "autoload": { @@ -1704,7 +1689,7 @@ ], "support": { "issues": "https://github.com/GrahamCampbell/Result-Type/issues", - "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.1" + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.2" }, "funding": [ { @@ -1716,20 +1701,20 @@ "type": "tidelift" } ], - "time": "2023-02-25T20:23:15+00:00" + "time": "2023-11-12T22:16:48+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "7.8.0", + "version": "7.8.1", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9" + "reference": "41042bc7ab002487b876a0683fc8dce04ddce104" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/1110f66a6530a40fe7aea0378fe608ee2b2248f9", - "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/41042bc7ab002487b876a0683fc8dce04ddce104", + "reference": "41042bc7ab002487b876a0683fc8dce04ddce104", "shasum": "" }, "require": { @@ -1744,11 +1729,11 @@ "psr/http-client-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", + "bamarni/composer-bin-plugin": "^1.8.2", "ext-curl": "*", "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", "php-http/message-factory": "^1.1", - "phpunit/phpunit": "^8.5.29 || ^9.5.23", + "phpunit/phpunit": "^8.5.36 || ^9.6.15", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -1826,7 +1811,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.8.0" + "source": "https://github.com/guzzle/guzzle/tree/7.8.1" }, "funding": [ { @@ -1842,28 +1827,28 @@ "type": "tidelift" } ], - "time": "2023-08-27T10:20:53+00:00" + "time": "2023-12-03T20:35:24+00:00" }, { "name": "guzzlehttp/promises", - "version": "2.0.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "111166291a0f8130081195ac4556a5587d7f1b5d" + "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/111166291a0f8130081195ac4556a5587d7f1b5d", - "reference": "111166291a0f8130081195ac4556a5587d7f1b5d", + "url": "https://api.github.com/repos/guzzle/promises/zipball/bbff78d96034045e58e13dedd6ad91b5d1253223", + "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", - "phpunit/phpunit": "^8.5.29 || ^9.5.23" + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.36 || ^9.6.15" }, "type": "library", "extra": { @@ -1909,7 +1894,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.1" + "source": "https://github.com/guzzle/promises/tree/2.0.2" }, "funding": [ { @@ -1925,20 +1910,20 @@ "type": "tidelift" } ], - "time": "2023-08-03T15:11:55+00:00" + "time": "2023-12-03T20:19:20+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.6.1", + "version": "2.6.2", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727" + "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/be45764272e8873c72dbe3d2edcfdfcc3bc9f727", - "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221", + "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221", "shasum": "" }, "require": { @@ -1952,9 +1937,9 @@ "psr/http-message-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", + "bamarni/composer-bin-plugin": "^1.8.2", "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.29 || ^9.5.23" + "phpunit/phpunit": "^8.5.36 || ^9.6.15" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" @@ -2025,7 +2010,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.6.1" + "source": "https://github.com/guzzle/psr7/tree/2.6.2" }, "funding": [ { @@ -2041,20 +2026,20 @@ "type": "tidelift" } ], - "time": "2023-08-27T10:13:57+00:00" + "time": "2023-12-03T20:05:35+00:00" }, { "name": "monolog/monolog", - "version": "2.9.1", + "version": "2.9.2", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "f259e2b15fb95494c83f52d3caad003bbf5ffaa1" + "reference": "437cb3628f4cf6042cc10ae97fc2b8472e48ca1f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f259e2b15fb95494c83f52d3caad003bbf5ffaa1", - "reference": "f259e2b15fb95494c83f52d3caad003bbf5ffaa1", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/437cb3628f4cf6042cc10ae97fc2b8472e48ca1f", + "reference": "437cb3628f4cf6042cc10ae97fc2b8472e48ca1f", "shasum": "" }, "require": { @@ -2131,7 +2116,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.9.1" + "source": "https://github.com/Seldaek/monolog/tree/2.9.2" }, "funding": [ { @@ -2143,7 +2128,7 @@ "type": "tidelift" } ], - "time": "2023-02-06T13:44:46+00:00" + "time": "2023-10-27T15:25:26+00:00" }, { "name": "mustache/mustache", @@ -2307,16 +2292,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.17.1", + "version": "v4.18.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" + "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", - "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/1bcbb2179f97633e98bbbc87044ee2611c7d7999", + "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999", "shasum": "" }, "require": { @@ -2357,79 +2342,26 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1" - }, - "time": "2023-08-13T19:53:39+00:00" - }, - { - "name": "openlss/lib-array2xml", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/nullivex/lib-array2xml.git", - "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nullivex/lib-array2xml/zipball/a91f18a8dfc69ffabe5f9b068bc39bb202c81d90", - "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90", - "shasum": "" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.18.0" }, - "require": { - "php": ">=5.3.2" - }, - "type": "library", - "autoload": { - "psr-0": { - "LSS": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Bryan Tong", - "email": "bryan@nullivex.com", - "homepage": "https://www.nullivex.com" - }, - { - "name": "Tony Butler", - "email": "spudz76@gmail.com", - "homepage": "https://www.nullivex.com" - } - ], - "description": "Array2XML conversion library credit to lalit.org", - "homepage": "https://www.nullivex.com", - "keywords": [ - "array", - "array conversion", - "xml", - "xml conversion" - ], - "support": { - "issues": "https://github.com/nullivex/lib-array2xml/issues", - "source": "https://github.com/nullivex/lib-array2xml/tree/master" - }, - "time": "2019-03-29T20:06:56+00:00" + "time": "2023-12-10T21:03:43+00:00" }, { "name": "phalcon/ide-stubs", - "version": "v4.1.0", + "version": "v5.4.0", "source": { "type": "git", "url": "https://github.com/phalcon/ide-stubs.git", - "reference": "77384e4f42542f11b065b2a860b9bca2ea20ad5a" + "reference": "7e4560a5f0d2f67f5e20432ad9b5aba1530fd7f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phalcon/ide-stubs/zipball/77384e4f42542f11b065b2a860b9bca2ea20ad5a", - "reference": "77384e4f42542f11b065b2a860b9bca2ea20ad5a", + "url": "https://api.github.com/repos/phalcon/ide-stubs/zipball/7e4560a5f0d2f67f5e20432ad9b5aba1530fd7f2", + "reference": "7e4560a5f0d2f67f5e20432ad9b5aba1530fd7f2", "shasum": "" }, "require": { - "php": ">=7.2.0" + "php": ">=7.4" }, "require-dev": { "squizlabs/php_codesniffer": "3.*", @@ -2479,20 +2411,20 @@ "type": "open_collective" } ], - "time": "2020-11-13T10:58:11+00:00" + "time": "2023-10-25T15:31:53+00:00" }, { "name": "phalcon/zephir", - "version": "0.17.0", + "version": "dev-development", "source": { "type": "git", "url": "https://github.com/zephir-lang/zephir.git", - "reference": "9f99da6da419a6f243a85645ae500e4ac76b7225" + "reference": "254df48dda42de38bf1c3bbbac4f59a3b5728e5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zephir-lang/zephir/zipball/9f99da6da419a6f243a85645ae500e4ac76b7225", - "reference": "9f99da6da419a6f243a85645ae500e4ac76b7225", + "url": "https://api.github.com/repos/zephir-lang/zephir/zipball/254df48dda42de38bf1c3bbbac4f59a3b5728e5c", + "reference": "254df48dda42de38bf1c3bbbac4f59a3b5728e5c", "shasum": "" }, "require": { @@ -2504,7 +2436,7 @@ "ext-xml": "*", "ext-zlib": "*", "monolog/monolog": "^2.3", - "php": ">=7.4.1", + "php": ">=8.0", "symfony/console": "^5.2", "symfony/event-dispatcher": "^5.3" }, @@ -2514,18 +2446,17 @@ "ext-pdo_sqlite": "*", "ext-zip": "*", "phpunit/phpunit": "9.5.28", - "psr/log": "1.1.*" + "psr/log": "1.1.*", + "squizlabs/php_codesniffer": "^3.7" }, + "default-branch": true, "bin": [ "zephir" ], "type": "library", "autoload": { - "files": [ - "Library/functions.php" - ], "psr-4": { - "Zephir\\": "Library" + "Zephir\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2567,7 +2498,7 @@ "type": "github" } ], - "time": "2023-02-11T20:14:50+00:00" + "time": "2023-12-23T15:37:37+00:00" }, { "name": "phar-io/manifest", @@ -2850,16 +2781,16 @@ }, { "name": "phpoption/phpoption", - "version": "1.9.1", + "version": "1.9.2", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "dd3a383e599f49777d8b628dadbb90cae435b87e" + "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/dd3a383e599f49777d8b628dadbb90cae435b87e", - "reference": "dd3a383e599f49777d8b628dadbb90cae435b87e", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/80735db690fe4fc5c76dfa7f9b770634285fa820", + "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820", "shasum": "" }, "require": { @@ -2867,7 +2798,7 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.32 || ^9.6.3 || ^10.0.12" + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" }, "type": "library", "extra": { @@ -2909,7 +2840,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.9.1" + "source": "https://github.com/schmittjoh/php-option/tree/1.9.2" }, "funding": [ { @@ -2921,20 +2852,20 @@ "type": "tidelift" } ], - "time": "2023-02-25T19:38:58+00:00" + "time": "2023-11-12T21:59:55+00:00" }, { "name": "phpstan/phpdoc-parser", - "version": "1.24.2", + "version": "1.24.5", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "bcad8d995980440892759db0c32acae7c8e79442" + "reference": "fedf211ff14ec8381c9bf5714e33a7a552dd1acc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/bcad8d995980440892759db0c32acae7c8e79442", - "reference": "bcad8d995980440892759db0c32acae7c8e79442", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/fedf211ff14ec8381c9bf5714e33a7a552dd1acc", + "reference": "fedf211ff14ec8381c9bf5714e33a7a552dd1acc", "shasum": "" }, "require": { @@ -2966,29 +2897,29 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.2" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.5" }, - "time": "2023-09-26T12:28:12+00:00" + "time": "2023-12-16T09:33:33+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.29", + "version": "9.2.30", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76" + "reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6a3a87ac2bbe33b25042753df8195ba4aa534c76", - "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ca2bd87d2f9215904682a9cb9bb37dda98e76089", + "reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.15", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=7.3", "phpunit/php-file-iterator": "^3.0.3", "phpunit/php-text-template": "^2.0.2", @@ -3038,7 +2969,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.29" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.30" }, "funding": [ { @@ -3046,7 +2977,7 @@ "type": "github" } ], - "time": "2023-09-19T04:57:46+00:00" + "time": "2023-12-22T06:47:57+00:00" }, { "name": "phpunit/php-file-iterator", @@ -3291,16 +3222,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.13", + "version": "9.6.15", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be" + "reference": "05017b80304e0eb3f31d90194a563fd53a6021f1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f3d767f7f9e191eab4189abe41ab37797e30b1be", - "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/05017b80304e0eb3f31d90194a563fd53a6021f1", + "reference": "05017b80304e0eb3f31d90194a563fd53a6021f1", "shasum": "" }, "require": { @@ -3374,7 +3305,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.13" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.15" }, "funding": [ { @@ -3390,7 +3321,7 @@ "type": "tidelift" } ], - "time": "2023-09-19T05:39:22+00:00" + "time": "2023-12-01T16:55:19+00:00" }, { "name": "predis/predis", @@ -3460,22 +3391,27 @@ }, { "name": "psr/container", - "version": "1.1.2", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", "shasum": "" }, "require": { "php": ">=7.4.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -3502,9 +3438,9 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.2" + "source": "https://github.com/php-fig/container/tree/2.0.2" }, - "time": "2021-11-05T16:50:12+00:00" + "time": "2021-11-05T16:47:00+00:00" }, { "name": "psr/event-dispatcher", @@ -3718,30 +3654,30 @@ }, { "name": "psr/log", - "version": "1.1.4", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "url": "https://api.github.com/repos/php-fig/log/zipball/ef29f6d262798707a9edd554e2b82517ef3a9376", + "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -3762,9 +3698,9 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" + "source": "https://github.com/php-fig/log/tree/2.0.0" }, - "time": "2021-05-03T11:20:27+00:00" + "time": "2021-07-14T16:41:46+00:00" }, { "name": "ralouphie/getallheaders", @@ -4053,20 +3989,20 @@ }, { "name": "sebastian/complexity", - "version": "2.0.2", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", "shasum": "" }, "require": { - "nikic/php-parser": "^4.7", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=7.3" }, "require-dev": { @@ -4098,7 +4034,7 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" }, "funding": [ { @@ -4106,7 +4042,7 @@ "type": "github" } ], - "time": "2020-10-26T15:52:27+00:00" + "time": "2023-12-22T06:19:30+00:00" }, { "name": "sebastian/diff", @@ -4380,20 +4316,20 @@ }, { "name": "sebastian/lines-of-code", - "version": "1.0.3", + "version": "1.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", "shasum": "" }, "require": { - "nikic/php-parser": "^4.6", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=7.3" }, "require-dev": { @@ -4425,7 +4361,7 @@ "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" }, "funding": [ { @@ -4433,7 +4369,7 @@ "type": "github" } ], - "time": "2020-11-28T06:42:11+00:00" + "time": "2023-12-22T06:20:34+00:00" }, { "name": "sebastian/object-enumerator", @@ -4774,18 +4710,81 @@ ], "time": "2020-09-28T06:39:44+00:00" }, + { + "name": "spatie/array-to-xml", + "version": "3.2.2", + "source": { + "type": "git", + "url": "https://github.com/spatie/array-to-xml.git", + "reference": "96be97e664c87613121d073ea39af4c74e57a7f8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/96be97e664c87613121d073ea39af4c74e57a7f8", + "reference": "96be97e664c87613121d073ea39af4c74e57a7f8", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "php": "^8.0" + }, + "require-dev": { + "mockery/mockery": "^1.2", + "pestphp/pest": "^1.21", + "spatie/pest-plugin-snapshots": "^1.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\ArrayToXml\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://freek.dev", + "role": "Developer" + } + ], + "description": "Convert an array to xml", + "homepage": "https://github.com/spatie/array-to-xml", + "keywords": [ + "array", + "convert", + "xml" + ], + "support": { + "source": "https://github.com/spatie/array-to-xml/tree/3.2.2" + }, + "funding": [ + { + "url": "https://spatie.be/open-source/support-us", + "type": "custom" + }, + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2023-11-14T14:08:51+00:00" + }, { "name": "squizlabs/php_codesniffer", - "version": "3.7.2", + "version": "3.8.0", "source": { "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879" + "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", + "reference": "5805f7a4e4958dbb5e944ef1e6edae0a303765e7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ed8e00df0a83aa96acf703f8c2979ff33341f879", - "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/5805f7a4e4958dbb5e944ef1e6edae0a303765e7", + "reference": "5805f7a4e4958dbb5e944ef1e6edae0a303765e7", "shasum": "" }, "require": { @@ -4795,7 +4794,7 @@ "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" }, "bin": [ "bin/phpcs", @@ -4814,35 +4813,58 @@ "authors": [ { "name": "Greg Sherwood", - "role": "lead" + "role": "Former lead" + }, + { + "name": "Juliette Reinders Folmer", + "role": "Current lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" } ], "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", "keywords": [ "phpcs", "standards", "static analysis" ], "support": { - "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", - "source": "https://github.com/squizlabs/PHP_CodeSniffer", - "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues", + "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy", + "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki" }, - "time": "2023-02-22T23:07:41+00:00" + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + } + ], + "time": "2023-12-08T12:32:31+00:00" }, { "name": "symfony/browser-kit", - "version": "v5.4.21", + "version": "v5.4.31", "source": { "type": "git", "url": "https://github.com/symfony/browser-kit.git", - "reference": "a866ca7e396f15d7efb6d74a8a7d364d4e05b704" + "reference": "0ed1f634a36606f2065eec221b3975e05016cbbe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/a866ca7e396f15d7efb6d74a8a7d364d4e05b704", - "reference": "a866ca7e396f15d7efb6d74a8a7d364d4e05b704", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/0ed1f634a36606f2065eec221b3975e05016cbbe", + "reference": "0ed1f634a36606f2065eec221b3975e05016cbbe", "shasum": "" }, "require": { @@ -4885,7 +4907,7 @@ "description": "Simulates the behavior of a web browser, allowing you to make requests, click on links and submit forms programmatically", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/browser-kit/tree/v5.4.21" + "source": "https://github.com/symfony/browser-kit/tree/v5.4.31" }, "funding": [ { @@ -4901,20 +4923,20 @@ "type": "tidelift" } ], - "time": "2023-02-14T08:03:56+00:00" + "time": "2023-10-31T07:58:33+00:00" }, { "name": "symfony/console", - "version": "v5.4.28", + "version": "v5.4.32", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "f4f71842f24c2023b91237c72a365306f3c58827" + "reference": "c70df1ffaf23a8d340bded3cfab1b86752ad6ed7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/f4f71842f24c2023b91237c72a365306f3c58827", - "reference": "f4f71842f24c2023b91237c72a365306f3c58827", + "url": "https://api.github.com/repos/symfony/console/zipball/c70df1ffaf23a8d340bded3cfab1b86752ad6ed7", + "reference": "c70df1ffaf23a8d340bded3cfab1b86752ad6ed7", "shasum": "" }, "require": { @@ -4984,7 +5006,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.28" + "source": "https://github.com/symfony/console/tree/v5.4.32" }, "funding": [ { @@ -5000,7 +5022,7 @@ "type": "tidelift" } ], - "time": "2023-08-07T06:12:30+00:00" + "time": "2023-11-18T18:23:04+00:00" }, { "name": "symfony/css-selector", @@ -5070,25 +5092,25 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.2", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" + "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", + "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.0.2" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -5117,7 +5139,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.2" }, "funding": [ { @@ -5133,20 +5155,20 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-01-02T09:55:41+00:00" }, { "name": "symfony/dom-crawler", - "version": "v5.4.25", + "version": "v5.4.32", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "d2aefa5a7acc5511422792931d14d1be96fe9fea" + "reference": "728f1fc136252a626ba5a69c02bd66a3697ff201" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/d2aefa5a7acc5511422792931d14d1be96fe9fea", - "reference": "d2aefa5a7acc5511422792931d14d1be96fe9fea", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/728f1fc136252a626ba5a69c02bd66a3697ff201", + "reference": "728f1fc136252a626ba5a69c02bd66a3697ff201", "shasum": "" }, "require": { @@ -5192,7 +5214,7 @@ "description": "Eases DOM navigation for HTML and XML documents", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dom-crawler/tree/v5.4.25" + "source": "https://github.com/symfony/dom-crawler/tree/v5.4.32" }, "funding": [ { @@ -5208,7 +5230,7 @@ "type": "tidelift" } ], - "time": "2023-06-05T08:05:41+00:00" + "time": "2023-11-17T20:43:48+00:00" }, { "name": "symfony/event-dispatcher", @@ -5297,20 +5319,20 @@ }, { "name": "symfony/event-dispatcher-contracts", - "version": "v2.5.2", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1" + "reference": "7bc61cc2db649b4637d331240c5346dcc7708051" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/f98b54df6ad059855739db6fcbc2d36995283fe1", - "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/7bc61cc2db649b4637d331240c5346dcc7708051", + "reference": "7bc61cc2db649b4637d331240c5346dcc7708051", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", "psr/event-dispatcher": "^1" }, "suggest": { @@ -5319,7 +5341,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -5356,7 +5378,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.5.2" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.0.2" }, "funding": [ { @@ -5372,27 +5394,26 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-01-02T09:55:41+00:00" }, { "name": "symfony/filesystem", - "version": "v5.4.25", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364" + "reference": "3d49eec03fda1f0fc19b7349fbbe55ebc1004214" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/0ce3a62c9579a53358d3a7eb6b3dfb79789a6364", - "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/3d49eec03fda1f0fc19b7349fbbe55ebc1004214", + "reference": "3d49eec03fda1f0fc19b7349fbbe55ebc1004214", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.8", - "symfony/polyfill-php80": "^1.16" + "symfony/polyfill-mbstring": "~1.8" }, "type": "library", "autoload": { @@ -5420,7 +5441,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.4.25" + "source": "https://github.com/symfony/filesystem/tree/v6.0.19" }, "funding": [ { @@ -5436,7 +5457,7 @@ "type": "tidelift" } ], - "time": "2023-05-31T13:04:02+00:00" + "time": "2023-01-20T17:44:14+00:00" }, { "name": "symfony/finder", @@ -5503,23 +5524,21 @@ }, { "name": "symfony/options-resolver", - "version": "v5.4.21", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9" + "reference": "6a180d1c45e0d9797470ca9eb46215692de00fa3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9", - "reference": "4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/6a180d1c45e0d9797470ca9eb46215692de00fa3", + "reference": "6a180d1c45e0d9797470ca9eb46215692de00fa3", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php73": "~1.0", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.0.2", + "symfony/deprecation-contracts": "^2.1|^3" }, "type": "library", "autoload": { @@ -5552,7 +5571,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v5.4.21" + "source": "https://github.com/symfony/options-resolver/tree/v6.0.19" }, "funding": [ { @@ -5568,7 +5587,7 @@ "type": "tidelift" } ], - "time": "2023-02-14T08:03:56+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/polyfill-ctype", @@ -6143,21 +6162,20 @@ }, { "name": "symfony/process", - "version": "v5.4.28", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b" + "reference": "2114fd60f26a296cc403a7939ab91478475a33d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b", - "reference": "45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b", + "url": "https://api.github.com/repos/symfony/process/zipball/2114fd60f26a296cc403a7939ab91478475a33d4", + "reference": "2114fd60f26a296cc403a7939ab91478475a33d4", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.0.2" }, "type": "library", "autoload": { @@ -6185,7 +6203,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.4.28" + "source": "https://github.com/symfony/process/tree/v6.0.19" }, "funding": [ { @@ -6201,26 +6219,25 @@ "type": "tidelift" } ], - "time": "2023-08-07T10:36:04+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.5.2", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c" + "reference": "d78d39c1599bd1188b8e26bb341da52c3c6d8a66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", - "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/d78d39c1599bd1188b8e26bb341da52c3c6d8a66", + "reference": "d78d39c1599bd1188b8e26bb341da52c3c6d8a66", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1|^3" + "php": ">=8.0.2", + "psr/container": "^2.0" }, "conflict": { "ext-psr": "<1.1|>=2" @@ -6231,7 +6248,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -6268,7 +6285,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.2" + "source": "https://github.com/symfony/service-contracts/tree/v3.0.2" }, "funding": [ { @@ -6284,24 +6301,24 @@ "type": "tidelift" } ], - "time": "2022-05-30T19:17:29+00:00" + "time": "2022-05-30T19:17:58+00:00" }, { "name": "symfony/stopwatch", - "version": "v5.4.21", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "f83692cd869a6f2391691d40a01e8acb89e76fee" + "reference": "011e781839dd1d2eb8119f65ac516a530f60226d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/f83692cd869a6f2391691d40a01e8acb89e76fee", - "reference": "f83692cd869a6f2391691d40a01e8acb89e76fee", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/011e781839dd1d2eb8119f65ac516a530f60226d", + "reference": "011e781839dd1d2eb8119f65ac516a530f60226d", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", "symfony/service-contracts": "^1|^2|^3" }, "type": "library", @@ -6330,7 +6347,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v5.4.21" + "source": "https://github.com/symfony/stopwatch/tree/v6.0.19" }, "funding": [ { @@ -6346,38 +6363,37 @@ "type": "tidelift" } ], - "time": "2023-02-14T08:03:56+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/string", - "version": "v5.4.29", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "e41bdc93def20eaf3bfc1537c4e0a2b0680a152d" + "reference": "d9e72497367c23e08bf94176d2be45b00a9d232a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/e41bdc93def20eaf3bfc1537c4e0a2b0680a152d", - "reference": "e41bdc93def20eaf3bfc1537c4e0a2b0680a152d", + "url": "https://api.github.com/repos/symfony/string/zipball/d9e72497367c23e08bf94176d2be45b00a9d232a", + "reference": "d9e72497367c23e08bf94176d2be45b00a9d232a", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "~1.15" + "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/translation-contracts": ">=3.0" + "symfony/translation-contracts": "<2.0" }, "require-dev": { - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", - "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0|^6.0" + "symfony/error-handler": "^5.4|^6.0", + "symfony/http-client": "^5.4|^6.0", + "symfony/translation-contracts": "^2.0|^3.0", + "symfony/var-exporter": "^5.4|^6.0" }, "type": "library", "autoload": { @@ -6416,7 +6432,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.29" + "source": "https://github.com/symfony/string/tree/v6.0.19" }, "funding": [ { @@ -6432,20 +6448,20 @@ "type": "tidelift" } ], - "time": "2023-09-13T11:47:41+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/yaml", - "version": "v5.4.23", + "version": "v5.4.31", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "4cd2e3ea301aadd76a4172756296fe552fb45b0b" + "reference": "f387675d7f5fc4231f7554baa70681f222f73563" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/4cd2e3ea301aadd76a4172756296fe552fb45b0b", - "reference": "4cd2e3ea301aadd76a4172756296fe552fb45b0b", + "url": "https://api.github.com/repos/symfony/yaml/zipball/f387675d7f5fc4231f7554baa70681f222f73563", + "reference": "f387675d7f5fc4231f7554baa70681f222f73563", "shasum": "" }, "require": { @@ -6491,7 +6507,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v5.4.23" + "source": "https://github.com/symfony/yaml/tree/v5.4.31" }, "funding": [ { @@ -6507,20 +6523,20 @@ "type": "tidelift" } ], - "time": "2023-04-23T19:33:36+00:00" + "time": "2023-11-03T14:41:28+00:00" }, { "name": "theseer/tokenizer", - "version": "1.2.1", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96", + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96", "shasum": "" }, "require": { @@ -6549,7 +6565,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + "source": "https://github.com/theseer/tokenizer/tree/1.2.2" }, "funding": [ { @@ -6557,7 +6573,7 @@ "type": "github" } ], - "time": "2021-07-28T10:34:58+00:00" + "time": "2023-11-20T00:12:19+00:00" }, { "name": "twig/twig", @@ -6639,24 +6655,24 @@ }, { "name": "vimeo/psalm", - "version": "4.30.0", + "version": "5.18.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "d0bc6e25d89f649e4f36a534f330f8bb4643dd69" + "reference": "b113f3ed0259fd6e212d87c3df80eec95a6abf19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/d0bc6e25d89f649e4f36a534f330f8bb4643dd69", - "reference": "d0bc6e25d89f649e4f36a534f330f8bb4643dd69", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/b113f3ed0259fd6e212d87c3df80eec95a6abf19", + "reference": "b113f3ed0259fd6e212d87c3df80eec95a6abf19", "shasum": "" }, "require": { "amphp/amp": "^2.4.2", "amphp/byte-stream": "^1.5", - "composer/package-versions-deprecated": "^1.8.0", + "composer-runtime-api": "^2", "composer/semver": "^1.4 || ^2.0 || ^3.0", - "composer/xdebug-handler": "^1.1 || ^2.0 || ^3.0", + "composer/xdebug-handler": "^2.0 || ^3.0", "dnoegel/php-xdg-base-dir": "^0.1.1", "ext-ctype": "*", "ext-dom": "*", @@ -6665,35 +6681,38 @@ "ext-mbstring": "*", "ext-simplexml": "*", "ext-tokenizer": "*", - "felixfbecker/advanced-json-rpc": "^3.0.3", - "felixfbecker/language-server-protocol": "^1.5", + "felixfbecker/advanced-json-rpc": "^3.1", + "felixfbecker/language-server-protocol": "^1.5.2", + "fidry/cpu-core-counter": "^0.4.1 || ^0.5.1 || ^1.0.0", "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", - "nikic/php-parser": "^4.13", - "openlss/lib-array2xml": "^1.0", - "php": "^7.1|^8", - "sebastian/diff": "^3.0 || ^4.0", - "symfony/console": "^3.4.17 || ^4.1.6 || ^5.0 || ^6.0", - "symfony/polyfill-php80": "^1.25", - "webmozart/path-util": "^2.3" + "nikic/php-parser": "^4.16", + "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", + "sebastian/diff": "^4.0 || ^5.0", + "spatie/array-to-xml": "^2.17.0 || ^3.0", + "symfony/console": "^4.1.6 || ^5.0 || ^6.0 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.0 || ^7.0" + }, + "conflict": { + "nikic/php-parser": "4.17.0" }, "provide": { "psalm/psalm": "self.version" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.2", - "brianium/paratest": "^4.0||^6.0", + "amphp/phpunit-util": "^2.0", + "bamarni/composer-bin-plugin": "^1.4", + "brianium/paratest": "^6.9", "ext-curl": "*", + "mockery/mockery": "^1.5", + "nunomaduro/mock-final-classes": "^1.1", "php-parallel-lint/php-parallel-lint": "^1.2", - "phpdocumentor/reflection-docblock": "^5", - "phpmyadmin/sql-parser": "5.1.0||dev-master", - "phpspec/prophecy": ">=1.9.0", - "phpstan/phpdoc-parser": "1.2.* || 1.6.4", - "phpunit/phpunit": "^9.0", - "psalm/plugin-phpunit": "^0.16", - "slevomat/coding-standard": "^7.0", - "squizlabs/php_codesniffer": "^3.5", - "symfony/process": "^4.3 || ^5.0 || ^6.0", - "weirdan/prophecy-shim": "^1.0 || ^2.0" + "phpstan/phpdoc-parser": "^1.6", + "phpunit/phpunit": "^9.6", + "psalm/plugin-mockery": "^1.1", + "psalm/plugin-phpunit": "^0.18", + "slevomat/coding-standard": "^8.4", + "squizlabs/php_codesniffer": "^3.6", + "symfony/process": "^4.4 || ^5.0 || ^6.0 || ^7.0" }, "suggest": { "ext-curl": "In order to send data to shepherd", @@ -6706,20 +6725,17 @@ "psalm-refactor", "psalter" ], - "type": "library", + "type": "project", "extra": { "branch-alias": { - "dev-master": "4.x-dev", + "dev-master": "5.x-dev", + "dev-4.x": "4.x-dev", "dev-3.x": "3.x-dev", "dev-2.x": "2.x-dev", "dev-1.x": "1.x-dev" } }, "autoload": { - "files": [ - "src/functions.php", - "src/spl_object_id.php" - ], "psr-4": { "Psalm\\": "src/Psalm/" } @@ -6737,41 +6753,43 @@ "keywords": [ "code", "inspection", - "php" + "php", + "static analysis" ], "support": { + "docs": "https://psalm.dev/docs", "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/4.30.0" + "source": "https://github.com/vimeo/psalm" }, - "time": "2022-11-06T20:37:08+00:00" + "time": "2023-12-16T09:37:35+00:00" }, { "name": "vlucas/phpdotenv", - "version": "v5.5.0", + "version": "v5.6.0", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7" + "reference": "2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7", - "reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4", + "reference": "2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4", "shasum": "" }, "require": { "ext-pcre": "*", - "graham-campbell/result-type": "^1.0.2", - "php": "^7.1.3 || ^8.0", - "phpoption/phpoption": "^1.8", - "symfony/polyfill-ctype": "^1.23", - "symfony/polyfill-mbstring": "^1.23.1", - "symfony/polyfill-php80": "^1.23.1" + "graham-campbell/result-type": "^1.1.2", + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.2", + "symfony/polyfill-ctype": "^1.24", + "symfony/polyfill-mbstring": "^1.24", + "symfony/polyfill-php80": "^1.24" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.2", "ext-filter": "*", - "phpunit/phpunit": "^7.5.20 || ^8.5.30 || ^9.5.25" + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" }, "suggest": { "ext-filter": "Required to use the boolean validator." @@ -6783,7 +6801,7 @@ "forward-command": true }, "branch-alias": { - "dev-master": "5.5-dev" + "dev-master": "5.6-dev" } }, "autoload": { @@ -6815,7 +6833,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v5.5.0" + "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.0" }, "funding": [ { @@ -6827,7 +6845,7 @@ "type": "tidelift" } ], - "time": "2022-10-16T01:01:54+00:00" + "time": "2023-11-12T22:43:29+00:00" }, { "name": "webmozart/assert", @@ -6886,66 +6904,17 @@ "source": "https://github.com/webmozarts/assert/tree/1.11.0" }, "time": "2022-06-03T18:03:27+00:00" - }, - { - "name": "webmozart/path-util", - "version": "2.3.0", - "source": { - "type": "git", - "url": "https://github.com/webmozart/path-util.git", - "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozart/path-util/zipball/d939f7edc24c9a1bb9c0dee5cb05d8e859490725", - "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "webmozart/assert": "~1.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\PathUtil\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "A robust cross-platform utility for normalizing, comparing and modifying file paths.", - "support": { - "issues": "https://github.com/webmozart/path-util/issues", - "source": "https://github.com/webmozart/path-util/tree/2.3.0" - }, - "abandoned": "symfony/filesystem", - "time": "2015-12-17T08:42:14+00:00" } ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "phalcon/zephir": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=7.4" + "php": ">=8.0" }, "platform-dev": { "ext-apcu": "*", @@ -6964,5 +6933,5 @@ "ext-sqlite3": "*", "ext-xml": "*" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/config.json b/config.json index d46e748aaf2..2e7e77b0557 100644 --- a/config.json +++ b/config.json @@ -3,7 +3,7 @@ "name": "phalcon", "description": "Phalcon is a full stack PHP framework, delivered as a PHP extension, offering lower resource consumption and high performance.", "author": "Phalcon Team and contributors", - "version": "5.4.0", + "version": "5.5.0", "verbose": false, "stubs": { "path": "ide\/%version%\/%namespace%\/", diff --git a/docker-compose-local.yml b/docker-compose-local.yml index 1f1febc49e8..f66bdb14550 100644 --- a/docker-compose-local.yml +++ b/docker-compose-local.yml @@ -3,14 +3,6 @@ version: '3' services: - cphalcon-7.4: - container_name: cphalcon-7.4 - hostname: cphalcon-74 - build: docker/7.4 - working_dir: /srv - volumes: - - .:/srv - cphalcon-8.0: container_name: cphalcon-8.0 hostname: cphalcon-80 @@ -35,6 +27,14 @@ services: volumes: - .:/srv + cphalcon-8.3: + container_name: cphalcon-8.3 + hostname: cphalcon-83 + build: docker/8.3 + working_dir: /srv + volumes: + - .:/srv + mysql: container_name: cphalcon-mysql image: mysql:5.7 diff --git a/docker-compose.yml b/docker-compose.yml index 37a624d3362..a4fdbcb2f92 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,14 +3,6 @@ version: '3' services: - cphalcon-7.4: - container_name: cphalcon-7.4 - hostname: cphalcon-74 - build: docker/7.4 - working_dir: /srv - volumes: - - .:/srv - cphalcon-8.0: container_name: cphalcon-8.0 hostname: cphalcon-80 @@ -24,6 +16,8 @@ services: hostname: cphalcon-81 build: docker/8.1 working_dir: /srv + ports: + - "9501:9501" volumes: - .:/srv @@ -35,6 +29,14 @@ services: volumes: - .:/srv + cphalcon-8.3: + container_name: cphalcon-8.3 + hostname: cphalcon-83 + build: docker/8.3 + working_dir: /srv + volumes: + - .:/srv + mysql: container_name: cphalcon-mysql image: mysql:5.7 diff --git a/docker/8.0/.bashrc b/docker/8.0/.bashrc index 418e8efb717..712bde188f6 100644 --- a/docker/8.0/.bashrc +++ b/docker/8.0/.bashrc @@ -1,7 +1,5 @@ #!/bin/bash -ZEPHIR_VERSION="0.17.0" - # Easier navigation: .., ..., ...., ....., ~ and - alias ..="cd .." alias ...="cd ../.." @@ -77,27 +75,9 @@ alias untar='tar xvf' NB_CORES=$(grep -c '^processor' /proc/cpuinfo) export MAKEFLAGS="-j$((NB_CORES)) -l${NB_CORES}" -if [ ! -f ./zephir ]; then - wget --no-clobber -O ./zephir https://github.com/phalcon/zephir/releases/download/$ZEPHIR_VERSION/zephir.phar - chmod +x ./zephir -fi - -alias zephir='./zephir ' -alias zf='./zephir fullclean' -alias zg='./zephir generate' -alias zs='./zephir stubs' +alias zephir='./vendor/bin/zephir ' +alias zf='./vendor/bin/zephir fullclean' +alias zg='./vendor/bin/zephir generate' +alias zs='./vendor/bin/zephir stubs' alias cpl='zf && zg && cd ext/ && ./install && ..' alias codecept='php -d extension=ext/modules/phalcon.so ./vendor/bin/codecept ' -alias phpcs='php -d extension=ext/modules/phalcon.so ./vendor/bin/phpcs ' -alias phpcbf='php -d extension=ext/modules/phalcon.so ./vendor/bin/phpcbf ' -alias psalm='php ./vendor/bin/psalm ' - -alias test-unit='php -d extension=ext/modules/phalcon.so vendor/bin/codecept run --ext DotReporter unit' -alias test-cli='php -d extension=ext/modules/phalcon.so vendor/bin/codecept run --ext DotReporter cli' -alias test-integration='php -d extension=ext/modules/phalcon.so vendor/bin/codecept run --ext DotReporter integration' -alias test-db-common='php -d extension=ext/modules/phalcon.so vendor/bin/codecept run --ext DotReporter database -g common' -alias test-db-mysql='php -d extension=ext/modules/phalcon.so vendor/bin/codecept run --ext DotReporter database --env mysql -g mysql' -alias test-db-pgsql='php -d extension=ext/modules/phalcon.so vendor/bin/codecept run --ext DotReporter database --env pgsql -g pgsql' -alias test-db-sqlite='php -d extension=ext/modules/phalcon.so vendor/bin/codecept run --ext DotReporter database --env sqlite -g sqlite' -alias test-db='test-db-common && test-db-mysql && test-db-pgsql && test-db-sqlite' -alias test-all='test-unit && test-cli && test-integration && test-db' diff --git a/docker/8.1/.bashrc b/docker/8.1/.bashrc index 418e8efb717..712bde188f6 100644 --- a/docker/8.1/.bashrc +++ b/docker/8.1/.bashrc @@ -1,7 +1,5 @@ #!/bin/bash -ZEPHIR_VERSION="0.17.0" - # Easier navigation: .., ..., ...., ....., ~ and - alias ..="cd .." alias ...="cd ../.." @@ -77,27 +75,9 @@ alias untar='tar xvf' NB_CORES=$(grep -c '^processor' /proc/cpuinfo) export MAKEFLAGS="-j$((NB_CORES)) -l${NB_CORES}" -if [ ! -f ./zephir ]; then - wget --no-clobber -O ./zephir https://github.com/phalcon/zephir/releases/download/$ZEPHIR_VERSION/zephir.phar - chmod +x ./zephir -fi - -alias zephir='./zephir ' -alias zf='./zephir fullclean' -alias zg='./zephir generate' -alias zs='./zephir stubs' +alias zephir='./vendor/bin/zephir ' +alias zf='./vendor/bin/zephir fullclean' +alias zg='./vendor/bin/zephir generate' +alias zs='./vendor/bin/zephir stubs' alias cpl='zf && zg && cd ext/ && ./install && ..' alias codecept='php -d extension=ext/modules/phalcon.so ./vendor/bin/codecept ' -alias phpcs='php -d extension=ext/modules/phalcon.so ./vendor/bin/phpcs ' -alias phpcbf='php -d extension=ext/modules/phalcon.so ./vendor/bin/phpcbf ' -alias psalm='php ./vendor/bin/psalm ' - -alias test-unit='php -d extension=ext/modules/phalcon.so vendor/bin/codecept run --ext DotReporter unit' -alias test-cli='php -d extension=ext/modules/phalcon.so vendor/bin/codecept run --ext DotReporter cli' -alias test-integration='php -d extension=ext/modules/phalcon.so vendor/bin/codecept run --ext DotReporter integration' -alias test-db-common='php -d extension=ext/modules/phalcon.so vendor/bin/codecept run --ext DotReporter database -g common' -alias test-db-mysql='php -d extension=ext/modules/phalcon.so vendor/bin/codecept run --ext DotReporter database --env mysql -g mysql' -alias test-db-pgsql='php -d extension=ext/modules/phalcon.so vendor/bin/codecept run --ext DotReporter database --env pgsql -g pgsql' -alias test-db-sqlite='php -d extension=ext/modules/phalcon.so vendor/bin/codecept run --ext DotReporter database --env sqlite -g sqlite' -alias test-db='test-db-common && test-db-mysql && test-db-pgsql && test-db-sqlite' -alias test-all='test-unit && test-cli && test-integration && test-db' diff --git a/docker/8.2/.bashrc b/docker/8.2/.bashrc index 418e8efb717..712bde188f6 100644 --- a/docker/8.2/.bashrc +++ b/docker/8.2/.bashrc @@ -1,7 +1,5 @@ #!/bin/bash -ZEPHIR_VERSION="0.17.0" - # Easier navigation: .., ..., ...., ....., ~ and - alias ..="cd .." alias ...="cd ../.." @@ -77,27 +75,9 @@ alias untar='tar xvf' NB_CORES=$(grep -c '^processor' /proc/cpuinfo) export MAKEFLAGS="-j$((NB_CORES)) -l${NB_CORES}" -if [ ! -f ./zephir ]; then - wget --no-clobber -O ./zephir https://github.com/phalcon/zephir/releases/download/$ZEPHIR_VERSION/zephir.phar - chmod +x ./zephir -fi - -alias zephir='./zephir ' -alias zf='./zephir fullclean' -alias zg='./zephir generate' -alias zs='./zephir stubs' +alias zephir='./vendor/bin/zephir ' +alias zf='./vendor/bin/zephir fullclean' +alias zg='./vendor/bin/zephir generate' +alias zs='./vendor/bin/zephir stubs' alias cpl='zf && zg && cd ext/ && ./install && ..' alias codecept='php -d extension=ext/modules/phalcon.so ./vendor/bin/codecept ' -alias phpcs='php -d extension=ext/modules/phalcon.so ./vendor/bin/phpcs ' -alias phpcbf='php -d extension=ext/modules/phalcon.so ./vendor/bin/phpcbf ' -alias psalm='php ./vendor/bin/psalm ' - -alias test-unit='php -d extension=ext/modules/phalcon.so vendor/bin/codecept run --ext DotReporter unit' -alias test-cli='php -d extension=ext/modules/phalcon.so vendor/bin/codecept run --ext DotReporter cli' -alias test-integration='php -d extension=ext/modules/phalcon.so vendor/bin/codecept run --ext DotReporter integration' -alias test-db-common='php -d extension=ext/modules/phalcon.so vendor/bin/codecept run --ext DotReporter database -g common' -alias test-db-mysql='php -d extension=ext/modules/phalcon.so vendor/bin/codecept run --ext DotReporter database --env mysql -g mysql' -alias test-db-pgsql='php -d extension=ext/modules/phalcon.so vendor/bin/codecept run --ext DotReporter database --env pgsql -g pgsql' -alias test-db-sqlite='php -d extension=ext/modules/phalcon.so vendor/bin/codecept run --ext DotReporter database --env sqlite -g sqlite' -alias test-db='test-db-common && test-db-mysql && test-db-pgsql && test-db-sqlite' -alias test-all='test-unit && test-cli && test-integration && test-db' diff --git a/docker/7.4/.bashrc b/docker/8.3/.bashrc similarity index 92% rename from docker/7.4/.bashrc rename to docker/8.3/.bashrc index 418e8efb717..36d671f4ebb 100644 --- a/docker/7.4/.bashrc +++ b/docker/8.3/.bashrc @@ -1,7 +1,5 @@ #!/bin/bash -ZEPHIR_VERSION="0.17.0" - # Easier navigation: .., ..., ...., ....., ~ and - alias ..="cd .." alias ...="cd ../.." @@ -77,15 +75,10 @@ alias untar='tar xvf' NB_CORES=$(grep -c '^processor' /proc/cpuinfo) export MAKEFLAGS="-j$((NB_CORES)) -l${NB_CORES}" -if [ ! -f ./zephir ]; then - wget --no-clobber -O ./zephir https://github.com/phalcon/zephir/releases/download/$ZEPHIR_VERSION/zephir.phar - chmod +x ./zephir -fi - -alias zephir='./zephir ' -alias zf='./zephir fullclean' -alias zg='./zephir generate' -alias zs='./zephir stubs' +alias zephir='./vendor/bin/zephir ' +alias zf='./vendor/bin/zephir fullclean' +alias zg='./vendor/bin/zephir generate' +alias zs='./vendor/bin/zephir stubs' alias cpl='zf && zg && cd ext/ && ./install && ..' alias codecept='php -d extension=ext/modules/phalcon.so ./vendor/bin/codecept ' alias phpcs='php -d extension=ext/modules/phalcon.so ./vendor/bin/phpcs ' diff --git a/docker/7.4/Dockerfile b/docker/8.3/Dockerfile similarity index 86% rename from docker/7.4/Dockerfile rename to docker/8.3/Dockerfile index 939ff64cd85..712b15d6202 100644 --- a/docker/7.4/Dockerfile +++ b/docker/8.3/Dockerfile @@ -1,5 +1,5 @@ FROM composer:latest as composer -FROM php:7.4-fpm +FROM php:8.3-fpm ADD ./extra.ini /usr/local/etc/php/conf.d/ @@ -8,7 +8,7 @@ ENV MY_USER="phalcon" \ MY_GROUP="phalcon" \ MY_UID="1000" \ MY_GID="1000" \ - PHP_VERSION="7.4" \ + PHP_VERSION="8.3" \ LANG=en_US.UTF-8 \ LANGUAGE=en_US.UTF-8 \ LC_ALL=en_US.UTF-8 @@ -38,17 +38,22 @@ RUN apt update -y && \ nano \ sudo \ wget \ - zip \ - zlib1g + zip + +# Remove this RUN when imagick will be available via pecl +RUN cd /opt && \ + git clone https://github.com/Imagick/imagick.git && \ + cd imagick && \ + phpize && ./configure && \ + make && make install # PECL Packages -RUN pecl install \ - redis \ - igbinary \ +RUN pecl install -o -f redis && \ + pecl install igbinary \ msgpack \ apcu \ yaml \ - imagick \ +# imagick \ memcached \ zephir_parser @@ -79,7 +84,6 @@ RUN docker-php-ext-install \ # Install PHP extensions RUN docker-php-ext-enable \ - gettext \ redis \ igbinary \ msgpack \ diff --git a/docker/7.4/extra.ini b/docker/8.3/extra.ini similarity index 100% rename from docker/7.4/extra.ini rename to docker/8.3/extra.ini diff --git a/ext/kernel/array.h b/ext/kernel/array.h index 11d19b6f776..1c98ca2cc06 100644 --- a/ext/kernel/array.h +++ b/ext/kernel/array.h @@ -9,8 +9,6 @@ * following url: https://docs.zephir-lang.com/en/latest/license */ -#ifndef ZEPHIR_KERNEL_ARRAY_H -#define ZEPHIR_KERNEL_ARRAY_H #define ZEPHIR_MAX_ARRAY_LEVELS 16 #include @@ -73,5 +71,3 @@ int zephir_fast_in_array(zval *needle, zval *haystack); Z_TRY_ADDREF_P(value); \ zend_hash_next_index_insert(Z_ARRVAL_P(arr), value); \ } while (0) - -#endif /* ZEPHIR_KERNEL_ARRAY_H */ diff --git a/ext/kernel/exception.c b/ext/kernel/exception.c index 6d0a50ba3cc..404162af8d2 100644 --- a/ext/kernel/exception.c +++ b/ext/kernel/exception.c @@ -38,7 +38,8 @@ void zephir_throw_exception_debug(zval *object, const char *file, uint32_t line) ZVAL_UNDEF(&curline); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); if (Z_TYPE_P(object) != IS_OBJECT) { ZVAL_COPY_VALUE(&object_copy, object); @@ -54,14 +55,8 @@ void zephir_throw_exception_debug(zval *object, const char *file, uint32_t line) zephir_check_call_status(); if (ZEPHIR_IS_LONG(&curline, 0)) { default_exception_ce = zend_exception_get_default(); - -#if PHP_VERSION_ID >= 80000 zend_update_property_string(default_exception_ce, Z_OBJ_P(object), SL("file"), file); zend_update_property_long(default_exception_ce, Z_OBJ_P(object), SL("line"), line); -#else - zend_update_property_string(default_exception_ce, object, SL("file"), file); - zend_update_property_long(default_exception_ce, object, SL("line"), line); -#endif } } @@ -88,13 +83,8 @@ void zephir_throw_exception_string_debug(zend_class_entry *ce, const char *messa if (line > 0) { default_exception_ce = zend_exception_get_default(); -#if PHP_VERSION_ID >= 80000 zend_update_property_string(default_exception_ce, Z_OBJ(object), "file", sizeof("file")-1, file); zend_update_property_long(default_exception_ce, Z_OBJ(object), "line", sizeof("line")-1, line); -#else - zend_update_property_string(default_exception_ce, &object, "file", sizeof("file")-1, file); - zend_update_property_long(default_exception_ce, &object, "line", sizeof("line")-1, line); -#endif } if (ZEPHIR_LAST_CALL_STATUS != FAILURE) { diff --git a/ext/kernel/fcall.c b/ext/kernel/fcall.c index d017ec4db33..cfcc025bed4 100644 --- a/ext/kernel/fcall.c +++ b/ext/kernel/fcall.c @@ -211,21 +211,12 @@ static void populate_fcic(zend_fcall_info_cache* fcic, zephir_call_type type, ze } fcic->called_scope = called_scope; - -#if PHP_VERSION_ID >= 80000 calling_scope = zend_get_called_scope(EG(current_execute_data)); -#else - calling_scope = zend_get_executed_scope(); -#endif - fcic->object = this_ptr ? Z_OBJ_P(this_ptr) : NULL; switch (type) { case zephir_fcall_parent: - -#if PHP_VERSION_ID >= 80000 if (ce && Z_TYPE_P(func) == IS_STRING) { fcic->function_handler = zend_hash_find_ptr(&ce->parent->function_table, Z_STR_P(func)); - fcic->calling_scope = ce->parent; } else if (EXPECTED(calling_scope && calling_scope->parent)) { if (Z_TYPE_P(func) == IS_STRING) { @@ -235,7 +226,7 @@ static void populate_fcic(zend_fcall_info_cache* fcic, zephir_call_type type, ze } else { return; } -#endif + if (UNEXPECTED(!calling_scope || !calling_scope->parent)) { return; } @@ -244,7 +235,6 @@ static void populate_fcic(zend_fcall_info_cache* fcic, zephir_call_type type, ze break; case zephir_fcall_static: -#if PHP_VERSION_ID >= 80000 if (ce && Z_TYPE_P(func) == IS_STRING) { fcic->function_handler = zend_hash_find_ptr(&ce->function_table, Z_STR_P(func)); fcic->calling_scope = ce; @@ -252,17 +242,10 @@ static void populate_fcic(zend_fcall_info_cache* fcic, zephir_call_type type, ze fcic->function_handler = zend_hash_find_ptr(&calling_scope->function_table, Z_STR_P(func)); fcic->calling_scope = called_scope; } -#else - fcic->calling_scope = called_scope; - if (UNEXPECTED(!calling_scope)) { - return; - } -#endif break; case zephir_fcall_self: -#if PHP_VERSION_ID >= 80000 if (ce && Z_TYPE_P(func) == IS_STRING) { fcic->function_handler = zend_hash_find_ptr(&ce->function_table, Z_STR_P(func)); fcic->calling_scope = ce; @@ -273,13 +256,9 @@ static void populate_fcic(zend_fcall_info_cache* fcic, zephir_call_type type, ze //fcic->called_scope = zend_get_called_scope(EG(current_execute_data)); fcic->calling_scope = calling_scope; } -#else - fcic->calling_scope = calling_scope; -#endif break; case zephir_fcall_ce: -#if PHP_VERSION_ID >= 80000 if (ce && Z_TYPE_P(func) == IS_STRING) { fcic->function_handler = zend_hash_find_ptr(&ce->function_table, Z_STR_P(func)); @@ -288,7 +267,6 @@ static void populate_fcic(zend_fcall_info_cache* fcic, zephir_call_type type, ze fcic->function_handler = zend_hash_find_ptr(&calling_scope->function_table, Z_STR_P(func)); fcic->calling_scope = calling_scope; } -#endif // TODO: Check for PHP 7.4 and PHP 8.0, as it rewrite from above fcic->calling_scope = ce; fcic->called_scope = ce; @@ -297,11 +275,7 @@ static void populate_fcic(zend_fcall_info_cache* fcic, zephir_call_type type, ze case zephir_fcall_function: case zephir_fcall_method: if (Z_TYPE_P(func) == IS_OBJECT) { -#if PHP_VERSION_ID >= 80000 if (Z_OBJ_HANDLER_P(func, get_closure) && Z_OBJ_HANDLER_P(func, get_closure)(Z_OBJ_P(func), &fcic->calling_scope, &fcic->function_handler, &fcic->object, 0) == SUCCESS) { -#else - if (Z_OBJ_HANDLER_P(func, get_closure) && Z_OBJ_HANDLER_P(func, get_closure)(func, &fcic->calling_scope, &fcic->function_handler, &fcic->object) == SUCCESS) { -#endif fcic->called_scope = fcic->calling_scope; break; } @@ -309,11 +283,9 @@ static void populate_fcic(zend_fcall_info_cache* fcic, zephir_call_type type, ze return; } -#if PHP_VERSION_ID >= 80000 if (ce && Z_TYPE_P(func) == IS_STRING) { fcic->function_handler = zend_hash_find_ptr(&ce->function_table, Z_STR_P(func)); } -#endif fcic->calling_scope = this_ptr ? Z_OBJCE_P(this_ptr) : NULL; fcic->called_scope = fcic->calling_scope; break; @@ -383,12 +355,7 @@ int zephir_call_user_function( ZVAL_COPY_VALUE(&fci.function_name, function_name); fci.retval = retval_ptr ? retval_ptr : &local_retval_ptr; fci.param_count = param_count; - -#if PHP_VERSION_ID < 80000 - fci.no_separation = 1; -#else fci.named_params = NULL; -#endif if (cache_entry && *cache_entry) { /* We have a cache record, initialize scope */ @@ -402,22 +369,18 @@ int zephir_call_user_function( /* The caller is interested in caching OR we have the call cache enabled */ resolve_callable(&callable, type, (object_pp && type != zephir_fcall_ce ? Z_OBJCE_P(object_pp) : obj_ce), object_pp, function_name); -#if PHP_VERSION_ID >= 80000 - char *is_callable_error = NULL; - zend_execute_data *frame = EG(current_execute_data); + char *is_callable_error = NULL; + zend_execute_data *frame = EG(current_execute_data); if (obj_ce || !zend_is_callable_at_frame(&callable, fci.object, frame, 0, &fcic, &is_callable_error)) { - if (is_callable_error) { - zend_error(E_WARNING, "%s", is_callable_error); - efree(is_callable_error); + if (is_callable_error) { + zend_error(E_WARNING, "%s", is_callable_error); + efree(is_callable_error); - return FAILURE; - } + return FAILURE; + } populate_fcic(&fcic, type, obj_ce, object_pp, function_name, called_scope); } -#else - zend_is_callable_ex(&callable, fci.object, IS_CALLABLE_CHECK_SILENT, NULL, &fcic, NULL); -#endif } #ifdef _MSC_VER @@ -432,12 +395,9 @@ int zephir_call_user_function( } fci.params = p; - -#if PHP_VERSION_ID >= 80000 if (!fcic.function_handler) { ZVAL_COPY_VALUE(&fci.function_name, &callable); } -#endif status = zend_call_function(&fci, &fcic); @@ -630,29 +590,6 @@ int zephir_call_user_func_array_noex(zval *return_value, zval *handler, zval *pa return FAILURE; } -#if PHP_VERSION_ID < 80000 - zend_fcall_info_init(handler, 0, &fci, &fci_cache, NULL, &is_callable_error); - - if (is_callable_error) { - zend_error(E_WARNING, "%s", is_callable_error); - efree(is_callable_error); - } else { - status = SUCCESS; - } - - if (status == SUCCESS) { - zend_fcall_info_args(&fci, params); - - fci.retval = return_value; - zend_call_function(&fci, &fci_cache); - - zend_fcall_info_args_clear(&fci, 1); - } - - if (EG(exception)) { - status = SUCCESS; - } -#else zend_execute_data *frame = EG(current_execute_data); if (!zend_is_callable_at_frame(handler, NULL, frame, 0, &fci_cache, &is_callable_error)) { if (is_callable_error) { @@ -674,7 +611,6 @@ int zephir_call_user_func_array_noex(zval *return_value, zval *handler, zval *pa zend_fcall_info_args(&fci, params); status = zend_call_function(&fci, &fci_cache); zend_fcall_info_args_clear(&fci, 1); -#endif return status; } @@ -696,11 +632,7 @@ void zephir_eval_php(zval *str, zval *retval_ptr, char *context) #if PHP_VERSION_ID >= 80200 new_op_array = zend_compile_string(Z_STR_P(str), context, ZEND_COMPILE_POSITION_AFTER_OPEN_TAG); #else -#if PHP_VERSION_ID >= 80000 new_op_array = zend_compile_string(Z_STR_P(str), context); -#else - new_op_array = zend_compile_string(str, context); -#endif #endif CG(compiler_options) = original_compiler_options; diff --git a/ext/kernel/fcall.h b/ext/kernel/fcall.h index 2581360756e..4754bf4626d 100644 --- a/ext/kernel/fcall.h +++ b/ext/kernel/fcall.h @@ -167,19 +167,11 @@ typedef enum _zephir_call_type { ZEPHIR_LAST_CALL_STATUS = zephir_return_call_class_method(return_value, Z_TYPE_P(object) == IS_OBJECT ? Z_OBJCE_P(object) : NULL, zephir_fcall_method, object, method, strlen(method), cache, cache_slot, ZEPHIR_CALL_NUM_PARAMS(params_), ZEPHIR_PASS_CALL_PARAMS(params_)); \ } while (0) -#if PHP_VERSION_ID >= 80000 #define ZEPHIR_RETURN_CALL_STATIC(method, cache, cache_slot, ...) \ do { \ zval *params_[] = {ZEPHIR_FETCH_VA_ARGS __VA_ARGS__}; \ ZEPHIR_LAST_CALL_STATUS = zephir_return_call_class_method(return_value, (getThis() ? Z_OBJCE_P(getThis()) : NULL), zephir_fcall_static, getThis(), method, strlen(method), cache, cache_slot, ZEPHIR_CALL_NUM_PARAMS(params_), ZEPHIR_PASS_CALL_PARAMS(params_)); \ } while (0) -#else -#define ZEPHIR_RETURN_CALL_STATIC(method, cache, cache_slot, ...) \ - do { \ - zval *params_[] = {ZEPHIR_FETCH_VA_ARGS __VA_ARGS__}; \ - ZEPHIR_LAST_CALL_STATUS = zephir_return_call_class_method(return_value, NULL, zephir_fcall_static, NULL, method, strlen(method), cache, cache_slot, ZEPHIR_CALL_NUM_PARAMS(params_), ZEPHIR_PASS_CALL_PARAMS(params_)); \ - } while (0) -#endif #define ZEPHIR_RETURN_CALL_PARENT(class_entry, this_ptr, method, cache, cache_slot, ...) \ do { \ @@ -187,51 +179,25 @@ typedef enum _zephir_call_type { ZEPHIR_LAST_CALL_STATUS = zephir_return_call_class_method(return_value, class_entry, zephir_fcall_parent, this_ptr, method, strlen(method), cache, cache_slot, ZEPHIR_CALL_NUM_PARAMS(params_), ZEPHIR_PASS_CALL_PARAMS(params_)); \ } while (0) -#if PHP_VERSION_ID >= 80000 #define ZEPHIR_CALL_SELF(return_value_ptr, method, cache, cache_slot, ...) \ do { \ zval *params_[] = {ZEPHIR_FETCH_VA_ARGS __VA_ARGS__}; \ ZEPHIR_OBSERVE_OR_NULLIFY_PPZV(return_value_ptr); \ ZEPHIR_LAST_CALL_STATUS = zephir_call_class_method_aparams(return_value_ptr, (getThis() ? Z_OBJCE_P(getThis()) : NULL), zephir_fcall_self, getThis(), method, strlen(method), cache, cache_slot, ZEPHIR_CALL_NUM_PARAMS(params_), ZEPHIR_PASS_CALL_PARAMS(params_)); \ } while (0) -#else -#define ZEPHIR_CALL_SELF(return_value_ptr, method, cache, cache_slot, ...) \ - do { \ - zval *params_[] = {ZEPHIR_FETCH_VA_ARGS __VA_ARGS__}; \ - ZEPHIR_OBSERVE_OR_NULLIFY_PPZV(return_value_ptr); \ - ZEPHIR_LAST_CALL_STATUS = zephir_call_class_method_aparams(return_value_ptr, NULL, zephir_fcall_self, NULL, method, strlen(method), cache, cache_slot, ZEPHIR_CALL_NUM_PARAMS(params_), ZEPHIR_PASS_CALL_PARAMS(params_)); \ - } while (0) -#endif -#if PHP_VERSION_ID >= 80000 #define ZEPHIR_RETURN_CALL_SELF(method, cache, cache_slot, ...) \ do { \ zval *params_[] = {ZEPHIR_FETCH_VA_ARGS __VA_ARGS__}; \ ZEPHIR_LAST_CALL_STATUS = zephir_return_call_class_method(return_value, (getThis() ? Z_OBJCE_P(getThis()) : NULL), zephir_fcall_self, getThis(), method, strlen(method), cache, cache_slot, ZEPHIR_CALL_NUM_PARAMS(params_), ZEPHIR_PASS_CALL_PARAMS(params_)); \ } while (0) -#else -#define ZEPHIR_RETURN_CALL_SELF(method, cache, cache_slot, ...) \ - do { \ - zval *params_[] = {ZEPHIR_FETCH_VA_ARGS __VA_ARGS__}; \ - ZEPHIR_LAST_CALL_STATUS = zephir_return_call_class_method(return_value, NULL, zephir_fcall_self, NULL, method, strlen(method), cache, cache_slot, ZEPHIR_CALL_NUM_PARAMS(params_), ZEPHIR_PASS_CALL_PARAMS(params_)); \ - } while (0) -#endif -#if PHP_VERSION_ID >= 80000 #define ZEPHIR_CALL_STATIC(return_value_ptr, method, cache, cache_slot, ...) \ do { \ zval *params_[] = {ZEPHIR_FETCH_VA_ARGS __VA_ARGS__}; \ ZEPHIR_OBSERVE_OR_NULLIFY_PPZV(return_value_ptr); \ ZEPHIR_LAST_CALL_STATUS = zephir_call_class_method_aparams(return_value_ptr, (getThis() ? Z_OBJCE_P(getThis()) : NULL), zephir_fcall_static, getThis(), method, strlen(method), cache, cache_slot, ZEPHIR_CALL_NUM_PARAMS(params_), ZEPHIR_PASS_CALL_PARAMS(params_)); \ } while (0) -#else -#define ZEPHIR_CALL_STATIC(return_value_ptr, method, cache, cache_slot, ...) \ - do { \ - zval *params_[] = {ZEPHIR_FETCH_VA_ARGS __VA_ARGS__}; \ - ZEPHIR_OBSERVE_OR_NULLIFY_PPZV(return_value_ptr); \ - ZEPHIR_LAST_CALL_STATUS = zephir_call_class_method_aparams(return_value_ptr, NULL, zephir_fcall_static, NULL, method, strlen(method), cache, cache_slot, ZEPHIR_CALL_NUM_PARAMS(params_), ZEPHIR_PASS_CALL_PARAMS(params_)); \ - } while (0) -#endif #define ZEPHIR_CALL_CE_STATIC(return_value_ptr, class_entry, method, cache, cache_slot, ...) \ do { \ diff --git a/ext/kernel/main.c b/ext/kernel/main.c index 1bbd149639d..8aeedda44ea 100644 --- a/ext/kernel/main.c +++ b/ext/kernel/main.c @@ -137,26 +137,17 @@ void zephir_fast_count(zval *result, zval *value) } if (Z_TYPE_P(value) == IS_OBJECT) { - zval retval; if (Z_OBJ_HT_P(value)->count_elements) { ZVAL_LONG(result, 1); -#if PHP_VERSION_ID >= 80000 if (SUCCESS == Z_OBJ_HT(*value)->count_elements(Z_OBJ_P(value), &Z_LVAL_P(result))) { -#else - if (SUCCESS == Z_OBJ_HT(*value)->count_elements(value, &Z_LVAL_P(result))) { -#endif return; } } if (instanceof_function(Z_OBJCE_P(value), zend_ce_countable)) { -#if PHP_VERSION_ID >= 80000 zend_call_method_with_0_params(Z_OBJ_P(value), NULL, NULL, "count", &retval); -#else - zend_call_method_with_0_params(value, NULL, NULL, "count", &retval); -#endif if (Z_TYPE(retval) != IS_UNDEF) { convert_to_long_ex(&retval); ZVAL_LONG(result, Z_LVAL(retval)); @@ -189,24 +180,15 @@ int zephir_fast_count_ev(zval *value) } if (Z_TYPE_P(value) == IS_OBJECT) { - zval retval; if (Z_OBJ_HT_P(value)->count_elements) { -#if PHP_VERSION_ID >= 80000 Z_OBJ_HT(*value)->count_elements(Z_OBJ_P(value), &count); -#else - Z_OBJ_HT(*value)->count_elements(value, &count); -#endif return (int) count > 0; } if (instanceof_function(Z_OBJCE_P(value), zend_ce_countable)) { -#if PHP_VERSION_ID >= 80000 zend_call_method_with_0_params(Z_OBJ_P(value), NULL, NULL, "count", &retval); -#else - zend_call_method_with_0_params(value, NULL, NULL, "count", &retval); -#endif if (Z_TYPE(retval) != IS_UNDEF) { convert_to_long_ex(&retval); count = Z_LVAL(retval); @@ -241,20 +223,12 @@ int zephir_fast_count_int(zval *value) zval retval; if (Z_OBJ_HT_P(value)->count_elements) { -#if PHP_VERSION_ID >= 80000 Z_OBJ_HT(*value)->count_elements(Z_OBJ_P(value), &count); -#else - Z_OBJ_HT(*value)->count_elements(value, &count); -#endif return (int) count; } if (instanceof_function(Z_OBJCE_P(value), zend_ce_countable)) { -#if PHP_VERSION_ID >= 80000 zend_call_method_with_0_params(Z_OBJ_P(value), NULL, NULL, "count", &retval); -#else - zend_call_method_with_0_params(value, NULL, NULL, "count", &retval); -#endif if (Z_TYPE(retval) != IS_UNDEF) { convert_to_long_ex(&retval); count = Z_LVAL(retval); @@ -282,7 +256,7 @@ int zephir_fast_count_int(zval *value) */ int zephir_function_exists(const zval *function_name) { - if (zend_hash_str_exists(CG(function_table), Z_STRVAL_P(function_name), Z_STRLEN_P(function_name)) != NULL) { + if (zend_hash_str_exists(CG(function_table), Z_STRVAL_P(function_name), Z_STRLEN_P(function_name))) { return SUCCESS; } @@ -406,7 +380,6 @@ zend_class_entry* zephir_get_internal_ce(const char *class_name, unsigned int cl /* Declare constants */ int zephir_declare_class_constant(zend_class_entry *ce, const char *name, size_t name_length, zval *value) { -#if PHP_VERSION_ID >= 80000 zend_string *key; if (ce->type == ZEND_INTERNAL_CLASS) { @@ -422,24 +395,6 @@ int zephir_declare_class_constant(zend_class_entry *ce, const char *name, size_t } return SUCCESS; -#else - int ret; - zend_string *key; - - if (ce->type == ZEND_INTERNAL_CLASS) { - key = zend_string_init_interned(name, name_length, 1); - } else { - key = zend_string_init(name, name_length, 0); - } - - ret = zend_declare_class_constant_ex(ce, key, value, ZEND_ACC_PUBLIC, NULL); - - if (ce->type != ZEND_INTERNAL_CLASS) { - zend_string_release(key); - } - - return ret; -#endif } int zephir_declare_class_constant_null(zend_class_entry *ce, const char *name, size_t name_length) diff --git a/ext/kernel/main.h b/ext/kernel/main.h index 72278a569fd..99194e3c920 100644 --- a/ext/kernel/main.h +++ b/ext/kernel/main.h @@ -36,11 +36,6 @@ extern zend_string* i_self; #define PH_COPY 1024 #define PH_CTOR 4096 -/* Deprecated */ -#ifndef zend_uint - #define zend_uint uint32_t -#endif - #ifndef ZEND_ACC_FINAL_CLASS #define ZEND_ACC_FINAL_CLASS ZEND_ACC_FINAL #endif @@ -198,7 +193,6 @@ extern zend_string* i_self; #define RETURN_MM_ON_FAILURE(what) \ do { \ if (what == FAILURE) { \ - ZEPHIR_MM_RESTORE(); \ return; \ } \ } while (0) @@ -289,7 +283,7 @@ int zephir_fetch_parameters(int num_args, int required_args, int optional_args, zval _null; \ ZVAL_NULL(&_null); \ ZVAL_COPY(return_value, &_null); \ - zephir_ptr_dtor(&_null); \ + zval_ptr_dtor(&_null); \ } else { \ ZVAL_COPY(return_value, _constant_ptr); \ } \ diff --git a/ext/kernel/memory.c b/ext/kernel/memory.c index ac1f012fd07..68c76a15a1f 100644 --- a/ext/kernel/memory.c +++ b/ext/kernel/memory.c @@ -38,147 +38,147 @@ static zend_always_inline zend_execute_data* find_symbol_table(zend_execute_data* ex) { - while (ex && (!ex->func || !ZEND_USER_CODE(ex->func->common.type))) { - ex = ex->prev_execute_data; - } + while (ex && (!ex->func || !ZEND_USER_CODE(ex->func->common.type))) { + ex = ex->prev_execute_data; + } - return ex; + return ex; } /** - * Adds a memory frame in the current executed method - */ +* Adds a memory frame in the current executed method +*/ void ZEPHIR_FASTCALL zephir_memory_grow_stack(zephir_method_globals *g, const char *func) { - if (g->active_memory == NULL) { - zephir_memory_entry *active_memory; +if (g->active_memory == NULL) { + zephir_memory_entry *active_memory; - active_memory = (zephir_memory_entry *) pecalloc(1, sizeof(zephir_memory_entry), 0); + active_memory = (zephir_memory_entry *) pecalloc(1, sizeof(zephir_memory_entry), 0); - active_memory->addresses = pecalloc(24, sizeof(zval*), 0); - active_memory->capacity = 24; + active_memory->addresses = pecalloc(24, sizeof(zval*), 0); + active_memory->capacity = 24; - g->active_memory = active_memory; - } + g->active_memory = active_memory; +} - assert(g->active_memory != NULL); - assert(g->active_memory->pointer == 0); +assert(g->active_memory != NULL); +assert(g->active_memory->pointer == 0); #ifndef ZEPHIR_RELEASE - g->active_memory->func = func; +g->active_memory->func = func; #endif } void ZEPHIR_FASTCALL zephir_memory_restore_stack(zephir_method_globals *g, const char *func) { - size_t i; - zephir_memory_entry *active_memory; - zephir_symbol_table *active_symbol_table; - zval *ptr; +size_t i; +zephir_memory_entry *active_memory; +zephir_symbol_table *active_symbol_table; +zval *ptr; #ifndef ZEPHIR_RELEASE - int show_backtrace = 0; +int show_backtrace = 0; #endif #ifndef ZEPHIR_RELEASE - if (UNEXPECTED(g->active_memory == NULL)) { - fprintf(stderr, "WARNING: calling zephir_memory_restore_stack() without an active memory frame!\n"); - fprintf(stderr, "The frame was created by %s\n", g->active_memory->func); - fprintf(stderr, "Calling function: %s\n", func); - zephir_print_backtrace(); - return; - } +if (UNEXPECTED(g->active_memory == NULL)) { + fprintf(stderr, "WARNING: calling zephir_memory_restore_stack() without an active memory frame!\n"); + fprintf(stderr, "The frame was created by %s\n", g->active_memory->func); + fprintf(stderr, "Calling function: %s\n", func); + zephir_print_backtrace(); + return; +} - if (UNEXPECTED(g->active_memory->func != func)) { - fprintf(stderr, "Trying to free someone else's memory frame!\n"); - fprintf(stderr, "The frame was created by %s\n", g->active_memory->func); - fprintf(stderr, "Calling function: %s\n", func); - zephir_print_backtrace(); - return; - } +if (UNEXPECTED(g->active_memory->func != func)) { + fprintf(stderr, "Trying to free someone else's memory frame!\n"); + fprintf(stderr, "The frame was created by %s\n", g->active_memory->func); + fprintf(stderr, "Calling function: %s\n", func); + zephir_print_backtrace(); + return; +} #endif - active_memory = g->active_memory; - assert(active_memory != NULL); +active_memory = g->active_memory; +assert(active_memory != NULL); - if (EXPECTED(!CG(unclean_shutdown))) { - /* Clean active symbol table */ - if (g->active_symbol_table) { - active_symbol_table = g->active_symbol_table; - while (active_symbol_table && active_symbol_table->scope == active_memory) { - zend_execute_data *ex = find_symbol_table(EG(current_execute_data)); +if (EXPECTED(!CG(unclean_shutdown))) { + /* Clean active symbol table */ + if (g->active_symbol_table) { + active_symbol_table = g->active_symbol_table; + while (active_symbol_table && active_symbol_table->scope == active_memory) { + zend_execute_data *ex = find_symbol_table(EG(current_execute_data)); #ifndef ZEPHIR_RELEASE - if (UNEXPECTED(!ex)) { - fprintf(stderr, "ERROR: unable to find a symbol table"); - zephir_print_backtrace(); - return; - } -#endif - zend_hash_destroy(ex->symbol_table); - efree(ex->symbol_table); - ex->symbol_table = active_symbol_table->symbol_table; - zend_attach_symbol_table(ex); - zend_rebuild_symbol_table(); - - g->active_symbol_table = active_symbol_table->prev; - efree(active_symbol_table); - active_symbol_table = g->active_symbol_table; + if (UNEXPECTED(!ex)) { + fprintf(stderr, "ERROR: unable to find a symbol table"); + zephir_print_backtrace(); + return; } +#endif + zend_hash_destroy(ex->symbol_table); + efree(ex->symbol_table); + ex->symbol_table = active_symbol_table->symbol_table; + zend_attach_symbol_table(ex); + zend_rebuild_symbol_table(); + + g->active_symbol_table = active_symbol_table->prev; + efree(active_symbol_table); + active_symbol_table = g->active_symbol_table; } + } #ifndef ZEPHIR_RELEASE - for (i = 0; i < active_memory->pointer; ++i) { - if (active_memory->addresses[i] != NULL) { - zval *var = active_memory->addresses[i]; - if (Z_TYPE_P(var) > IS_CALLABLE) { - fprintf(stderr, "%s: observed variable #%d (%p) has invalid type %u [%s]\n", __func__, (int)i, var, Z_TYPE_P(var), active_memory->func); - show_backtrace = 1; - } - - if (!Z_REFCOUNTED_P(var)) { - continue; - } - - if (Z_REFCOUNT_P(var) == 0) { - fprintf(stderr, "%s: observed variable #%d (%p) has 0 references, type=%d [%s]\n", __func__, (int)i, var, Z_TYPE_P(var), active_memory->func); - show_backtrace = 1; - } - else if (Z_REFCOUNT_P(var) >= 1000000) { - fprintf(stderr, "%s: observed variable #%d (%p) has too many references (%u), type=%d [%s]\n", __func__, (int)i, var, Z_REFCOUNT_P(var), Z_TYPE_P(var), active_memory->func); - show_backtrace = 1; - } + for (i = 0; i < active_memory->pointer; ++i) { + if (active_memory->addresses[i] != NULL) { + zval *var = active_memory->addresses[i]; + if (Z_TYPE_P(var) > IS_CALLABLE) { + fprintf(stderr, "%s: observed variable #%d (%p) has invalid type %u [%s]\n", __func__, (int)i, var, Z_TYPE_P(var), active_memory->func); + show_backtrace = 1; + } + + if (!Z_REFCOUNTED_P(var)) { + continue; + } + + if (Z_REFCOUNT_P(var) == 0) { + fprintf(stderr, "%s: observed variable #%d (%p) has 0 references, type=%d [%s]\n", __func__, (int)i, var, Z_TYPE_P(var), active_memory->func); + show_backtrace = 1; + } + else if (Z_REFCOUNT_P(var) >= 1000000) { + fprintf(stderr, "%s: observed variable #%d (%p) has too many references (%u), type=%d [%s]\n", __func__, (int)i, var, Z_REFCOUNT_P(var), Z_TYPE_P(var), active_memory->func); + show_backtrace = 1; } } + } #endif - /* Traverse all zvals allocated, reduce the reference counting or free them */ - for (i = 0; i < active_memory->pointer; ++i) { - ptr = active_memory->addresses[i]; - if (EXPECTED(ptr != NULL)) { - if (!Z_REFCOUNTED_P(ptr)) continue; - if (Z_REFCOUNT_P(ptr) == 1) { - zval_ptr_dtor(ptr); - } else { - Z_DELREF_P(ptr); - } + /* Traverse all zvals allocated, reduce the reference counting or free them */ + for (i = 0; i < active_memory->pointer; ++i) { + ptr = active_memory->addresses[i]; + if (EXPECTED(ptr != NULL)) { + if (!Z_REFCOUNTED_P(ptr)) continue; + if (Z_REFCOUNT_P(ptr) == 1) { + zval_ptr_dtor(ptr); + } else { + Z_DELREF_P(ptr); } } } +} #ifndef ZEPHIR_RELEASE - active_memory->func = NULL; +active_memory->func = NULL; #endif - if (active_memory->addresses != NULL) { - pefree(active_memory->addresses, 0); - } +if (active_memory->addresses != NULL) { + pefree(active_memory->addresses, 0); +} - pefree(g->active_memory, 0); - g->active_memory = NULL; +pefree(g->active_memory, 0); +g->active_memory = NULL; #ifndef ZEPHIR_RELEASE - if (show_backtrace == 1) { - zephir_print_backtrace(); - } +if (show_backtrace == 1) { + zephir_print_backtrace(); +} #endif } @@ -274,60 +274,6 @@ int zephir_set_symbol(zval *key_name, zval *value) return SUCCESS; } -/** - * Exports a string symbol to the active symbol table - */ -int zephir_set_symbol_str(char *key_name, unsigned int key_length, zval *value) -{ - zend_array *symbol_table = zend_rebuild_symbol_table(); - - if (!symbol_table) { - php_error_docref(NULL, E_WARNING, "Cannot find a valid symbol_table"); - return FAILURE; - } - - Z_TRY_ADDREF_P(value); - zend_hash_str_update(symbol_table, key_name, key_length, value); - - return SUCCESS; -} - -/** - * Cleans the function/method cache up - */ -int zephir_cleanup_fcache(void *pDest, int num_args, va_list args, zend_hash_key *hash_key) -{ - zephir_fcall_cache_entry **entry = (zephir_fcall_cache_entry**) pDest; - zend_class_entry *scope; - size_t len = ZSTR_LEN(hash_key->key); - - assert(hash_key->key != NULL); - assert(len > 2 * sizeof(zend_class_entry**)); - - memcpy(&scope, &ZSTR_VAL(hash_key->key)[(len -1) - 2 * sizeof(zend_class_entry**)], sizeof(zend_class_entry*)); - -/* -#ifndef ZEPHIR_RELEASE - { - zend_class_entry *cls; - memcpy(&cls, &hash_key->arKey[len - sizeof(zend_class_entry**)], sizeof(zend_class_entry*)); - - fprintf(stderr, "func: %s, cls: %s, scope: %s [%u]\n", (*entry)->f->common.function_name, (cls ? cls->name : "N/A"), (scope ? scope->name : "N/A"), (uint)(*entry)->times); - } -#endif -*/ - - if ((*entry)->type != ZEND_INTERNAL_FUNCTION || (scope && scope->type != ZEND_INTERNAL_CLASS)) { - return ZEND_HASH_APPLY_REMOVE; - } - - if (scope && scope->type == ZEND_INTERNAL_CLASS && scope->info.internal.module->type != MODULE_PERSISTENT) { - return ZEND_HASH_APPLY_REMOVE; - } - - return ZEND_HASH_APPLY_KEEP; -} - void ZEPHIR_FASTCALL zephir_do_memory_observe(zval *var, const zephir_method_globals *g) { zephir_memory_entry *frame = g->active_memory; diff --git a/ext/kernel/memory.h b/ext/kernel/memory.h index 269ed609203..7da4ec47e20 100644 --- a/ext/kernel/memory.h +++ b/ext/kernel/memory.h @@ -17,12 +17,6 @@ #include "php_ext.h" #include "kernel/globals.h" -#if defined(__x86_64__) || defined(__LP64__) || defined(_LP64) || defined(_WIN64) - #define ZEPHIR_ENABLE_64BITS 1 -#endif - -#define ZEPHIR_NUM_PREALLOCATED_FRAMES 25 - /** Memory frame */ typedef struct _zephir_memory_entry { size_t pointer; @@ -53,21 +47,14 @@ typedef struct _zephir_method_globals { void ZEPHIR_FASTCALL zephir_memory_grow_stack(zephir_method_globals *g, const char *func); void ZEPHIR_FASTCALL zephir_memory_restore_stack(zephir_method_globals *g, const char *func); -#define ZEPHIR_MM_GROW() \ - ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); \ - zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - #define ZEPHIR_MM_RESTORE() \ zephir_memory_restore_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); \ pefree(ZEPHIR_METHOD_GLOBALS_PTR, 0); \ ZEPHIR_METHOD_GLOBALS_PTR = NULL; void zephir_initialize_memory(zend_zephir_globals_def *zephir_globals_ptr); -int zephir_cleanup_fcache(void *pDest, int num_args, va_list args, zend_hash_key *hash_key); void zephir_deinitialize_memory(); -#define zephir_ptr_dtor(x) zval_ptr_dtor(x) - void ZEPHIR_FASTCALL zephir_do_memory_observe(zval *var, const zephir_method_globals *g); #define zephir_memory_observe(var) zephir_do_memory_observe(var, ZEPHIR_METHOD_GLOBALS_PTR); @@ -78,14 +65,11 @@ void zephir_create_symbol_table(zephir_method_globals *g); #define ZEPHIR_CREATE_SYMBOL_TABLE() zephir_create_symbol_table(ZEPHIR_METHOD_GLOBALS_PTR); int zephir_set_symbol(zval *key_name, zval *value); -int zephir_set_symbol_str(char *key_name, unsigned int key_length, zval *value); #define ZEPHIR_INIT_VAR(z) \ zephir_memory_observe(z); \ ZVAL_NULL(z); -#define ZEPHIR_INIT_ZVAL_NREF(z) ZVAL_UNDEF(&z); - #define ZEPHIR_INIT_NVAR(z) \ do { \ if (Z_TYPE_P(z) == IS_UNDEF) { \ @@ -100,14 +84,11 @@ int zephir_set_symbol_str(char *key_name, unsigned int key_length, zval *value); ZVAL_NULL(z); \ } while (0) -/* only removes the value body of the zval */ -#define ZEPHIR_INIT_LNVAR(z) ZEPHIR_INIT_NVAR(&z) - #define ZEPHIR_CPY_WRT(d, v) \ Z_TRY_ADDREF_P(v); \ if (Z_TYPE_P(d) > IS_UNDEF) { \ if (Z_REFCOUNTED_P(d) && Z_REFCOUNT_P(d) > 0) { \ - zephir_ptr_dtor(d); \ + zval_ptr_dtor(d); \ } \ } else { \ zephir_memory_observe(d); \ @@ -117,24 +98,16 @@ int zephir_set_symbol_str(char *key_name, unsigned int key_length, zval *value); #define ZEPHIR_CPY_WRT_CTOR(d, v) \ if (d) { \ if (Z_REFCOUNTED_P(d) && Z_REFCOUNT_P(d) > 0) { \ - zephir_ptr_dtor(d); \ + zval_ptr_dtor(d); \ } \ - } else { \ - /*TODO: as above */ \ } \ ZVAL_DUP(d, v); -#define ZEPHIR_OBS_VAR(z) \ - zephir_memory_observe(z) - -#define ZEPHIR_OBS_VAR_ONCE(z) \ +#define ZEPHIR_OBS_COPY_OR_DUP(z, v) \ if (Z_TYPE_P(z) == IS_UNDEF) { \ zephir_memory_observe(z); \ - } - -#define ZEPHIR_OBS_COPY_OR_DUP(z, v) \ - ZEPHIR_OBS_VAR_ONCE(z); \ - ZVAL_COPY(z, v); + } \ + ZVAL_COPY(z, v); #define ZEPHIR_HASH_COPY(z, v) \ if (Z_TYPE_P(z) == IS_ARRAY && Z_TYPE_P(v) == IS_ARRAY) { \ @@ -146,7 +119,7 @@ int zephir_set_symbol_str(char *key_name, unsigned int key_length, zval *value); if (Z_REFCOUNTED_P(z) && Z_REFCOUNT_P(z) > 1) { \ Z_DELREF_P(z); \ } else {\ - zephir_ptr_dtor(z); \ + zval_ptr_dtor(z); \ ZVAL_NULL(z); \ } \ } else { \ @@ -161,7 +134,7 @@ int zephir_set_symbol_str(char *key_name, unsigned int key_length, zval *value); zval *tmp_ = (ppzv); \ if (tmp_ != NULL) { \ if (Z_TYPE_P(tmp_) != IS_UNDEF) { \ - zephir_ptr_dtor(tmp_); \ + zval_ptr_dtor(tmp_); \ } else { \ zephir_memory_observe(tmp_); \ } \ @@ -169,13 +142,10 @@ int zephir_set_symbol_str(char *key_name, unsigned int key_length, zval *value); } \ } while (0) -#define ZEPHIR_SEPARATE(z) SEPARATE_ZVAL(z) - #define ZEPHIR_SEPARATE_PARAM(z) \ do { \ zval *orig_ptr = z; \ - ZEPHIR_SEPARATE(orig_ptr); \ - /*zephir_memory_observe(orig_ptr);*/ \ + SEPARATE_ZVAL(orig_ptr); \ } while (0) #endif diff --git a/ext/kernel/object.c b/ext/kernel/object.c index 3fb2e006c6d..12f703ef273 100644 --- a/ext/kernel/object.c +++ b/ext/kernel/object.c @@ -338,11 +338,7 @@ int zephir_clone(zval *destination, zval *obj) status = FAILURE; } else { if (!EG(exception)) { -#if PHP_VERSION_ID >= 80000 ZVAL_OBJ(destination, clone_call(Z_OBJ_P(obj))); -#else - ZVAL_OBJ(destination, clone_call(obj)); -#endif if (EG(exception)) { zval_ptr_dtor(destination); } @@ -363,19 +359,11 @@ int zephir_isset_property(zval *object, const char *property_name, unsigned int return 1; } -#if PHP_VERSION_ID >= 80000 return zend_hash_str_exists( Z_OBJ_HT_P(object)->get_properties(Z_OBJ_P(object)), property_name, property_length ); -#else - return zend_hash_str_exists( - Z_OBJ_HT_P(object)->get_properties(object), - property_name, - property_length - ); -#endif } return 0; @@ -391,19 +379,11 @@ int zephir_isset_property_zval(zval *object, const zval *property) if (EXPECTED(zend_hash_str_exists(&Z_OBJCE_P(object)->properties_info, Z_STRVAL_P(property), Z_STRLEN_P(property)))) { return 1; } else { -#if PHP_VERSION_ID >= 80000 return zend_hash_str_exists( Z_OBJ_HT_P(object)->get_properties(Z_OBJ_P(object)), Z_STRVAL_P(property), Z_STRLEN_P(property) ); -#else - return zend_hash_str_exists( - Z_OBJ_HT_P(object)->get_properties(object), - Z_STRVAL_P(property), - Z_STRLEN_P(property) - ); -#endif } } } @@ -523,15 +503,9 @@ int zephir_read_property( } ZVAL_STRINGL(&property, property_name, property_length); -#if PHP_VERSION_ID >= 80000 res = Z_OBJ_HT_P(object)->read_property(Z_OBJ_P(object), Z_STR(property), flags ? BP_VAR_IS : BP_VAR_R, NULL, &tmp); -#else - res = Z_OBJ_HT_P(object)->read_property(object, &property, - flags ? BP_VAR_IS : BP_VAR_R, - NULL, &tmp); -#endif if ((flags & PH_READONLY) == PH_READONLY) { ZVAL_COPY_VALUE(result, res); @@ -674,11 +648,7 @@ int zephir_update_property_zval( /* write_property will add 1 to refcount, so no Z_TRY_ADDREF_P(value) is necessary */ -#if PHP_VERSION_ID >= 80000 Z_OBJ_HT_P(object)->write_property(Z_OBJ_P(object), Z_STR(property), &sep_value, 0); -#else - Z_OBJ_HT_P(object)->write_property(object, &property, &sep_value, 0); -#endif zval_ptr_dtor(&property); @@ -770,7 +740,7 @@ int zephir_update_property_array(zval *object, const char *property, uint32_t pr if (separated) { zephir_update_property_zval(object, property, property_length, &tmp); - zephir_ptr_dtor(&tmp); + zval_ptr_dtor(&tmp); } return SUCCESS; @@ -858,7 +828,7 @@ int zephir_update_property_array_append(zval *object, char *property, unsigned i if (separated) { zephir_update_property_zval(object, property, property_length, &tmp); - zephir_ptr_dtor(&tmp); + zval_ptr_dtor(&tmp); } return SUCCESS; @@ -920,7 +890,7 @@ int zephir_update_property_array_multi(zval *object, const char *property, uint3 if (separated) { zephir_update_property_zval(object, property, property_length, &tmp_arr); - zephir_ptr_dtor(&tmp_arr); + zval_ptr_dtor(&tmp_arr); } } @@ -943,11 +913,7 @@ int zephir_unset_property(zval* object, const char* name) /* Use caller's scope */ zephir_set_scope(Z_OBJCE_P(object)); -#if PHP_VERSION_ID >= 80000 Z_OBJ_HT_P(object)->unset_property(Z_OBJ_P(object), Z_STR(member), 0); -#else - Z_OBJ_HT_P(object)->unset_property(object, &member, 0); -#endif /* Restore original scope */ zephir_set_scope(scope); @@ -1296,11 +1262,7 @@ int zephir_create_instance(zval *return_value, const zval *class_name) fci.retval = 0; fci.param_count = 0; fci.params = 0; -#if PHP_VERSION_ID < 80000 - fci.no_separation = 1; -#else - fci.named_params = NULL; -#endif + fci.named_params = NULL; ZVAL_NULL(&fci.function_name); @@ -1358,11 +1320,8 @@ int zephir_create_instance_params(zval *return_value, const zval *class_name, zv fci.retval = 0; fci.param_count = 0; fci.params = 0; -#if PHP_VERSION_ID < 80000 - fci.no_separation = 1; -#else - fci.named_params = NULL; -#endif + fci.named_params = NULL; + ZVAL_NULL(&fci.function_name); fcc.object = obj; diff --git a/ext/kernel/operators.h b/ext/kernel/operators.h index 059f0a0fe24..44351f897a5 100644 --- a/ext/kernel/operators.h +++ b/ext/kernel/operators.h @@ -146,7 +146,11 @@ long zephir_safe_mod_double_zval(double op1, zval *op2); #define zephir_get_boolval(z) (Z_TYPE_P(z) == IS_TRUE ? 1 : (Z_TYPE_P(z) == IS_FALSE ? 0 : zephir_get_boolval_ex(z))) #define zephir_get_charval(z) (Z_TYPE_P(z) == IS_LONG ? Z_LVAL_P(z) : zephir_get_charval_ex(z)) +#if PHP_VERSION_ID >= 80300 +#define zephir_add_function(result, left, right) add_function(result, left, right) +#else #define zephir_add_function(result, left, right) fast_add_function(result, left, right) +#endif #define zephir_sub_function(result, left, right) sub_function(result, left, right) #define zephir_pow_function(result, op1, op2) pow_function(result, op1, op2) #define zephir_increment(var) increment_function(var) @@ -155,7 +159,7 @@ long zephir_safe_mod_double_zval(double op1, zval *op2); #define ZEPHIR_ADD_ASSIGN(z, v) \ { \ zval tmp; \ - ZEPHIR_SEPARATE(z); \ + SEPARATE_ZVAL(z); \ add_function(&tmp, z, v); \ if (Z_TYPE(tmp) == IS_LONG) { \ Z_LVAL_P(z) = Z_LVAL(tmp); \ @@ -169,7 +173,7 @@ long zephir_safe_mod_double_zval(double op1, zval *op2); #define ZEPHIR_SUB_ASSIGN(z, v) \ { \ zval tmp; \ - ZEPHIR_SEPARATE(z); \ + SEPARATE_ZVAL(z); \ sub_function(&tmp, z, v); \ if (Z_TYPE(tmp) == IS_LONG) { \ Z_LVAL_P(z) = Z_LVAL(tmp); \ @@ -183,7 +187,7 @@ long zephir_safe_mod_double_zval(double op1, zval *op2); #define ZEPHIR_MUL_ASSIGN(z, v) \ { \ zval tmp; \ - ZEPHIR_SEPARATE(z); \ + SEPARATE_ZVAL(z); \ mul_function(&tmp, z, v); \ if (Z_TYPE(tmp) == IS_LONG) { \ Z_LVAL_P(z) = Z_LVAL(tmp); \ diff --git a/ext/kernel/string.c b/ext/kernel/string.c index dd5ba9d4323..96a49a42541 100644 --- a/ext/kernel/string.c +++ b/ext/kernel/string.c @@ -461,11 +461,8 @@ void zephir_fast_join(zval *result, zval *glue, zval *pieces) zend_error(E_WARNING, "Invalid arguments supplied for join()"); return; } -#if PHP_VERSION_ID < 80000 - php_implode(Z_STR_P(glue), pieces, result); -#else + php_implode(Z_STR_P(glue), Z_ARRVAL_P(pieces), result); -#endif } /** diff --git a/ext/phalcon/0__closure.zep.c b/ext/phalcon/0__closure.zep.c index e973509f373..954a97dc320 100644 --- a/ext/phalcon/0__closure.zep.c +++ b/ext/phalcon/0__closure.zep.c @@ -30,22 +30,15 @@ PHP_METHOD(phalcon_0__closure, __invoke) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *element, element_sub, _0; - zval *this_ptr = getThis(); ZVAL_UNDEF(&element_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(element) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &element); - - ZEPHIR_CALL_FUNCTION(&_0, "mb_strtolower", NULL, 10, element); zephir_check_call_status(); zephir_ucfirst(return_value, &_0); diff --git a/ext/phalcon/10__closure.zep.c b/ext/phalcon/10__closure.zep.c index 0003437e370..8454b0effe8 100644 --- a/ext/phalcon/10__closure.zep.c +++ b/ext/phalcon/10__closure.zep.c @@ -28,25 +28,18 @@ PHP_METHOD(phalcon_10__closure, __invoke) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *action, action_sub, _0; - zval *this_ptr = getThis(); ZVAL_UNDEF(&action_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(action) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &action); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "-"); - zephir_uncamelize(return_value, action, &_0 ); + zephir_uncamelize(return_value, action, &_0); RETURN_MM(); } diff --git a/ext/phalcon/11__closure.zep.c b/ext/phalcon/11__closure.zep.c index a6a1951d0a5..c66619f3565 100644 --- a/ext/phalcon/11__closure.zep.c +++ b/ext/phalcon/11__closure.zep.c @@ -26,27 +26,19 @@ ZEPHIR_INIT_CLASS(phalcon_11__closure) PHP_METHOD(phalcon_11__closure, __invoke) { zval *number, number_sub, *message, message_sub, *file, file_sub, *line, line_sub, __$true; - zval *this_ptr = getThis(); ZVAL_UNDEF(&number_sub); ZVAL_UNDEF(&message_sub); ZVAL_UNDEF(&file_sub); ZVAL_UNDEF(&line_sub); ZVAL_BOOL(&__$true, 1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(4, 4) Z_PARAM_ZVAL(number) Z_PARAM_ZVAL(message) Z_PARAM_ZVAL(file) Z_PARAM_ZVAL(line) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(4, 0, &number, &message, &file, &line); - - ZEPHIR_GLOBAL(warning).enable = zend_is_true(&__$true); } diff --git a/ext/phalcon/12__closure.zep.c b/ext/phalcon/12__closure.zep.c index 075f485e1eb..e8652f0d3fb 100644 --- a/ext/phalcon/12__closure.zep.c +++ b/ext/phalcon/12__closure.zep.c @@ -26,7 +26,6 @@ ZEPHIR_INIT_CLASS(phalcon_12__closure) PHP_METHOD(phalcon_12__closure, __invoke) { zval *number, number_sub, *message, message_sub, *file, file_sub, *line, line_sub, *context, context_sub, __$true; - zval *this_ptr = getThis(); ZVAL_UNDEF(&number_sub); ZVAL_UNDEF(&message_sub); @@ -34,8 +33,6 @@ PHP_METHOD(phalcon_12__closure, __invoke) ZVAL_UNDEF(&line_sub); ZVAL_UNDEF(&context_sub); ZVAL_BOOL(&__$true, 1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(5, 5) Z_PARAM_ZVAL(number) Z_PARAM_ZVAL(message) @@ -43,12 +40,7 @@ PHP_METHOD(phalcon_12__closure, __invoke) Z_PARAM_ZVAL(line) Z_PARAM_ZVAL(context) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(5, 0, &number, &message, &file, &line, &context); - - ZEPHIR_GLOBAL(warning).enable = zend_is_true(&__$true); } diff --git a/ext/phalcon/13__closure.zep.c b/ext/phalcon/13__closure.zep.c index 41392cea2d4..f213b153660 100644 --- a/ext/phalcon/13__closure.zep.c +++ b/ext/phalcon/13__closure.zep.c @@ -27,20 +27,12 @@ PHP_METHOD(phalcon_13__closure, __invoke) { zend_bool _0; zval *element, element_sub; - zval *this_ptr = getThis(); ZVAL_UNDEF(&element_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(element) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &element); - - _0 = Z_TYPE_P(element) == IS_LONG; if (!(_0)) { _0 = Z_TYPE_P(element) == IS_STRING; diff --git a/ext/phalcon/14__closure.zep.c b/ext/phalcon/14__closure.zep.c index c1e941f9357..fad8e7db4f3 100644 --- a/ext/phalcon/14__closure.zep.c +++ b/ext/phalcon/14__closure.zep.c @@ -27,20 +27,12 @@ PHP_METHOD(phalcon_14__closure, __invoke) { zend_bool _0; zval *element, element_sub; - zval *this_ptr = getThis(); ZVAL_UNDEF(&element_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(element) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &element); - - _0 = Z_TYPE_P(element) == IS_LONG; if (!(_0)) { _0 = Z_TYPE_P(element) == IS_STRING; diff --git a/ext/phalcon/1__closure.zep.c b/ext/phalcon/1__closure.zep.c index 18fe607f3ec..ec8ee7ef221 100644 --- a/ext/phalcon/1__closure.zep.c +++ b/ext/phalcon/1__closure.zep.c @@ -26,27 +26,19 @@ ZEPHIR_INIT_CLASS(phalcon_1__closure) PHP_METHOD(phalcon_1__closure, __invoke) { zval *number, number_sub, *message, message_sub, *file, file_sub, *line, line_sub, __$true; - zval *this_ptr = getThis(); ZVAL_UNDEF(&number_sub); ZVAL_UNDEF(&message_sub); ZVAL_UNDEF(&file_sub); ZVAL_UNDEF(&line_sub); ZVAL_BOOL(&__$true, 1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(4, 4) Z_PARAM_ZVAL(number) Z_PARAM_ZVAL(message) Z_PARAM_ZVAL(file) Z_PARAM_ZVAL(line) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(4, 0, &number, &message, &file, &line); - - ZEPHIR_GLOBAL(warning).enable = zend_is_true(&__$true); } diff --git a/ext/phalcon/2__closure.zep.c b/ext/phalcon/2__closure.zep.c index 95c5f9a2bba..522c0c3e264 100644 --- a/ext/phalcon/2__closure.zep.c +++ b/ext/phalcon/2__closure.zep.c @@ -26,7 +26,6 @@ ZEPHIR_INIT_CLASS(phalcon_2__closure) PHP_METHOD(phalcon_2__closure, __invoke) { zval *number, number_sub, *message, message_sub, *file, file_sub, *line, line_sub, *context, context_sub, __$true; - zval *this_ptr = getThis(); ZVAL_UNDEF(&number_sub); ZVAL_UNDEF(&message_sub); @@ -34,8 +33,6 @@ PHP_METHOD(phalcon_2__closure, __invoke) ZVAL_UNDEF(&line_sub); ZVAL_UNDEF(&context_sub); ZVAL_BOOL(&__$true, 1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(5, 5) Z_PARAM_ZVAL(number) Z_PARAM_ZVAL(message) @@ -43,12 +40,7 @@ PHP_METHOD(phalcon_2__closure, __invoke) Z_PARAM_ZVAL(line) Z_PARAM_ZVAL(context) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(5, 0, &number, &message, &file, &line, &context); - - ZEPHIR_GLOBAL(warning).enable = zend_is_true(&__$true); } diff --git a/ext/phalcon/3__closure.zep.c b/ext/phalcon/3__closure.zep.c index c7fda2ae048..1c386224ea1 100644 --- a/ext/phalcon/3__closure.zep.c +++ b/ext/phalcon/3__closure.zep.c @@ -26,27 +26,19 @@ ZEPHIR_INIT_CLASS(phalcon_3__closure) PHP_METHOD(phalcon_3__closure, __invoke) { zval *number, number_sub, *message, message_sub, *file, file_sub, *line, line_sub, __$true; - zval *this_ptr = getThis(); ZVAL_UNDEF(&number_sub); ZVAL_UNDEF(&message_sub); ZVAL_UNDEF(&file_sub); ZVAL_UNDEF(&line_sub); ZVAL_BOOL(&__$true, 1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(4, 4) Z_PARAM_ZVAL(number) Z_PARAM_ZVAL(message) Z_PARAM_ZVAL(file) Z_PARAM_ZVAL(line) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(4, 0, &number, &message, &file, &line); - - ZEPHIR_GLOBAL(warning).enable = zend_is_true(&__$true); } diff --git a/ext/phalcon/4__closure.zep.c b/ext/phalcon/4__closure.zep.c index ce46964d399..3cf0edc560c 100644 --- a/ext/phalcon/4__closure.zep.c +++ b/ext/phalcon/4__closure.zep.c @@ -26,7 +26,6 @@ ZEPHIR_INIT_CLASS(phalcon_4__closure) PHP_METHOD(phalcon_4__closure, __invoke) { zval *number, number_sub, *message, message_sub, *file, file_sub, *line, line_sub, *context, context_sub, __$true; - zval *this_ptr = getThis(); ZVAL_UNDEF(&number_sub); ZVAL_UNDEF(&message_sub); @@ -34,8 +33,6 @@ PHP_METHOD(phalcon_4__closure, __invoke) ZVAL_UNDEF(&line_sub); ZVAL_UNDEF(&context_sub); ZVAL_BOOL(&__$true, 1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(5, 5) Z_PARAM_ZVAL(number) Z_PARAM_ZVAL(message) @@ -43,12 +40,7 @@ PHP_METHOD(phalcon_4__closure, __invoke) Z_PARAM_ZVAL(line) Z_PARAM_ZVAL(context) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(5, 0, &number, &message, &file, &line, &context); - - ZEPHIR_GLOBAL(warning).enable = zend_is_true(&__$true); } diff --git a/ext/phalcon/5__closure.zep.c b/ext/phalcon/5__closure.zep.c index 7401e34247b..244f8475af4 100644 --- a/ext/phalcon/5__closure.zep.c +++ b/ext/phalcon/5__closure.zep.c @@ -26,27 +26,19 @@ ZEPHIR_INIT_CLASS(phalcon_5__closure) PHP_METHOD(phalcon_5__closure, __invoke) { zval *number, number_sub, *message, message_sub, *file, file_sub, *line, line_sub, __$true; - zval *this_ptr = getThis(); ZVAL_UNDEF(&number_sub); ZVAL_UNDEF(&message_sub); ZVAL_UNDEF(&file_sub); ZVAL_UNDEF(&line_sub); ZVAL_BOOL(&__$true, 1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(4, 4) Z_PARAM_ZVAL(number) Z_PARAM_ZVAL(message) Z_PARAM_ZVAL(file) Z_PARAM_ZVAL(line) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(4, 0, &number, &message, &file, &line); - - ZEPHIR_GLOBAL(warning).enable = zend_is_true(&__$true); } diff --git a/ext/phalcon/6__closure.zep.c b/ext/phalcon/6__closure.zep.c index 5ae8575852e..df72acfac4a 100644 --- a/ext/phalcon/6__closure.zep.c +++ b/ext/phalcon/6__closure.zep.c @@ -26,7 +26,6 @@ ZEPHIR_INIT_CLASS(phalcon_6__closure) PHP_METHOD(phalcon_6__closure, __invoke) { zval *number, number_sub, *message, message_sub, *file, file_sub, *line, line_sub, *context, context_sub, __$true; - zval *this_ptr = getThis(); ZVAL_UNDEF(&number_sub); ZVAL_UNDEF(&message_sub); @@ -34,8 +33,6 @@ PHP_METHOD(phalcon_6__closure, __invoke) ZVAL_UNDEF(&line_sub); ZVAL_UNDEF(&context_sub); ZVAL_BOOL(&__$true, 1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(5, 5) Z_PARAM_ZVAL(number) Z_PARAM_ZVAL(message) @@ -43,12 +40,7 @@ PHP_METHOD(phalcon_6__closure, __invoke) Z_PARAM_ZVAL(line) Z_PARAM_ZVAL(context) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(5, 0, &number, &message, &file, &line, &context); - - ZEPHIR_GLOBAL(warning).enable = zend_is_true(&__$true); } diff --git a/ext/phalcon/7__closure.zep.c b/ext/phalcon/7__closure.zep.c index bdb40bbfd5d..c9fc211c361 100644 --- a/ext/phalcon/7__closure.zep.c +++ b/ext/phalcon/7__closure.zep.c @@ -26,20 +26,12 @@ ZEPHIR_INIT_CLASS(phalcon_7__closure) PHP_METHOD(phalcon_7__closure, __invoke) { zval *file, file_sub; - zval *this_ptr = getThis(); ZVAL_UNDEF(&file_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(file) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &file); - - RETURN_BOOL(1); } diff --git a/ext/phalcon/8__closure.zep.c b/ext/phalcon/8__closure.zep.c index 73fb49c0499..d6dfdc9d9f0 100644 --- a/ext/phalcon/8__closure.zep.c +++ b/ext/phalcon/8__closure.zep.c @@ -29,28 +29,21 @@ PHP_METHOD(phalcon_8__closure, __invoke) zend_bool _1; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *element, element_sub, _0, _2; - zval *this_ptr = getThis(); ZVAL_UNDEF(&element_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(element) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &element); - - - ZEPHIR_OBS_VAR(&_0); + zephir_memory_observe(&_0); zephir_array_fetch_long(&_0, element, 0, PH_NOISY, "phalcon/Filter/Validation.zep", 81); _1 = Z_TYPE_P(&_0) != IS_ARRAY; if (!(_1)) { - ZEPHIR_OBS_VAR(&_2); + zephir_memory_observe(&_2); zephir_array_fetch_long(&_2, element, 1, PH_NOISY, "phalcon/Filter/Validation.zep", 81); _1 = !(zephir_instance_of_ev(&_2, phalcon_filter_validation_abstractcombinedfieldsvalidator_ce)); } diff --git a/ext/phalcon/9__closure.zep.c b/ext/phalcon/9__closure.zep.c index 9667ac429b4..398dd418b40 100644 --- a/ext/phalcon/9__closure.zep.c +++ b/ext/phalcon/9__closure.zep.c @@ -29,28 +29,21 @@ PHP_METHOD(phalcon_9__closure, __invoke) zend_bool _1; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *element, element_sub, _0, _2; - zval *this_ptr = getThis(); ZVAL_UNDEF(&element_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(element) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &element); - - - ZEPHIR_OBS_VAR(&_0); + zephir_memory_observe(&_0); zephir_array_fetch_long(&_0, element, 0, PH_NOISY, "phalcon/Filter/Validation.zep", 88); _1 = Z_TYPE_P(&_0) == IS_ARRAY; if (_1) { - ZEPHIR_OBS_VAR(&_2); + zephir_memory_observe(&_2); zephir_array_fetch_long(&_2, element, 1, PH_NOISY, "phalcon/Filter/Validation.zep", 88); _1 = zephir_instance_of_ev(&_2, phalcon_filter_validation_abstractcombinedfieldsvalidator_ce); } diff --git a/ext/phalcon/acl/adapter/abstractadapter.zep.c b/ext/phalcon/acl/adapter/abstractadapter.zep.c index f58d8f1f036..a693f8666d9 100644 --- a/ext/phalcon/acl/adapter/abstractadapter.zep.c +++ b/ext/phalcon/acl/adapter/abstractadapter.zep.c @@ -13,8 +13,8 @@ #include "kernel/main.h" #include "kernel/object.h" -#include "kernel/memory.h" #include "kernel/operators.h" +#include "kernel/memory.h" /** @@ -73,9 +73,6 @@ ZEPHIR_INIT_CLASS(Phalcon_Acl_Adapter_AbstractAdapter) */ PHP_METHOD(Phalcon_Acl_Adapter_AbstractAdapter, getActiveAccess) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "activeAccess"); } @@ -85,9 +82,6 @@ PHP_METHOD(Phalcon_Acl_Adapter_AbstractAdapter, getActiveAccess) */ PHP_METHOD(Phalcon_Acl_Adapter_AbstractAdapter, getActiveComponent) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "activeComponent"); } @@ -98,9 +92,6 @@ PHP_METHOD(Phalcon_Acl_Adapter_AbstractAdapter, getActiveComponent) */ PHP_METHOD(Phalcon_Acl_Adapter_AbstractAdapter, getActiveRole) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "activeRole"); } @@ -110,9 +101,6 @@ PHP_METHOD(Phalcon_Acl_Adapter_AbstractAdapter, getActiveRole) */ PHP_METHOD(Phalcon_Acl_Adapter_AbstractAdapter, getDefaultAction) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "defaultAccess"); } @@ -127,19 +115,11 @@ PHP_METHOD(Phalcon_Acl_Adapter_AbstractAdapter, setDefaultAction) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(defaultAccess) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &defaultAccess_param); - defaultAccess = zephir_get_intval(defaultAccess_param); - - - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, defaultAccess); zephir_update_property_zval(this_ptr, ZEND_STRL("defaultAccess"), &_0); } diff --git a/ext/phalcon/acl/adapter/adapterinterface.zep.h b/ext/phalcon/acl/adapter/adapterinterface.zep.h index 34e54814dee..af5a470e0f3 100644 --- a/ext/phalcon/acl/adapter/adapterinterface.zep.h +++ b/ext/phalcon/acl/adapter/adapterinterface.zep.h @@ -74,11 +74,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_acl_adapter_adapterinter ZEND_ARG_INFO(0, roleName) ZEND_ARG_INFO(0, componentName) ZEND_ARG_TYPE_INFO(0, access, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, parameters, IS_ARRAY, 1, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, parameters, 1) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, parameters, IS_ARRAY, 1, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_acl_adapter_adapterinterface_iscomponent, 0, 1, _IS_BOOL, 0) diff --git a/ext/phalcon/acl/adapter/memory.zep.c b/ext/phalcon/acl/adapter/memory.zep.c index 33025533398..de515792ae5 100644 --- a/ext/phalcon/acl/adapter/memory.zep.c +++ b/ext/phalcon/acl/adapter/memory.zep.c @@ -178,9 +178,8 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, __construct) ZVAL_BOOL(&__$true, 1); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); zephir_create_array(&_0, 1, 0); @@ -241,19 +240,13 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, addComponent) ZVAL_UNDEF(&componentName); ZVAL_UNDEF(&componentObject); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ZVAL(componentValue) Z_PARAM_ZVAL(accessList) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &componentValue, &accessList); - - _0 = Z_TYPE_P(componentValue) == IS_OBJECT; if (_0) { _0 = zephir_instance_of_ev(componentValue, phalcon_acl_componentinterface_ce); @@ -263,10 +256,10 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, addComponent) } else { ZEPHIR_INIT_NVAR(&componentObject); object_init_ex(&componentObject, phalcon_acl_component_ce); - ZEPHIR_CALL_METHOD(NULL, &componentObject, "__construct", NULL, 142, componentValue); + ZEPHIR_CALL_METHOD(NULL, &componentObject, "__construct", NULL, 143, componentValue); zephir_check_call_status(); } - ZEPHIR_CALL_METHOD(&componentName, &componentObject, "getname", NULL, 143); + ZEPHIR_CALL_METHOD(&componentName, &componentObject, "getname", NULL, 144); zephir_check_call_status(); zephir_read_property(&_1, this_ptr, ZEND_STRL("componentsNames"), PH_NOISY_CC | PH_READONLY); if (!(zephir_array_isset(&_1, &componentName))) { @@ -306,24 +299,18 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, addComponentAccess) ZVAL_UNDEF(&_11$$9); ZVAL_UNDEF(&_12$$9); ZVAL_UNDEF(&_13$$10); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(componentName) Z_PARAM_ZVAL(accessList) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &componentName_param, &accessList); zephir_get_strval(&componentName, componentName_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("componentsNames"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "Component"); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "checkexists", NULL, 144, &_0, &componentName, &_1); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "checkexists", NULL, 145, &_0, &componentName, &_1); zephir_check_call_status(); _2 = Z_TYPE_P(accessList) != IS_ARRAY; if (_2) { @@ -455,26 +442,20 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, addInherit) ZVAL_UNDEF(&_45$$33); ZVAL_UNDEF(&checkRoleToInherits); ZVAL_UNDEF(&usedRoleToInherits); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(roleName) Z_PARAM_ZVAL(roleToInherits) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &roleName_param, &roleToInherits); zephir_get_strval(&roleName, roleName_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("roles"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "Role"); ZEPHIR_INIT_VAR(&_2); ZVAL_STRING(&_2, "role list"); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "checkexists", NULL, 144, &_0, &roleName, &_1, &_2); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "checkexists", NULL, 145, &_0, &roleName, &_1, &_2); zephir_check_call_status(); zephir_read_property(&_3, this_ptr, ZEND_STRL("roleInherits"), PH_NOISY_CC | PH_READONLY); if (!(zephir_array_isset(&_3, &roleName))) { @@ -516,7 +497,7 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, addInherit) object_init_ex(&_11$$10, phalcon_acl_exception_ce); ZEPHIR_INIT_NVAR(&_12$$10); ZEPHIR_CONCAT_SVS(&_12$$10, "Role '", &roleInheritName, "' (to inherit) does not exist in the role list"); - ZEPHIR_CALL_METHOD(NULL, &_11$$10, "__construct", &_13, 32, &_12$$10); + ZEPHIR_CALL_METHOD(NULL, &_11$$10, "__construct", &_13, 33, &_12$$10); zephir_check_call_status(); zephir_throw_exception_debug(&_11$$10, "phalcon/Acl/Adapter/Memory.zep", 318); ZEPHIR_MM_RESTORE(); @@ -538,7 +519,7 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, addInherit) ZEPHIR_INIT_NVAR(&usedRoleToInherit); ZVAL_COPY(&usedRoleToInherit, _17$$12); ZEPHIR_MAKE_REF(&checkRoleToInherits); - ZEPHIR_CALL_FUNCTION(NULL, "array_push", &_19, 145, &checkRoleToInherits, &usedRoleToInherit); + ZEPHIR_CALL_FUNCTION(NULL, "array_push", &_19, 146, &checkRoleToInherits, &usedRoleToInherit); ZEPHIR_UNREF(&checkRoleToInherits); zephir_check_call_status(); } ZEND_HASH_FOREACH_END(); @@ -554,7 +535,7 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, addInherit) ZEPHIR_CALL_METHOD(&usedRoleToInherit, &_16$$12, "current", NULL, 0); zephir_check_call_status(); ZEPHIR_MAKE_REF(&checkRoleToInherits); - ZEPHIR_CALL_FUNCTION(NULL, "array_push", &_19, 145, &checkRoleToInherits, &usedRoleToInherit); + ZEPHIR_CALL_FUNCTION(NULL, "array_push", &_19, 146, &checkRoleToInherits, &usedRoleToInherit); ZEPHIR_UNREF(&checkRoleToInherits); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &_16$$12, "next", NULL, 0); @@ -569,7 +550,7 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, addInherit) break; } ZEPHIR_MAKE_REF(&checkRoleToInherits); - ZEPHIR_CALL_FUNCTION(&checkRoleToInherit, "array_shift", &_20, 21, &checkRoleToInherits); + ZEPHIR_CALL_FUNCTION(&checkRoleToInherit, "array_shift", &_20, 22, &checkRoleToInherits); ZEPHIR_UNREF(&checkRoleToInherits); zephir_check_call_status(); if (zephir_array_isset(&usedRoleToInherits, &checkRoleToInherit)) { @@ -581,7 +562,7 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, addInherit) object_init_ex(&_21$$17, phalcon_acl_exception_ce); ZEPHIR_INIT_NVAR(&_22$$17); ZEPHIR_CONCAT_SVS(&_22$$17, "Role '", &roleInheritName, "' (to inherit) produces an infinite loop"); - ZEPHIR_CALL_METHOD(NULL, &_21$$17, "__construct", &_13, 32, &_22$$17); + ZEPHIR_CALL_METHOD(NULL, &_21$$17, "__construct", &_13, 33, &_22$$17); zephir_check_call_status(); zephir_throw_exception_debug(&_21$$17, "phalcon/Acl/Adapter/Memory.zep", 350); ZEPHIR_MM_RESTORE(); @@ -598,7 +579,7 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, addInherit) ZEPHIR_INIT_NVAR(&usedRoleToInherit); ZVAL_COPY(&usedRoleToInherit, _26$$18); ZEPHIR_MAKE_REF(&checkRoleToInherits); - ZEPHIR_CALL_FUNCTION(NULL, "array_push", &_19, 145, &checkRoleToInherits, &usedRoleToInherit); + ZEPHIR_CALL_FUNCTION(NULL, "array_push", &_19, 146, &checkRoleToInherits, &usedRoleToInherit); ZEPHIR_UNREF(&checkRoleToInherits); zephir_check_call_status(); } ZEND_HASH_FOREACH_END(); @@ -614,7 +595,7 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, addInherit) ZEPHIR_CALL_METHOD(&usedRoleToInherit, &_25$$18, "current", NULL, 0); zephir_check_call_status(); ZEPHIR_MAKE_REF(&checkRoleToInherits); - ZEPHIR_CALL_FUNCTION(NULL, "array_push", &_19, 145, &checkRoleToInherits, &usedRoleToInherit); + ZEPHIR_CALL_FUNCTION(NULL, "array_push", &_19, 146, &checkRoleToInherits, &usedRoleToInherit); ZEPHIR_UNREF(&checkRoleToInherits); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &_25$$18, "next", NULL, 0); @@ -659,7 +640,7 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, addInherit) object_init_ex(&_32$$25, phalcon_acl_exception_ce); ZEPHIR_INIT_NVAR(&_33$$25); ZEPHIR_CONCAT_SVS(&_33$$25, "Role '", &roleInheritName, "' (to inherit) does not exist in the role list"); - ZEPHIR_CALL_METHOD(NULL, &_32$$25, "__construct", &_13, 32, &_33$$25); + ZEPHIR_CALL_METHOD(NULL, &_32$$25, "__construct", &_13, 33, &_33$$25); zephir_check_call_status(); zephir_throw_exception_debug(&_32$$25, "phalcon/Acl/Adapter/Memory.zep", 318); ZEPHIR_MM_RESTORE(); @@ -681,7 +662,7 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, addInherit) ZEPHIR_INIT_NVAR(&usedRoleToInherit); ZVAL_COPY(&usedRoleToInherit, _37$$27); ZEPHIR_MAKE_REF(&checkRoleToInherits); - ZEPHIR_CALL_FUNCTION(NULL, "array_push", &_19, 145, &checkRoleToInherits, &usedRoleToInherit); + ZEPHIR_CALL_FUNCTION(NULL, "array_push", &_19, 146, &checkRoleToInherits, &usedRoleToInherit); ZEPHIR_UNREF(&checkRoleToInherits); zephir_check_call_status(); } ZEND_HASH_FOREACH_END(); @@ -697,7 +678,7 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, addInherit) ZEPHIR_CALL_METHOD(&usedRoleToInherit, &_36$$27, "current", NULL, 0); zephir_check_call_status(); ZEPHIR_MAKE_REF(&checkRoleToInherits); - ZEPHIR_CALL_FUNCTION(NULL, "array_push", &_19, 145, &checkRoleToInherits, &usedRoleToInherit); + ZEPHIR_CALL_FUNCTION(NULL, "array_push", &_19, 146, &checkRoleToInherits, &usedRoleToInherit); ZEPHIR_UNREF(&checkRoleToInherits); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &_36$$27, "next", NULL, 0); @@ -712,7 +693,7 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, addInherit) break; } ZEPHIR_MAKE_REF(&checkRoleToInherits); - ZEPHIR_CALL_FUNCTION(&checkRoleToInherit, "array_shift", &_20, 21, &checkRoleToInherits); + ZEPHIR_CALL_FUNCTION(&checkRoleToInherit, "array_shift", &_20, 22, &checkRoleToInherits); ZEPHIR_UNREF(&checkRoleToInherits); zephir_check_call_status(); if (zephir_array_isset(&usedRoleToInherits, &checkRoleToInherit)) { @@ -724,7 +705,7 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, addInherit) object_init_ex(&_39$$32, phalcon_acl_exception_ce); ZEPHIR_INIT_NVAR(&_40$$32); ZEPHIR_CONCAT_SVS(&_40$$32, "Role '", &roleInheritName, "' (to inherit) produces an infinite loop"); - ZEPHIR_CALL_METHOD(NULL, &_39$$32, "__construct", &_13, 32, &_40$$32); + ZEPHIR_CALL_METHOD(NULL, &_39$$32, "__construct", &_13, 33, &_40$$32); zephir_check_call_status(); zephir_throw_exception_debug(&_39$$32, "phalcon/Acl/Adapter/Memory.zep", 350); ZEPHIR_MM_RESTORE(); @@ -741,7 +722,7 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, addInherit) ZEPHIR_INIT_NVAR(&usedRoleToInherit); ZVAL_COPY(&usedRoleToInherit, _44$$33); ZEPHIR_MAKE_REF(&checkRoleToInherits); - ZEPHIR_CALL_FUNCTION(NULL, "array_push", &_19, 145, &checkRoleToInherits, &usedRoleToInherit); + ZEPHIR_CALL_FUNCTION(NULL, "array_push", &_19, 146, &checkRoleToInherits, &usedRoleToInherit); ZEPHIR_UNREF(&checkRoleToInherits); zephir_check_call_status(); } ZEND_HASH_FOREACH_END(); @@ -757,7 +738,7 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, addInherit) ZEPHIR_CALL_METHOD(&usedRoleToInherit, &_43$$33, "current", NULL, 0); zephir_check_call_status(); ZEPHIR_MAKE_REF(&checkRoleToInherits); - ZEPHIR_CALL_FUNCTION(NULL, "array_push", &_19, 145, &checkRoleToInherits, &usedRoleToInherit); + ZEPHIR_CALL_FUNCTION(NULL, "array_push", &_19, 146, &checkRoleToInherits, &usedRoleToInherit); ZEPHIR_UNREF(&checkRoleToInherits); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &_43$$33, "next", NULL, 0); @@ -804,24 +785,19 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, addRole) ZVAL_UNDEF(&roleName); ZVAL_UNDEF(&roleObject); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ZVAL(role) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(accessInherits) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &role, &accessInherits); if (!accessInherits) { accessInherits = &accessInherits_sub; accessInherits = &__$null; } - - _0 = Z_TYPE_P(role) == IS_OBJECT; if (_0) { _0 = zephir_instance_of_ev(role, phalcon_acl_roleinterface_ce); @@ -831,13 +807,13 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, addRole) } else if (Z_TYPE_P(role) == IS_STRING) { ZEPHIR_INIT_NVAR(&roleObject); object_init_ex(&roleObject, phalcon_acl_role_ce); - ZEPHIR_CALL_METHOD(NULL, &roleObject, "__construct", NULL, 146, role); + ZEPHIR_CALL_METHOD(NULL, &roleObject, "__construct", NULL, 147, role); zephir_check_call_status(); } else { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_acl_exception_ce, "Role must be either a string or implement RoleInterface", "phalcon/Acl/Adapter/Memory.zep", 394); return; } - ZEPHIR_CALL_METHOD(&roleName, &roleObject, "getname", NULL, 147); + ZEPHIR_CALL_METHOD(&roleName, &roleObject, "getname", NULL, 148); zephir_check_call_status(); zephir_read_property(&_1, this_ptr, ZEND_STRL("roles"), PH_NOISY_CC | PH_READONLY); if (zephir_array_isset(&_1, &roleName)) { @@ -867,6 +843,7 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, addRole) * * // Allow access to any role to browse on any component * $acl->allow("*", "*", "browse"); + * ``` */ PHP_METHOD(Phalcon_Acl_Adapter_Memory, allow) { @@ -889,7 +866,6 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, allow) ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_4$$4); ZVAL_UNDEF(&_6$$5); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 4) Z_PARAM_STR(roleName) @@ -898,10 +874,8 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, allow) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(func) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 1, &roleName_param, &componentName_param, &access, &func); zephir_get_strval(&roleName, roleName_param); zephir_get_strval(&componentName, componentName_param); @@ -909,8 +883,6 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, allow) func = &func_sub; func = &__$null; } - - ZEPHIR_INIT_VAR(&rolesArray); zephir_create_array(&rolesArray, 1, 0); zephir_array_fast_append(&rolesArray, &roleName); @@ -921,14 +893,14 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, allow) ZEPHIR_INIT_NVAR(&rolesArray); zephir_array_keys(&rolesArray, &_1$$3); } - zephir_is_iterable(&rolesArray, 0, "phalcon/Acl/Adapter/Memory.zep", 446); + zephir_is_iterable(&rolesArray, 0, "phalcon/Acl/Adapter/Memory.zep", 447); if (Z_TYPE_P(&rolesArray) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rolesArray), _2) { ZEPHIR_INIT_NVAR(&role); ZVAL_COPY(&role, _2); ZVAL_LONG(&_4$$4, 1); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "allowordeny", &_5, 148, &role, &componentName, access, &_4$$4, func); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "allowordeny", &_5, 149, &role, &componentName, access, &_4$$4, func); zephir_check_call_status(); } ZEND_HASH_FOREACH_END(); } else { @@ -943,7 +915,7 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, allow) ZEPHIR_CALL_METHOD(&role, &rolesArray, "current", NULL, 0); zephir_check_call_status(); ZVAL_LONG(&_6$$5, 1); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "allowordeny", &_5, 148, &role, &componentName, access, &_6$$5, func); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "allowordeny", &_5, 149, &role, &componentName, access, &_6$$5, func); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &rolesArray, "next", NULL, 0); zephir_check_call_status(); @@ -991,7 +963,6 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, deny) ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_4$$4); ZVAL_UNDEF(&_6$$5); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 4) Z_PARAM_STR(roleName) @@ -1000,10 +971,8 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, deny) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(func) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 1, &roleName_param, &componentName_param, &access, &func); zephir_get_strval(&roleName, roleName_param); zephir_get_strval(&componentName, componentName_param); @@ -1011,8 +980,6 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, deny) func = &func_sub; func = &__$null; } - - ZEPHIR_INIT_VAR(&rolesArray); zephir_create_array(&rolesArray, 1, 0); zephir_array_fast_append(&rolesArray, &roleName); @@ -1023,14 +990,14 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, deny) ZEPHIR_INIT_NVAR(&rolesArray); zephir_array_keys(&rolesArray, &_1$$3); } - zephir_is_iterable(&rolesArray, 0, "phalcon/Acl/Adapter/Memory.zep", 483); + zephir_is_iterable(&rolesArray, 0, "phalcon/Acl/Adapter/Memory.zep", 484); if (Z_TYPE_P(&rolesArray) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rolesArray), _2) { ZEPHIR_INIT_NVAR(&role); ZVAL_COPY(&role, _2); ZVAL_LONG(&_4$$4, 0); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "allowordeny", &_5, 148, &role, &componentName, access, &_4$$4, func); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "allowordeny", &_5, 149, &role, &componentName, access, &_4$$4, func); zephir_check_call_status(); } ZEND_HASH_FOREACH_END(); } else { @@ -1045,7 +1012,7 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, deny) ZEPHIR_CALL_METHOD(&role, &rolesArray, "current", NULL, 0); zephir_check_call_status(); ZVAL_LONG(&_6$$5, 0); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "allowordeny", &_5, 148, &role, &componentName, access, &_6$$5, func); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "allowordeny", &_5, 149, &role, &componentName, access, &_6$$5, func); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &rolesArray, "next", NULL, 0); zephir_check_call_status(); @@ -1080,20 +1047,14 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, dropComponentAccess) ZVAL_UNDEF(&_7$$8); ZVAL_UNDEF(&_8$$9); ZVAL_UNDEF(&localAccess); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(componentName) Z_PARAM_ZVAL(accessList) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &componentName_param, &accessList); zephir_get_strval(&componentName, componentName_param); - - ZEPHIR_INIT_VAR(&localAccess); array_init(&localAccess); if (Z_TYPE_P(accessList) == IS_STRING) { @@ -1105,7 +1066,7 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, dropComponentAccess) ZEPHIR_CPY_WRT(&localAccess, accessList); } if (Z_TYPE_P(accessList) == IS_ARRAY) { - zephir_is_iterable(&localAccess, 0, "phalcon/Acl/Adapter/Memory.zep", 508); + zephir_is_iterable(&localAccess, 0, "phalcon/Acl/Adapter/Memory.zep", 509); if (Z_TYPE_P(&localAccess) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&localAccess), _1$$5) { @@ -1157,9 +1118,6 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, dropComponentAccess) */ PHP_METHOD(Phalcon_Acl_Adapter_Memory, getActiveFunction) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "activeFunction"); } @@ -1169,9 +1127,6 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, getActiveFunction) */ PHP_METHOD(Phalcon_Acl_Adapter_Memory, getActiveFunctionCustomArgumentsCount) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "activeFunctionCustomArgumentsCount"); } @@ -1181,9 +1136,6 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, getActiveFunctionCustomArgumentsCount) */ PHP_METHOD(Phalcon_Acl_Adapter_Memory, getActiveKey) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "activeKey"); } @@ -1193,9 +1145,6 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, getActiveKey) */ PHP_METHOD(Phalcon_Acl_Adapter_Memory, getComponents) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "components"); } @@ -1216,16 +1165,12 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, getInheritedRoles) ZVAL_UNDEF(&result); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR(roleName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &roleName_param); if (!roleName_param) { ZEPHIR_INIT_VAR(&roleName); @@ -1233,19 +1178,18 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, getInheritedRoles) } else { zephir_get_strval(&roleName, roleName_param); } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, ""); if (ZEPHIR_IS_IDENTICAL(&_0, &roleName)) { RETURN_MM_MEMBER(getThis(), "roleInherits"); } + zephir_memory_observe(&result); zephir_read_property(&_1, this_ptr, ZEND_STRL("roleInherits"), PH_NOISY_CC | PH_READONLY); - if (!(zephir_array_isset_fetch(&result, &_1, &roleName, 1))) { + if (!(zephir_array_isset_fetch(&result, &_1, &roleName, 0))) { array_init(return_value); RETURN_MM(); } - RETURN_CTOR(&result); + RETURN_CCTOR(&result); } /** @@ -1254,9 +1198,6 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, getInheritedRoles) */ PHP_METHOD(Phalcon_Acl_Adapter_Memory, getNoArgumentsDefaultAction) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "noArgumentsDefaultAction"); } @@ -1266,9 +1207,6 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, getNoArgumentsDefaultAction) */ PHP_METHOD(Phalcon_Acl_Adapter_Memory, getRoles) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "roles"); } @@ -1362,7 +1300,6 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, isAllowed) ZVAL_UNDEF(&_2$$6); ZVAL_UNDEF(&_5$$10); ZVAL_UNDEF(¶meters); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 4) Z_PARAM_ZVAL(roleName) @@ -1371,10 +1308,8 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, isAllowed) Z_PARAM_OPTIONAL Z_PARAM_ARRAY_OR_NULL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 1, &roleName, &componentName, &access_param, ¶meters_param); ZEPHIR_SEPARATE_PARAM(roleName); ZEPHIR_SEPARATE_PARAM(componentName); @@ -1384,8 +1319,6 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, isAllowed) } else { zephir_get_arrval(¶meters, parameters_param); } - - ZEPHIR_INIT_VAR(&componentObject); ZVAL_NULL(&componentObject); ZEPHIR_INIT_VAR(&haveAccess); @@ -1410,9 +1343,9 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, isAllowed) object_init_ex(&_1$$6, phalcon_acl_exception_ce); ZEPHIR_INIT_VAR(&_2$$6); ZEPHIR_CONCAT_SS(&_2$$6, "Object passed as roleName must implement ", "Phalcon\\Acl\\RoleAwareInterface or Phalcon\\Acl\\RoleInterface"); - ZEPHIR_CALL_METHOD(NULL, &_1$$6, "__construct", NULL, 32, &_2$$6); + ZEPHIR_CALL_METHOD(NULL, &_1$$6, "__construct", NULL, 33, &_2$$6); zephir_check_call_status(); - zephir_throw_exception_debug(&_1$$6, "phalcon/Acl/Adapter/Memory.zep", 613); + zephir_throw_exception_debug(&_1$$6, "phalcon/Acl/Adapter/Memory.zep", 614); ZEPHIR_MM_RESTORE(); return; } @@ -1431,9 +1364,9 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, isAllowed) object_init_ex(&_4$$10, phalcon_acl_exception_ce); ZEPHIR_INIT_VAR(&_5$$10); ZEPHIR_CONCAT_SS(&_5$$10, "Object passed as componentName must implement ", "Phalcon\\Acl\\ComponentAwareInterface or Phalcon\\Acl\\ComponentInterface"); - ZEPHIR_CALL_METHOD(NULL, &_4$$10, "__construct", NULL, 32, &_5$$10); + ZEPHIR_CALL_METHOD(NULL, &_4$$10, "__construct", NULL, 33, &_5$$10); zephir_check_call_status(); - zephir_throw_exception_debug(&_4$$10, "phalcon/Acl/Adapter/Memory.zep", 627); + zephir_throw_exception_debug(&_4$$10, "phalcon/Acl/Adapter/Memory.zep", 628); ZEPHIR_MM_RESTORE(); return; } @@ -1444,11 +1377,11 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, isAllowed) zephir_update_property_zval(this_ptr, ZEND_STRL("activeKey"), &__$null); zephir_update_property_zval(this_ptr, ZEND_STRL("activeKey"), &__$null); zephir_update_property_zval(this_ptr, ZEND_STRL("activeFunction"), &__$null); - ZEPHIR_OBS_VAR(&accessList); + zephir_memory_observe(&accessList); zephir_read_property(&accessList, this_ptr, ZEND_STRL("access"), PH_NOISY_CC); - ZEPHIR_OBS_VAR(&funcList); + zephir_memory_observe(&funcList); zephir_read_property(&funcList, this_ptr, ZEND_STRL("func"), PH_NOISY_CC); - ZEPHIR_INIT_ZVAL_NREF(_6); + ZVAL_UNDEF(&_6); ZVAL_LONG(&_6, 0); zephir_update_property_zval(this_ptr, ZEND_STRL("activeFunctionCustomArgumentsCount"), &_6); ZEPHIR_INIT_VAR(&_8); @@ -1463,7 +1396,7 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, isAllowed) zephir_read_property(&_9$$12, this_ptr, ZEND_STRL("defaultAccess"), PH_NOISY_CC | PH_READONLY); RETURN_MM_BOOL((ZEPHIR_IS_LONG(&_9$$12, 1))); } - ZEPHIR_CALL_METHOD(&accessKey, this_ptr, "canaccess", NULL, 149, roleName, componentName, &access); + ZEPHIR_CALL_METHOD(&accessKey, this_ptr, "canaccess", NULL, 150, roleName, componentName, &access); zephir_check_call_status(); _10 = Z_TYPE_P(&accessKey) != IS_NULL; if (_10) { @@ -1471,7 +1404,7 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, isAllowed) } if (_10) { ZEPHIR_OBS_NVAR(&haveAccess); - zephir_array_fetch(&haveAccess, &accessList, &accessKey, PH_NOISY, "phalcon/Acl/Adapter/Memory.zep", 659); + zephir_array_fetch(&haveAccess, &accessList, &accessKey, PH_NOISY, "phalcon/Acl/Adapter/Memory.zep", 660); ZEPHIR_OBS_NVAR(&funcAccess); zephir_array_isset_fetch(&funcAccess, &funcList, &accessKey, 0); } @@ -1492,9 +1425,9 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, isAllowed) if (zephir_is_callable(&funcAccess)) { ZEPHIR_INIT_VAR(&reflectionFunction); object_init_ex(&reflectionFunction, zephir_get_internal_ce(SL("reflectionfunction"))); - ZEPHIR_CALL_METHOD(NULL, &reflectionFunction, "__construct", NULL, 150, &funcAccess); + ZEPHIR_CALL_METHOD(NULL, &reflectionFunction, "__construct", NULL, 151, &funcAccess); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&reflectionParameters, &reflectionFunction, "getparameters", NULL, 151); + ZEPHIR_CALL_METHOD(&reflectionParameters, &reflectionFunction, "getparameters", NULL, 152); zephir_check_call_status(); ZEPHIR_INIT_VAR(¶meterNumber); ZVAL_LONG(¶meterNumber, zephir_fast_count_int(&reflectionParameters)); @@ -1510,10 +1443,10 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, isAllowed) } ZEPHIR_INIT_VAR(¶metersForFunction); array_init(¶metersForFunction); - ZEPHIR_CALL_METHOD(&numberOfRequiredParameters, &reflectionFunction, "getnumberofrequiredparameters", NULL, 152); + ZEPHIR_CALL_METHOD(&numberOfRequiredParameters, &reflectionFunction, "getnumberofrequiredparameters", NULL, 153); zephir_check_call_status(); ZEPHIR_CPY_WRT(&userParametersSizeShouldBe, ¶meterNumber); - zephir_is_iterable(&reflectionParameters, 0, "phalcon/Acl/Adapter/Memory.zep", 766); + zephir_is_iterable(&reflectionParameters, 0, "phalcon/Acl/Adapter/Memory.zep", 767); if (Z_TYPE_P(&reflectionParameters) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&reflectionParameters), _15$$15) { @@ -1528,11 +1461,11 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, isAllowed) zephir_check_call_status(); ZEPHIR_INIT_NVAR(&reflectionClass); object_init_ex(&reflectionClass, zephir_get_internal_ce(SL("reflectionclass"))); - ZEPHIR_CALL_METHOD(NULL, &reflectionClass, "__construct", &_17, 153, &className); + ZEPHIR_CALL_METHOD(NULL, &reflectionClass, "__construct", &_17, 154, &className); zephir_check_call_status(); _18$$18 = Z_TYPE_P(&roleObject) != IS_NULL; if (_18$$18) { - ZEPHIR_CALL_METHOD(&_19$$18, &reflectionClass, "isinstance", &_20, 154, &roleObject); + ZEPHIR_CALL_METHOD(&_19$$18, &reflectionClass, "isinstance", &_20, 155, &roleObject); zephir_check_call_status(); _18$$18 = zephir_is_true(&_19$$18); } @@ -1542,14 +1475,14 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, isAllowed) } if (_21$$18) { hasRole = 1; - zephir_array_append(¶metersForFunction, &roleObject, PH_SEPARATE, "phalcon/Acl/Adapter/Memory.zep", 719); - ZEPHIR_SEPARATE(&userParametersSizeShouldBe); + zephir_array_append(¶metersForFunction, &roleObject, PH_SEPARATE, "phalcon/Acl/Adapter/Memory.zep", 720); + SEPARATE_ZVAL(&userParametersSizeShouldBe); zephir_decrement(&userParametersSizeShouldBe); continue; } _22$$18 = Z_TYPE_P(&componentObject) != IS_NULL; if (_22$$18) { - ZEPHIR_CALL_METHOD(&_23$$18, &reflectionClass, "isinstance", &_20, 154, &componentObject); + ZEPHIR_CALL_METHOD(&_23$$18, &reflectionClass, "isinstance", &_20, 155, &componentObject); zephir_check_call_status(); _22$$18 = zephir_is_true(&_23$$18); } @@ -1559,20 +1492,20 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, isAllowed) } if (_24$$18) { hasComponent = 1; - zephir_array_append(¶metersForFunction, &componentObject, PH_SEPARATE, "phalcon/Acl/Adapter/Memory.zep", 731); - ZEPHIR_SEPARATE(&userParametersSizeShouldBe); + zephir_array_append(¶metersForFunction, &componentObject, PH_SEPARATE, "phalcon/Acl/Adapter/Memory.zep", 732); + SEPARATE_ZVAL(&userParametersSizeShouldBe); zephir_decrement(&userParametersSizeShouldBe); continue; } _25$$18 = zephir_array_isset(¶meters, ¶meterToCheck); if (_25$$18) { - zephir_array_fetch(&_26$$18, ¶meters, ¶meterToCheck, PH_NOISY | PH_READONLY, "phalcon/Acl/Adapter/Memory.zep", 742); + zephir_array_fetch(&_26$$18, ¶meters, ¶meterToCheck, PH_NOISY | PH_READONLY, "phalcon/Acl/Adapter/Memory.zep", 743); _25$$18 = Z_TYPE_P(&_26$$18) == IS_OBJECT; } _27$$18 = _25$$18; if (_27$$18) { - zephir_array_fetch(&_29$$18, ¶meters, ¶meterToCheck, PH_NOISY | PH_READONLY, "phalcon/Acl/Adapter/Memory.zep", 743); - ZEPHIR_CALL_METHOD(&_28$$18, &reflectionClass, "isinstance", &_20, 154, &_29$$18); + zephir_array_fetch(&_29$$18, ¶meters, ¶meterToCheck, PH_NOISY | PH_READONLY, "phalcon/Acl/Adapter/Memory.zep", 744); + ZEPHIR_CALL_METHOD(&_28$$18, &reflectionClass, "isinstance", &_20, 155, &_29$$18); zephir_check_call_status(); _27$$18 = !zephir_is_true(&_28$$18); } @@ -1580,22 +1513,22 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, isAllowed) ZEPHIR_INIT_NVAR(&_30$$21); object_init_ex(&_30$$21, phalcon_acl_exception_ce); ZEPHIR_INIT_NVAR(&_31$$21); - zephir_array_fetch(&_32$$21, ¶meters, ¶meterToCheck, PH_NOISY | PH_READONLY, "phalcon/Acl/Adapter/Memory.zep", 750); + zephir_array_fetch(&_32$$21, ¶meters, ¶meterToCheck, PH_NOISY | PH_READONLY, "phalcon/Acl/Adapter/Memory.zep", 751); zephir_get_class(&_31$$21, &_32$$21, 0); - ZEPHIR_CALL_METHOD(&_33$$21, &reflectionClass, "getname", &_34, 155); + ZEPHIR_CALL_METHOD(&_33$$21, &reflectionClass, "getname", &_34, 156); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_35$$21); ZEPHIR_CONCAT_SSSVSVSVSVSVS(&_35$$21, "Your passed parameter doesn't have the ", "same class as the parameter in defined function ", "when checking if ", roleName, " can ", &access, " ", componentName, ". Class passed: ", &_31$$21, " , Class in defined function: ", &_33$$21, "."); - ZEPHIR_CALL_METHOD(NULL, &_30$$21, "__construct", NULL, 32, &_35$$21); + ZEPHIR_CALL_METHOD(NULL, &_30$$21, "__construct", NULL, 33, &_35$$21); zephir_check_call_status(); - zephir_throw_exception_debug(&_30$$21, "phalcon/Acl/Adapter/Memory.zep", 753); + zephir_throw_exception_debug(&_30$$21, "phalcon/Acl/Adapter/Memory.zep", 754); ZEPHIR_MM_RESTORE(); return; } } if (zephir_array_isset(¶meters, ¶meterToCheck)) { - zephir_array_fetch(&_36$$22, ¶meters, ¶meterToCheck, PH_NOISY | PH_READONLY, "phalcon/Acl/Adapter/Memory.zep", 762); - zephir_array_append(¶metersForFunction, &_36$$22, PH_SEPARATE, "phalcon/Acl/Adapter/Memory.zep", 762); + zephir_array_fetch(&_36$$22, ¶meters, ¶meterToCheck, PH_NOISY | PH_READONLY, "phalcon/Acl/Adapter/Memory.zep", 763); + zephir_array_append(¶metersForFunction, &_36$$22, PH_SEPARATE, "phalcon/Acl/Adapter/Memory.zep", 763); } } ZEND_HASH_FOREACH_END(); } else { @@ -1618,11 +1551,11 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, isAllowed) zephir_check_call_status(); ZEPHIR_INIT_NVAR(&reflectionClass); object_init_ex(&reflectionClass, zephir_get_internal_ce(SL("reflectionclass"))); - ZEPHIR_CALL_METHOD(NULL, &reflectionClass, "__construct", &_17, 153, &className); + ZEPHIR_CALL_METHOD(NULL, &reflectionClass, "__construct", &_17, 154, &className); zephir_check_call_status(); _37$$24 = Z_TYPE_P(&roleObject) != IS_NULL; if (_37$$24) { - ZEPHIR_CALL_METHOD(&_38$$24, &reflectionClass, "isinstance", &_20, 154, &roleObject); + ZEPHIR_CALL_METHOD(&_38$$24, &reflectionClass, "isinstance", &_20, 155, &roleObject); zephir_check_call_status(); _37$$24 = zephir_is_true(&_38$$24); } @@ -1632,14 +1565,14 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, isAllowed) } if (_39$$24) { hasRole = 1; - zephir_array_append(¶metersForFunction, &roleObject, PH_SEPARATE, "phalcon/Acl/Adapter/Memory.zep", 719); - ZEPHIR_SEPARATE(&userParametersSizeShouldBe); + zephir_array_append(¶metersForFunction, &roleObject, PH_SEPARATE, "phalcon/Acl/Adapter/Memory.zep", 720); + SEPARATE_ZVAL(&userParametersSizeShouldBe); zephir_decrement(&userParametersSizeShouldBe); continue; } _40$$24 = Z_TYPE_P(&componentObject) != IS_NULL; if (_40$$24) { - ZEPHIR_CALL_METHOD(&_41$$24, &reflectionClass, "isinstance", &_20, 154, &componentObject); + ZEPHIR_CALL_METHOD(&_41$$24, &reflectionClass, "isinstance", &_20, 155, &componentObject); zephir_check_call_status(); _40$$24 = zephir_is_true(&_41$$24); } @@ -1649,20 +1582,20 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, isAllowed) } if (_42$$24) { hasComponent = 1; - zephir_array_append(¶metersForFunction, &componentObject, PH_SEPARATE, "phalcon/Acl/Adapter/Memory.zep", 731); - ZEPHIR_SEPARATE(&userParametersSizeShouldBe); + zephir_array_append(¶metersForFunction, &componentObject, PH_SEPARATE, "phalcon/Acl/Adapter/Memory.zep", 732); + SEPARATE_ZVAL(&userParametersSizeShouldBe); zephir_decrement(&userParametersSizeShouldBe); continue; } _43$$24 = zephir_array_isset(¶meters, ¶meterToCheck); if (_43$$24) { - zephir_array_fetch(&_44$$24, ¶meters, ¶meterToCheck, PH_NOISY | PH_READONLY, "phalcon/Acl/Adapter/Memory.zep", 742); + zephir_array_fetch(&_44$$24, ¶meters, ¶meterToCheck, PH_NOISY | PH_READONLY, "phalcon/Acl/Adapter/Memory.zep", 743); _43$$24 = Z_TYPE_P(&_44$$24) == IS_OBJECT; } _45$$24 = _43$$24; if (_45$$24) { - zephir_array_fetch(&_47$$24, ¶meters, ¶meterToCheck, PH_NOISY | PH_READONLY, "phalcon/Acl/Adapter/Memory.zep", 743); - ZEPHIR_CALL_METHOD(&_46$$24, &reflectionClass, "isinstance", &_20, 154, &_47$$24); + zephir_array_fetch(&_47$$24, ¶meters, ¶meterToCheck, PH_NOISY | PH_READONLY, "phalcon/Acl/Adapter/Memory.zep", 744); + ZEPHIR_CALL_METHOD(&_46$$24, &reflectionClass, "isinstance", &_20, 155, &_47$$24); zephir_check_call_status(); _45$$24 = !zephir_is_true(&_46$$24); } @@ -1670,22 +1603,22 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, isAllowed) ZEPHIR_INIT_NVAR(&_48$$27); object_init_ex(&_48$$27, phalcon_acl_exception_ce); ZEPHIR_INIT_NVAR(&_49$$27); - zephir_array_fetch(&_50$$27, ¶meters, ¶meterToCheck, PH_NOISY | PH_READONLY, "phalcon/Acl/Adapter/Memory.zep", 750); + zephir_array_fetch(&_50$$27, ¶meters, ¶meterToCheck, PH_NOISY | PH_READONLY, "phalcon/Acl/Adapter/Memory.zep", 751); zephir_get_class(&_49$$27, &_50$$27, 0); - ZEPHIR_CALL_METHOD(&_51$$27, &reflectionClass, "getname", &_34, 155); + ZEPHIR_CALL_METHOD(&_51$$27, &reflectionClass, "getname", &_34, 156); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_52$$27); ZEPHIR_CONCAT_SSSVSVSVSVSVS(&_52$$27, "Your passed parameter doesn't have the ", "same class as the parameter in defined function ", "when checking if ", roleName, " can ", &access, " ", componentName, ". Class passed: ", &_49$$27, " , Class in defined function: ", &_51$$27, "."); - ZEPHIR_CALL_METHOD(NULL, &_48$$27, "__construct", NULL, 32, &_52$$27); + ZEPHIR_CALL_METHOD(NULL, &_48$$27, "__construct", NULL, 33, &_52$$27); zephir_check_call_status(); - zephir_throw_exception_debug(&_48$$27, "phalcon/Acl/Adapter/Memory.zep", 753); + zephir_throw_exception_debug(&_48$$27, "phalcon/Acl/Adapter/Memory.zep", 754); ZEPHIR_MM_RESTORE(); return; } } if (zephir_array_isset(¶meters, ¶meterToCheck)) { - zephir_array_fetch(&_53$$28, ¶meters, ¶meterToCheck, PH_NOISY | PH_READONLY, "phalcon/Acl/Adapter/Memory.zep", 762); - zephir_array_append(¶metersForFunction, &_53$$28, PH_SEPARATE, "phalcon/Acl/Adapter/Memory.zep", 762); + zephir_array_fetch(&_53$$28, ¶meters, ¶meterToCheck, PH_NOISY | PH_READONLY, "phalcon/Acl/Adapter/Memory.zep", 763); + zephir_array_append(¶metersForFunction, &_53$$28, PH_SEPARATE, "phalcon/Acl/Adapter/Memory.zep", 763); } ZEPHIR_CALL_METHOD(NULL, &reflectionParameters, "next", NULL, 0); zephir_check_call_status(); @@ -1736,9 +1669,9 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, isAllowed) object_init_ex(&_63$$15, phalcon_acl_exception_ce); ZEPHIR_INIT_VAR(&_64$$15); ZEPHIR_CONCAT_SSVSVSVS(&_64$$15, "You did not provide all necessary parameters for the ", "defined function when checking if '", roleName, "' can '", &access, "' for '", componentName, "'."); - ZEPHIR_CALL_METHOD(NULL, &_63$$15, "__construct", NULL, 32, &_64$$15); + ZEPHIR_CALL_METHOD(NULL, &_63$$15, "__construct", NULL, 33, &_64$$15); zephir_check_call_status(); - zephir_throw_exception_debug(&_63$$15, "phalcon/Acl/Adapter/Memory.zep", 807); + zephir_throw_exception_debug(&_63$$15, "phalcon/Acl/Adapter/Memory.zep", 808); ZEPHIR_MM_RESTORE(); return; } @@ -1757,19 +1690,13 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, isRole) ZVAL_UNDEF(&roleName); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(roleName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &roleName_param); zephir_get_strval(&roleName, roleName_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("roles"), PH_NOISY_CC | PH_READONLY); RETURN_MM_BOOL(zephir_array_isset(&_0, &roleName)); } @@ -1786,19 +1713,13 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, isComponent) ZVAL_UNDEF(&componentName); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(componentName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &componentName_param); zephir_get_strval(&componentName, componentName_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("componentsNames"), PH_NOISY_CC | PH_READONLY); RETURN_MM_BOOL(zephir_array_isset(&_0, &componentName)); } @@ -1815,19 +1736,11 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, setNoArgumentsDefaultAction) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(defaultAccess) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &defaultAccess_param); - defaultAccess = zephir_get_intval(defaultAccess_param); - - - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, defaultAccess); zephir_update_property_zval(this_ptr, ZEND_STRL("noArgumentsDefaultAction"), &_0); } @@ -1865,7 +1778,6 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, allowOrDeny) ZVAL_UNDEF(&_10$$7); ZVAL_UNDEF(&_13$$14); ZVAL_UNDEF(&_14$$14); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(4, 5) Z_PARAM_STR(roleName) @@ -1875,10 +1787,8 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, allowOrDeny) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(func) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 4, 1, &roleName_param, &componentName_param, &access, &action, &func); zephir_get_strval(&roleName, roleName_param); zephir_get_strval(&componentName, componentName_param); @@ -1886,22 +1796,20 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, allowOrDeny) func = &func_sub; func = &__$null; } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("roles"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "Role"); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "checkexists", NULL, 144, &_0, &roleName, &_1); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "checkexists", NULL, 145, &_0, &roleName, &_1); zephir_check_call_status(); zephir_read_property(&_2, this_ptr, ZEND_STRL("componentsNames"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_NVAR(&_1); ZVAL_STRING(&_1, "Component"); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "checkexists", NULL, 144, &_2, &componentName, &_1); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "checkexists", NULL, 145, &_2, &componentName, &_1); zephir_check_call_status(); zephir_read_property(&_3, this_ptr, ZEND_STRL("accessList"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&accessList, &_3); if (Z_TYPE_P(access) == IS_ARRAY) { - zephir_is_iterable(access, 0, "phalcon/Acl/Adapter/Memory.zep", 863); + zephir_is_iterable(access, 0, "phalcon/Acl/Adapter/Memory.zep", 864); if (Z_TYPE_P(access) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(access), _4$$3) { @@ -1914,9 +1822,9 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, allowOrDeny) object_init_ex(&_6$$5, phalcon_acl_exception_ce); ZEPHIR_INIT_NVAR(&_7$$5); ZEPHIR_CONCAT_SVSVS(&_7$$5, "Access '", &accessName, "' does not exist in component '", &componentName, "'"); - ZEPHIR_CALL_METHOD(NULL, &_6$$5, "__construct", &_8, 32, &_7$$5); + ZEPHIR_CALL_METHOD(NULL, &_6$$5, "__construct", &_8, 33, &_7$$5); zephir_check_call_status(); - zephir_throw_exception_debug(&_6$$5, "phalcon/Acl/Adapter/Memory.zep", 859); + zephir_throw_exception_debug(&_6$$5, "phalcon/Acl/Adapter/Memory.zep", 860); ZEPHIR_MM_RESTORE(); return; } @@ -1939,9 +1847,9 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, allowOrDeny) object_init_ex(&_9$$7, phalcon_acl_exception_ce); ZEPHIR_INIT_NVAR(&_10$$7); ZEPHIR_CONCAT_SVSVS(&_10$$7, "Access '", &accessName, "' does not exist in component '", &componentName, "'"); - ZEPHIR_CALL_METHOD(NULL, &_9$$7, "__construct", &_8, 32, &_10$$7); + ZEPHIR_CALL_METHOD(NULL, &_9$$7, "__construct", &_8, 33, &_10$$7); zephir_check_call_status(); - zephir_throw_exception_debug(&_9$$7, "phalcon/Acl/Adapter/Memory.zep", 859); + zephir_throw_exception_debug(&_9$$7, "phalcon/Acl/Adapter/Memory.zep", 860); ZEPHIR_MM_RESTORE(); return; } @@ -1950,7 +1858,7 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, allowOrDeny) } } ZEPHIR_INIT_NVAR(&accessName); - zephir_is_iterable(access, 0, "phalcon/Acl/Adapter/Memory.zep", 871); + zephir_is_iterable(access, 0, "phalcon/Acl/Adapter/Memory.zep", 872); if (Z_TYPE_P(access) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(access), _11$$3) { @@ -1994,9 +1902,9 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, allowOrDeny) object_init_ex(&_13$$14, phalcon_acl_exception_ce); ZEPHIR_INIT_VAR(&_14$$14); ZEPHIR_CONCAT_SVSVS(&_14$$14, "Access '", access, "' does not exist in component '", &componentName, "'"); - ZEPHIR_CALL_METHOD(NULL, &_13$$14, "__construct", &_8, 32, &_14$$14); + ZEPHIR_CALL_METHOD(NULL, &_13$$14, "__construct", &_8, 33, &_14$$14); zephir_check_call_status(); - zephir_throw_exception_debug(&_13$$14, "phalcon/Acl/Adapter/Memory.zep", 879); + zephir_throw_exception_debug(&_13$$14, "phalcon/Acl/Adapter/Memory.zep", 880); ZEPHIR_MM_RESTORE(); return; } @@ -2045,24 +1953,18 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, canAccess) ZVAL_UNDEF(&_14$$14); ZVAL_UNDEF(&usedRoleToInherits); ZVAL_UNDEF(&checkRoleToInherits); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(roleName) Z_PARAM_STR(componentName) Z_PARAM_STR(access) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &roleName_param, &componentName_param, &access_param); zephir_get_strval(&roleName, roleName_param); zephir_get_strval(&componentName, componentName_param); zephir_get_strval(&access, access_param); - - - ZEPHIR_OBS_VAR(&accessList); + zephir_memory_observe(&accessList); zephir_read_property(&accessList, this_ptr, ZEND_STRL("access"), PH_NOISY_CC); ZEPHIR_INIT_VAR(&accessKey); ZEPHIR_CONCAT_VSVSV(&accessKey, &roleName, "!", &componentName, "!", &access); @@ -2084,15 +1986,15 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, canAccess) ZEPHIR_INIT_VAR(&checkRoleToInherits); array_init(&checkRoleToInherits); zephir_read_property(&_1$$6, this_ptr, ZEND_STRL("roleInherits"), PH_NOISY_CC | PH_READONLY); - zephir_array_fetch(&_2$$6, &_1$$6, &roleName, PH_NOISY | PH_READONLY, "phalcon/Acl/Adapter/Memory.zep", 940); - zephir_is_iterable(&_2$$6, 0, "phalcon/Acl/Adapter/Memory.zep", 944); + zephir_array_fetch(&_2$$6, &_1$$6, &roleName, PH_NOISY | PH_READONLY, "phalcon/Acl/Adapter/Memory.zep", 941); + zephir_is_iterable(&_2$$6, 0, "phalcon/Acl/Adapter/Memory.zep", 945); if (Z_TYPE_P(&_2$$6) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_2$$6), _3$$6) { ZEPHIR_INIT_NVAR(&usedRoleToInherit); ZVAL_COPY(&usedRoleToInherit, _3$$6); ZEPHIR_MAKE_REF(&checkRoleToInherits); - ZEPHIR_CALL_FUNCTION(NULL, "array_push", &_5, 145, &checkRoleToInherits, &usedRoleToInherit); + ZEPHIR_CALL_FUNCTION(NULL, "array_push", &_5, 146, &checkRoleToInherits, &usedRoleToInherit); ZEPHIR_UNREF(&checkRoleToInherits); zephir_check_call_status(); } ZEND_HASH_FOREACH_END(); @@ -2108,7 +2010,7 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, canAccess) ZEPHIR_CALL_METHOD(&usedRoleToInherit, &_2$$6, "current", NULL, 0); zephir_check_call_status(); ZEPHIR_MAKE_REF(&checkRoleToInherits); - ZEPHIR_CALL_FUNCTION(NULL, "array_push", &_5, 145, &checkRoleToInherits, &usedRoleToInherit); + ZEPHIR_CALL_FUNCTION(NULL, "array_push", &_5, 146, &checkRoleToInherits, &usedRoleToInherit); ZEPHIR_UNREF(&checkRoleToInherits); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &_2$$6, "next", NULL, 0); @@ -2123,7 +2025,7 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, canAccess) break; } ZEPHIR_MAKE_REF(&checkRoleToInherits); - ZEPHIR_CALL_FUNCTION(&checkRoleToInherit, "array_shift", &_6, 21, &checkRoleToInherits); + ZEPHIR_CALL_FUNCTION(&checkRoleToInherit, "array_shift", &_6, 22, &checkRoleToInherits); ZEPHIR_UNREF(&checkRoleToInherits); zephir_check_call_status(); if (zephir_array_isset(&usedRoleToInherits, &checkRoleToInherit)) { @@ -2151,15 +2053,15 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, canAccess) zephir_read_property(&_10$$9, this_ptr, ZEND_STRL("roleInherits"), PH_NOISY_CC | PH_READONLY); if (zephir_array_isset(&_10$$9, &checkRoleToInherit)) { zephir_read_property(&_11$$14, this_ptr, ZEND_STRL("roleInherits"), PH_NOISY_CC | PH_READONLY); - zephir_array_fetch(&_12$$14, &_11$$14, &checkRoleToInherit, PH_NOISY | PH_READONLY, "phalcon/Acl/Adapter/Memory.zep", 987); - zephir_is_iterable(&_12$$14, 0, "phalcon/Acl/Adapter/Memory.zep", 990); + zephir_array_fetch(&_12$$14, &_11$$14, &checkRoleToInherit, PH_NOISY | PH_READONLY, "phalcon/Acl/Adapter/Memory.zep", 988); + zephir_is_iterable(&_12$$14, 0, "phalcon/Acl/Adapter/Memory.zep", 991); if (Z_TYPE_P(&_12$$14) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_12$$14), _13$$14) { ZEPHIR_INIT_NVAR(&usedRoleToInherit); ZVAL_COPY(&usedRoleToInherit, _13$$14); ZEPHIR_MAKE_REF(&checkRoleToInherits); - ZEPHIR_CALL_FUNCTION(NULL, "array_push", &_5, 145, &checkRoleToInherits, &usedRoleToInherit); + ZEPHIR_CALL_FUNCTION(NULL, "array_push", &_5, 146, &checkRoleToInherits, &usedRoleToInherit); ZEPHIR_UNREF(&checkRoleToInherits); zephir_check_call_status(); } ZEND_HASH_FOREACH_END(); @@ -2175,7 +2077,7 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, canAccess) ZEPHIR_CALL_METHOD(&usedRoleToInherit, &_12$$14, "current", NULL, 0); zephir_check_call_status(); ZEPHIR_MAKE_REF(&checkRoleToInherits); - ZEPHIR_CALL_FUNCTION(NULL, "array_push", &_5, 145, &checkRoleToInherits, &usedRoleToInherit); + ZEPHIR_CALL_FUNCTION(NULL, "array_push", &_5, 146, &checkRoleToInherits, &usedRoleToInherit); ZEPHIR_UNREF(&checkRoleToInherits); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &_12$$14, "next", NULL, 0); @@ -2204,7 +2106,6 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, checkExists) zval element, elementName, suffix, _1$$3; zval *collection_param = NULL, *element_param = NULL, *elementName_param = NULL, *suffix_param = NULL, _0$$3; zval collection; - zval *this_ptr = getThis(); ZVAL_UNDEF(&collection); ZVAL_UNDEF(&_0$$3); @@ -2212,8 +2113,6 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, checkExists) ZVAL_UNDEF(&elementName); ZVAL_UNDEF(&suffix); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 4) Z_PARAM_ARRAY(collection) Z_PARAM_STR(element) @@ -2221,10 +2120,8 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, checkExists) Z_PARAM_OPTIONAL Z_PARAM_STR(suffix) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 1, &collection_param, &element_param, &elementName_param, &suffix_param); zephir_get_arrval(&collection, collection_param); zephir_get_strval(&element, element_param); @@ -2235,16 +2132,14 @@ PHP_METHOD(Phalcon_Acl_Adapter_Memory, checkExists) } else { zephir_get_strval(&suffix, suffix_param); } - - if (1 != zephir_array_isset(&collection, &element)) { ZEPHIR_INIT_VAR(&_0$$3); object_init_ex(&_0$$3, phalcon_acl_exception_ce); ZEPHIR_INIT_VAR(&_1$$3); ZEPHIR_CONCAT_VSVSV(&_1$$3, &elementName, " '", &element, "' does not exist in the ", &suffix); - ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 32, &_1$$3); + ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 33, &_1$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_0$$3, "phalcon/Acl/Adapter/Memory.zep", 1015); + zephir_throw_exception_debug(&_0$$3, "phalcon/Acl/Adapter/Memory.zep", 1016); ZEPHIR_MM_RESTORE(); return; } diff --git a/ext/phalcon/acl/adapter/memory.zep.h b/ext/phalcon/acl/adapter/memory.zep.h index e59ec468c52..fe0e21d154e 100644 --- a/ext/phalcon/acl/adapter/memory.zep.h +++ b/ext/phalcon/acl/adapter/memory.zep.h @@ -97,11 +97,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_acl_adapter_memory_isall ZEND_ARG_INFO(0, roleName) ZEND_ARG_INFO(0, componentName) ZEND_ARG_TYPE_INFO(0, access, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, parameters, IS_ARRAY, 1, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, parameters, 1) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, parameters, IS_ARRAY, 1, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_acl_adapter_memory_isrole, 0, 1, _IS_BOOL, 0) @@ -141,11 +137,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_acl_adapter_memory_check ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_acl_adapter_memory_method_entry) { -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Acl_Adapter_Memory, __construct, arginfo_phalcon_acl_adapter_memory___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) -#else - PHP_ME(Phalcon_Acl_Adapter_Memory, __construct, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) -#endif +PHP_ME(Phalcon_Acl_Adapter_Memory, __construct, arginfo_phalcon_acl_adapter_memory___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) PHP_ME(Phalcon_Acl_Adapter_Memory, addComponent, arginfo_phalcon_acl_adapter_memory_addcomponent, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Acl_Adapter_Memory, addComponentAccess, arginfo_phalcon_acl_adapter_memory_addcomponentaccess, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Acl_Adapter_Memory, addInherit, arginfo_phalcon_acl_adapter_memory_addinherit, ZEND_ACC_PUBLIC) @@ -153,11 +145,7 @@ ZEPHIR_INIT_FUNCS(phalcon_acl_adapter_memory_method_entry) { PHP_ME(Phalcon_Acl_Adapter_Memory, allow, arginfo_phalcon_acl_adapter_memory_allow, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Acl_Adapter_Memory, deny, arginfo_phalcon_acl_adapter_memory_deny, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Acl_Adapter_Memory, dropComponentAccess, arginfo_phalcon_acl_adapter_memory_dropcomponentaccess, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Acl_Adapter_Memory, getActiveFunction, arginfo_phalcon_acl_adapter_memory_getactivefunction, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Acl_Adapter_Memory, getActiveFunction, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Acl_Adapter_Memory, getActiveFunction, arginfo_phalcon_acl_adapter_memory_getactivefunction, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Acl_Adapter_Memory, getActiveFunctionCustomArgumentsCount, arginfo_phalcon_acl_adapter_memory_getactivefunctioncustomargumentscount, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Acl_Adapter_Memory, getActiveKey, arginfo_phalcon_acl_adapter_memory_getactivekey, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Acl_Adapter_Memory, getComponents, arginfo_phalcon_acl_adapter_memory_getcomponents, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/acl/component.zep.c b/ext/phalcon/acl/component.zep.c index d5a4239a6ce..37bb622bf6f 100644 --- a/ext/phalcon/acl/component.zep.c +++ b/ext/phalcon/acl/component.zep.c @@ -62,17 +62,14 @@ PHP_METHOD(Phalcon_Acl_Component, __construct) ZVAL_UNDEF(&name); ZVAL_UNDEF(&description); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(name) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(description) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &name_param, &description_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")); @@ -88,8 +85,6 @@ PHP_METHOD(Phalcon_Acl_Component, __construct) } else { zephir_get_strval(&description, description_param); } - - if (UNEXPECTED(ZEPHIR_IS_STRING_IDENTICAL(&name, "*"))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_acl_exception_ce, "Component name cannot be '*'", "phalcon/Acl/Component.zep", 38); return; @@ -101,27 +96,18 @@ PHP_METHOD(Phalcon_Acl_Component, __construct) PHP_METHOD(Phalcon_Acl_Component, __toString) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "name"); } PHP_METHOD(Phalcon_Acl_Component, getDescription) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "description"); } PHP_METHOD(Phalcon_Acl_Component, getName) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "name"); } diff --git a/ext/phalcon/acl/role.zep.c b/ext/phalcon/acl/role.zep.c index 63fff2ec054..38f38d017f1 100644 --- a/ext/phalcon/acl/role.zep.c +++ b/ext/phalcon/acl/role.zep.c @@ -62,17 +62,14 @@ PHP_METHOD(Phalcon_Acl_Role, __construct) ZVAL_UNDEF(&name); ZVAL_UNDEF(&description); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(name) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(description) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &name_param, &description_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")); @@ -88,8 +85,6 @@ PHP_METHOD(Phalcon_Acl_Role, __construct) } else { zephir_get_strval(&description, description_param); } - - if (UNEXPECTED(ZEPHIR_IS_STRING_IDENTICAL(&name, "*"))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_acl_exception_ce, "Role name cannot be '*'", "phalcon/Acl/Role.zep", 38); return; @@ -101,27 +96,18 @@ PHP_METHOD(Phalcon_Acl_Role, __construct) PHP_METHOD(Phalcon_Acl_Role, __toString) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "name"); } PHP_METHOD(Phalcon_Acl_Role, getDescription) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "description"); } PHP_METHOD(Phalcon_Acl_Role, getName) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "name"); } diff --git a/ext/phalcon/annotations/adapter/abstractadapter.zep.c b/ext/phalcon/annotations/adapter/abstractadapter.zep.c index 4b11a72dd24..3a19f08f4a0 100644 --- a/ext/phalcon/annotations/adapter/abstractadapter.zep.c +++ b/ext/phalcon/annotations/adapter/abstractadapter.zep.c @@ -67,18 +67,12 @@ PHP_METHOD(Phalcon_Annotations_Adapter_AbstractAdapter, get) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$5); ZVAL_UNDEF(&_2$$5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(className) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &className); - - if (Z_TYPE_P(className) == IS_OBJECT) { ZEPHIR_INIT_VAR(&realClassName); zephir_get_class(&realClassName, className, 0); @@ -104,7 +98,7 @@ PHP_METHOD(Phalcon_Annotations_Adapter_AbstractAdapter, get) zephir_check_call_status(); ZEPHIR_INIT_NVAR(&classAnnotations); object_init_ex(&classAnnotations, phalcon_annotations_reflection_ce); - ZEPHIR_CALL_METHOD(NULL, &classAnnotations, "__construct", NULL, 36, &parsedAnnotations); + ZEPHIR_CALL_METHOD(NULL, &classAnnotations, "__construct", NULL, 37, &parsedAnnotations); zephir_check_call_status(); zephir_update_property_array(this_ptr, SL("annotations"), &realClassName, &classAnnotations); ZEPHIR_CALL_METHOD(NULL, this_ptr, "write", NULL, 0, &realClassName, &classAnnotations); @@ -128,26 +122,20 @@ PHP_METHOD(Phalcon_Annotations_Adapter_AbstractAdapter, getConstant) ZVAL_UNDEF(&constantName); ZVAL_UNDEF(&constants); ZVAL_UNDEF(&constant); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(className) Z_PARAM_STR(constantName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &className_param, &constantName_param); zephir_get_strval(&className, className_param); zephir_get_strval(&constantName, constantName_param); - - ZEPHIR_CALL_METHOD(&constants, this_ptr, "getconstants", NULL, 0, &className); zephir_check_call_status(); if (!(zephir_array_isset_fetch(&constant, &constants, &constantName, 1))) { object_init_ex(return_value, phalcon_annotations_collection_ce); - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 37); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 38); zephir_check_call_status(); RETURN_MM(); } @@ -167,19 +155,13 @@ PHP_METHOD(Phalcon_Annotations_Adapter_AbstractAdapter, getConstants) ZVAL_UNDEF(&className); ZVAL_UNDEF(&classAnnotations); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(className) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &className_param); zephir_get_strval(&className, className_param); - - ZEPHIR_CALL_METHOD(&classAnnotations, this_ptr, "get", NULL, 0, &className); zephir_check_call_status(); ZEPHIR_RETURN_CALL_METHOD(&classAnnotations, "getconstantsannotations", NULL, 0); @@ -203,28 +185,22 @@ PHP_METHOD(Phalcon_Annotations_Adapter_AbstractAdapter, getProperty) ZVAL_UNDEF(&classAnnotations); ZVAL_UNDEF(&properties); ZVAL_UNDEF(&property); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(className) Z_PARAM_STR(propertyName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &className_param, &propertyName_param); zephir_get_strval(&className, className_param); zephir_get_strval(&propertyName, propertyName_param); - - ZEPHIR_CALL_METHOD(&classAnnotations, this_ptr, "get", NULL, 0, &className); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&properties, &classAnnotations, "getpropertiesannotations", NULL, 0); zephir_check_call_status(); if (!(zephir_array_isset_fetch(&property, &properties, &propertyName, 1))) { object_init_ex(return_value, phalcon_annotations_collection_ce); - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 37); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 38); zephir_check_call_status(); RETURN_MM(); } @@ -244,19 +220,13 @@ PHP_METHOD(Phalcon_Annotations_Adapter_AbstractAdapter, getProperties) ZVAL_UNDEF(&className); ZVAL_UNDEF(&classAnnotations); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(className) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &className_param); zephir_get_strval(&className, className_param); - - ZEPHIR_CALL_METHOD(&classAnnotations, this_ptr, "get", NULL, 0, &className); zephir_check_call_status(); ZEPHIR_RETURN_CALL_METHOD(&classAnnotations, "getpropertiesannotations", NULL, 0); @@ -287,21 +257,15 @@ PHP_METHOD(Phalcon_Annotations_Adapter_AbstractAdapter, getMethod) ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_4$$4); ZVAL_UNDEF(&_6$$6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(className) Z_PARAM_STR(methodName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &className_param, &methodName_param); zephir_get_strval(&className, className_param); zephir_get_strval(&methodName, methodName_param); - - ZEPHIR_CALL_METHOD(&classAnnotations, this_ptr, "get", NULL, 0, &className); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&methods, &classAnnotations, "getmethodsannotations", NULL, 0); @@ -319,7 +283,7 @@ PHP_METHOD(Phalcon_Annotations_Adapter_AbstractAdapter, getMethod) } ZEPHIR_INIT_NVAR(&method); ZVAL_COPY(&method, _0$$3); - ZEPHIR_CALL_FUNCTION(&_4$$4, "strcasecmp", &_5, 38, &methodKey, &methodName); + ZEPHIR_CALL_FUNCTION(&_4$$4, "strcasecmp", &_5, 39, &methodKey, &methodName); zephir_check_call_status(); if (!(zephir_is_true(&_4$$4))) { RETURN_CCTOR(&method); @@ -338,7 +302,7 @@ PHP_METHOD(Phalcon_Annotations_Adapter_AbstractAdapter, getMethod) zephir_check_call_status(); ZEPHIR_CALL_METHOD(&method, &methods, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&_6$$6, "strcasecmp", &_5, 38, &methodKey, &methodName); + ZEPHIR_CALL_FUNCTION(&_6$$6, "strcasecmp", &_5, 39, &methodKey, &methodName); zephir_check_call_status(); if (!(zephir_is_true(&_6$$6))) { RETURN_CCTOR(&method); @@ -351,7 +315,7 @@ PHP_METHOD(Phalcon_Annotations_Adapter_AbstractAdapter, getMethod) ZEPHIR_INIT_NVAR(&methodKey); } object_init_ex(return_value, phalcon_annotations_collection_ce); - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 37); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 38); zephir_check_call_status(); RETURN_MM(); } @@ -369,19 +333,13 @@ PHP_METHOD(Phalcon_Annotations_Adapter_AbstractAdapter, getMethods) ZVAL_UNDEF(&className); ZVAL_UNDEF(&classAnnotations); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(className) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &className_param); zephir_get_strval(&className, className_param); - - ZEPHIR_CALL_METHOD(&classAnnotations, this_ptr, "get", NULL, 0, &className); zephir_check_call_status(); ZEPHIR_RETURN_CALL_METHOD(&classAnnotations, "getmethodsannotations", NULL, 0); @@ -401,9 +359,8 @@ PHP_METHOD(Phalcon_Annotations_Adapter_AbstractAdapter, getReader) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("reader"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_0) == IS_NULL) { @@ -428,17 +385,10 @@ PHP_METHOD(Phalcon_Annotations_Adapter_AbstractAdapter, setReader) zval *this_ptr = getThis(); ZVAL_UNDEF(&reader_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(reader, phalcon_annotations_readerinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &reader); - - zephir_update_property_zval(this_ptr, ZEND_STRL("reader"), reader); } @@ -450,7 +400,8 @@ zend_object *zephir_init_properties_Phalcon_Annotations_Adapter_AbstractAdapter( ZVAL_UNDEF(&_1$$3); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/annotations/adapter/apcu.zep.c b/ext/phalcon/annotations/adapter/apcu.zep.c index db798c91d33..9836d11fd7d 100644 --- a/ext/phalcon/annotations/adapter/apcu.zep.c +++ b/ext/phalcon/annotations/adapter/apcu.zep.c @@ -13,8 +13,8 @@ #include "kernel/main.h" #include "kernel/array.h" -#include "kernel/object.h" #include "kernel/memory.h" +#include "kernel/object.h" #include "kernel/operators.h" #include "kernel/string.h" #include "kernel/concat.h" @@ -73,16 +73,12 @@ PHP_METHOD(Phalcon_Annotations_Adapter_Apcu, __construct) ZVAL_UNDEF(&options); ZVAL_UNDEF(&prefix); ZVAL_UNDEF(&ttl); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -90,12 +86,12 @@ PHP_METHOD(Phalcon_Annotations_Adapter_Apcu, __construct) } else { zephir_get_arrval(&options, options_param); } - - - if (zephir_array_isset_string_fetch(&prefix, &options, SL("prefix"), 1)) { + zephir_memory_observe(&prefix); + if (zephir_array_isset_string_fetch(&prefix, &options, SL("prefix"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("prefix"), &prefix); } - if (zephir_array_isset_string_fetch(&ttl, &options, SL("lifetime"), 1)) { + zephir_memory_observe(&ttl); + if (zephir_array_isset_string_fetch(&ttl, &options, SL("lifetime"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("ttl"), &ttl); } ZEPHIR_MM_RESTORE(); @@ -116,15 +112,11 @@ PHP_METHOD(Phalcon_Annotations_Adapter_Apcu, read) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -135,14 +127,12 @@ PHP_METHOD(Phalcon_Annotations_Adapter_Apcu, read) } else { ZEPHIR_INIT_VAR(&key); } - - ZEPHIR_INIT_VAR(&_0); zephir_read_property(&_1, this_ptr, ZEND_STRL("prefix"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_2); ZEPHIR_CONCAT_SVV(&_2, "_PHAN", &_1, &key); zephir_fast_strtolower(&_0, &_2); - ZEPHIR_RETURN_CALL_FUNCTION("apcu_fetch", NULL, 106, &_0); + ZEPHIR_RETURN_CALL_FUNCTION("apcu_fetch", NULL, 107, &_0); zephir_check_call_status(); RETURN_MM(); } @@ -164,16 +154,12 @@ PHP_METHOD(Phalcon_Annotations_Adapter_Apcu, write) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(key) Z_PARAM_OBJECT_OF_CLASS(data, phalcon_annotations_reflection_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &key_param, &data); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -184,15 +170,13 @@ PHP_METHOD(Phalcon_Annotations_Adapter_Apcu, write) } else { ZEPHIR_INIT_VAR(&key); } - - ZEPHIR_INIT_VAR(&_0); zephir_read_property(&_1, this_ptr, ZEND_STRL("prefix"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_2); ZEPHIR_CONCAT_SVV(&_2, "_PHAN", &_1, &key); zephir_fast_strtolower(&_0, &_2); zephir_read_property(&_3, this_ptr, ZEND_STRL("ttl"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_RETURN_CALL_FUNCTION("apcu_store", NULL, 107, &_0, data, &_3); + ZEPHIR_RETURN_CALL_FUNCTION("apcu_store", NULL, 108, &_0, data, &_3); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/annotations/adapter/apcu.zep.h b/ext/phalcon/annotations/adapter/apcu.zep.h index b847fbac3ec..ac03bb69b38 100644 --- a/ext/phalcon/annotations/adapter/apcu.zep.h +++ b/ext/phalcon/annotations/adapter/apcu.zep.h @@ -8,11 +8,7 @@ PHP_METHOD(Phalcon_Annotations_Adapter_Apcu, read); PHP_METHOD(Phalcon_Annotations_Adapter_Apcu, write); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_annotations_adapter_apcu___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_annotations_adapter_apcu_read, 0, 0, 1) diff --git a/ext/phalcon/annotations/adapter/memory.zep.c b/ext/phalcon/annotations/adapter/memory.zep.c index 42f51577f77..3c3320af9aa 100644 --- a/ext/phalcon/annotations/adapter/memory.zep.c +++ b/ext/phalcon/annotations/adapter/memory.zep.c @@ -13,8 +13,8 @@ #include "kernel/main.h" #include "kernel/array.h" -#include "kernel/object.h" #include "kernel/memory.h" +#include "kernel/object.h" #include "kernel/string.h" #include "ext/spl/spl_exceptions.h" #include "kernel/exception.h" @@ -58,15 +58,11 @@ PHP_METHOD(Phalcon_Annotations_Adapter_Memory, read) ZVAL_UNDEF(&data); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -77,15 +73,14 @@ PHP_METHOD(Phalcon_Annotations_Adapter_Memory, read) } else { ZEPHIR_INIT_VAR(&key); } - - + zephir_memory_observe(&data); zephir_read_property(&_0, this_ptr, ZEND_STRL("data"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_1); zephir_fast_strtolower(&_1, &key); - if (!(zephir_array_isset_fetch(&data, &_0, &_1, 1))) { + if (!(zephir_array_isset_fetch(&data, &_0, &_1, 0))) { RETURN_MM_BOOL(0); } - RETURN_CTOR(&data); + RETURN_CCTOR(&data); } /** @@ -101,16 +96,12 @@ PHP_METHOD(Phalcon_Annotations_Adapter_Memory, write) ZVAL_UNDEF(&key); ZVAL_UNDEF(&data_sub); ZVAL_UNDEF(&lowercasedKey); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(key) Z_PARAM_OBJECT_OF_CLASS(data, phalcon_annotations_reflection_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &key_param, &data); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -121,8 +112,6 @@ PHP_METHOD(Phalcon_Annotations_Adapter_Memory, write) } else { ZEPHIR_INIT_VAR(&key); } - - ZEPHIR_INIT_VAR(&lowercasedKey); zephir_fast_strtolower(&lowercasedKey, &key); zephir_update_property_array(this_ptr, SL("data"), &lowercasedKey, data); diff --git a/ext/phalcon/annotations/adapter/stream.zep.c b/ext/phalcon/annotations/adapter/stream.zep.c index ef691fd4790..e1dc2730df9 100644 --- a/ext/phalcon/annotations/adapter/stream.zep.c +++ b/ext/phalcon/annotations/adapter/stream.zep.c @@ -13,8 +13,8 @@ #include "kernel/main.h" #include "kernel/array.h" -#include "kernel/object.h" #include "kernel/memory.h" +#include "kernel/object.h" #include "kernel/operators.h" #include "kernel/concat.h" #include "kernel/file.h" @@ -71,16 +71,12 @@ PHP_METHOD(Phalcon_Annotations_Adapter_Stream, __construct) ZVAL_UNDEF(&options); ZVAL_UNDEF(&annotationsDir); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -88,9 +84,8 @@ PHP_METHOD(Phalcon_Annotations_Adapter_Stream, __construct) } else { zephir_get_arrval(&options, options_param); } - - - if (zephir_array_isset_string_fetch(&annotationsDir, &options, SL("annotationsDir"), 1)) { + zephir_memory_observe(&annotationsDir); + if (zephir_array_isset_string_fetch(&annotationsDir, &options, SL("annotationsDir"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("annotationsDir"), &annotationsDir); } ZEPHIR_MM_RESTORE(); @@ -124,19 +119,13 @@ PHP_METHOD(Phalcon_Annotations_Adapter_Stream, read) ZVAL_UNDEF(&_8$$5); ZVAL_UNDEF(&_9$$6); ZVAL_UNDEF(&_10$$6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); zephir_get_strval(&key, key_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("annotationsDir"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_1); ZEPHIR_INIT_VAR(&_2); @@ -154,33 +143,33 @@ PHP_METHOD(Phalcon_Annotations_Adapter_Stream, read) RETURN_MM_BOOL(0); } ZEPHIR_GLOBAL(warning).enable = zend_is_true(&__$false); - ZEPHIR_CALL_FUNCTION(&version, "phpversion", NULL, 132); + ZEPHIR_CALL_FUNCTION(&version, "phpversion", NULL, 133); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_4); ZVAL_STRING(&_4, "8.0"); ZEPHIR_INIT_VAR(&_5); ZVAL_STRING(&_5, ">="); - ZEPHIR_CALL_FUNCTION(&_6, "version_compare", NULL, 133, &version, &_4, &_5); + ZEPHIR_CALL_FUNCTION(&_6, "version_compare", NULL, 134, &version, &_4, &_5); zephir_check_call_status(); if (zephir_is_true(&_6)) { ZEPHIR_INIT_VAR(&_7$$5); ZEPHIR_INIT_NVAR(&_7$$5); zephir_create_closure_ex(&_7$$5, NULL, phalcon_5__closure_ce, SL("__invoke")); ZVAL_LONG(&_8$$5, 2); - ZEPHIR_CALL_FUNCTION(NULL, "set_error_handler", NULL, 134, &_7$$5, &_8$$5); + ZEPHIR_CALL_FUNCTION(NULL, "set_error_handler", NULL, 135, &_7$$5, &_8$$5); zephir_check_call_status(); } else { ZEPHIR_INIT_VAR(&_9$$6); ZEPHIR_INIT_NVAR(&_9$$6); zephir_create_closure_ex(&_9$$6, NULL, phalcon_6__closure_ce, SL("__invoke")); ZVAL_LONG(&_10$$6, 2); - ZEPHIR_CALL_FUNCTION(NULL, "set_error_handler", NULL, 134, &_9$$6, &_10$$6); + ZEPHIR_CALL_FUNCTION(NULL, "set_error_handler", NULL, 135, &_9$$6, &_10$$6); zephir_check_call_status(); } ZEPHIR_CALL_FUNCTION(&_11, "unserialize", NULL, 16, &contents); zephir_check_call_status(); ZEPHIR_CPY_WRT(&contents, &_11); - ZEPHIR_CALL_FUNCTION(NULL, "restore_error_handler", NULL, 135); + ZEPHIR_CALL_FUNCTION(NULL, "restore_error_handler", NULL, 136); zephir_check_call_status(); if (UNEXPECTED(ZEPHIR_GLOBAL(warning).enable)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(spl_ce_RuntimeException, "Cannot read annotation data", "phalcon/Annotations/Adapter/Stream.zep", 102); @@ -209,16 +198,12 @@ PHP_METHOD(Phalcon_Annotations_Adapter_Stream, write) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(key) Z_PARAM_OBJECT_OF_CLASS(data, phalcon_annotations_reflection_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &key_param, &data); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -229,8 +214,6 @@ PHP_METHOD(Phalcon_Annotations_Adapter_Stream, write) } else { ZEPHIR_INIT_VAR(&key); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("annotationsDir"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_1); ZEPHIR_INIT_VAR(&_2); diff --git a/ext/phalcon/annotations/adapter/stream.zep.h b/ext/phalcon/annotations/adapter/stream.zep.h index 2b74df62355..ff562cc3c9c 100644 --- a/ext/phalcon/annotations/adapter/stream.zep.h +++ b/ext/phalcon/annotations/adapter/stream.zep.h @@ -8,11 +8,7 @@ PHP_METHOD(Phalcon_Annotations_Adapter_Stream, read); PHP_METHOD(Phalcon_Annotations_Adapter_Stream, write); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_annotations_adapter_stream___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_annotations_adapter_stream_read, 0, 0, 1) diff --git a/ext/phalcon/annotations/annotation.zep.c b/ext/phalcon/annotations/annotation.zep.c index 5b19b88dae8..1207ed29dd2 100644 --- a/ext/phalcon/annotations/annotation.zep.c +++ b/ext/phalcon/annotations/annotation.zep.c @@ -82,25 +82,19 @@ PHP_METHOD(Phalcon_Annotations_Annotation, __construct) ZVAL_UNDEF(&_2$$4); ZVAL_UNDEF(&_3$$5); ZVAL_UNDEF(&_5$$8); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(reflectionData) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &reflectionData_param); ZEPHIR_OBS_COPY_OR_DUP(&reflectionData, reflectionData_param); - - - ZEPHIR_OBS_VAR(&name); + zephir_memory_observe(&name); if (zephir_array_isset_string_fetch(&name, &reflectionData, SL("name"), 0)) { zephir_array_fetch_string(&_0$$3, &reflectionData, SL("name"), PH_NOISY | PH_READONLY, "phalcon/Annotations/Annotation.zep", 48); zephir_update_property_zval(this_ptr, ZEND_STRL("name"), &_0$$3); } - ZEPHIR_OBS_VAR(&exprArguments); + zephir_memory_observe(&exprArguments); if (zephir_array_isset_string_fetch(&exprArguments, &reflectionData, SL("arguments"), 0)) { ZEPHIR_INIT_VAR(&arguments); array_init(&arguments); @@ -156,28 +150,25 @@ PHP_METHOD(Phalcon_Annotations_Annotation, __construct) */ PHP_METHOD(Phalcon_Annotations_Annotation, getArgument) { + zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *position, position_sub, argument, _0; zval *this_ptr = getThis(); ZVAL_UNDEF(&position_sub); ZVAL_UNDEF(&argument); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(position) ZEND_PARSE_PARAMETERS_END(); -#endif - - - zephir_fetch_params_without_memory_grow(1, 0, &position); - - + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); + zephir_fetch_params(1, 1, 0, &position); + zephir_memory_observe(&argument); zephir_read_property(&_0, this_ptr, ZEND_STRL("arguments"), PH_NOISY_CC | PH_READONLY); - if (zephir_array_isset_fetch(&argument, &_0, position, 1)) { - RETURN_CTORW(&argument); + if (zephir_array_isset_fetch(&argument, &_0, position, 0)) { + RETURN_CCTOR(&argument); } - RETURN_NULL(); + RETURN_MM_NULL(); } /** @@ -185,9 +176,6 @@ PHP_METHOD(Phalcon_Annotations_Annotation, getArgument) */ PHP_METHOD(Phalcon_Annotations_Annotation, getArguments) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "arguments"); } @@ -197,9 +185,6 @@ PHP_METHOD(Phalcon_Annotations_Annotation, getArguments) */ PHP_METHOD(Phalcon_Annotations_Annotation, getExprArguments) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "exprArguments"); } @@ -229,24 +214,18 @@ PHP_METHOD(Phalcon_Annotations_Annotation, getExpression) ZVAL_UNDEF(&_5$$11); ZVAL_UNDEF(&_6$$15); ZVAL_UNDEF(&_7$$15); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(expr) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &expr_param); ZEPHIR_OBS_COPY_OR_DUP(&expr, expr_param); - - - ZEPHIR_OBS_VAR(&type); + zephir_memory_observe(&type); zephir_array_fetch_string(&type, &expr, SL("type"), PH_NOISY, "phalcon/Annotations/Annotation.zep", 111); do { if (ZEPHIR_IS_LONG(&type, 301) || ZEPHIR_IS_LONG(&type, 302) || ZEPHIR_IS_LONG(&type, 303) || ZEPHIR_IS_LONG(&type, 307)) { - ZEPHIR_OBS_VAR(&value); + zephir_memory_observe(&value); zephir_array_fetch_string(&value, &expr, SL("value"), PH_NOISY, "phalcon/Annotations/Annotation.zep", 118); break; } @@ -276,7 +255,7 @@ PHP_METHOD(Phalcon_Annotations_Annotation, getExpression) ZEPHIR_INIT_NVAR(&item); ZVAL_COPY(&item, _1$$7); zephir_array_fetch_string(&_3$$8, &item, SL("expr"), PH_NOISY | PH_READONLY, "phalcon/Annotations/Annotation.zep", 139); - ZEPHIR_CALL_METHOD(&resolvedItem, this_ptr, "getexpression", &_4, 156, &_3$$8); + ZEPHIR_CALL_METHOD(&resolvedItem, this_ptr, "getexpression", &_4, 157, &_3$$8); zephir_check_call_status(); ZEPHIR_OBS_NVAR(&name); if (zephir_array_isset_string_fetch(&name, &item, SL("name"), 0)) { @@ -297,7 +276,7 @@ PHP_METHOD(Phalcon_Annotations_Annotation, getExpression) ZEPHIR_CALL_METHOD(&item, &_0$$7, "current", NULL, 0); zephir_check_call_status(); zephir_array_fetch_string(&_5$$11, &item, SL("expr"), PH_NOISY | PH_READONLY, "phalcon/Annotations/Annotation.zep", 139); - ZEPHIR_CALL_METHOD(&resolvedItem, this_ptr, "getexpression", &_4, 156, &_5$$11); + ZEPHIR_CALL_METHOD(&resolvedItem, this_ptr, "getexpression", &_4, 157, &_5$$11); zephir_check_call_status(); ZEPHIR_OBS_NVAR(&name); if (zephir_array_isset_string_fetch(&name, &item, SL("name"), 0)) { @@ -314,7 +293,7 @@ PHP_METHOD(Phalcon_Annotations_Annotation, getExpression) } if (ZEPHIR_IS_LONG(&type, 300)) { object_init_ex(return_value, phalcon_annotations_annotation_ce); - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 157, &expr); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 158, &expr); zephir_check_call_status(); RETURN_MM(); } @@ -322,7 +301,7 @@ PHP_METHOD(Phalcon_Annotations_Annotation, getExpression) object_init_ex(&_6$$15, phalcon_annotations_exception_ce); ZEPHIR_INIT_VAR(&_7$$15); ZEPHIR_CONCAT_SVS(&_7$$15, "The expression ", &type, " is unknown"); - ZEPHIR_CALL_METHOD(NULL, &_6$$15, "__construct", NULL, 32, &_7$$15); + ZEPHIR_CALL_METHOD(NULL, &_6$$15, "__construct", NULL, 33, &_7$$15); zephir_check_call_status(); zephir_throw_exception_debug(&_6$$15, "phalcon/Annotations/Annotation.zep", 154); ZEPHIR_MM_RESTORE(); @@ -337,9 +316,6 @@ PHP_METHOD(Phalcon_Annotations_Annotation, getExpression) */ PHP_METHOD(Phalcon_Annotations_Annotation, getName) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "name"); } @@ -357,15 +333,11 @@ PHP_METHOD(Phalcon_Annotations_Annotation, getNamedArgument) ZVAL_UNDEF(&name); ZVAL_UNDEF(&argument); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -376,11 +348,10 @@ PHP_METHOD(Phalcon_Annotations_Annotation, getNamedArgument) } else { ZEPHIR_INIT_VAR(&name); } - - + zephir_memory_observe(&argument); zephir_read_property(&_0, this_ptr, ZEND_STRL("arguments"), PH_NOISY_CC | PH_READONLY); - if (zephir_array_isset_fetch(&argument, &_0, &name, 1)) { - RETURN_CTOR(&argument); + if (zephir_array_isset_fetch(&argument, &_0, &name, 0)) { + RETURN_CCTOR(&argument); } RETURN_MM_NULL(); } @@ -397,15 +368,11 @@ PHP_METHOD(Phalcon_Annotations_Annotation, getNamedParameter) zval *this_ptr = getThis(); ZVAL_UNDEF(&name); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -416,8 +383,6 @@ PHP_METHOD(Phalcon_Annotations_Annotation, getNamedParameter) } else { ZEPHIR_INIT_VAR(&name); } - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getnamedargument", NULL, 0, &name); zephir_check_call_status(); RETURN_MM(); @@ -433,17 +398,10 @@ PHP_METHOD(Phalcon_Annotations_Annotation, hasArgument) ZVAL_UNDEF(&position_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(position) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &position); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("arguments"), PH_NOISY_CC | PH_READONLY); RETURN_BOOL(zephir_array_isset(&_0, position)); } @@ -457,9 +415,6 @@ PHP_METHOD(Phalcon_Annotations_Annotation, numberArguments) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - zephir_read_property(&_0, this_ptr, ZEND_STRL("arguments"), PH_NOISY_CC | PH_READONLY); RETURN_LONG(zephir_fast_count_int(&_0)); } @@ -474,7 +429,8 @@ zend_object *zephir_init_properties_Phalcon_Annotations_Annotation(zend_class_en ZVAL_UNDEF(&_3$$4); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/annotations/annotationsfactory.zep.c b/ext/phalcon/annotations/annotationsfactory.zep.c index 94c18662474..fd11c3026ea 100644 --- a/ext/phalcon/annotations/annotationsfactory.zep.c +++ b/ext/phalcon/annotations/annotationsfactory.zep.c @@ -51,16 +51,12 @@ PHP_METHOD(Phalcon_Annotations_AnnotationsFactory, __construct) zval *this_ptr = getThis(); ZVAL_UNDEF(&services); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(services) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &services_param); if (!services_param) { ZEPHIR_INIT_VAR(&services); @@ -68,8 +64,6 @@ PHP_METHOD(Phalcon_Annotations_AnnotationsFactory, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&services, services_param); } - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "init", NULL, 0, &services); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); @@ -101,19 +95,13 @@ PHP_METHOD(Phalcon_Annotations_AnnotationsFactory, load) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(config) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &config); ZEPHIR_SEPARATE_PARAM(config); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "checkconfig", NULL, 0, config); zephir_check_call_status(); ZEPHIR_CPY_WRT(config, &_0); @@ -122,7 +110,7 @@ PHP_METHOD(Phalcon_Annotations_AnnotationsFactory, load) ZEPHIR_CALL_METHOD(&_0, this_ptr, "checkconfigelement", NULL, 0, config, &_1); zephir_check_call_status(); ZEPHIR_CPY_WRT(config, &_0); - ZEPHIR_OBS_VAR(&name); + zephir_memory_observe(&name); zephir_array_fetch_string(&name, config, SL("adapter"), PH_NOISY, "phalcon/Annotations/AnnotationsFactory.zep", 48); zephir_array_unset_string(config, SL("adapter"), PH_SEPARATE); ZEPHIR_INIT_NVAR(&_1); @@ -136,7 +124,7 @@ PHP_METHOD(Phalcon_Annotations_AnnotationsFactory, load) array_init(&_2); ZEPHIR_INIT_VAR(&_3); ZVAL_STRING(&_3, "options"); - ZEPHIR_CALL_METHOD(&options, &_1, "__invoke", NULL, 158, config, &_3, &_2); + ZEPHIR_CALL_METHOD(&options, &_1, "__invoke", NULL, 159, config, &_3, &_2); zephir_check_call_status(); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "newinstance", NULL, 0, &name, &options); zephir_check_call_status(); @@ -165,17 +153,13 @@ PHP_METHOD(Phalcon_Annotations_AnnotationsFactory, newInstance) ZVAL_UNDEF(&definition); ZVAL_UNDEF(&options); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(name) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &name_param, &options_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")); @@ -192,8 +176,6 @@ PHP_METHOD(Phalcon_Annotations_AnnotationsFactory, newInstance) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - ZEPHIR_CALL_METHOD(&definition, this_ptr, "getservice", NULL, 0, &name); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_0); @@ -209,9 +191,6 @@ PHP_METHOD(Phalcon_Annotations_AnnotationsFactory, newInstance) */ PHP_METHOD(Phalcon_Annotations_AnnotationsFactory, getExceptionClass) { - zval *this_ptr = getThis(); - - RETURN_STRING("Phalcon\\Annotations\\Exception"); } @@ -223,9 +202,6 @@ PHP_METHOD(Phalcon_Annotations_AnnotationsFactory, getExceptionClass) */ PHP_METHOD(Phalcon_Annotations_AnnotationsFactory, getServices) { - zval *this_ptr = getThis(); - - zephir_create_array(return_value, 3, 0); add_assoc_stringl_ex(return_value, SL("apcu"), SL("Phalcon\\Annotations\\Adapter\\Apcu")); diff --git a/ext/phalcon/annotations/annotationsfactory.zep.h b/ext/phalcon/annotations/annotationsfactory.zep.h index b723f58fc8b..c42016f470b 100644 --- a/ext/phalcon/annotations/annotationsfactory.zep.h +++ b/ext/phalcon/annotations/annotationsfactory.zep.h @@ -10,11 +10,7 @@ PHP_METHOD(Phalcon_Annotations_AnnotationsFactory, getExceptionClass); PHP_METHOD(Phalcon_Annotations_AnnotationsFactory, getServices); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_annotations_annotationsfactory___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, services, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, services, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, services, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_annotations_annotationsfactory_load, 0, 0, 1) @@ -23,11 +19,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_annotations_annotationsfactory_newinstance, 0, 1, Phalcon\\Annotations\\Adapter\\AdapterInterface, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_annotations_annotationsfactory_getexceptionclass, 0, 0, IS_STRING, 0) diff --git a/ext/phalcon/annotations/collection.zep.c b/ext/phalcon/annotations/collection.zep.c index e64cc683451..4411ef14069 100644 --- a/ext/phalcon/annotations/collection.zep.c +++ b/ext/phalcon/annotations/collection.zep.c @@ -81,16 +81,12 @@ PHP_METHOD(Phalcon_Annotations_Collection, __construct) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_4$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(reflectionData) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &reflectionData_param); if (!reflectionData_param) { ZEPHIR_INIT_VAR(&reflectionData); @@ -98,8 +94,6 @@ PHP_METHOD(Phalcon_Annotations_Collection, __construct) } else { zephir_get_arrval(&reflectionData, reflectionData_param); } - - ZEPHIR_INIT_VAR(&annotations); array_init(&annotations); zephir_is_iterable(&reflectionData, 0, "phalcon/Annotations/Collection.zep", 58); @@ -110,7 +104,7 @@ PHP_METHOD(Phalcon_Annotations_Collection, __construct) ZVAL_COPY(&annotationData, _0); ZEPHIR_INIT_NVAR(&_2$$3); object_init_ex(&_2$$3, phalcon_annotations_annotation_ce); - ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", &_3, 157, &annotationData); + ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", &_3, 158, &annotationData); zephir_check_call_status(); zephir_array_append(&annotations, &_2$$3, PH_SEPARATE, "phalcon/Annotations/Collection.zep", 55); } ZEND_HASH_FOREACH_END(); @@ -127,7 +121,7 @@ PHP_METHOD(Phalcon_Annotations_Collection, __construct) zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_4$$4); object_init_ex(&_4$$4, phalcon_annotations_annotation_ce); - ZEPHIR_CALL_METHOD(NULL, &_4$$4, "__construct", &_3, 157, &annotationData); + ZEPHIR_CALL_METHOD(NULL, &_4$$4, "__construct", &_3, 158, &annotationData); zephir_check_call_status(); zephir_array_append(&annotations, &_4$$4, PH_SEPARATE, "phalcon/Annotations/Collection.zep", 55); ZEPHIR_CALL_METHOD(NULL, &reflectionData, "next", NULL, 0); @@ -148,9 +142,6 @@ PHP_METHOD(Phalcon_Annotations_Collection, count) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - zephir_read_property(&_0, this_ptr, ZEND_STRL("annotations"), PH_NOISY_CC | PH_READONLY); RETURN_LONG(zephir_fast_count_int(&_0)); } @@ -161,20 +152,22 @@ PHP_METHOD(Phalcon_Annotations_Collection, count) PHP_METHOD(Phalcon_Annotations_Collection, current) { zval annotation, _0, _1; + zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *this_ptr = getThis(); ZVAL_UNDEF(&annotation); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - + zephir_memory_observe(&annotation); zephir_read_property(&_0, this_ptr, ZEND_STRL("annotations"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_1, this_ptr, ZEND_STRL("position"), PH_NOISY_CC | PH_READONLY); - if (!(zephir_array_isset_fetch(&annotation, &_0, &_1, 1))) { - RETURN_BOOL(0); + if (!(zephir_array_isset_fetch(&annotation, &_0, &_1, 0))) { + RETURN_MM_BOOL(0); } - RETURN_CTORW(&annotation); + RETURN_CCTOR(&annotation); } /** @@ -197,19 +190,13 @@ PHP_METHOD(Phalcon_Annotations_Collection, get) ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &name_param); zephir_get_strval(&name, name_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("annotations"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&annotations, &_0); zephir_is_iterable(&annotations, 0, "phalcon/Annotations/Collection.zep", 98); @@ -249,7 +236,7 @@ PHP_METHOD(Phalcon_Annotations_Collection, get) object_init_ex(&_5, phalcon_annotations_exception_ce); ZEPHIR_INIT_VAR(&_6); ZEPHIR_CONCAT_SVS(&_6, "Collection doesn't have an annotation called '", &name, "'"); - ZEPHIR_CALL_METHOD(NULL, &_5, "__construct", NULL, 32, &_6); + ZEPHIR_CALL_METHOD(NULL, &_5, "__construct", NULL, 33, &_6); zephir_check_call_status(); zephir_throw_exception_debug(&_5, "phalcon/Annotations/Collection.zep", 100); ZEPHIR_MM_RESTORE(); @@ -276,19 +263,13 @@ PHP_METHOD(Phalcon_Annotations_Collection, getAll) ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$5); ZVAL_UNDEF(&found); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &name_param); zephir_get_strval(&name, name_param); - - ZEPHIR_INIT_VAR(&found); array_init(&found); zephir_read_property(&_0, this_ptr, ZEND_STRL("annotations"), PH_NOISY_CC | PH_READONLY); @@ -334,9 +315,6 @@ PHP_METHOD(Phalcon_Annotations_Collection, getAll) */ PHP_METHOD(Phalcon_Annotations_Collection, getAnnotations) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "annotations"); } @@ -359,19 +337,13 @@ PHP_METHOD(Phalcon_Annotations_Collection, has) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &name_param); zephir_get_strval(&name, name_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("annotations"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&annotations, &_0); zephir_is_iterable(&annotations, 0, "phalcon/Annotations/Collection.zep", 146); @@ -415,9 +387,6 @@ PHP_METHOD(Phalcon_Annotations_Collection, has) */ PHP_METHOD(Phalcon_Annotations_Collection, key) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "position"); } @@ -428,9 +397,6 @@ PHP_METHOD(Phalcon_Annotations_Collection, key) PHP_METHOD(Phalcon_Annotations_Collection, next) { zval *this_ptr = getThis(); - - - RETURN_ON_FAILURE(zephir_property_incr(this_ptr, SL("position"))); } @@ -443,10 +409,7 @@ PHP_METHOD(Phalcon_Annotations_Collection, rewind) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, 0); zephir_update_property_zval(this_ptr, ZEND_STRL("position"), &_0); } @@ -461,9 +424,6 @@ PHP_METHOD(Phalcon_Annotations_Collection, valid) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - zephir_read_property(&_0, this_ptr, ZEND_STRL("annotations"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_1, this_ptr, ZEND_STRL("position"), PH_NOISY_CC | PH_READONLY); RETURN_BOOL(zephir_array_isset(&_0, &_1)); diff --git a/ext/phalcon/annotations/collection.zep.h b/ext/phalcon/annotations/collection.zep.h index 3e1ae8da6d0..de6aa624bde 100644 --- a/ext/phalcon/annotations/collection.zep.h +++ b/ext/phalcon/annotations/collection.zep.h @@ -16,21 +16,13 @@ PHP_METHOD(Phalcon_Annotations_Collection, rewind); PHP_METHOD(Phalcon_Annotations_Collection, valid); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_annotations_collection___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, reflectionData, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, reflectionData, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, reflectionData, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_annotations_collection_count, 0, 0, IS_LONG, 0) ZEND_END_ARG_INFO() -#if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_annotations_collection_current, 0, 0, IS_MIXED, 0) -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_annotations_collection_current, 0, 0, 0) -#endif ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_annotations_collection_get, 0, 1, Phalcon\\Annotations\\Annotation, 0) diff --git a/ext/phalcon/annotations/reader.zep.c b/ext/phalcon/annotations/reader.zep.c index fed60db3b60..e2de431adb4 100644 --- a/ext/phalcon/annotations/reader.zep.c +++ b/ext/phalcon/annotations/reader.zep.c @@ -51,7 +51,6 @@ PHP_METHOD(Phalcon_Annotations_Reader, parse) zend_long ZEPHIR_LAST_CALL_STATUS, line = 0; zval *className_param = NULL, reflection, comment, arrayKeys, classAnnotations, properties, property, annotationsProperties, propertyAnnotations, methods, method, annotationsMethods, methodAnnotations, constants, constant, anotationsConstants, constantAnnotations, constantReflection, _0$$3, _1$$3, *_2$$5, _3$$5, _5$$7, _6$$7, _7$$10, _8$$10, *_9$$13, _10$$13, _11$$15, _12$$15, _13$$16, _14$$18, _15$$18, _16$$19, *_17$$21, _18$$21, _19$$23, _20$$23, _21$$24, _22$$26, _23$$26, _24$$27; zval className; - zval *this_ptr = getThis(); ZVAL_UNDEF(&className); ZVAL_UNDEF(&reflection); @@ -93,32 +92,26 @@ PHP_METHOD(Phalcon_Annotations_Reader, parse) ZVAL_UNDEF(&_23$$26); ZVAL_UNDEF(&_24$$27); ZVAL_UNDEF(&annotations); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(className) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &className_param); zephir_get_strval(&className, className_param); - - ZEPHIR_INIT_VAR(&annotations); array_init(&annotations); ZEPHIR_INIT_VAR(&reflection); object_init_ex(&reflection, zephir_get_internal_ce(SL("reflectionclass"))); - ZEPHIR_CALL_METHOD(NULL, &reflection, "__construct", NULL, 153, &className); + ZEPHIR_CALL_METHOD(NULL, &reflection, "__construct", NULL, 154, &className); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&comment, &reflection, "getdoccomment", NULL, 159); + ZEPHIR_CALL_METHOD(&comment, &reflection, "getdoccomment", NULL, 160); zephir_check_call_status(); if (!ZEPHIR_IS_FALSE_IDENTICAL(&comment)) { ZEPHIR_INIT_VAR(&classAnnotations); - ZEPHIR_CALL_METHOD(&_0$$3, &reflection, "getfilename", NULL, 160); + ZEPHIR_CALL_METHOD(&_0$$3, &reflection, "getfilename", NULL, 161); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_1$$3, &reflection, "getstartline", NULL, 161); + ZEPHIR_CALL_METHOD(&_1$$3, &reflection, "getstartline", NULL, 162); zephir_check_call_status(); ZEPHIR_LAST_CALL_STATUS = phannot_parse_annotations(&classAnnotations, &comment, &_0$$3, &_1$$3); zephir_check_call_status(); @@ -126,7 +119,7 @@ PHP_METHOD(Phalcon_Annotations_Reader, parse) zephir_array_update_string(&annotations, SL("class"), &classAnnotations, PH_COPY | PH_SEPARATE); } } - ZEPHIR_CALL_METHOD(&constants, &reflection, "getconstants", NULL, 162); + ZEPHIR_CALL_METHOD(&constants, &reflection, "getconstants", NULL, 163); zephir_check_call_status(); if (zephir_fast_count_int(&constants)) { line = 1; @@ -140,13 +133,13 @@ PHP_METHOD(Phalcon_Annotations_Reader, parse) { ZEPHIR_INIT_NVAR(&constant); ZVAL_COPY(&constant, _2$$5); - ZEPHIR_CALL_METHOD(&constantReflection, &reflection, "getreflectionconstant", &_4, 163, &constant); + ZEPHIR_CALL_METHOD(&constantReflection, &reflection, "getreflectionconstant", &_4, 164, &constant); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&comment, &constantReflection, "getdoccomment", NULL, 0); zephir_check_call_status(); if (!ZEPHIR_IS_FALSE_IDENTICAL(&comment)) { ZEPHIR_INIT_NVAR(&constantAnnotations); - ZEPHIR_CALL_METHOD(&_5$$7, &reflection, "getfilename", NULL, 160); + ZEPHIR_CALL_METHOD(&_5$$7, &reflection, "getfilename", NULL, 161); zephir_check_call_status(); ZVAL_LONG(&_6$$7, line); ZEPHIR_LAST_CALL_STATUS = phannot_parse_annotations(&constantAnnotations, &comment, &_5$$7, &_6$$7); @@ -167,13 +160,13 @@ PHP_METHOD(Phalcon_Annotations_Reader, parse) } ZEPHIR_CALL_METHOD(&constant, &arrayKeys, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&constantReflection, &reflection, "getreflectionconstant", &_4, 163, &constant); + ZEPHIR_CALL_METHOD(&constantReflection, &reflection, "getreflectionconstant", &_4, 164, &constant); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&comment, &constantReflection, "getdoccomment", NULL, 0); zephir_check_call_status(); if (!ZEPHIR_IS_FALSE_IDENTICAL(&comment)) { ZEPHIR_INIT_NVAR(&constantAnnotations); - ZEPHIR_CALL_METHOD(&_7$$10, &reflection, "getfilename", NULL, 160); + ZEPHIR_CALL_METHOD(&_7$$10, &reflection, "getfilename", NULL, 161); zephir_check_call_status(); ZVAL_LONG(&_8$$10, line); ZEPHIR_LAST_CALL_STATUS = phannot_parse_annotations(&constantAnnotations, &comment, &_7$$10, &_8$$10); @@ -191,7 +184,7 @@ PHP_METHOD(Phalcon_Annotations_Reader, parse) zephir_array_update_string(&annotations, SL("constants"), &anotationsConstants, PH_COPY | PH_SEPARATE); } } - ZEPHIR_CALL_METHOD(&properties, &reflection, "getproperties", NULL, 164); + ZEPHIR_CALL_METHOD(&properties, &reflection, "getproperties", NULL, 165); zephir_check_call_status(); if (zephir_fast_count_int(&properties)) { line = 1; @@ -207,7 +200,7 @@ PHP_METHOD(Phalcon_Annotations_Reader, parse) zephir_check_call_status(); if (!ZEPHIR_IS_FALSE_IDENTICAL(&comment)) { ZEPHIR_INIT_NVAR(&propertyAnnotations); - ZEPHIR_CALL_METHOD(&_11$$15, &reflection, "getfilename", NULL, 160); + ZEPHIR_CALL_METHOD(&_11$$15, &reflection, "getfilename", NULL, 161); zephir_check_call_status(); ZVAL_LONG(&_12$$15, line); ZEPHIR_LAST_CALL_STATUS = phannot_parse_annotations(&propertyAnnotations, &comment, &_11$$15, &_12$$15); @@ -234,7 +227,7 @@ PHP_METHOD(Phalcon_Annotations_Reader, parse) zephir_check_call_status(); if (!ZEPHIR_IS_FALSE_IDENTICAL(&comment)) { ZEPHIR_INIT_NVAR(&propertyAnnotations); - ZEPHIR_CALL_METHOD(&_14$$18, &reflection, "getfilename", NULL, 160); + ZEPHIR_CALL_METHOD(&_14$$18, &reflection, "getfilename", NULL, 161); zephir_check_call_status(); ZVAL_LONG(&_15$$18, line); ZEPHIR_LAST_CALL_STATUS = phannot_parse_annotations(&propertyAnnotations, &comment, &_14$$18, &_15$$18); @@ -254,7 +247,7 @@ PHP_METHOD(Phalcon_Annotations_Reader, parse) zephir_array_update_string(&annotations, SL("properties"), &annotationsProperties, PH_COPY | PH_SEPARATE); } } - ZEPHIR_CALL_METHOD(&methods, &reflection, "getmethods", NULL, 165); + ZEPHIR_CALL_METHOD(&methods, &reflection, "getmethods", NULL, 166); zephir_check_call_status(); if (0 == ZEPHIR_IS_EMPTY(&methods)) { ZEPHIR_INIT_VAR(&annotationsMethods); @@ -330,13 +323,11 @@ PHP_METHOD(Phalcon_Annotations_Reader, parseDocBlock) zend_long ZEPHIR_LAST_CALL_STATUS; zval *docBlock_param = NULL, *file = NULL, file_sub, *line = NULL, line_sub, __$null; zval docBlock; - zval *this_ptr = getThis(); ZVAL_UNDEF(&docBlock); ZVAL_UNDEF(&file_sub); ZVAL_UNDEF(&line_sub); ZVAL_NULL(&__$null); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(docBlock) @@ -344,10 +335,8 @@ PHP_METHOD(Phalcon_Annotations_Reader, parseDocBlock) Z_PARAM_ZVAL_OR_NULL(file) Z_PARAM_ZVAL_OR_NULL(line) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &docBlock_param, &file, &line); zephir_get_strval(&docBlock, docBlock_param); if (!file) { @@ -360,8 +349,6 @@ PHP_METHOD(Phalcon_Annotations_Reader, parseDocBlock) line = &line_sub; line = &__$null; } - - if (Z_TYPE_P(file) != IS_STRING) { ZEPHIR_INIT_NVAR(file); ZVAL_STRING(file, "eval code"); diff --git a/ext/phalcon/annotations/reflection.zep.c b/ext/phalcon/annotations/reflection.zep.c index 68a5864630c..69f3470c366 100644 --- a/ext/phalcon/annotations/reflection.zep.c +++ b/ext/phalcon/annotations/reflection.zep.c @@ -82,16 +82,12 @@ PHP_METHOD(Phalcon_Annotations_Reflection, __construct) zval *this_ptr = getThis(); ZVAL_UNDEF(&reflectionData); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(reflectionData) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &reflectionData_param); if (!reflectionData_param) { ZEPHIR_INIT_VAR(&reflectionData); @@ -99,8 +95,6 @@ PHP_METHOD(Phalcon_Annotations_Reflection, __construct) } else { zephir_get_arrval(&reflectionData, reflectionData_param); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("reflectionData"), &reflectionData); ZEPHIR_MM_RESTORE(); } @@ -121,17 +115,17 @@ PHP_METHOD(Phalcon_Annotations_Reflection, getClassAnnotations) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$4); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("classAnnotations"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_0) == IS_NULL) { + zephir_memory_observe(&reflectionClass); zephir_read_property(&_1$$3, this_ptr, ZEND_STRL("reflectionData"), PH_NOISY_CC | PH_READONLY); - if (zephir_array_isset_string_fetch(&reflectionClass, &_1$$3, SL("class"), 1)) { + if (zephir_array_isset_string_fetch(&reflectionClass, &_1$$3, SL("class"), 0)) { ZEPHIR_INIT_VAR(&_2$$4); object_init_ex(&_2$$4, phalcon_annotations_collection_ce); - ZEPHIR_CALL_METHOD(NULL, &_2$$4, "__construct", NULL, 37, &reflectionClass); + ZEPHIR_CALL_METHOD(NULL, &_2$$4, "__construct", NULL, 38, &reflectionClass); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("classAnnotations"), &_2$$4); } @@ -162,11 +156,10 @@ PHP_METHOD(Phalcon_Annotations_Reflection, getConstantsAnnotations) ZVAL_UNDEF(&_3$$4); ZVAL_UNDEF(&_6$$5); ZVAL_UNDEF(&_8$$6); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_OBS_VAR(&reflectionConstants); + zephir_memory_observe(&reflectionConstants); zephir_read_property(&_0, this_ptr, ZEND_STRL("reflectionData"), PH_NOISY_CC | PH_READONLY); if (zephir_array_isset_string_fetch(&reflectionConstants, &_0, SL("constants"), 0)) { _1$$3 = Z_TYPE_P(&reflectionConstants) == IS_ARRAY; @@ -188,7 +181,7 @@ PHP_METHOD(Phalcon_Annotations_Reflection, getConstantsAnnotations) ZVAL_COPY(&reflectionConstant, _2$$4); ZEPHIR_INIT_NVAR(&_6$$5); object_init_ex(&_6$$5, phalcon_annotations_collection_ce); - ZEPHIR_CALL_METHOD(NULL, &_6$$5, "__construct", &_7, 37, &reflectionConstant); + ZEPHIR_CALL_METHOD(NULL, &_6$$5, "__construct", &_7, 38, &reflectionConstant); zephir_check_call_status(); zephir_update_property_array(this_ptr, SL("constantAnnotations"), &constant, &_6$$5); } ZEND_HASH_FOREACH_END(); @@ -207,7 +200,7 @@ PHP_METHOD(Phalcon_Annotations_Reflection, getConstantsAnnotations) zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_8$$6); object_init_ex(&_8$$6, phalcon_annotations_collection_ce); - ZEPHIR_CALL_METHOD(NULL, &_8$$6, "__construct", &_7, 37, &reflectionConstant); + ZEPHIR_CALL_METHOD(NULL, &_8$$6, "__construct", &_7, 38, &reflectionConstant); zephir_check_call_status(); zephir_update_property_array(this_ptr, SL("constantAnnotations"), &constant, &_8$$6); ZEPHIR_CALL_METHOD(NULL, &reflectionConstants, "next", NULL, 0); @@ -244,11 +237,10 @@ PHP_METHOD(Phalcon_Annotations_Reflection, getPropertiesAnnotations) ZVAL_UNDEF(&_3$$4); ZVAL_UNDEF(&_6$$5); ZVAL_UNDEF(&_8$$6); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_OBS_VAR(&reflectionProperties); + zephir_memory_observe(&reflectionProperties); zephir_read_property(&_0, this_ptr, ZEND_STRL("reflectionData"), PH_NOISY_CC | PH_READONLY); if (zephir_array_isset_string_fetch(&reflectionProperties, &_0, SL("properties"), 0)) { _1$$3 = Z_TYPE_P(&reflectionProperties) == IS_ARRAY; @@ -270,7 +262,7 @@ PHP_METHOD(Phalcon_Annotations_Reflection, getPropertiesAnnotations) ZVAL_COPY(&reflectionProperty, _2$$4); ZEPHIR_INIT_NVAR(&_6$$5); object_init_ex(&_6$$5, phalcon_annotations_collection_ce); - ZEPHIR_CALL_METHOD(NULL, &_6$$5, "__construct", &_7, 37, &reflectionProperty); + ZEPHIR_CALL_METHOD(NULL, &_6$$5, "__construct", &_7, 38, &reflectionProperty); zephir_check_call_status(); zephir_update_property_array(this_ptr, SL("propertyAnnotations"), &property, &_6$$5); } ZEND_HASH_FOREACH_END(); @@ -289,7 +281,7 @@ PHP_METHOD(Phalcon_Annotations_Reflection, getPropertiesAnnotations) zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_8$$6); object_init_ex(&_8$$6, phalcon_annotations_collection_ce); - ZEPHIR_CALL_METHOD(NULL, &_8$$6, "__construct", &_7, 37, &reflectionProperty); + ZEPHIR_CALL_METHOD(NULL, &_8$$6, "__construct", &_7, 38, &reflectionProperty); zephir_check_call_status(); zephir_update_property_array(this_ptr, SL("propertyAnnotations"), &property, &_8$$6); ZEPHIR_CALL_METHOD(NULL, &reflectionProperties, "next", NULL, 0); @@ -326,11 +318,10 @@ PHP_METHOD(Phalcon_Annotations_Reflection, getMethodsAnnotations) ZVAL_UNDEF(&_3$$4); ZVAL_UNDEF(&_6$$5); ZVAL_UNDEF(&_8$$6); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_OBS_VAR(&reflectionMethods); + zephir_memory_observe(&reflectionMethods); zephir_read_property(&_0, this_ptr, ZEND_STRL("reflectionData"), PH_NOISY_CC | PH_READONLY); if (zephir_array_isset_string_fetch(&reflectionMethods, &_0, SL("methods"), 0)) { _1$$3 = Z_TYPE_P(&reflectionMethods) == IS_ARRAY; @@ -352,7 +343,7 @@ PHP_METHOD(Phalcon_Annotations_Reflection, getMethodsAnnotations) ZVAL_COPY(&reflectionMethod, _2$$4); ZEPHIR_INIT_NVAR(&_6$$5); object_init_ex(&_6$$5, phalcon_annotations_collection_ce); - ZEPHIR_CALL_METHOD(NULL, &_6$$5, "__construct", &_7, 37, &reflectionMethod); + ZEPHIR_CALL_METHOD(NULL, &_6$$5, "__construct", &_7, 38, &reflectionMethod); zephir_check_call_status(); zephir_update_property_array(this_ptr, SL("methodAnnotations"), &methodName, &_6$$5); } ZEND_HASH_FOREACH_END(); @@ -371,7 +362,7 @@ PHP_METHOD(Phalcon_Annotations_Reflection, getMethodsAnnotations) zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_8$$6); object_init_ex(&_8$$6, phalcon_annotations_collection_ce); - ZEPHIR_CALL_METHOD(NULL, &_8$$6, "__construct", &_7, 37, &reflectionMethod); + ZEPHIR_CALL_METHOD(NULL, &_8$$6, "__construct", &_7, 38, &reflectionMethod); zephir_check_call_status(); zephir_update_property_array(this_ptr, SL("methodAnnotations"), &methodName, &_8$$6); ZEPHIR_CALL_METHOD(NULL, &reflectionMethods, "next", NULL, 0); @@ -393,9 +384,6 @@ PHP_METHOD(Phalcon_Annotations_Reflection, getMethodsAnnotations) */ PHP_METHOD(Phalcon_Annotations_Reflection, getReflectionData) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "reflectionData"); } @@ -414,7 +402,8 @@ zend_object *zephir_init_properties_Phalcon_Annotations_Reflection(zend_class_en ZVAL_UNDEF(&_7$$6); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/annotations/reflection.zep.h b/ext/phalcon/annotations/reflection.zep.h index 3ec463348fe..04595017892 100644 --- a/ext/phalcon/annotations/reflection.zep.h +++ b/ext/phalcon/annotations/reflection.zep.h @@ -12,11 +12,7 @@ PHP_METHOD(Phalcon_Annotations_Reflection, getReflectionData); zend_object *zephir_init_properties_Phalcon_Annotations_Reflection(zend_class_entry *class_type); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_annotations_reflection___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, reflectionData, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, reflectionData, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, reflectionData, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_annotations_reflection_getclassannotations, 0, 0, Phalcon\\Annotations\\Collection, 1) diff --git a/ext/phalcon/application/abstractapplication.zep.c b/ext/phalcon/application/abstractapplication.zep.c index d2a83c33459..41bc85ad95d 100644 --- a/ext/phalcon/application/abstractapplication.zep.c +++ b/ext/phalcon/application/abstractapplication.zep.c @@ -69,22 +69,16 @@ PHP_METHOD(Phalcon_Application_AbstractApplication, __construct) ZVAL_UNDEF(&container_sub); ZVAL_NULL(&__$null); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_OBJECT_OF_CLASS_OR_NULL(container, phalcon_di_diinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(0, 1, &container); if (!container) { container = &container_sub; container = &__$null; } - - if (Z_TYPE_P(container) != IS_NULL) { zephir_update_property_zval(this_ptr, ZEND_STRL("container"), container); } @@ -95,9 +89,6 @@ PHP_METHOD(Phalcon_Application_AbstractApplication, __construct) */ PHP_METHOD(Phalcon_Application_AbstractApplication, getDefaultModule) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "defaultModule"); } @@ -107,9 +98,6 @@ PHP_METHOD(Phalcon_Application_AbstractApplication, getDefaultModule) */ PHP_METHOD(Phalcon_Application_AbstractApplication, getEventsManager) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "eventsManager"); } @@ -134,15 +122,11 @@ PHP_METHOD(Phalcon_Application_AbstractApplication, getModule) ZVAL_UNDEF(&module); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -153,16 +137,14 @@ PHP_METHOD(Phalcon_Application_AbstractApplication, getModule) } else { ZEPHIR_INIT_VAR(&name); } - - - ZEPHIR_OBS_VAR(&module); + zephir_memory_observe(&module); zephir_read_property(&_0, this_ptr, ZEND_STRL("modules"), PH_NOISY_CC | PH_READONLY); if (UNEXPECTED(!(zephir_array_isset_fetch(&module, &_0, &name, 0)))) { ZEPHIR_INIT_VAR(&_1$$3); object_init_ex(&_1$$3, phalcon_application_exception_ce); ZEPHIR_INIT_VAR(&_2$$3); ZEPHIR_CONCAT_SVS(&_2$$3, "Module '", &name, "' is not registered in the application container"); - ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 32, &_2$$3); + ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 33, &_2$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_1$$3, "phalcon/Application/AbstractApplication.zep", 83); ZEPHIR_MM_RESTORE(); @@ -176,9 +158,6 @@ PHP_METHOD(Phalcon_Application_AbstractApplication, getModule) */ PHP_METHOD(Phalcon_Application_AbstractApplication, getModules) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "modules"); } @@ -212,26 +191,19 @@ PHP_METHOD(Phalcon_Application_AbstractApplication, registerModules) ZVAL_UNDEF(&modules); ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(modules) Z_PARAM_OPTIONAL Z_PARAM_BOOL(merge) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &modules_param, &merge_param); zephir_get_arrval(&modules, modules_param); if (!merge_param) { merge = 0; } else { - merge = zephir_get_boolval(merge_param); - } - - + } if (merge) { ZEPHIR_INIT_VAR(&_0$$3); zephir_read_property(&_1$$3, this_ptr, ZEND_STRL("modules"), PH_NOISY_CC | PH_READONLY); @@ -254,15 +226,11 @@ PHP_METHOD(Phalcon_Application_AbstractApplication, setDefaultModule) zval *this_ptr = getThis(); ZVAL_UNDEF(&defaultModule); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(defaultModule) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &defaultModule_param); if (UNEXPECTED(Z_TYPE_P(defaultModule_param) != IS_STRING && Z_TYPE_P(defaultModule_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'defaultModule' must be of the type string")); @@ -273,8 +241,6 @@ PHP_METHOD(Phalcon_Application_AbstractApplication, setDefaultModule) } else { ZEPHIR_INIT_VAR(&defaultModule); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("defaultModule"), &defaultModule); RETURN_THIS(); } @@ -292,18 +258,12 @@ PHP_METHOD(Phalcon_Application_AbstractApplication, setEventsManager) ZVAL_UNDEF(&eventsManager_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(eventsManager, phalcon_events_managerinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &eventsManager); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "getdi", NULL, 0); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_1); @@ -322,7 +282,8 @@ zend_object *zephir_init_properties_Phalcon_Application_AbstractApplication(zend ZVAL_UNDEF(&_1$$3); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/assets/asset.zep.c b/ext/phalcon/assets/asset.zep.c index 587deae76fd..5d419ad7c82 100644 --- a/ext/phalcon/assets/asset.zep.c +++ b/ext/phalcon/assets/asset.zep.c @@ -112,7 +112,6 @@ PHP_METHOD(Phalcon_Assets_Asset, __construct) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 7) Z_PARAM_STR(type) @@ -124,23 +123,19 @@ PHP_METHOD(Phalcon_Assets_Asset, __construct) Z_PARAM_STR_OR_NULL(version) Z_PARAM_BOOL(isAutoVersion) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 5, &type_param, &path_param, &isLocal_param, &filter_param, &attributes_param, &version_param, &isAutoVersion_param); zephir_get_strval(&type, type_param); zephir_get_strval(&path, path_param); if (!isLocal_param) { isLocal = 1; } else { - isLocal = zephir_get_boolval(isLocal_param); - } + } if (!filter_param) { filter = 1; } else { - filter = zephir_get_boolval(filter_param); - } + } if (!attributes_param) { ZEPHIR_INIT_VAR(&attributes); array_init(&attributes); @@ -155,10 +150,7 @@ PHP_METHOD(Phalcon_Assets_Asset, __construct) if (!isAutoVersion_param) { isAutoVersion = 0; } else { - isAutoVersion = zephir_get_boolval(isAutoVersion_param); - } - - + } zephir_update_property_zval(this_ptr, ZEND_STRL("type"), &type); zephir_update_property_zval(this_ptr, ZEND_STRL("path"), &path); if (isLocal) { @@ -195,9 +187,8 @@ PHP_METHOD(Phalcon_Assets_Asset, getAssetKey) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&_0, this_ptr, "gettype", NULL, 0); zephir_check_call_status(); @@ -207,7 +198,7 @@ PHP_METHOD(Phalcon_Assets_Asset, getAssetKey) ZEPHIR_CONCAT_VSV(&key, &_0, ":", &_1); ZEPHIR_INIT_VAR(&_2); ZVAL_STRING(&_2, "sha256"); - ZEPHIR_RETURN_CALL_FUNCTION("hash", NULL, 71, &_2, &key); + ZEPHIR_RETURN_CALL_FUNCTION("hash", NULL, 72, &_2, &key); zephir_check_call_status(); RETURN_MM(); } @@ -219,9 +210,6 @@ PHP_METHOD(Phalcon_Assets_Asset, getAssetKey) */ PHP_METHOD(Phalcon_Assets_Asset, getAttributes) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "attributes"); } @@ -251,27 +239,22 @@ PHP_METHOD(Phalcon_Assets_Asset, getContent) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_4); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(basePath) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &basePath_param); if (!basePath_param) { ZEPHIR_INIT_VAR(&basePath); } else { zephir_get_strval(&basePath, basePath_param); } - - ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "sourcePath"); - ZEPHIR_CALL_METHOD(&_0, this_ptr, "checkpath", NULL, 72, &_1); + ZEPHIR_CALL_METHOD(&_0, this_ptr, "checkpath", NULL, 73, &_1); zephir_check_call_status(); ZEPHIR_INIT_VAR(&completePath); ZEPHIR_CONCAT_VV(&completePath, &basePath, &_0); @@ -283,13 +266,13 @@ PHP_METHOD(Phalcon_Assets_Asset, getContent) _3 = !ZEPHIR_IS_TRUE_IDENTICAL(&_4); } if (_3) { - ZEPHIR_CALL_METHOD(NULL, this_ptr, "throwexception", NULL, 73, &completePath); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "throwexception", NULL, 74, &completePath); zephir_check_call_status(); } ZEPHIR_CALL_METHOD(&content, this_ptr, "phpfilegetcontents", NULL, 0, &completePath); zephir_check_call_status(); if (ZEPHIR_IS_FALSE_IDENTICAL(&content)) { - ZEPHIR_CALL_METHOD(NULL, this_ptr, "throwexception", NULL, 73, &completePath); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "throwexception", NULL, 74, &completePath); zephir_check_call_status(); } RETURN_CCTOR(&content); @@ -297,18 +280,12 @@ PHP_METHOD(Phalcon_Assets_Asset, getContent) PHP_METHOD(Phalcon_Assets_Asset, getFilter) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "filter"); } PHP_METHOD(Phalcon_Assets_Asset, getPath) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "path"); } @@ -335,33 +312,28 @@ PHP_METHOD(Phalcon_Assets_Asset, getRealSourcePath) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(basePath) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &basePath_param); if (!basePath_param) { ZEPHIR_INIT_VAR(&basePath); } else { zephir_get_strval(&basePath, basePath_param); } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "sourcePath"); - ZEPHIR_CALL_METHOD(&source, this_ptr, "checkpath", NULL, 72, &_0); + ZEPHIR_CALL_METHOD(&source, this_ptr, "checkpath", NULL, 73, &_0); zephir_check_call_status(); zephir_read_property(&_1, this_ptr, ZEND_STRL("isLocal"), PH_NOISY_CC | PH_READONLY); if (zephir_is_true(&_1)) { ZEPHIR_INIT_VAR(&_2$$3); ZEPHIR_CONCAT_VV(&_2$$3, &basePath, &source); - ZEPHIR_CALL_FUNCTION(&_3$$3, "realpath", NULL, 74, &_2$$3); + ZEPHIR_CALL_FUNCTION(&_3$$3, "realpath", NULL, 75, &_2$$3); zephir_check_call_status(); zephir_cast_to_string(&_4$$3, &_3$$3); ZEPHIR_CPY_WRT(&source, &_4$$3); @@ -391,27 +363,22 @@ PHP_METHOD(Phalcon_Assets_Asset, getRealTargetPath) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$4); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(basePath) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &basePath_param); if (!basePath_param) { ZEPHIR_INIT_VAR(&basePath); } else { zephir_get_strval(&basePath, basePath_param); } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "targetPath"); - ZEPHIR_CALL_METHOD(&target, this_ptr, "checkpath", NULL, 72, &_0); + ZEPHIR_CALL_METHOD(&target, this_ptr, "checkpath", NULL, 73, &_0); zephir_check_call_status(); zephir_read_property(&_1, this_ptr, ZEND_STRL("isLocal"), PH_NOISY_CC | PH_READONLY); if (zephir_is_true(&_1)) { @@ -420,7 +387,7 @@ PHP_METHOD(Phalcon_Assets_Asset, getRealTargetPath) ZEPHIR_CALL_METHOD(&_2$$3, this_ptr, "phpfileexists", NULL, 0, &completePath); zephir_check_call_status(); if (ZEPHIR_IS_TRUE_IDENTICAL(&_2$$3)) { - ZEPHIR_CALL_FUNCTION(&_3$$4, "realpath", NULL, 74, &completePath); + ZEPHIR_CALL_FUNCTION(&_3$$4, "realpath", NULL, 75, &completePath); zephir_check_call_status(); ZEPHIR_CPY_WRT(&completePath, &_3$$4); if (ZEPHIR_IS_FALSE_IDENTICAL(&completePath)) { @@ -455,15 +422,14 @@ PHP_METHOD(Phalcon_Assets_Asset, getRealTargetUri) ZVAL_UNDEF(&_4$$3); ZVAL_UNDEF(&_5$$3); ZVAL_UNDEF(&_6$$4); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "targetUri"); - ZEPHIR_CALL_METHOD(&target, this_ptr, "checkpath", NULL, 72, &_0); + ZEPHIR_CALL_METHOD(&target, this_ptr, "checkpath", NULL, 73, &_0); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&ver); + zephir_memory_observe(&ver); zephir_read_property(&ver, this_ptr, ZEND_STRL("version"), PH_NOISY_CC); zephir_read_property(&_1, this_ptr, ZEND_STRL("isAutoVersion"), PH_NOISY_CC | PH_READONLY); _2 = zephir_is_true(&_1); @@ -495,27 +461,18 @@ PHP_METHOD(Phalcon_Assets_Asset, getRealTargetUri) PHP_METHOD(Phalcon_Assets_Asset, getSourcePath) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "sourcePath"); } PHP_METHOD(Phalcon_Assets_Asset, getTargetPath) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "targetPath"); } PHP_METHOD(Phalcon_Assets_Asset, getTargetUri) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "targetUri"); } @@ -525,9 +482,6 @@ PHP_METHOD(Phalcon_Assets_Asset, getTargetUri) */ PHP_METHOD(Phalcon_Assets_Asset, getType) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "type"); } @@ -539,9 +493,6 @@ PHP_METHOD(Phalcon_Assets_Asset, getType) */ PHP_METHOD(Phalcon_Assets_Asset, getVersion) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "version"); } @@ -553,9 +504,6 @@ PHP_METHOD(Phalcon_Assets_Asset, getVersion) */ PHP_METHOD(Phalcon_Assets_Asset, isAutoVersion) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "isAutoVersion"); } @@ -567,9 +515,6 @@ PHP_METHOD(Phalcon_Assets_Asset, isAutoVersion) */ PHP_METHOD(Phalcon_Assets_Asset, isLocal) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "isLocal"); } @@ -589,19 +534,13 @@ PHP_METHOD(Phalcon_Assets_Asset, setAttributes) zval *this_ptr = getThis(); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &attributes_param); zephir_get_arrval(&attributes, attributes_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("attributes"), &attributes); RETURN_THIS(); } @@ -619,18 +558,10 @@ PHP_METHOD(Phalcon_Assets_Asset, setAutoVersion) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(flag) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &flag_param); - flag = zephir_get_boolval(flag_param); - - if (flag) { zephir_update_property_zval(this_ptr, ZEND_STRL("isAutoVersion"), &__$true); } else { @@ -654,18 +585,10 @@ PHP_METHOD(Phalcon_Assets_Asset, setFilter) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(filter) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &filter_param); - filter = zephir_get_boolval(filter_param); - - if (filter) { zephir_update_property_zval(this_ptr, ZEND_STRL("filter"), &__$true); } else { @@ -689,18 +612,10 @@ PHP_METHOD(Phalcon_Assets_Asset, setIsLocal) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(flag) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &flag_param); - flag = zephir_get_boolval(flag_param); - - if (flag) { zephir_update_property_zval(this_ptr, ZEND_STRL("isLocal"), &__$true); } else { @@ -724,19 +639,13 @@ PHP_METHOD(Phalcon_Assets_Asset, setSourcePath) zval *this_ptr = getThis(); ZVAL_UNDEF(&sourcePath); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(sourcePath) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &sourcePath_param); zephir_get_strval(&sourcePath, sourcePath_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("sourcePath"), &sourcePath); RETURN_THIS(); } @@ -756,19 +665,13 @@ PHP_METHOD(Phalcon_Assets_Asset, setTargetPath) zval *this_ptr = getThis(); ZVAL_UNDEF(&targetPath); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(targetPath) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &targetPath_param); zephir_get_strval(&targetPath, targetPath_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("targetPath"), &targetPath); RETURN_THIS(); } @@ -788,19 +691,13 @@ PHP_METHOD(Phalcon_Assets_Asset, setTargetUri) zval *this_ptr = getThis(); ZVAL_UNDEF(&targetUri); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(targetUri) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &targetUri_param); zephir_get_strval(&targetUri, targetUri_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("targetUri"), &targetUri); RETURN_THIS(); } @@ -820,19 +717,13 @@ PHP_METHOD(Phalcon_Assets_Asset, setType) zval *this_ptr = getThis(); ZVAL_UNDEF(&type); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &type_param); zephir_get_strval(&type, type_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("type"), &type); RETURN_THIS(); } @@ -852,19 +743,13 @@ PHP_METHOD(Phalcon_Assets_Asset, setPath) zval *this_ptr = getThis(); ZVAL_UNDEF(&path); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(path) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &path_param); zephir_get_strval(&path, path_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("path"), &path); RETURN_THIS(); } @@ -884,19 +769,13 @@ PHP_METHOD(Phalcon_Assets_Asset, setVersion) zval *this_ptr = getThis(); ZVAL_UNDEF(&version); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(version) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &version_param); zephir_get_strval(&version, version_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("version"), &version); RETURN_THIS(); } @@ -916,25 +795,19 @@ PHP_METHOD(Phalcon_Assets_Asset, checkPath) ZVAL_UNDEF(&property); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(property) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &property_param); zephir_get_strval(&property, property_param); - - - ZEPHIR_OBS_VAR(&_0); + zephir_memory_observe(&_0); zephir_read_property_zval(&_0, this_ptr, &property, PH_NOISY_CC); if (1 == ZEPHIR_IS_EMPTY(&_0)) { RETURN_MM_MEMBER(getThis(), "path"); } - ZEPHIR_OBS_VAR(&_1); + zephir_memory_observe(&_1); zephir_read_property_zval(&_1, this_ptr, &property, PH_NOISY_CC); RETURN_CCTOR(&_1); } @@ -950,29 +823,22 @@ PHP_METHOD(Phalcon_Assets_Asset, throwException) zend_long ZEPHIR_LAST_CALL_STATUS; zval *completePath_param = NULL, _0; zval completePath, _1; - zval *this_ptr = getThis(); ZVAL_UNDEF(&completePath); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(completePath) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &completePath_param); zephir_get_strval(&completePath, completePath_param); - - ZEPHIR_INIT_VAR(&_0); object_init_ex(&_0, phalcon_assets_exception_ce); ZEPHIR_INIT_VAR(&_1); ZEPHIR_CONCAT_SVS(&_1, "Asset's content for '", &completePath, "' cannot be read"); - ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 32, &_1); + ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 33, &_1); zephir_check_call_status(); zephir_throw_exception_debug(&_0, "phalcon/Assets/Asset.zep", 472); ZEPHIR_MM_RESTORE(); @@ -987,22 +853,15 @@ PHP_METHOD(Phalcon_Assets_Asset, phpFileExists) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *filename_param = NULL; zval filename; - zval *this_ptr = getThis(); ZVAL_UNDEF(&filename); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(filename) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &filename_param); zephir_get_strval(&filename, filename_param); - - RETURN_MM_BOOL((zephir_file_exists(&filename) == SUCCESS)); } @@ -1011,22 +870,15 @@ PHP_METHOD(Phalcon_Assets_Asset, phpFileGetContents) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *filename_param = NULL; zval filename; - zval *this_ptr = getThis(); ZVAL_UNDEF(&filename); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(filename) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &filename_param); zephir_get_strval(&filename, filename_param); - - zephir_file_get_contents(return_value, &filename); RETURN_MM(); } diff --git a/ext/phalcon/assets/asset.zep.h b/ext/phalcon/assets/asset.zep.h index 816c32d3f6f..5563983f37c 100644 --- a/ext/phalcon/assets/asset.zep.h +++ b/ext/phalcon/assets/asset.zep.h @@ -39,11 +39,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_assets_asset___construct, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, isLocal, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, filter, _IS_BOOL, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_ARG_TYPE_INFO(0, version, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, isAutoVersion, _IS_BOOL, 0) ZEND_END_ARG_INFO() diff --git a/ext/phalcon/assets/asset/css.zep.c b/ext/phalcon/assets/asset/css.zep.c index bafe33a3685..3a72b85b162 100644 --- a/ext/phalcon/assets/asset/css.zep.c +++ b/ext/phalcon/assets/asset/css.zep.c @@ -45,21 +45,18 @@ PHP_METHOD(Phalcon_Assets_Asset_Css, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval attributes; zend_bool local, filter, autoVersion; - zval *path_param = NULL, *local_param = NULL, *filter_param = NULL, *attributes_param = NULL, *version_param = NULL, *autoVersion_param = NULL, _1, _2, _3, _4; + zval *path_param = NULL, *local_param = NULL, *filter_param = NULL, *attributes_param = NULL, *version_param = NULL, *autoVersion_param = NULL, _0, _1, _2, _3; zval path, version; - zval *this_ptr = getThis(); ZVAL_UNDEF(&path); ZVAL_UNDEF(&version); + ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); - ZVAL_UNDEF(&_4); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 6) Z_PARAM_STR(path) @@ -70,10 +67,8 @@ PHP_METHOD(Phalcon_Assets_Asset_Css, __construct) Z_PARAM_STR_OR_NULL(version) Z_PARAM_BOOL(autoVersion) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 5, &path_param, &local_param, &filter_param, &attributes_param, &version_param, &autoVersion_param); if (UNEXPECTED(Z_TYPE_P(path_param) != IS_STRING && Z_TYPE_P(path_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'path' must be of the type string")); @@ -87,13 +82,11 @@ PHP_METHOD(Phalcon_Assets_Asset_Css, __construct) if (!local_param) { local = 1; } else { - local = zephir_get_boolval(local_param); - } + } if (!filter_param) { filter = 1; } else { - filter = zephir_get_boolval(filter_param); - } + } if (!attributes_param) { ZEPHIR_INIT_VAR(&attributes); array_init(&attributes); @@ -108,28 +101,25 @@ PHP_METHOD(Phalcon_Assets_Asset_Css, __construct) if (!autoVersion_param) { autoVersion = 0; } else { - autoVersion = zephir_get_boolval(autoVersion_param); - } - - - ZEPHIR_INIT_VAR(&_1); - ZVAL_STRING(&_1, "css"); + } + ZEPHIR_INIT_VAR(&_0); + ZVAL_STRING(&_0, "css"); if (local) { - ZVAL_BOOL(&_2, 1); + ZVAL_BOOL(&_1, 1); } else { - ZVAL_BOOL(&_2, 0); + ZVAL_BOOL(&_1, 0); } if (filter) { - ZVAL_BOOL(&_3, 1); + ZVAL_BOOL(&_2, 1); } else { - ZVAL_BOOL(&_3, 0); + ZVAL_BOOL(&_2, 0); } if (autoVersion) { - ZVAL_BOOL(&_4, 1); + ZVAL_BOOL(&_3, 1); } else { - ZVAL_BOOL(&_4, 0); + ZVAL_BOOL(&_3, 0); } - ZEPHIR_CALL_PARENT(NULL, phalcon_assets_asset_css_ce, getThis(), "__construct", &_0, 0, &_1, &path, &_2, &_3, &attributes, &version, &_4); + ZEPHIR_CALL_PARENT(NULL, phalcon_assets_asset_css_ce, getThis(), "__construct", NULL, 0, &_0, &path, &_1, &_2, &attributes, &version, &_3); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } diff --git a/ext/phalcon/assets/asset/css.zep.h b/ext/phalcon/assets/asset/css.zep.h index 24ce897359a..07080f1c161 100644 --- a/ext/phalcon/assets/asset/css.zep.h +++ b/ext/phalcon/assets/asset/css.zep.h @@ -9,11 +9,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_assets_asset_css___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, local, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, filter, _IS_BOOL, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_ARG_TYPE_INFO(0, version, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, autoVersion, _IS_BOOL, 0) ZEND_END_ARG_INFO() diff --git a/ext/phalcon/assets/asset/js.zep.c b/ext/phalcon/assets/asset/js.zep.c index ae6d4128328..55c100f176b 100644 --- a/ext/phalcon/assets/asset/js.zep.c +++ b/ext/phalcon/assets/asset/js.zep.c @@ -45,21 +45,18 @@ PHP_METHOD(Phalcon_Assets_Asset_Js, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval attributes; zend_bool local, filter, autoVersion; - zval *path_param = NULL, *local_param = NULL, *filter_param = NULL, *attributes_param = NULL, *version_param = NULL, *autoVersion_param = NULL, _1, _2, _3, _4; + zval *path_param = NULL, *local_param = NULL, *filter_param = NULL, *attributes_param = NULL, *version_param = NULL, *autoVersion_param = NULL, _0, _1, _2, _3; zval path, version; - zval *this_ptr = getThis(); ZVAL_UNDEF(&path); ZVAL_UNDEF(&version); + ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); - ZVAL_UNDEF(&_4); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 6) Z_PARAM_STR(path) @@ -70,10 +67,8 @@ PHP_METHOD(Phalcon_Assets_Asset_Js, __construct) Z_PARAM_STR_OR_NULL(version) Z_PARAM_BOOL(autoVersion) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 5, &path_param, &local_param, &filter_param, &attributes_param, &version_param, &autoVersion_param); if (UNEXPECTED(Z_TYPE_P(path_param) != IS_STRING && Z_TYPE_P(path_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'path' must be of the type string")); @@ -87,13 +82,11 @@ PHP_METHOD(Phalcon_Assets_Asset_Js, __construct) if (!local_param) { local = 1; } else { - local = zephir_get_boolval(local_param); - } + } if (!filter_param) { filter = 1; } else { - filter = zephir_get_boolval(filter_param); - } + } if (!attributes_param) { ZEPHIR_INIT_VAR(&attributes); array_init(&attributes); @@ -108,28 +101,25 @@ PHP_METHOD(Phalcon_Assets_Asset_Js, __construct) if (!autoVersion_param) { autoVersion = 0; } else { - autoVersion = zephir_get_boolval(autoVersion_param); - } - - - ZEPHIR_INIT_VAR(&_1); - ZVAL_STRING(&_1, "js"); + } + ZEPHIR_INIT_VAR(&_0); + ZVAL_STRING(&_0, "js"); if (local) { - ZVAL_BOOL(&_2, 1); + ZVAL_BOOL(&_1, 1); } else { - ZVAL_BOOL(&_2, 0); + ZVAL_BOOL(&_1, 0); } if (filter) { - ZVAL_BOOL(&_3, 1); + ZVAL_BOOL(&_2, 1); } else { - ZVAL_BOOL(&_3, 0); + ZVAL_BOOL(&_2, 0); } if (autoVersion) { - ZVAL_BOOL(&_4, 1); + ZVAL_BOOL(&_3, 1); } else { - ZVAL_BOOL(&_4, 0); + ZVAL_BOOL(&_3, 0); } - ZEPHIR_CALL_PARENT(NULL, phalcon_assets_asset_js_ce, getThis(), "__construct", &_0, 0, &_1, &path, &_2, &_3, &attributes, &version, &_4); + ZEPHIR_CALL_PARENT(NULL, phalcon_assets_asset_js_ce, getThis(), "__construct", NULL, 0, &_0, &path, &_1, &_2, &attributes, &version, &_3); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } diff --git a/ext/phalcon/assets/asset/js.zep.h b/ext/phalcon/assets/asset/js.zep.h index 56283e54749..6c2df3e5a49 100644 --- a/ext/phalcon/assets/asset/js.zep.h +++ b/ext/phalcon/assets/asset/js.zep.h @@ -9,11 +9,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_assets_asset_js___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, local, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, filter, _IS_BOOL, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_ARG_TYPE_INFO(0, version, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, autoVersion, _IS_BOOL, 0) ZEND_END_ARG_INFO() diff --git a/ext/phalcon/assets/collection.zep.c b/ext/phalcon/assets/collection.zep.c index c18f0079030..0936d9acbdf 100644 --- a/ext/phalcon/assets/collection.zep.c +++ b/ext/phalcon/assets/collection.zep.c @@ -112,19 +112,13 @@ PHP_METHOD(Phalcon_Assets_Collection, add) zval *this_ptr = getThis(); ZVAL_UNDEF(&asset_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(asset, phalcon_assets_assetinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &asset); - - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "addasset", NULL, 166, asset); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "addasset", NULL, 167, asset); zephir_check_call_status(); RETURN_THIS(); } @@ -157,7 +151,6 @@ PHP_METHOD(Phalcon_Assets_Collection, addCss) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 6) Z_PARAM_STR(path) @@ -168,10 +161,8 @@ PHP_METHOD(Phalcon_Assets_Collection, addCss) Z_PARAM_STR_OR_NULL(version) Z_PARAM_BOOL(autoVersion) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 5, &path_param, &isLocal, &filter_param, &attributes_param, &version_param, &autoVersion_param); zephir_get_strval(&path, path_param); if (!isLocal) { @@ -181,8 +172,7 @@ PHP_METHOD(Phalcon_Assets_Collection, addCss) if (!filter_param) { filter = 1; } else { - filter = zephir_get_boolval(filter_param); - } + } if (!attributes_param) { ZEPHIR_INIT_VAR(&attributes); array_init(&attributes); @@ -197,10 +187,7 @@ PHP_METHOD(Phalcon_Assets_Collection, addCss) if (!autoVersion_param) { autoVersion = 0; } else { - autoVersion = zephir_get_boolval(autoVersion_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "Css"); if (filter) { @@ -213,7 +200,7 @@ PHP_METHOD(Phalcon_Assets_Collection, addCss) } else { ZVAL_BOOL(&_2, 0); } - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "processadd", NULL, 167, &_0, &path, isLocal, &_1, &attributes, &version, &_2); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "processadd", NULL, 168, &_0, &path, isLocal, &_1, &attributes, &version, &_2); zephir_check_call_status(); RETURN_MM(); } @@ -229,17 +216,10 @@ PHP_METHOD(Phalcon_Assets_Collection, addFilter) zval *this_ptr = getThis(); ZVAL_UNDEF(&filter_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(filter, phalcon_assets_filterinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &filter); - - zephir_update_property_array_append(this_ptr, SL("filters"), filter); RETURN_THISW(); } @@ -257,19 +237,13 @@ PHP_METHOD(Phalcon_Assets_Collection, addInline) zval *this_ptr = getThis(); ZVAL_UNDEF(&code_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(code, phalcon_assets_inline_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &code); - - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "addasset", NULL, 166, code); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "addasset", NULL, 167, code); zephir_check_call_status(); RETURN_THIS(); } @@ -295,33 +269,26 @@ PHP_METHOD(Phalcon_Assets_Collection, addInlineCss) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(content) Z_PARAM_OPTIONAL Z_PARAM_BOOL(filter) Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &content_param, &filter_param, &attributes_param); zephir_get_strval(&content, content_param); if (!filter_param) { filter = 1; } else { - filter = zephir_get_boolval(filter_param); - } + } if (!attributes_param) { ZEPHIR_INIT_VAR(&attributes); array_init(&attributes); } else { zephir_get_arrval(&attributes, attributes_param); } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "Css"); if (filter) { @@ -329,7 +296,7 @@ PHP_METHOD(Phalcon_Assets_Collection, addInlineCss) } else { ZVAL_BOOL(&_1, 0); } - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "processaddinline", NULL, 168, &_0, &content, &_1, &attributes); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "processaddinline", NULL, 169, &_0, &content, &_1, &attributes); zephir_check_call_status(); RETURN_MM(); } @@ -355,33 +322,26 @@ PHP_METHOD(Phalcon_Assets_Collection, addInlineJs) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(content) Z_PARAM_OPTIONAL Z_PARAM_BOOL(filter) Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &content_param, &filter_param, &attributes_param); zephir_get_strval(&content, content_param); if (!filter_param) { filter = 1; } else { - filter = zephir_get_boolval(filter_param); - } + } if (!attributes_param) { ZEPHIR_INIT_VAR(&attributes); array_init(&attributes); } else { zephir_get_arrval(&attributes, attributes_param); } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "Js"); if (filter) { @@ -389,7 +349,7 @@ PHP_METHOD(Phalcon_Assets_Collection, addInlineJs) } else { ZVAL_BOOL(&_1, 0); } - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "processaddinline", NULL, 168, &_0, &content, &_1, &attributes); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "processaddinline", NULL, 169, &_0, &content, &_1, &attributes); zephir_check_call_status(); RETURN_MM(); } @@ -422,7 +382,6 @@ PHP_METHOD(Phalcon_Assets_Collection, addJs) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 6) Z_PARAM_STR(path) @@ -433,10 +392,8 @@ PHP_METHOD(Phalcon_Assets_Collection, addJs) Z_PARAM_STR_OR_NULL(version) Z_PARAM_BOOL(autoVersion) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 5, &path_param, &isLocal, &filter_param, &attributes_param, &version_param, &autoVersion_param); zephir_get_strval(&path, path_param); if (!isLocal) { @@ -446,8 +403,7 @@ PHP_METHOD(Phalcon_Assets_Collection, addJs) if (!filter_param) { filter = 1; } else { - filter = zephir_get_boolval(filter_param); - } + } if (!attributes_param) { ZEPHIR_INIT_VAR(&attributes); array_init(&attributes); @@ -462,10 +418,7 @@ PHP_METHOD(Phalcon_Assets_Collection, addJs) if (!autoVersion_param) { autoVersion = 0; } else { - autoVersion = zephir_get_boolval(autoVersion_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "Js"); if (filter) { @@ -478,7 +431,7 @@ PHP_METHOD(Phalcon_Assets_Collection, addJs) } else { ZVAL_BOOL(&_2, 0); } - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "processadd", NULL, 167, &_0, &path, isLocal, &_1, &attributes, &version, &_2); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "processadd", NULL, 168, &_0, &path, isLocal, &_1, &attributes, &version, &_2); zephir_check_call_status(); RETURN_MM(); } @@ -496,9 +449,6 @@ PHP_METHOD(Phalcon_Assets_Collection, count) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - zephir_read_property(&_0, this_ptr, ZEND_STRL("assets"), PH_NOISY_CC | PH_READONLY); RETURN_LONG(zephir_fast_count_int(&_0)); } @@ -508,9 +458,6 @@ PHP_METHOD(Phalcon_Assets_Collection, count) */ PHP_METHOD(Phalcon_Assets_Collection, getAssets) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "assets"); } @@ -520,9 +467,6 @@ PHP_METHOD(Phalcon_Assets_Collection, getAssets) */ PHP_METHOD(Phalcon_Assets_Collection, getAttributes) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "attributes"); } @@ -532,9 +476,6 @@ PHP_METHOD(Phalcon_Assets_Collection, getAttributes) */ PHP_METHOD(Phalcon_Assets_Collection, getCodes) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "codes"); } @@ -544,9 +485,6 @@ PHP_METHOD(Phalcon_Assets_Collection, getCodes) */ PHP_METHOD(Phalcon_Assets_Collection, getFilters) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "filters"); } @@ -564,9 +502,8 @@ PHP_METHOD(Phalcon_Assets_Collection, getIterator) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); object_init_ex(return_value, spl_ce_ArrayIterator); zephir_read_property(&_0, this_ptr, ZEND_STRL("assets"), PH_NOISY_CC | PH_READONLY); @@ -580,9 +517,6 @@ PHP_METHOD(Phalcon_Assets_Collection, getIterator) */ PHP_METHOD(Phalcon_Assets_Collection, getJoin) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "join"); } @@ -592,9 +526,6 @@ PHP_METHOD(Phalcon_Assets_Collection, getJoin) */ PHP_METHOD(Phalcon_Assets_Collection, getPrefix) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "prefix"); } @@ -618,15 +549,11 @@ PHP_METHOD(Phalcon_Assets_Collection, getRealTargetPath) ZVAL_UNDEF(&basePath); ZVAL_UNDEF(&completePath); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(basePath) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &basePath_param); if (UNEXPECTED(Z_TYPE_P(basePath_param) != IS_STRING && Z_TYPE_P(basePath_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'basePath' must be of the type string")); @@ -637,13 +564,11 @@ PHP_METHOD(Phalcon_Assets_Collection, getRealTargetPath) } else { ZEPHIR_INIT_VAR(&basePath); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("targetPath"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&completePath); ZEPHIR_CONCAT_VV(&completePath, &basePath, &_0); if (1 == (zephir_file_exists(&completePath) == SUCCESS)) { - ZEPHIR_RETURN_CALL_FUNCTION("realpath", NULL, 74, &completePath); + ZEPHIR_RETURN_CALL_FUNCTION("realpath", NULL, 75, &completePath); zephir_check_call_status(); RETURN_MM(); } @@ -655,9 +580,6 @@ PHP_METHOD(Phalcon_Assets_Collection, getRealTargetPath) */ PHP_METHOD(Phalcon_Assets_Collection, getSourcePath) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "sourcePath"); } @@ -667,9 +589,6 @@ PHP_METHOD(Phalcon_Assets_Collection, getSourcePath) */ PHP_METHOD(Phalcon_Assets_Collection, getTargetIsLocal) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "targetIsLocal"); } @@ -679,9 +598,6 @@ PHP_METHOD(Phalcon_Assets_Collection, getTargetIsLocal) */ PHP_METHOD(Phalcon_Assets_Collection, getTargetPath) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "targetPath"); } @@ -691,9 +607,6 @@ PHP_METHOD(Phalcon_Assets_Collection, getTargetPath) */ PHP_METHOD(Phalcon_Assets_Collection, getTargetUri) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "targetUri"); } @@ -703,9 +616,6 @@ PHP_METHOD(Phalcon_Assets_Collection, getTargetUri) */ PHP_METHOD(Phalcon_Assets_Collection, getVersion) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "version"); } @@ -743,18 +653,12 @@ PHP_METHOD(Phalcon_Assets_Collection, has) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(asset, phalcon_assets_assetinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &asset); - - ZEPHIR_CALL_METHOD(&key, asset, "getassetkey", NULL, 0); zephir_check_call_status(); zephir_read_property(&_0, this_ptr, ZEND_STRL("assets"), PH_NOISY_CC | PH_READONLY); @@ -801,9 +705,6 @@ PHP_METHOD(Phalcon_Assets_Collection, has) */ PHP_METHOD(Phalcon_Assets_Collection, isAutoVersion) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "autoVersion"); } @@ -813,9 +714,6 @@ PHP_METHOD(Phalcon_Assets_Collection, isAutoVersion) */ PHP_METHOD(Phalcon_Assets_Collection, isLocal) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "isLocal"); } @@ -836,18 +734,10 @@ PHP_METHOD(Phalcon_Assets_Collection, join) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(flag) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &flag_param); - flag = zephir_get_boolval(flag_param); - - if (flag) { zephir_update_property_zval(this_ptr, ZEND_STRL("join"), &__$true); } else { @@ -869,19 +759,13 @@ PHP_METHOD(Phalcon_Assets_Collection, setAttributes) zval *this_ptr = getThis(); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &attributes_param); zephir_get_arrval(&attributes, attributes_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("attributes"), &attributes); RETURN_THIS(); } @@ -897,18 +781,10 @@ PHP_METHOD(Phalcon_Assets_Collection, setAutoVersion) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(flag) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &flag_param); - flag = zephir_get_boolval(flag_param); - - if (flag) { zephir_update_property_zval(this_ptr, ZEND_STRL("autoVersion"), &__$true); } else { @@ -930,19 +806,13 @@ PHP_METHOD(Phalcon_Assets_Collection, setFilters) zval *this_ptr = getThis(); ZVAL_UNDEF(&filters); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(filters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &filters_param); zephir_get_arrval(&filters, filters_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("filters"), &filters); RETURN_THIS(); } @@ -960,18 +830,10 @@ PHP_METHOD(Phalcon_Assets_Collection, setIsLocal) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(flag) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &flag_param); - flag = zephir_get_boolval(flag_param); - - if (flag) { zephir_update_property_zval(this_ptr, ZEND_STRL("isLocal"), &__$true); } else { @@ -993,19 +855,13 @@ PHP_METHOD(Phalcon_Assets_Collection, setPrefix) zval *this_ptr = getThis(); ZVAL_UNDEF(&prefix); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(prefix) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &prefix_param); zephir_get_strval(&prefix, prefix_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("prefix"), &prefix); RETURN_THIS(); } @@ -1023,18 +879,10 @@ PHP_METHOD(Phalcon_Assets_Collection, setTargetIsLocal) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(flag) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &flag_param); - flag = zephir_get_boolval(flag_param); - - if (flag) { zephir_update_property_zval(this_ptr, ZEND_STRL("targetIsLocal"), &__$true); } else { @@ -1056,19 +904,13 @@ PHP_METHOD(Phalcon_Assets_Collection, setTargetPath) zval *this_ptr = getThis(); ZVAL_UNDEF(&targetPath); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(targetPath) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &targetPath_param); zephir_get_strval(&targetPath, targetPath_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("targetPath"), &targetPath); RETURN_THIS(); } @@ -1086,19 +928,13 @@ PHP_METHOD(Phalcon_Assets_Collection, setTargetUri) zval *this_ptr = getThis(); ZVAL_UNDEF(&targetUri); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(targetUri) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &targetUri_param); zephir_get_strval(&targetUri, targetUri_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("targetUri"), &targetUri); RETURN_THIS(); } @@ -1116,19 +952,13 @@ PHP_METHOD(Phalcon_Assets_Collection, setSourcePath) zval *this_ptr = getThis(); ZVAL_UNDEF(&sourcePath); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(sourcePath) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &sourcePath_param); zephir_get_strval(&sourcePath, sourcePath_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("sourcePath"), &sourcePath); RETURN_THIS(); } @@ -1146,19 +976,13 @@ PHP_METHOD(Phalcon_Assets_Collection, setVersion) zval *this_ptr = getThis(); ZVAL_UNDEF(&version); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(version) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &version_param); zephir_get_strval(&version, version_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("version"), &version); RETURN_THIS(); } @@ -1180,18 +1004,12 @@ PHP_METHOD(Phalcon_Assets_Collection, addAsset) ZVAL_UNDEF(&asset_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(asset, phalcon_assets_assetinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &asset); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "has", NULL, 0, asset); zephir_check_call_status(); if (ZEPHIR_IS_TRUE_IDENTICAL(&_0)) { @@ -1235,7 +1053,6 @@ PHP_METHOD(Phalcon_Assets_Collection, processAdd) ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_5); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 7) Z_PARAM_STR(className) @@ -1247,10 +1064,8 @@ PHP_METHOD(Phalcon_Assets_Collection, processAdd) Z_PARAM_STR_OR_NULL(version) Z_PARAM_BOOL(autoVersion) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 5, &className_param, &path_param, &isLocal, &filter_param, &attributes_param, &version_param, &autoVersion_param); zephir_get_strval(&className, className_param); zephir_get_strval(&path, path_param); @@ -1261,8 +1076,7 @@ PHP_METHOD(Phalcon_Assets_Collection, processAdd) if (!filter_param) { filter = 1; } else { - filter = zephir_get_boolval(filter_param); - } + } if (!attributes_param) { ZEPHIR_INIT_VAR(&attributes); array_init(&attributes); @@ -1277,16 +1091,13 @@ PHP_METHOD(Phalcon_Assets_Collection, processAdd) if (!autoVersion_param) { autoVersion = 0; } else { - autoVersion = zephir_get_boolval(autoVersion_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZEPHIR_CONCAT_SV(&_0, "Phalcon\\Assets\\Asset\\", &className); ZEPHIR_CPY_WRT(&name, &_0); - ZEPHIR_OBS_VAR(&flag); + zephir_memory_observe(&flag); zephir_read_property(&flag, this_ptr, ZEND_STRL("isLocal"), PH_NOISY_CC); - ZEPHIR_CALL_METHOD(&attrs, this_ptr, "processattributes", NULL, 169, &attributes); + ZEPHIR_CALL_METHOD(&attrs, this_ptr, "processattributes", NULL, 170, &attributes); zephir_check_call_status(); if (Z_TYPE_P(isLocal) != IS_NULL) { ZEPHIR_INIT_NVAR(&flag); @@ -1343,8 +1154,6 @@ PHP_METHOD(Phalcon_Assets_Collection, processAddInline) ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 4) Z_PARAM_STR(className) Z_PARAM_STR(content) @@ -1352,30 +1161,25 @@ PHP_METHOD(Phalcon_Assets_Collection, processAddInline) Z_PARAM_BOOL(filter) Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 2, &className_param, &content_param, &filter_param, &attributes_param); zephir_get_strval(&className, className_param); zephir_get_strval(&content, content_param); if (!filter_param) { filter = 1; } else { - filter = zephir_get_boolval(filter_param); - } + } if (!attributes_param) { ZEPHIR_INIT_VAR(&attributes); array_init(&attributes); } else { zephir_get_arrval(&attributes, attributes_param); } - - ZEPHIR_INIT_VAR(&_0); ZEPHIR_CONCAT_SV(&_0, "Phalcon\\Assets\\Inline\\", &className); ZEPHIR_CPY_WRT(&name, &_0); - ZEPHIR_CALL_METHOD(&attrs, this_ptr, "processattributes", NULL, 169, &attributes); + ZEPHIR_CALL_METHOD(&attrs, this_ptr, "processattributes", NULL, 170, &attributes); zephir_check_call_status(); ZEPHIR_INIT_VAR(&asset); zephir_fetch_safe_class(&_1, &name); @@ -1414,23 +1218,18 @@ PHP_METHOD(Phalcon_Assets_Collection, processAttributes) ZVAL_UNDEF(&attributes); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &attributes_param); zephir_get_arrval(&attributes, attributes_param); - - ZEPHIR_INIT_VAR(&_0); if (1 != ZEPHIR_IS_EMPTY(&attributes)) { ZEPHIR_CPY_WRT(&_0, &attributes); } else { + ZEPHIR_OBS_NVAR(&_0); zephir_read_property(&_0, this_ptr, ZEND_STRL("attributes"), PH_NOISY_CC); } RETURN_CCTOR(&_0); @@ -1450,7 +1249,8 @@ zend_object *zephir_init_properties_Phalcon_Assets_Collection(zend_class_entry * ZVAL_UNDEF(&_7$$6); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/assets/collection.zep.h b/ext/phalcon/assets/collection.zep.h index 83c606ad68c..fbd053f5c37 100644 --- a/ext/phalcon/assets/collection.zep.h +++ b/ext/phalcon/assets/collection.zep.h @@ -52,11 +52,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_assets_collection_addcss, ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) ZEND_ARG_INFO(0, isLocal) ZEND_ARG_TYPE_INFO(0, filter, _IS_BOOL, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_ARG_TYPE_INFO(0, version, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, autoVersion, _IS_BOOL, 0) ZEND_END_ARG_INFO() @@ -72,32 +68,20 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_assets_collection_addinlinecss, 0, 1, Phalcon\\Assets\\Collection, 0) ZEND_ARG_TYPE_INFO(0, content, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, filter, _IS_BOOL, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_assets_collection_addinlinejs, 0, 1, Phalcon\\Assets\\Collection, 0) ZEND_ARG_TYPE_INFO(0, content, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, filter, _IS_BOOL, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_assets_collection_addjs, 0, 1, Phalcon\\Assets\\Collection, 0) ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) ZEND_ARG_INFO(0, isLocal) ZEND_ARG_TYPE_INFO(0, filter, _IS_BOOL, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_ARG_TYPE_INFO(0, version, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, autoVersion, _IS_BOOL, 0) ZEND_END_ARG_INFO() @@ -208,11 +192,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_assets_collection_process ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) ZEND_ARG_INFO(0, isLocal) ZEND_ARG_TYPE_INFO(0, filter, _IS_BOOL, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_ARG_TYPE_INFO(0, version, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, autoVersion, _IS_BOOL, 0) ZEND_END_ARG_INFO() @@ -221,11 +201,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_assets_collection_process ZEND_ARG_TYPE_INFO(0, className, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, content, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, filter, _IS_BOOL, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_assets_collection_processattributes, 0, 1, IS_ARRAY, 0) diff --git a/ext/phalcon/assets/filters/cssmin.zep.c b/ext/phalcon/assets/filters/cssmin.zep.c index d0111a6312e..56af1faf581 100644 --- a/ext/phalcon/assets/filters/cssmin.zep.c +++ b/ext/phalcon/assets/filters/cssmin.zep.c @@ -50,18 +50,13 @@ PHP_METHOD(Phalcon_Assets_Filters_Cssmin, filter) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *content_param = NULL; zval content; - zval *this_ptr = getThis(); ZVAL_UNDEF(&content); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(content) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &content_param); if (UNEXPECTED(Z_TYPE_P(content_param) != IS_STRING && Z_TYPE_P(content_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'content' must be of the type string")); @@ -72,8 +67,6 @@ PHP_METHOD(Phalcon_Assets_Filters_Cssmin, filter) } else { ZEPHIR_INIT_VAR(&content); } - - RETURN_CTOR(&content); } diff --git a/ext/phalcon/assets/filters/jsmin.zep.c b/ext/phalcon/assets/filters/jsmin.zep.c index c6afd9cf2a8..f42f414a8c4 100644 --- a/ext/phalcon/assets/filters/jsmin.zep.c +++ b/ext/phalcon/assets/filters/jsmin.zep.c @@ -51,18 +51,13 @@ PHP_METHOD(Phalcon_Assets_Filters_Jsmin, filter) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *content_param = NULL; zval content; - zval *this_ptr = getThis(); ZVAL_UNDEF(&content); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(content) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &content_param); if (UNEXPECTED(Z_TYPE_P(content_param) != IS_STRING && Z_TYPE_P(content_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'content' must be of the type string")); @@ -73,8 +68,6 @@ PHP_METHOD(Phalcon_Assets_Filters_Jsmin, filter) } else { ZEPHIR_INIT_VAR(&content); } - - RETURN_CTOR(&content); } diff --git a/ext/phalcon/assets/filters/none.zep.c b/ext/phalcon/assets/filters/none.zep.c index 8deb61e14d3..3822ed14cf6 100644 --- a/ext/phalcon/assets/filters/none.zep.c +++ b/ext/phalcon/assets/filters/none.zep.c @@ -46,18 +46,13 @@ PHP_METHOD(Phalcon_Assets_Filters_None, filter) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *content_param = NULL; zval content; - zval *this_ptr = getThis(); ZVAL_UNDEF(&content); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(content) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &content_param); if (UNEXPECTED(Z_TYPE_P(content_param) != IS_STRING && Z_TYPE_P(content_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'content' must be of the type string")); @@ -68,8 +63,6 @@ PHP_METHOD(Phalcon_Assets_Filters_None, filter) } else { ZEPHIR_INIT_VAR(&content); } - - RETURN_CTOR(&content); } diff --git a/ext/phalcon/assets/inline.zep.c b/ext/phalcon/assets/inline.zep.c index 00d7e8033fb..87f8821d75c 100644 --- a/ext/phalcon/assets/inline.zep.c +++ b/ext/phalcon/assets/inline.zep.c @@ -75,8 +75,6 @@ PHP_METHOD(Phalcon_Assets_Inline, __construct) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 4) Z_PARAM_STR(type) Z_PARAM_STR(content) @@ -84,26 +82,21 @@ PHP_METHOD(Phalcon_Assets_Inline, __construct) Z_PARAM_BOOL(filter) Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 2, &type_param, &content_param, &filter_param, &attributes_param); zephir_get_strval(&type, type_param); zephir_get_strval(&content, content_param); if (!filter_param) { filter = 1; } else { - filter = zephir_get_boolval(filter_param); - } + } if (!attributes_param) { ZEPHIR_INIT_VAR(&attributes); array_init(&attributes); } else { zephir_get_arrval(&attributes, attributes_param); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("type"), &type); zephir_update_property_zval(this_ptr, ZEND_STRL("content"), &content); if (filter) { @@ -129,9 +122,8 @@ PHP_METHOD(Phalcon_Assets_Inline, getAssetKey) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&_0, this_ptr, "gettype", NULL, 0); zephir_check_call_status(); @@ -141,7 +133,7 @@ PHP_METHOD(Phalcon_Assets_Inline, getAssetKey) ZEPHIR_CONCAT_VSV(&key, &_0, ":", &_1); ZEPHIR_INIT_VAR(&_2); ZVAL_STRING(&_2, "sha256"); - ZEPHIR_RETURN_CALL_FUNCTION("hash", NULL, 71, &_2, &key); + ZEPHIR_RETURN_CALL_FUNCTION("hash", NULL, 72, &_2, &key); zephir_check_call_status(); RETURN_MM(); } @@ -151,9 +143,6 @@ PHP_METHOD(Phalcon_Assets_Inline, getAssetKey) */ PHP_METHOD(Phalcon_Assets_Inline, getAttributes) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "attributes"); } @@ -163,9 +152,6 @@ PHP_METHOD(Phalcon_Assets_Inline, getAttributes) */ PHP_METHOD(Phalcon_Assets_Inline, getContent) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "content"); } @@ -175,9 +161,6 @@ PHP_METHOD(Phalcon_Assets_Inline, getContent) */ PHP_METHOD(Phalcon_Assets_Inline, getFilter) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "filter"); } @@ -187,9 +170,6 @@ PHP_METHOD(Phalcon_Assets_Inline, getFilter) */ PHP_METHOD(Phalcon_Assets_Inline, getType) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "type"); } @@ -205,19 +185,13 @@ PHP_METHOD(Phalcon_Assets_Inline, setAttributes) zval *this_ptr = getThis(); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &attributes_param); zephir_get_arrval(&attributes, attributes_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("attributes"), &attributes); RETURN_THIS(); } @@ -233,18 +207,10 @@ PHP_METHOD(Phalcon_Assets_Inline, setFilter) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(filter) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &filter_param); - filter = zephir_get_boolval(filter_param); - - if (filter) { zephir_update_property_zval(this_ptr, ZEND_STRL("filter"), &__$true); } else { @@ -264,19 +230,13 @@ PHP_METHOD(Phalcon_Assets_Inline, setType) zval *this_ptr = getThis(); ZVAL_UNDEF(&type); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &type_param); zephir_get_strval(&type, type_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("type"), &type); RETURN_THIS(); } diff --git a/ext/phalcon/assets/inline.zep.h b/ext/phalcon/assets/inline.zep.h index 8151a1cfd6f..f945d1dfab6 100644 --- a/ext/phalcon/assets/inline.zep.h +++ b/ext/phalcon/assets/inline.zep.h @@ -17,11 +17,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_assets_inline___construct, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, type, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, content, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, filter, _IS_BOOL, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_assets_inline_getassetkey, 0, 0, IS_STRING, 0) diff --git a/ext/phalcon/assets/inline/css.zep.c b/ext/phalcon/assets/inline/css.zep.c index 06cab85681e..9fafc2da551 100644 --- a/ext/phalcon/assets/inline/css.zep.c +++ b/ext/phalcon/assets/inline/css.zep.c @@ -44,59 +44,50 @@ PHP_METHOD(Phalcon_Assets_Inline_Css, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_1 = NULL; zval attributes; zend_bool filter; - zval *content_param = NULL, *filter_param = NULL, *attributes_param = NULL, _0$$3, _2, _3; + zval *content_param = NULL, *filter_param = NULL, *attributes_param = NULL, _0$$3, _1, _2; zval content; - zval *this_ptr = getThis(); ZVAL_UNDEF(&content); ZVAL_UNDEF(&_0$$3); + ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); - ZVAL_UNDEF(&_3); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(content) Z_PARAM_OPTIONAL Z_PARAM_BOOL(filter) Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &content_param, &filter_param, &attributes_param); zephir_get_strval(&content, content_param); if (!filter_param) { filter = 1; } else { - filter = zephir_get_boolval(filter_param); - } + } if (!attributes_param) { ZEPHIR_INIT_VAR(&attributes); array_init(&attributes); } else { zephir_get_arrval(&attributes, attributes_param); } - - if (1 == ZEPHIR_IS_EMPTY(&attributes)) { ZEPHIR_INIT_VAR(&_0$$3); zephir_create_array(&_0$$3, 1, 0); add_assoc_stringl_ex(&_0$$3, SL("type"), SL("text/css")); ZEPHIR_CPY_WRT(&attributes, &_0$$3); } - ZEPHIR_INIT_VAR(&_2); - ZVAL_STRING(&_2, "css"); + ZEPHIR_INIT_VAR(&_1); + ZVAL_STRING(&_1, "css"); if (filter) { - ZVAL_BOOL(&_3, 1); + ZVAL_BOOL(&_2, 1); } else { - ZVAL_BOOL(&_3, 0); + ZVAL_BOOL(&_2, 0); } - ZEPHIR_CALL_PARENT(NULL, phalcon_assets_inline_css_ce, getThis(), "__construct", &_1, 0, &_2, &content, &_3, &attributes); + ZEPHIR_CALL_PARENT(NULL, phalcon_assets_inline_css_ce, getThis(), "__construct", NULL, 0, &_1, &content, &_2, &attributes); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } diff --git a/ext/phalcon/assets/inline/css.zep.h b/ext/phalcon/assets/inline/css.zep.h index f09086d96d4..0ec38394b92 100644 --- a/ext/phalcon/assets/inline/css.zep.h +++ b/ext/phalcon/assets/inline/css.zep.h @@ -8,11 +8,7 @@ PHP_METHOD(Phalcon_Assets_Inline_Css, __construct); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_assets_inline_css___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, content, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, filter, _IS_BOOL, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_assets_inline_css_method_entry) { diff --git a/ext/phalcon/assets/inline/js.zep.c b/ext/phalcon/assets/inline/js.zep.c index 791897554cd..2a37fc8ed03 100644 --- a/ext/phalcon/assets/inline/js.zep.c +++ b/ext/phalcon/assets/inline/js.zep.c @@ -44,59 +44,50 @@ PHP_METHOD(Phalcon_Assets_Inline_Js, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_1 = NULL; zval attributes; zend_bool filter; - zval *content_param = NULL, *filter_param = NULL, *attributes_param = NULL, _0$$3, _2, _3; + zval *content_param = NULL, *filter_param = NULL, *attributes_param = NULL, _0$$3, _1, _2; zval content; - zval *this_ptr = getThis(); ZVAL_UNDEF(&content); ZVAL_UNDEF(&_0$$3); + ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); - ZVAL_UNDEF(&_3); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(content) Z_PARAM_OPTIONAL Z_PARAM_BOOL(filter) Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &content_param, &filter_param, &attributes_param); zephir_get_strval(&content, content_param); if (!filter_param) { filter = 1; } else { - filter = zephir_get_boolval(filter_param); - } + } if (!attributes_param) { ZEPHIR_INIT_VAR(&attributes); array_init(&attributes); } else { zephir_get_arrval(&attributes, attributes_param); } - - if (1 == ZEPHIR_IS_EMPTY(&attributes)) { ZEPHIR_INIT_VAR(&_0$$3); zephir_create_array(&_0$$3, 1, 0); add_assoc_stringl_ex(&_0$$3, SL("type"), SL("application/javascript")); ZEPHIR_CPY_WRT(&attributes, &_0$$3); } - ZEPHIR_INIT_VAR(&_2); - ZVAL_STRING(&_2, "js"); + ZEPHIR_INIT_VAR(&_1); + ZVAL_STRING(&_1, "js"); if (filter) { - ZVAL_BOOL(&_3, 1); + ZVAL_BOOL(&_2, 1); } else { - ZVAL_BOOL(&_3, 0); + ZVAL_BOOL(&_2, 0); } - ZEPHIR_CALL_PARENT(NULL, phalcon_assets_inline_js_ce, getThis(), "__construct", &_1, 0, &_2, &content, &_3, &attributes); + ZEPHIR_CALL_PARENT(NULL, phalcon_assets_inline_js_ce, getThis(), "__construct", NULL, 0, &_1, &content, &_2, &attributes); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } diff --git a/ext/phalcon/assets/inline/js.zep.h b/ext/phalcon/assets/inline/js.zep.h index 8207d162515..9426ffe6346 100644 --- a/ext/phalcon/assets/inline/js.zep.h +++ b/ext/phalcon/assets/inline/js.zep.h @@ -8,11 +8,7 @@ PHP_METHOD(Phalcon_Assets_Inline_Js, __construct); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_assets_inline_js___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, content, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, filter, _IS_BOOL, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_assets_inline_js_method_entry) { diff --git a/ext/phalcon/assets/manager.zep.c b/ext/phalcon/assets/manager.zep.c index 23fb9b14aa4..b0d4c6664ce 100644 --- a/ext/phalcon/assets/manager.zep.c +++ b/ext/phalcon/assets/manager.zep.c @@ -75,17 +75,13 @@ PHP_METHOD(Phalcon_Assets_Manager, __construct) ZVAL_UNDEF(&tagFactory_sub); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_OBJECT_OF_CLASS(tagFactory, phalcon_html_tagfactory_ce) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &tagFactory, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -93,8 +89,6 @@ PHP_METHOD(Phalcon_Assets_Manager, __construct) } else { zephir_get_arrval(&options, options_param); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("tagFactory"), tagFactory); zephir_update_property_zval(this_ptr, ZEND_STRL("options"), &options); ZEPHIR_MM_RESTORE(); @@ -114,18 +108,12 @@ PHP_METHOD(Phalcon_Assets_Manager, addAsset) ZVAL_UNDEF(&asset_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(asset, phalcon_assets_asset_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &asset); - - ZEPHIR_CALL_METHOD(&_0, asset, "gettype", NULL, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, this_ptr, "addassetbytype", NULL, 0, &_0, asset); @@ -150,16 +138,12 @@ PHP_METHOD(Phalcon_Assets_Manager, addAssetByType) ZVAL_UNDEF(&type); ZVAL_UNDEF(&asset_sub); ZVAL_UNDEF(&collection); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(type) Z_PARAM_OBJECT_OF_CLASS(asset, phalcon_assets_asset_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &type_param, &asset); if (UNEXPECTED(Z_TYPE_P(type_param) != IS_STRING && Z_TYPE_P(type_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'type' must be of the type string")); @@ -170,9 +154,7 @@ PHP_METHOD(Phalcon_Assets_Manager, addAssetByType) } else { ZEPHIR_INIT_VAR(&type); } - - - ZEPHIR_CALL_METHOD(&collection, this_ptr, "checkandcreatecollection", NULL, 170, &type); + ZEPHIR_CALL_METHOD(&collection, this_ptr, "checkandcreatecollection", NULL, 171, &type); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &collection, "add", NULL, 0, asset); zephir_check_call_status(); @@ -207,7 +189,6 @@ PHP_METHOD(Phalcon_Assets_Manager, addCss) ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 6) Z_PARAM_STR(path) @@ -218,10 +199,8 @@ PHP_METHOD(Phalcon_Assets_Manager, addCss) Z_PARAM_STR_OR_NULL(version) Z_PARAM_BOOL(autoVersion) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 5, &path_param, &local_param, &filter_param, &attributes_param, &version_param, &autoVersion_param); if (UNEXPECTED(Z_TYPE_P(path_param) != IS_STRING && Z_TYPE_P(path_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'path' must be of the type string")); @@ -235,13 +214,11 @@ PHP_METHOD(Phalcon_Assets_Manager, addCss) if (!local_param) { local = 1; } else { - local = zephir_get_boolval(local_param); - } + } if (!filter_param) { filter = 1; } else { - filter = zephir_get_boolval(filter_param); - } + } if (!attributes_param) { ZEPHIR_INIT_VAR(&attributes); array_init(&attributes); @@ -256,10 +233,7 @@ PHP_METHOD(Phalcon_Assets_Manager, addCss) if (!autoVersion_param) { autoVersion = 0; } else { - autoVersion = zephir_get_boolval(autoVersion_param); - } - - + } ZEPHIR_INIT_VAR(&_0); object_init_ex(&_0, phalcon_assets_asset_css_ce); if (local) { @@ -277,7 +251,7 @@ PHP_METHOD(Phalcon_Assets_Manager, addCss) } else { ZVAL_BOOL(&_3, 0); } - ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 171, &path, &_1, &_2, &attributes, &version, &_3); + ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 172, &path, &_1, &_2, &attributes, &version, &_3); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_4); ZVAL_STRING(&_4, "css"); @@ -300,18 +274,12 @@ PHP_METHOD(Phalcon_Assets_Manager, addInlineCode) ZVAL_UNDEF(&code_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(code, phalcon_assets_inline_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &code); - - ZEPHIR_CALL_METHOD(&_0, code, "gettype", NULL, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, this_ptr, "addinlinecodebytype", NULL, 0, &_0, code); @@ -336,16 +304,12 @@ PHP_METHOD(Phalcon_Assets_Manager, addInlineCodeByType) ZVAL_UNDEF(&type); ZVAL_UNDEF(&code_sub); ZVAL_UNDEF(&collection); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(type) Z_PARAM_OBJECT_OF_CLASS(code, phalcon_assets_inline_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &type_param, &code); if (UNEXPECTED(Z_TYPE_P(type_param) != IS_STRING && Z_TYPE_P(type_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'type' must be of the type string")); @@ -356,9 +320,7 @@ PHP_METHOD(Phalcon_Assets_Manager, addInlineCodeByType) } else { ZEPHIR_INIT_VAR(&type); } - - - ZEPHIR_CALL_METHOD(&collection, this_ptr, "checkandcreatecollection", NULL, 170, &type); + ZEPHIR_CALL_METHOD(&collection, this_ptr, "checkandcreatecollection", NULL, 171, &type); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &collection, "addinline", NULL, 0, code); zephir_check_call_status(); @@ -387,33 +349,26 @@ PHP_METHOD(Phalcon_Assets_Manager, addInlineCss) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(content) Z_PARAM_OPTIONAL Z_PARAM_BOOL(filter) Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &content_param, &filter_param, &attributes_param); zephir_get_strval(&content, content_param); if (!filter_param) { filter = 1; } else { - filter = zephir_get_boolval(filter_param); - } + } if (!attributes_param) { ZEPHIR_INIT_VAR(&attributes); array_init(&attributes); } else { zephir_get_arrval(&attributes, attributes_param); } - - ZEPHIR_INIT_VAR(&_0); object_init_ex(&_0, phalcon_assets_inline_css_ce); if (filter) { @@ -421,7 +376,7 @@ PHP_METHOD(Phalcon_Assets_Manager, addInlineCss) } else { ZVAL_BOOL(&_1, 0); } - ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 172, &content, &_1, &attributes); + ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 173, &content, &_1, &attributes); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_2); ZVAL_STRING(&_2, "css"); @@ -452,33 +407,26 @@ PHP_METHOD(Phalcon_Assets_Manager, addInlineJs) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(content) Z_PARAM_OPTIONAL Z_PARAM_BOOL(filter) Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &content_param, &filter_param, &attributes_param); zephir_get_strval(&content, content_param); if (!filter_param) { filter = 1; } else { - filter = zephir_get_boolval(filter_param); - } + } if (!attributes_param) { ZEPHIR_INIT_VAR(&attributes); array_init(&attributes); } else { zephir_get_arrval(&attributes, attributes_param); } - - ZEPHIR_INIT_VAR(&_0); object_init_ex(&_0, phalcon_assets_inline_js_ce); if (filter) { @@ -486,7 +434,7 @@ PHP_METHOD(Phalcon_Assets_Manager, addInlineJs) } else { ZVAL_BOOL(&_1, 0); } - ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 173, &content, &_1, &attributes); + ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 174, &content, &_1, &attributes); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_2); ZVAL_STRING(&_2, "js"); @@ -528,7 +476,6 @@ PHP_METHOD(Phalcon_Assets_Manager, addJs) ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 6) Z_PARAM_STR(path) @@ -539,10 +486,8 @@ PHP_METHOD(Phalcon_Assets_Manager, addJs) Z_PARAM_STR_OR_NULL(version) Z_PARAM_BOOL(autoVersion) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 5, &path_param, &local_param, &filter_param, &attributes_param, &version_param, &autoVersion_param); if (UNEXPECTED(Z_TYPE_P(path_param) != IS_STRING && Z_TYPE_P(path_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'path' must be of the type string")); @@ -556,13 +501,11 @@ PHP_METHOD(Phalcon_Assets_Manager, addJs) if (!local_param) { local = 1; } else { - local = zephir_get_boolval(local_param); - } + } if (!filter_param) { filter = 1; } else { - filter = zephir_get_boolval(filter_param); - } + } if (!attributes_param) { ZEPHIR_INIT_VAR(&attributes); array_init(&attributes); @@ -577,10 +520,7 @@ PHP_METHOD(Phalcon_Assets_Manager, addJs) if (!autoVersion_param) { autoVersion = 0; } else { - autoVersion = zephir_get_boolval(autoVersion_param); - } - - + } ZEPHIR_INIT_VAR(&_0); object_init_ex(&_0, phalcon_assets_asset_js_ce); if (local) { @@ -598,7 +538,7 @@ PHP_METHOD(Phalcon_Assets_Manager, addJs) } else { ZVAL_BOOL(&_3, 0); } - ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 174, &path, &_1, &_2, &attributes, &version, &_3); + ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 175, &path, &_1, &_2, &attributes, &version, &_3); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_4); ZVAL_STRING(&_4, "js"); @@ -621,20 +561,14 @@ PHP_METHOD(Phalcon_Assets_Manager, collection) zval *this_ptr = getThis(); ZVAL_UNDEF(&name); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &name_param); zephir_get_strval(&name, name_param); - - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "checkandcreatecollection", NULL, 170, &name); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "checkandcreatecollection", NULL, 171, &name); zephir_check_call_status(); RETURN_MM(); } @@ -653,7 +587,6 @@ PHP_METHOD(Phalcon_Assets_Manager, collectionAssetsByType) zval type; zval *assets_param = NULL, *type_param = NULL, asset, *_0, _1, _3$$3, _5$$5; zval assets, filtered; - zval *this_ptr = getThis(); ZVAL_UNDEF(&assets); ZVAL_UNDEF(&filtered); @@ -662,21 +595,15 @@ PHP_METHOD(Phalcon_Assets_Manager, collectionAssetsByType) ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_5$$5); ZVAL_UNDEF(&type); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ARRAY(assets) Z_PARAM_STR(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &assets_param, &type_param); zephir_get_arrval(&assets, assets_param); zephir_get_strval(&type, type_param); - - ZEPHIR_INIT_VAR(&filtered); array_init(&filtered); zephir_is_iterable(&assets, 0, "phalcon/Assets/Manager.zep", 253); @@ -745,15 +672,11 @@ PHP_METHOD(Phalcon_Assets_Manager, exists) zval *this_ptr = getThis(); ZVAL_UNDEF(&name); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -764,8 +687,6 @@ PHP_METHOD(Phalcon_Assets_Manager, exists) } else { ZEPHIR_INIT_VAR(&name); } - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "has", NULL, 0, &name); zephir_check_call_status(); RETURN_MM(); @@ -794,15 +715,11 @@ PHP_METHOD(Phalcon_Assets_Manager, get) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -813,8 +730,6 @@ PHP_METHOD(Phalcon_Assets_Manager, get) } else { ZEPHIR_INIT_VAR(&name); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("collections"), PH_NOISY_CC | PH_READONLY); if (UNEXPECTED(1 != zephir_array_isset(&_0, &name))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_assets_exception_ce, "The collection does not exist in the manager", "phalcon/Assets/Manager.zep", 289); @@ -832,9 +747,6 @@ PHP_METHOD(Phalcon_Assets_Manager, get) */ PHP_METHOD(Phalcon_Assets_Manager, getCollections) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "collections"); } @@ -852,13 +764,12 @@ PHP_METHOD(Phalcon_Assets_Manager, getCss) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "css"); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "checkandcreatecollection", NULL, 170, &_0); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "checkandcreatecollection", NULL, 171, &_0); zephir_check_call_status(); RETURN_MM(); } @@ -876,13 +787,12 @@ PHP_METHOD(Phalcon_Assets_Manager, getJs) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "js"); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "checkandcreatecollection", NULL, 170, &_0); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "checkandcreatecollection", NULL, 171, &_0); zephir_check_call_status(); RETURN_MM(); } @@ -892,9 +802,6 @@ PHP_METHOD(Phalcon_Assets_Manager, getJs) */ PHP_METHOD(Phalcon_Assets_Manager, getOptions) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "options"); } @@ -920,15 +827,11 @@ PHP_METHOD(Phalcon_Assets_Manager, has) ZVAL_UNDEF(&name); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -939,8 +842,6 @@ PHP_METHOD(Phalcon_Assets_Manager, has) } else { ZEPHIR_INIT_VAR(&name); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("collections"), PH_NOISY_CC | PH_READONLY); RETURN_MM_BOOL(zephir_array_isset(&_0, &name)); } @@ -1045,20 +946,14 @@ PHP_METHOD(Phalcon_Assets_Manager, output) ZVAL_UNDEF(&_61$$67); ZVAL_UNDEF(&type); ZVAL_UNDEF(&output); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(collection, phalcon_assets_collection_ce) Z_PARAM_STR(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &collection, &type_param); zephir_get_strval(&type, type_param); - - ZEPHIR_INIT_VAR(&completeSourcePath); ZVAL_STRING(&completeSourcePath, ""); ZEPHIR_INIT_VAR(&completeTargetPath); @@ -1094,12 +989,12 @@ PHP_METHOD(Phalcon_Assets_Manager, output) ZEPHIR_INIT_VAR(&typeCss); ZVAL_STRING(&typeCss, "css"); if (1 != ZEPHIR_IS_EMPTY(&filters)) { - ZEPHIR_OBS_VAR(&sourceBasePath); + zephir_memory_observe(&sourceBasePath); if (!(zephir_array_isset_string_fetch(&sourceBasePath, &options, SL("sourceBasePath"), 0))) { ZEPHIR_INIT_NVAR(&sourceBasePath); ZVAL_STRING(&sourceBasePath, ""); } - ZEPHIR_OBS_VAR(&targetBasePath); + zephir_memory_observe(&targetBasePath); if (!(zephir_array_isset_string_fetch(&targetBasePath, &options, SL("targetBasePath"), 0))) { ZEPHIR_INIT_NVAR(&targetBasePath); ZVAL_STRING(&targetBasePath, ""); @@ -1126,20 +1021,20 @@ PHP_METHOD(Phalcon_Assets_Manager, output) object_init_ex(&_3$$9, phalcon_assets_exception_ce); ZEPHIR_INIT_VAR(&_4$$9); ZEPHIR_CONCAT_SVS(&_4$$9, "Path '", &completeTargetPath, "' is not a valid target path (1)"); - ZEPHIR_CALL_METHOD(NULL, &_3$$9, "__construct", NULL, 32, &_4$$9); + ZEPHIR_CALL_METHOD(NULL, &_3$$9, "__construct", NULL, 33, &_4$$9); zephir_check_call_status(); zephir_throw_exception_debug(&_3$$9, "phalcon/Assets/Manager.zep", 457); ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_CALL_FUNCTION(&_5$$8, "is_dir", NULL, 136, &completeTargetPath); + ZEPHIR_CALL_FUNCTION(&_5$$8, "is_dir", NULL, 137, &completeTargetPath); zephir_check_call_status(); if (ZEPHIR_IS_TRUE_IDENTICAL(&_5$$8)) { ZEPHIR_INIT_VAR(&_6$$10); object_init_ex(&_6$$10, phalcon_assets_exception_ce); ZEPHIR_INIT_VAR(&_7$$10); ZEPHIR_CONCAT_SVS(&_7$$10, "Path '", &completeTargetPath, "' is not a valid target path (2), it is a directory."); - ZEPHIR_CALL_METHOD(NULL, &_6$$10, "__construct", NULL, 32, &_7$$10); + ZEPHIR_CALL_METHOD(NULL, &_6$$10, "__construct", NULL, 33, &_7$$10); zephir_check_call_status(); zephir_throw_exception_debug(&_6$$10, "phalcon/Assets/Manager.zep", 463); ZEPHIR_MM_RESTORE(); @@ -1170,7 +1065,7 @@ PHP_METHOD(Phalcon_Assets_Manager, output) object_init_ex(&_11$$14, phalcon_assets_exception_ce); ZEPHIR_INIT_NVAR(&_12$$14); ZEPHIR_CONCAT_SVS(&_12$$14, "Asset '", &sourcePath, "' does not have a valid source path"); - ZEPHIR_CALL_METHOD(NULL, &_11$$14, "__construct", NULL, 32, &_12$$14); + ZEPHIR_CALL_METHOD(NULL, &_11$$14, "__construct", NULL, 33, &_12$$14); zephir_check_call_status(); zephir_throw_exception_debug(&_11$$14, "phalcon/Assets/Manager.zep", 493); ZEPHIR_MM_RESTORE(); @@ -1184,7 +1079,7 @@ PHP_METHOD(Phalcon_Assets_Manager, output) object_init_ex(&_13$$15, phalcon_assets_exception_ce); ZEPHIR_INIT_NVAR(&_14$$15); ZEPHIR_CONCAT_SVS(&_14$$15, "Asset '", &sourcePath, "' does not have a valid target path"); - ZEPHIR_CALL_METHOD(NULL, &_13$$15, "__construct", NULL, 32, &_14$$15); + ZEPHIR_CALL_METHOD(NULL, &_13$$15, "__construct", NULL, 33, &_14$$15); zephir_check_call_status(); zephir_throw_exception_debug(&_13$$15, "phalcon/Assets/Manager.zep", 509); ZEPHIR_MM_RESTORE(); @@ -1198,7 +1093,7 @@ PHP_METHOD(Phalcon_Assets_Manager, output) object_init_ex(&_16$$17, phalcon_assets_exception_ce); ZEPHIR_INIT_NVAR(&_17$$17); ZEPHIR_CONCAT_SVS(&_17$$17, "Asset '", &targetPath, "' have the same source and target paths"); - ZEPHIR_CALL_METHOD(NULL, &_16$$17, "__construct", NULL, 32, &_17$$17); + ZEPHIR_CALL_METHOD(NULL, &_16$$17, "__construct", NULL, 33, &_17$$17); zephir_check_call_status(); zephir_throw_exception_debug(&_16$$17, "phalcon/Assets/Manager.zep", 519); ZEPHIR_MM_RESTORE(); @@ -1221,13 +1116,13 @@ PHP_METHOD(Phalcon_Assets_Manager, output) zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_21$$21, &asset, "getrealsourcepath", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&prefixedPath, this_ptr, "calculateprefixedpath", &_22, 175, collection, &_20$$21, &_21$$21); + ZEPHIR_CALL_METHOD(&prefixedPath, this_ptr, "calculateprefixedpath", &_22, 176, collection, &_20$$21, &_21$$21); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_23$$21, &asset, "getattributes", NULL, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_24$$21, &asset, "islocal", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&html, this_ptr, "docallback", &_25, 176, &callback, &_23$$21, &prefixedPath, &_24$$21); + ZEPHIR_CALL_METHOD(&html, this_ptr, "docallback", &_25, 177, &callback, &_23$$21, &prefixedPath, &_24$$21); zephir_check_call_status(); zephir_read_property(&_26$$21, this_ptr, ZEND_STRL("implicitOutput"), PH_NOISY_CC | PH_READONLY); if (ZEPHIR_IS_TRUE_IDENTICAL(&_26$$21)) { @@ -1304,12 +1199,12 @@ PHP_METHOD(Phalcon_Assets_Manager, output) zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_31$$36, &asset, "getrealsourcepath", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&prefixedPath, this_ptr, "calculateprefixedpath", &_22, 175, collection, &_30$$36, &_31$$36); + ZEPHIR_CALL_METHOD(&prefixedPath, this_ptr, "calculateprefixedpath", &_22, 176, collection, &_30$$36, &_31$$36); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_32$$36, collection, "getattributes", &_33, 0); zephir_check_call_status(); ZVAL_BOOL(&_34$$36, 1); - ZEPHIR_CALL_METHOD(&html, this_ptr, "docallback", &_25, 176, &callback, &_32$$36, &prefixedPath, &_34$$36); + ZEPHIR_CALL_METHOD(&html, this_ptr, "docallback", &_25, 177, &callback, &_32$$36, &prefixedPath, &_34$$36); zephir_check_call_status(); zephir_read_property(&_34$$36, this_ptr, ZEND_STRL("implicitOutput"), PH_NOISY_CC | PH_READONLY); if (ZEPHIR_IS_TRUE_IDENTICAL(&_34$$36)) { @@ -1347,7 +1242,7 @@ PHP_METHOD(Phalcon_Assets_Manager, output) object_init_ex(&_36$$42, phalcon_assets_exception_ce); ZEPHIR_INIT_NVAR(&_37$$42); ZEPHIR_CONCAT_SVS(&_37$$42, "Asset '", &sourcePath, "' does not have a valid source path"); - ZEPHIR_CALL_METHOD(NULL, &_36$$42, "__construct", NULL, 32, &_37$$42); + ZEPHIR_CALL_METHOD(NULL, &_36$$42, "__construct", NULL, 33, &_37$$42); zephir_check_call_status(); zephir_throw_exception_debug(&_36$$42, "phalcon/Assets/Manager.zep", 493); ZEPHIR_MM_RESTORE(); @@ -1361,7 +1256,7 @@ PHP_METHOD(Phalcon_Assets_Manager, output) object_init_ex(&_38$$43, phalcon_assets_exception_ce); ZEPHIR_INIT_NVAR(&_39$$43); ZEPHIR_CONCAT_SVS(&_39$$43, "Asset '", &sourcePath, "' does not have a valid target path"); - ZEPHIR_CALL_METHOD(NULL, &_38$$43, "__construct", NULL, 32, &_39$$43); + ZEPHIR_CALL_METHOD(NULL, &_38$$43, "__construct", NULL, 33, &_39$$43); zephir_check_call_status(); zephir_throw_exception_debug(&_38$$43, "phalcon/Assets/Manager.zep", 509); ZEPHIR_MM_RESTORE(); @@ -1375,7 +1270,7 @@ PHP_METHOD(Phalcon_Assets_Manager, output) object_init_ex(&_41$$45, phalcon_assets_exception_ce); ZEPHIR_INIT_NVAR(&_42$$45); ZEPHIR_CONCAT_SVS(&_42$$45, "Asset '", &targetPath, "' have the same source and target paths"); - ZEPHIR_CALL_METHOD(NULL, &_41$$45, "__construct", NULL, 32, &_42$$45); + ZEPHIR_CALL_METHOD(NULL, &_41$$45, "__construct", NULL, 33, &_42$$45); zephir_check_call_status(); zephir_throw_exception_debug(&_41$$45, "phalcon/Assets/Manager.zep", 519); ZEPHIR_MM_RESTORE(); @@ -1398,13 +1293,13 @@ PHP_METHOD(Phalcon_Assets_Manager, output) zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_46$$49, &asset, "getrealsourcepath", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&prefixedPath, this_ptr, "calculateprefixedpath", &_22, 175, collection, &_45$$49, &_46$$49); + ZEPHIR_CALL_METHOD(&prefixedPath, this_ptr, "calculateprefixedpath", &_22, 176, collection, &_45$$49, &_46$$49); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_47$$49, &asset, "getattributes", NULL, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_48$$49, &asset, "islocal", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&html, this_ptr, "docallback", &_25, 176, &callback, &_47$$49, &prefixedPath, &_48$$49); + ZEPHIR_CALL_METHOD(&html, this_ptr, "docallback", &_25, 177, &callback, &_47$$49, &prefixedPath, &_48$$49); zephir_check_call_status(); zephir_read_property(&_49$$49, this_ptr, ZEND_STRL("implicitOutput"), PH_NOISY_CC | PH_READONLY); if (ZEPHIR_IS_TRUE_IDENTICAL(&_49$$49)) { @@ -1481,12 +1376,12 @@ PHP_METHOD(Phalcon_Assets_Manager, output) zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_54$$64, &asset, "getrealsourcepath", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&prefixedPath, this_ptr, "calculateprefixedpath", &_22, 175, collection, &_53$$64, &_54$$64); + ZEPHIR_CALL_METHOD(&prefixedPath, this_ptr, "calculateprefixedpath", &_22, 176, collection, &_53$$64, &_54$$64); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_55$$64, collection, "getattributes", &_33, 0); zephir_check_call_status(); ZVAL_BOOL(&_56$$64, 1); - ZEPHIR_CALL_METHOD(&html, this_ptr, "docallback", &_25, 176, &callback, &_55$$64, &prefixedPath, &_56$$64); + ZEPHIR_CALL_METHOD(&html, this_ptr, "docallback", &_25, 177, &callback, &_55$$64, &prefixedPath, &_56$$64); zephir_check_call_status(); zephir_read_property(&_56$$64, this_ptr, ZEND_STRL("implicitOutput"), PH_NOISY_CC | PH_READONLY); if (ZEPHIR_IS_TRUE_IDENTICAL(&_56$$64)) { @@ -1508,13 +1403,13 @@ PHP_METHOD(Phalcon_Assets_Manager, output) zephir_file_put_contents(NULL, &completeTargetPath, &filteredJoinedContent); ZEPHIR_CALL_METHOD(&_58$$67, collection, "gettargeturi", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&prefixedPath, this_ptr, "calculateprefixedpath", &_22, 175, collection, &_58$$67, &completeTargetPath); + ZEPHIR_CALL_METHOD(&prefixedPath, this_ptr, "calculateprefixedpath", &_22, 176, collection, &_58$$67, &completeTargetPath); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_59$$67, collection, "getattributes", &_33, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_60$$67, collection, "gettargetislocal", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&html, this_ptr, "docallback", &_25, 176, &callback, &_59$$67, &prefixedPath, &_60$$67); + ZEPHIR_CALL_METHOD(&html, this_ptr, "docallback", &_25, 177, &callback, &_59$$67, &prefixedPath, &_60$$67); zephir_check_call_status(); zephir_read_property(&_61$$67, this_ptr, ZEND_STRL("implicitOutput"), PH_NOISY_CC | PH_READONLY); if (ZEPHIR_IS_TRUE_IDENTICAL(&_61$$67)) { @@ -1545,24 +1440,19 @@ PHP_METHOD(Phalcon_Assets_Manager, outputCss) ZVAL_UNDEF(&name); ZVAL_UNDEF(&collection); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &name_param); if (!name_param) { ZEPHIR_INIT_VAR(&name); } else { zephir_get_strval(&name, name_param); } - - ZEPHIR_CALL_METHOD(&collection, this_ptr, "getcss", NULL, 0); zephir_check_call_status(); if (1 != ZEPHIR_IS_EMPTY(&name)) { @@ -1628,19 +1518,13 @@ PHP_METHOD(Phalcon_Assets_Manager, outputInline) ZVAL_UNDEF(&html); ZVAL_UNDEF(&joinedContent); ZVAL_UNDEF(&output); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(collection, phalcon_assets_collection_ce) Z_PARAM_ZVAL(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &collection, &type); - - ZEPHIR_INIT_VAR(&output); ZEPHIR_INIT_VAR(&html); ZEPHIR_INIT_VAR(&joinedContent); @@ -1821,24 +1705,19 @@ PHP_METHOD(Phalcon_Assets_Manager, outputInlineCss) ZVAL_UNDEF(&name); ZVAL_UNDEF(&collection); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &name_param); if (!name_param) { ZEPHIR_INIT_VAR(&name); } else { zephir_get_strval(&name, name_param); } - - ZEPHIR_CALL_METHOD(&collection, this_ptr, "getcss", NULL, 0); zephir_check_call_status(); if (1 != ZEPHIR_IS_EMPTY(&name)) { @@ -1870,24 +1749,19 @@ PHP_METHOD(Phalcon_Assets_Manager, outputInlineJs) ZVAL_UNDEF(&name); ZVAL_UNDEF(&collection); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &name_param); if (!name_param) { ZEPHIR_INIT_VAR(&name); } else { zephir_get_strval(&name, name_param); } - - ZEPHIR_CALL_METHOD(&collection, this_ptr, "getjs", NULL, 0); zephir_check_call_status(); if (1 != ZEPHIR_IS_EMPTY(&name)) { @@ -1920,24 +1794,19 @@ PHP_METHOD(Phalcon_Assets_Manager, outputJs) ZVAL_UNDEF(&name); ZVAL_UNDEF(&collection); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &name_param); if (!name_param) { ZEPHIR_INIT_VAR(&name); } else { zephir_get_strval(&name, name_param); } - - ZEPHIR_CALL_METHOD(&collection, this_ptr, "getjs", NULL, 0); zephir_check_call_status(); if (1 != ZEPHIR_IS_EMPTY(&name)) { @@ -1970,16 +1839,12 @@ PHP_METHOD(Phalcon_Assets_Manager, set) ZVAL_UNDEF(&name); ZVAL_UNDEF(&collection_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(name) Z_PARAM_OBJECT_OF_CLASS(collection, phalcon_assets_collection_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &name_param, &collection); 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")); @@ -1990,8 +1855,6 @@ PHP_METHOD(Phalcon_Assets_Manager, set) } else { ZEPHIR_INIT_VAR(&name); } - - zephir_update_property_array(this_ptr, SL("collections"), &name, collection); RETURN_THIS(); } @@ -2009,19 +1872,13 @@ PHP_METHOD(Phalcon_Assets_Manager, setOptions) zval *this_ptr = getThis(); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &options_param); zephir_get_arrval(&options, options_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("options"), &options); RETURN_THIS(); } @@ -2039,18 +1896,10 @@ PHP_METHOD(Phalcon_Assets_Manager, useImplicitOutput) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(implicitOutput) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &implicitOutput_param); - implicitOutput = zephir_get_boolval(implicitOutput_param); - - if (implicitOutput) { zephir_update_property_zval(this_ptr, ZEND_STRL("implicitOutput"), &__$true); } else { @@ -2075,7 +1924,6 @@ PHP_METHOD(Phalcon_Assets_Manager, calculatePrefixedPath) zend_long ZEPHIR_LAST_CALL_STATUS; zval path, filePath; zval *collection, collection_sub, *path_param = NULL, *filePath_param = NULL, modificationTime, prefixedPath, version, _0, _1, _3, _4$$3, _5$$4; - zval *this_ptr = getThis(); ZVAL_UNDEF(&collection_sub); ZVAL_UNDEF(&modificationTime); @@ -2088,22 +1936,16 @@ PHP_METHOD(Phalcon_Assets_Manager, calculatePrefixedPath) ZVAL_UNDEF(&_5$$4); ZVAL_UNDEF(&path); ZVAL_UNDEF(&filePath); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_OBJECT_OF_CLASS(collection, phalcon_assets_collection_ce) Z_PARAM_STR(path) Z_PARAM_STR(filePath) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &collection, &path_param, &filePath_param); zephir_get_strval(&path, path_param); zephir_get_strval(&filePath, filePath_param); - - ZEPHIR_CALL_METHOD(&_0, collection, "getprefix", NULL, 0); zephir_check_call_status(); ZEPHIR_INIT_VAR(&prefixedPath); @@ -2154,19 +1996,13 @@ PHP_METHOD(Phalcon_Assets_Manager, checkAndCreateCollection) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &type_param); zephir_get_strval(&type, type_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("collections"), PH_NOISY_CC | PH_READONLY); if (1 != zephir_array_isset(&_0, &type)) { ZEPHIR_INIT_VAR(&_1$$3); @@ -2205,17 +2041,13 @@ PHP_METHOD(Phalcon_Assets_Manager, cssLink) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_ZVAL(parameters) Z_PARAM_BOOL(local) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 2, ¶meters, &local_param); if (!parameters) { parameters = ¶meters_sub; @@ -2225,10 +2057,7 @@ PHP_METHOD(Phalcon_Assets_Manager, cssLink) if (!local_param) { local = 1; } else { - local = zephir_get_boolval(local_param); - } - - + } if (local) { ZVAL_BOOL(&_0, 1); } else { @@ -2240,7 +2069,7 @@ PHP_METHOD(Phalcon_Assets_Manager, cssLink) ZVAL_STRING(&_2, "text/css"); ZEPHIR_INIT_VAR(&_3); ZVAL_STRING(&_3, "href"); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "processparameters", NULL, 177, parameters, &_0, &_1, &_2, &_3); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "processparameters", NULL, 178, parameters, &_0, &_1, &_2, &_3); zephir_check_call_status(); RETURN_MM(); } @@ -2261,7 +2090,6 @@ PHP_METHOD(Phalcon_Assets_Manager, doCallback) zval prefixedPath; zval attributes, parameters; zval *callback, callback_sub, *attributes_param = NULL, *prefixedPath_param = NULL, *local_param = NULL, _1, _0$$4; - zval *this_ptr = getThis(); ZVAL_UNDEF(&callback_sub); ZVAL_UNDEF(&_1); @@ -2269,24 +2097,17 @@ PHP_METHOD(Phalcon_Assets_Manager, doCallback) ZVAL_UNDEF(&attributes); ZVAL_UNDEF(¶meters); ZVAL_UNDEF(&prefixedPath); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(4, 4) Z_PARAM_ZVAL(callback) Z_PARAM_ARRAY(attributes) Z_PARAM_STR(prefixedPath) Z_PARAM_BOOL(local) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 4, 0, &callback, &attributes_param, &prefixedPath_param, &local_param); zephir_get_arrval(&attributes, attributes_param); zephir_get_strval(&prefixedPath, prefixedPath_param); - local = zephir_get_boolval(local_param); - - if (1 != ZEPHIR_IS_EMPTY(&attributes)) { zephir_array_update_long(&attributes, 0, &prefixedPath, PH_COPY | PH_SEPARATE ZEPHIR_DEBUG_PARAMS_DUMMY); ZEPHIR_INIT_VAR(¶meters); @@ -2326,17 +2147,13 @@ PHP_METHOD(Phalcon_Assets_Manager, jsLink) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_ZVAL(parameters) Z_PARAM_BOOL(local) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 2, ¶meters, &local_param); if (!parameters) { parameters = ¶meters_sub; @@ -2346,10 +2163,7 @@ PHP_METHOD(Phalcon_Assets_Manager, jsLink) if (!local_param) { local = 1; } else { - local = zephir_get_boolval(local_param); - } - - + } if (local) { ZVAL_BOOL(&_0, 1); } else { @@ -2361,7 +2175,7 @@ PHP_METHOD(Phalcon_Assets_Manager, jsLink) ZVAL_STRING(&_2, "application/javascript"); ZEPHIR_INIT_VAR(&_3); ZVAL_STRING(&_3, "src"); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "processparameters", NULL, 177, parameters, &_0, &_1, &_2, &_3); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "processparameters", NULL, 178, parameters, &_0, &_1, &_2, &_3); zephir_check_call_status(); RETURN_MM(); } @@ -2400,8 +2214,6 @@ PHP_METHOD(Phalcon_Assets_Manager, processParameters) ZVAL_UNDEF(&type); ZVAL_UNDEF(&name); ZVAL_UNDEF(&_13); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(5, 5) Z_PARAM_ZVAL(parameters) Z_PARAM_BOOL(local) @@ -2409,17 +2221,12 @@ PHP_METHOD(Phalcon_Assets_Manager, processParameters) Z_PARAM_STR(type) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 5, 0, ¶meters, &local_param, &helperClass_param, &type_param, &name_param); - local = zephir_get_boolval(local_param); zephir_get_strval(&helperClass, helperClass_param); zephir_get_strval(&type, type_param); zephir_get_strval(&name, name_param); - - ZEPHIR_CPY_WRT(¶ms, parameters); if (Z_TYPE_P(¶ms) != IS_ARRAY) { ZEPHIR_INIT_VAR(&_0$$3); @@ -2431,13 +2238,13 @@ PHP_METHOD(Phalcon_Assets_Manager, processParameters) ZEPHIR_CPY_WRT(¶ms, &_0$$3); } if (1 == zephir_array_isset_long(¶ms, 1)) { - ZEPHIR_OBS_VAR(&_2$$4); + zephir_memory_observe(&_2$$4); zephir_array_fetch_long(&_2$$4, ¶ms, 1, PH_NOISY, "phalcon/Assets/Manager.zep", 1020); local = zephir_get_boolval(&_2$$4); zephir_array_unset_long(¶ms, 1, PH_SEPARATE); } else { if (1 == zephir_array_isset_string(¶ms, SL("local"))) { - ZEPHIR_OBS_VAR(&_3$$6); + zephir_memory_observe(&_3$$6); zephir_array_fetch_string(&_3$$6, ¶ms, SL("local"), PH_NOISY, "phalcon/Assets/Manager.zep", 1024); local = zephir_get_boolval(&_3$$6); zephir_array_unset_string(¶ms, SL("local"), PH_SEPARATE); @@ -2463,7 +2270,7 @@ PHP_METHOD(Phalcon_Assets_Manager, processParameters) zephir_array_unset_long(¶ms, 0, PH_SEPARATE); } } - ZEPHIR_OBS_VAR(&tag); + zephir_memory_observe(&tag); zephir_array_fetch(&tag, ¶ms, &name, PH_NOISY, "phalcon/Assets/Manager.zep", 1049); zephir_array_unset(¶ms, &name, PH_SEPARATE); if (local) { @@ -2501,7 +2308,8 @@ zend_object *zephir_init_properties_Phalcon_Assets_Manager(zend_class_entry *cla ZVAL_UNDEF(&_3$$4); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/assets/manager.zep.h b/ext/phalcon/assets/manager.zep.h index 60275376a4a..7fb8636acef 100644 --- a/ext/phalcon/assets/manager.zep.h +++ b/ext/phalcon/assets/manager.zep.h @@ -40,11 +40,7 @@ zend_object *zephir_init_properties_Phalcon_Assets_Manager(zend_class_entry *cla ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_assets_manager___construct, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, tagFactory, Phalcon\\Html\\TagFactory, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_assets_manager_addasset, 0, 1, Phalcon\\Assets\\Manager, 0) @@ -60,11 +56,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_assets_manager_addcss, 0, ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, local, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, filter, _IS_BOOL, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_ARG_TYPE_INFO(0, version, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, autoVersion, _IS_BOOL, 0) ZEND_END_ARG_INFO() @@ -81,32 +73,20 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_assets_manager_addinlinecss, 0, 1, Phalcon\\Assets\\Manager, 0) ZEND_ARG_TYPE_INFO(0, content, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, filter, _IS_BOOL, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_assets_manager_addinlinejs, 0, 1, Phalcon\\Assets\\Manager, 0) ZEND_ARG_TYPE_INFO(0, content, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, filter, _IS_BOOL, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_assets_manager_addjs, 0, 1, Phalcon\\Assets\\Manager, 0) ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, local, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, filter, _IS_BOOL, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_ARG_TYPE_INFO(0, version, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, autoVersion, _IS_BOOL, 0) ZEND_END_ARG_INFO() diff --git a/ext/phalcon/autoload/loader.zep.c b/ext/phalcon/autoload/loader.zep.c index a51010eadf3..3ebc80781d4 100644 --- a/ext/phalcon/autoload/loader.zep.c +++ b/ext/phalcon/autoload/loader.zep.c @@ -105,29 +105,22 @@ PHP_METHOD(Phalcon_Autoload_Loader, __construct) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_BOOL(isDebug) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &isDebug_param); if (!isDebug_param) { isDebug = 0; } else { - isDebug = zephir_get_boolval(isDebug_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "sha256"); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "php"); - ZEPHIR_CALL_FUNCTION(&_2, "hash", NULL, 71, &_0, &_1); + ZEPHIR_CALL_FUNCTION(&_2, "hash", NULL, 72, &_0, &_1); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_0); ZVAL_STRING(&_0, "php"); @@ -157,21 +150,15 @@ PHP_METHOD(Phalcon_Autoload_Loader, addClass) ZVAL_UNDEF(&name); ZVAL_UNDEF(&file); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(name) Z_PARAM_STR(file) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &name_param, &file_param); zephir_get_strval(&name, name_param); zephir_get_strval(&file, file_param); - - zephir_update_property_array(this_ptr, SL("classes"), &name, &file); RETURN_THIS(); } @@ -194,22 +181,16 @@ PHP_METHOD(Phalcon_Autoload_Loader, addDirectory) ZVAL_UNDEF(&directory); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(directory) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &directory_param); zephir_get_strval(&directory, directory_param); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "sha256"); - ZEPHIR_CALL_FUNCTION(&_1, "hash", NULL, 71, &_0, &directory); + ZEPHIR_CALL_FUNCTION(&_1, "hash", NULL, 72, &_0, &directory); zephir_check_call_status(); zephir_update_property_array(this_ptr, SL("directories"), &_1, &directory); RETURN_THIS(); @@ -233,22 +214,16 @@ PHP_METHOD(Phalcon_Autoload_Loader, addExtension) ZVAL_UNDEF(&extension); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(extension) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &extension_param); zephir_get_strval(&extension, extension_param); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "sha256"); - ZEPHIR_CALL_FUNCTION(&_1, "hash", NULL, 71, &_0, &extension); + ZEPHIR_CALL_FUNCTION(&_1, "hash", NULL, 72, &_0, &extension); zephir_check_call_status(); zephir_update_property_array(this_ptr, SL("extensions"), &_1, &extension); RETURN_THIS(); @@ -272,22 +247,16 @@ PHP_METHOD(Phalcon_Autoload_Loader, addFile) ZVAL_UNDEF(&file); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(file) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &file_param); zephir_get_strval(&file, file_param); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "sha256"); - ZEPHIR_CALL_FUNCTION(&_1, "hash", NULL, 71, &_0, &file); + ZEPHIR_CALL_FUNCTION(&_1, "hash", NULL, 72, &_0, &file); zephir_check_call_status(); zephir_update_property_array(this_ptr, SL("files"), &_1, &file); RETURN_THIS(); @@ -325,28 +294,21 @@ PHP_METHOD(Phalcon_Autoload_Loader, addNamespace) ZVAL_UNDEF(&_6); ZVAL_UNDEF(&_7); ZVAL_UNDEF(&_4$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(name) Z_PARAM_ZVAL(directories) Z_PARAM_OPTIONAL Z_PARAM_BOOL(prepend) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &name_param, &directories, &prepend_param); zephir_get_strval(&name, name_param); ZEPHIR_SEPARATE_PARAM(directories); if (!prepend_param) { prepend = 0; } else { - prepend = zephir_get_boolval(prepend_param); - } - - + } ZEPHIR_CPY_WRT(&nsName, &name); ZEPHIR_INIT_VAR(&nsSeparator); ZVAL_STRING(&nsSeparator, "\\"); @@ -357,7 +319,7 @@ PHP_METHOD(Phalcon_Autoload_Loader, addNamespace) ZEPHIR_INIT_VAR(&_1); ZEPHIR_CONCAT_VV(&_1, &_0, &nsSeparator); ZEPHIR_CPY_WRT(&nsName, &_1); - ZEPHIR_CALL_METHOD(&_2, this_ptr, "checkdirectories", NULL, 178, directories, &dirSeparator); + ZEPHIR_CALL_METHOD(&_2, this_ptr, "checkdirectories", NULL, 179, directories, &dirSeparator); zephir_check_call_status(); ZEPHIR_CPY_WRT(directories, &_2); zephir_read_property(&_3, this_ptr, ZEND_STRL("namespaces"), PH_NOISY_CC | PH_READONLY); @@ -375,14 +337,14 @@ PHP_METHOD(Phalcon_Autoload_Loader, addNamespace) } if (prepend) { zephir_read_property(&_6, this_ptr, ZEND_STRL("namespaces"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_OBS_VAR(&target); + zephir_memory_observe(&target); zephir_array_fetch(&target, &_6, &nsName, PH_NOISY, "phalcon/Autoload/Loader.zep", 170); } else { ZEPHIR_CPY_WRT(&target, directories); } ZEPHIR_INIT_VAR(&_7); zephir_fast_array_merge(&_7, &source, &target); - ZEPHIR_CALL_FUNCTION(&_2, "array_unique", NULL, 179, &_7); + ZEPHIR_CALL_FUNCTION(&_2, "array_unique", NULL, 180, &_7); zephir_check_call_status(); zephir_update_property_array(this_ptr, SL("namespaces"), &nsName, &_2); RETURN_THIS(); @@ -415,58 +377,52 @@ PHP_METHOD(Phalcon_Autoload_Loader, autoload) ZVAL_UNDEF(&_7); ZVAL_UNDEF(&_8); ZVAL_UNDEF(&_9); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(className) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &className_param); zephir_get_strval(&className, className_param); - - ZEPHIR_INIT_VAR(&_0); array_init(&_0); zephir_update_property_zval(this_ptr, ZEND_STRL("debug"), &_0); ZEPHIR_INIT_VAR(&_1); ZEPHIR_CONCAT_SV(&_1, "Loading: ", &className); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "adddebug", NULL, 180, &_1); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "adddebug", NULL, 181, &_1); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_2); ZVAL_STRING(&_2, "loader:beforeCheckClass"); ZEPHIR_CALL_METHOD(NULL, this_ptr, "firemanagerevent", NULL, 0, &_2, &className); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_3, this_ptr, "autoloadcheckclasses", NULL, 181, &className); + ZEPHIR_CALL_METHOD(&_3, this_ptr, "autoloadcheckclasses", NULL, 182, &className); zephir_check_call_status(); if (ZEPHIR_IS_TRUE_IDENTICAL(&_3)) { RETURN_MM_BOOL(1); } ZEPHIR_INIT_VAR(&_4); ZEPHIR_CONCAT_SV(&_4, "Class: 404: ", &className); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "adddebug", NULL, 180, &_4); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "adddebug", NULL, 181, &_4); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_5, this_ptr, "autoloadchecknamespaces", NULL, 182, &className); + ZEPHIR_CALL_METHOD(&_5, this_ptr, "autoloadchecknamespaces", NULL, 183, &className); zephir_check_call_status(); if (ZEPHIR_IS_TRUE_IDENTICAL(&_5)) { RETURN_MM_BOOL(1); } ZEPHIR_INIT_VAR(&_6); ZEPHIR_CONCAT_SV(&_6, "Namespace: 404: ", &className); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "adddebug", NULL, 180, &_6); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "adddebug", NULL, 181, &_6); zephir_check_call_status(); zephir_read_property(&_8, this_ptr, ZEND_STRL("directories"), PH_NOISY_CC | PH_READONLY); ZVAL_BOOL(&_9, 1); - ZEPHIR_CALL_METHOD(&_7, this_ptr, "autoloadcheckdirectories", NULL, 183, &_8, &className, &_9); + ZEPHIR_CALL_METHOD(&_7, this_ptr, "autoloadcheckdirectories", NULL, 184, &_8, &className, &_9); zephir_check_call_status(); if (ZEPHIR_IS_TRUE_IDENTICAL(&_7)) { RETURN_MM_BOOL(1); } ZEPHIR_INIT_VAR(&_10); ZEPHIR_CONCAT_SV(&_10, "Directories: 404: ", &className); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "adddebug", NULL, 180, &_10); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "adddebug", NULL, 181, &_10); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_2); ZVAL_STRING(&_2, "loader:afterCheckClass"); @@ -482,9 +438,6 @@ PHP_METHOD(Phalcon_Autoload_Loader, autoload) */ PHP_METHOD(Phalcon_Autoload_Loader, getCheckedPath) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "checkedPath"); } @@ -496,9 +449,6 @@ PHP_METHOD(Phalcon_Autoload_Loader, getCheckedPath) */ PHP_METHOD(Phalcon_Autoload_Loader, getClasses) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "classes"); } @@ -510,9 +460,6 @@ PHP_METHOD(Phalcon_Autoload_Loader, getClasses) */ PHP_METHOD(Phalcon_Autoload_Loader, getDebug) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "debug"); } @@ -524,9 +471,6 @@ PHP_METHOD(Phalcon_Autoload_Loader, getDebug) */ PHP_METHOD(Phalcon_Autoload_Loader, getDirectories) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "directories"); } @@ -538,9 +482,6 @@ PHP_METHOD(Phalcon_Autoload_Loader, getDirectories) */ PHP_METHOD(Phalcon_Autoload_Loader, getExtensions) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "extensions"); } @@ -552,9 +493,6 @@ PHP_METHOD(Phalcon_Autoload_Loader, getExtensions) */ PHP_METHOD(Phalcon_Autoload_Loader, getFiles) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "files"); } @@ -566,9 +504,6 @@ PHP_METHOD(Phalcon_Autoload_Loader, getFiles) */ PHP_METHOD(Phalcon_Autoload_Loader, getFoundPath) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "foundPath"); } @@ -580,9 +515,6 @@ PHP_METHOD(Phalcon_Autoload_Loader, getFoundPath) */ PHP_METHOD(Phalcon_Autoload_Loader, getNamespaces) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "namespaces"); } @@ -608,9 +540,8 @@ PHP_METHOD(Phalcon_Autoload_Loader, loadFiles) ZVAL_UNDEF(&_8$$5); ZVAL_UNDEF(&_9$$5); ZVAL_UNDEF(&_10$$6); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("files"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&files, &_0); @@ -684,24 +615,17 @@ PHP_METHOD(Phalcon_Autoload_Loader, register) ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_BOOL(prepend) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &prepend_param); if (!prepend_param) { prepend = 0; } else { - prepend = zephir_get_boolval(prepend_param); - } - - + } zephir_read_property(&_0, this_ptr, ZEND_STRL("isRegistered"), PH_NOISY_CC | PH_READONLY); if (!ZEPHIR_IS_TRUE_IDENTICAL(&_0)) { ZEPHIR_CALL_METHOD(NULL, this_ptr, "loadfiles", NULL, 0); @@ -713,7 +637,7 @@ PHP_METHOD(Phalcon_Autoload_Loader, register) ZVAL_STRING(&_2$$3, "autoload"); zephir_array_fast_append(&_1$$3, &_2$$3); ZVAL_BOOL(&_3$$3, (prepend ? 1 : 0)); - ZEPHIR_CALL_FUNCTION(NULL, "spl_autoload_register", NULL, 184, &_1$$3, &__$true, &_3$$3); + ZEPHIR_CALL_FUNCTION(NULL, "spl_autoload_register", NULL, 185, &_1$$3, &__$true, &_3$$3); zephir_check_call_status(); if (1) { zephir_update_property_zval(this_ptr, ZEND_STRL("isRegistered"), &__$true); @@ -749,26 +673,19 @@ PHP_METHOD(Phalcon_Autoload_Loader, setClasses) ZVAL_UNDEF(&name); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_0$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(classes) Z_PARAM_OPTIONAL Z_PARAM_BOOL(merge) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &classes_param, &merge_param); zephir_get_arrval(&classes, classes_param); if (!merge_param) { merge = 0; } else { - merge = zephir_get_boolval(merge_param); - } - - + } if (!merge) { ZEPHIR_INIT_VAR(&_0$$3); array_init(&_0$$3); @@ -834,26 +751,19 @@ PHP_METHOD(Phalcon_Autoload_Loader, setDirectories) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(directories) Z_PARAM_OPTIONAL Z_PARAM_BOOL(merge) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &directories_param, &merge_param); zephir_get_arrval(&directories, directories_param); if (!merge_param) { merge = 0; } else { - merge = zephir_get_boolval(merge_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "directories"); ZEPHIR_INIT_VAR(&_1); @@ -863,7 +773,7 @@ PHP_METHOD(Phalcon_Autoload_Loader, setDirectories) } else { ZVAL_BOOL(&_2, 0); } - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "addtocollection", NULL, 185, &directories, &_0, &_1, &_2); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "addtocollection", NULL, 186, &directories, &_0, &_1, &_2); zephir_check_call_status(); RETURN_MM(); } @@ -894,26 +804,19 @@ PHP_METHOD(Phalcon_Autoload_Loader, setExtensions) ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(extensions) Z_PARAM_OPTIONAL Z_PARAM_BOOL(merge) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &extensions_param, &merge_param); zephir_get_arrval(&extensions, extensions_param); if (!merge_param) { merge = 0; } else { - merge = zephir_get_boolval(merge_param); - } - - + } if (!merge) { ZEPHIR_INIT_VAR(&_0$$3); array_init(&_0$$3); @@ -922,7 +825,7 @@ PHP_METHOD(Phalcon_Autoload_Loader, setExtensions) ZVAL_STRING(&_1$$3, "sha256"); ZEPHIR_INIT_VAR(&_2$$3); ZVAL_STRING(&_2$$3, "php"); - ZEPHIR_CALL_FUNCTION(&_3$$3, "hash", NULL, 71, &_1$$3, &_2$$3); + ZEPHIR_CALL_FUNCTION(&_3$$3, "hash", NULL, 72, &_1$$3, &_2$$3); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_1$$3); ZVAL_STRING(&_1$$3, "php"); @@ -987,23 +890,18 @@ PHP_METHOD(Phalcon_Autoload_Loader, setFileCheckingCallback) ZVAL_UNDEF(&method_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0$$4); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(method) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &method); if (!method) { method = &method_sub; method = &__$null; } - - if (1 == zephir_is_callable(method)) { zephir_update_property_zval(this_ptr, ZEND_STRL("fileCheckingCallback"), method); } else if (Z_TYPE_P(method) == IS_NULL) { @@ -1040,26 +938,19 @@ PHP_METHOD(Phalcon_Autoload_Loader, setFiles) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(files) Z_PARAM_OPTIONAL Z_PARAM_BOOL(merge) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &files_param, &merge_param); zephir_get_arrval(&files, files_param); if (!merge_param) { merge = 0; } else { - merge = zephir_get_boolval(merge_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "files"); ZEPHIR_INIT_VAR(&_1); @@ -1069,7 +960,7 @@ PHP_METHOD(Phalcon_Autoload_Loader, setFiles) } else { ZVAL_BOOL(&_2, 0); } - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "addtocollection", NULL, 185, &files, &_0, &_1, &_2); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "addtocollection", NULL, 186, &files, &_0, &_1, &_2); zephir_check_call_status(); RETURN_MM(); } @@ -1102,26 +993,19 @@ PHP_METHOD(Phalcon_Autoload_Loader, setNamespaces) ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_5$$4); ZVAL_UNDEF(&_8$$5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(namespaces) Z_PARAM_OPTIONAL Z_PARAM_BOOL(merge) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &namespaces_param, &merge_param); zephir_get_arrval(&namespaces, namespaces_param); if (!merge_param) { merge = 0; } else { - merge = zephir_get_boolval(merge_param); - } - - + } ZEPHIR_INIT_VAR(&dirSeparator); ZVAL_STRING(&dirSeparator, "/"); if (!merge) { @@ -1141,7 +1025,7 @@ PHP_METHOD(Phalcon_Autoload_Loader, setNamespaces) } ZEPHIR_INIT_NVAR(&directories); ZVAL_COPY(&directories, _1); - ZEPHIR_CALL_METHOD(&_5$$4, this_ptr, "checkdirectories", &_6, 178, &directories, &dirSeparator); + ZEPHIR_CALL_METHOD(&_5$$4, this_ptr, "checkdirectories", &_6, 179, &directories, &dirSeparator); zephir_check_call_status(); ZEPHIR_CPY_WRT(&directories, &_5$$4); ZEPHIR_CALL_METHOD(NULL, this_ptr, "addnamespace", &_7, 0, &name, &directories); @@ -1160,7 +1044,7 @@ PHP_METHOD(Phalcon_Autoload_Loader, setNamespaces) zephir_check_call_status(); ZEPHIR_CALL_METHOD(&directories, &namespaces, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_8$$5, this_ptr, "checkdirectories", &_6, 178, &directories, &dirSeparator); + ZEPHIR_CALL_METHOD(&_8$$5, this_ptr, "checkdirectories", &_6, 179, &directories, &dirSeparator); zephir_check_call_status(); ZEPHIR_CPY_WRT(&directories, &_8$$5); ZEPHIR_CALL_METHOD(NULL, this_ptr, "addnamespace", &_7, 0, &name, &directories); @@ -1192,9 +1076,8 @@ PHP_METHOD(Phalcon_Autoload_Loader, unregister) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_1$$3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("isRegistered"), PH_NOISY_CC | PH_READONLY); if (ZEPHIR_IS_TRUE_IDENTICAL(&_0)) { @@ -1204,7 +1087,7 @@ PHP_METHOD(Phalcon_Autoload_Loader, unregister) ZEPHIR_INIT_VAR(&_2$$3); ZVAL_STRING(&_2$$3, "autoload"); zephir_array_fast_append(&_1$$3, &_2$$3); - ZEPHIR_CALL_FUNCTION(NULL, "spl_autoload_unregister", NULL, 186, &_1$$3); + ZEPHIR_CALL_FUNCTION(NULL, "spl_autoload_unregister", NULL, 187, &_1$$3); zephir_check_call_status(); if (0) { zephir_update_property_zval(this_ptr, ZEND_STRL("isRegistered"), &__$true); @@ -1222,9 +1105,6 @@ PHP_METHOD(Phalcon_Autoload_Loader, unregister) */ PHP_METHOD(Phalcon_Autoload_Loader, isRegistered) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "isRegistered"); } @@ -1250,21 +1130,15 @@ PHP_METHOD(Phalcon_Autoload_Loader, requireFile) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(file) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &file_param); zephir_get_strval(&file, file_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("fileCheckingCallback"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&_1, "call_user_func", NULL, 187, &_0, &file); + ZEPHIR_CALL_FUNCTION(&_1, "call_user_func", NULL, 188, &_0, &file); zephir_check_call_status(); if (!ZEPHIR_IS_FALSE_IDENTICAL(&_1)) { ZEPHIR_INIT_VAR(&_2$$3); @@ -1273,7 +1147,7 @@ PHP_METHOD(Phalcon_Autoload_Loader, requireFile) zephir_check_call_status(); ZEPHIR_INIT_VAR(&_3$$3); ZEPHIR_CONCAT_SV(&_3$$3, "Require: ", &file); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "adddebug", NULL, 180, &_3$$3); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "adddebug", NULL, 181, &_3$$3); zephir_check_call_status(); if (zephir_require_once_zval(&file) == FAILURE) { RETURN_MM_NULL(); @@ -1282,7 +1156,7 @@ PHP_METHOD(Phalcon_Autoload_Loader, requireFile) } ZEPHIR_INIT_VAR(&_4); ZEPHIR_CONCAT_SV(&_4, "Require: 404: ", &file); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "adddebug", NULL, 180, &_4); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "adddebug", NULL, 181, &_4); zephir_check_call_status(); RETURN_MM_BOOL(0); } @@ -1301,19 +1175,13 @@ PHP_METHOD(Phalcon_Autoload_Loader, addDebug) ZVAL_UNDEF(&message); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(message) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &message_param); zephir_get_strval(&message, message_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("isDebug"), PH_NOISY_CC | PH_READONLY); if (ZEPHIR_IS_TRUE_IDENTICAL(&_0)) { zephir_update_property_array_append(this_ptr, SL("debug"), &message); @@ -1348,8 +1216,6 @@ PHP_METHOD(Phalcon_Autoload_Loader, addToCollection) ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&collectionName); ZVAL_UNDEF(&method); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 4) Z_PARAM_ARRAY(collection) Z_PARAM_STR(collectionName) @@ -1357,10 +1223,8 @@ PHP_METHOD(Phalcon_Autoload_Loader, addToCollection) Z_PARAM_OPTIONAL Z_PARAM_BOOL(merge) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 1, &collection_param, &collectionName_param, &method_param, &merge_param); zephir_get_arrval(&collection, collection_param); zephir_get_strval(&collectionName, collectionName_param); @@ -1368,10 +1232,7 @@ PHP_METHOD(Phalcon_Autoload_Loader, addToCollection) if (!merge_param) { merge = 0; } else { - merge = zephir_get_boolval(merge_param); - } - - + } if (!merge) { ZEPHIR_INIT_VAR(&_0$$3); array_init(&_0$$3); @@ -1429,23 +1290,17 @@ PHP_METHOD(Phalcon_Autoload_Loader, autoloadCheckClasses) ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(className) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &className_param); zephir_get_strval(&className, className_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("classes"), PH_NOISY_CC | PH_READONLY); if (1 == zephir_array_isset(&_0, &className)) { zephir_read_property(&_1$$3, this_ptr, ZEND_STRL("classes"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_OBS_VAR(&filePath); + zephir_memory_observe(&filePath); zephir_array_fetch(&filePath, &_1$$3, &className, PH_NOISY, "phalcon/Autoload/Loader.zep", 610); ZEPHIR_INIT_VAR(&_2$$3); ZVAL_STRING(&_2$$3, "loader:pathFound"); @@ -1455,7 +1310,7 @@ PHP_METHOD(Phalcon_Autoload_Loader, autoloadCheckClasses) zephir_check_call_status(); ZEPHIR_INIT_VAR(&_3$$3); ZEPHIR_CONCAT_SV(&_3$$3, "Class: load: ", &filePath); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "adddebug", NULL, 180, &_3$$3); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "adddebug", NULL, 181, &_3$$3); zephir_check_call_status(); RETURN_MM_BOOL(1); } @@ -1510,28 +1365,21 @@ PHP_METHOD(Phalcon_Autoload_Loader, autoloadCheckDirectories) ZVAL_UNDEF(&_22$$14); ZVAL_UNDEF(&_23$$14); ZVAL_UNDEF(&_24$$16); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_ARRAY(directories) Z_PARAM_STR(className) Z_PARAM_OPTIONAL Z_PARAM_BOOL(isDirectory) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &directories_param, &className_param, &isDirectory_param); zephir_get_arrval(&directories, directories_param); zephir_get_strval(&className, className_param); if (!isDirectory_param) { isDirectory = 0; } else { - isDirectory = zephir_get_boolval(isDirectory_param); - } - - + } ZEPHIR_INIT_VAR(&dirSeparator); ZVAL_STRING(&dirSeparator, "/"); ZEPHIR_INIT_VAR(&nsSeparator); @@ -1570,7 +1418,7 @@ PHP_METHOD(Phalcon_Autoload_Loader, autoloadCheckDirectories) if (isDirectory) { ZEPHIR_INIT_NVAR(&_11$$6); ZEPHIR_CONCAT_SV(&_11$$6, "Directories: ", &filePath); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "adddebug", &_12, 180, &_11$$6); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "adddebug", &_12, 181, &_11$$6); zephir_check_call_status(); } RETURN_MM_BOOL(1); @@ -1600,7 +1448,7 @@ PHP_METHOD(Phalcon_Autoload_Loader, autoloadCheckDirectories) if (isDirectory) { ZEPHIR_INIT_NVAR(&_15$$9); ZEPHIR_CONCAT_SV(&_15$$9, "Directories: ", &filePath); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "adddebug", &_12, 180, &_15$$9); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "adddebug", &_12, 181, &_15$$9); zephir_check_call_status(); } RETURN_MM_BOOL(1); @@ -1645,7 +1493,7 @@ PHP_METHOD(Phalcon_Autoload_Loader, autoloadCheckDirectories) if (isDirectory) { ZEPHIR_INIT_NVAR(&_21$$13); ZEPHIR_CONCAT_SV(&_21$$13, "Directories: ", &filePath); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "adddebug", &_12, 180, &_21$$13); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "adddebug", &_12, 181, &_21$$13); zephir_check_call_status(); } RETURN_MM_BOOL(1); @@ -1675,7 +1523,7 @@ PHP_METHOD(Phalcon_Autoload_Loader, autoloadCheckDirectories) if (isDirectory) { ZEPHIR_INIT_NVAR(&_24$$16); ZEPHIR_CONCAT_SV(&_24$$16, "Directories: ", &filePath); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "adddebug", &_12, 180, &_24$$16); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "adddebug", &_12, 181, &_24$$16); zephir_check_call_status(); } RETURN_MM_BOOL(1); @@ -1732,19 +1580,13 @@ PHP_METHOD(Phalcon_Autoload_Loader, autoloadCheckNamespaces) ZVAL_UNDEF(&_16$$6); ZVAL_UNDEF(&_17$$8); ZVAL_UNDEF(&_18$$8); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(className) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &className_param); zephir_get_strval(&className, className_param); - - ZEPHIR_INIT_VAR(&nsSeparator); ZVAL_STRING(&nsSeparator, "\\"); zephir_read_property(&_0, this_ptr, ZEND_STRL("namespaces"), PH_NOISY_CC | PH_READONLY); @@ -1772,13 +1614,13 @@ PHP_METHOD(Phalcon_Autoload_Loader, autoloadCheckNamespaces) ZVAL_LONG(&_7$$3, zephir_fast_strlen_ev(&prefix)); ZEPHIR_INIT_NVAR(&fileName); zephir_substr(&fileName, &className, zephir_get_intval(&_7$$3), 0, ZEPHIR_SUBSTR_NO_LENGTH); - ZEPHIR_CALL_METHOD(&_8$$3, this_ptr, "autoloadcheckdirectories", &_9, 183, &directories, &fileName); + ZEPHIR_CALL_METHOD(&_8$$3, this_ptr, "autoloadcheckdirectories", &_9, 184, &directories, &fileName); zephir_check_call_status(); if (ZEPHIR_IS_TRUE_IDENTICAL(&_8$$3)) { zephir_read_property(&_10$$5, this_ptr, ZEND_STRL("checkedPath"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_NVAR(&_11$$5); ZEPHIR_CONCAT_SVSV(&_11$$5, "Namespace: ", &prefix, " - ", &_10$$5); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "adddebug", &_12, 180, &_11$$5); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "adddebug", &_12, 181, &_11$$5); zephir_check_call_status(); RETURN_MM_BOOL(1); } @@ -1807,13 +1649,13 @@ PHP_METHOD(Phalcon_Autoload_Loader, autoloadCheckNamespaces) ZVAL_LONG(&_15$$6, zephir_fast_strlen_ev(&prefix)); ZEPHIR_INIT_NVAR(&fileName); zephir_substr(&fileName, &className, zephir_get_intval(&_15$$6), 0, ZEPHIR_SUBSTR_NO_LENGTH); - ZEPHIR_CALL_METHOD(&_16$$6, this_ptr, "autoloadcheckdirectories", &_9, 183, &directories, &fileName); + ZEPHIR_CALL_METHOD(&_16$$6, this_ptr, "autoloadcheckdirectories", &_9, 184, &directories, &fileName); zephir_check_call_status(); if (ZEPHIR_IS_TRUE_IDENTICAL(&_16$$6)) { zephir_read_property(&_17$$8, this_ptr, ZEND_STRL("checkedPath"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_NVAR(&_18$$8); ZEPHIR_CONCAT_SVSV(&_18$$8, "Namespace: ", &prefix, " - ", &_17$$8); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "adddebug", &_12, 180, &_18$$8); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "adddebug", &_12, 181, &_18$$8); zephir_check_call_status(); RETURN_MM_BOOL(1); } @@ -1847,7 +1689,6 @@ PHP_METHOD(Phalcon_Autoload_Loader, checkDirectories) zend_long ZEPHIR_LAST_CALL_STATUS; zval dirSeparator; zval *directories = NULL, directories_sub, *dirSeparator_param = NULL, directory, *_2, _3, _1$$4, _4$$5, _5$$5, _6$$5, _7$$5, _9$$6, _10$$6, _11$$6, _12$$6; - zval *this_ptr = getThis(); ZVAL_UNDEF(&directories_sub); ZVAL_UNDEF(&directory); @@ -1863,21 +1704,15 @@ PHP_METHOD(Phalcon_Autoload_Loader, checkDirectories) ZVAL_UNDEF(&_12$$6); ZVAL_UNDEF(&dirSeparator); ZVAL_UNDEF(&results); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ZVAL(directories) Z_PARAM_STR(dirSeparator) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &directories, &dirSeparator_param); ZEPHIR_SEPARATE_PARAM(directories); zephir_get_strval(&dirSeparator, dirSeparator_param); - - _0 = !(Z_TYPE_P(directories) == IS_STRING); if (_0) { _0 = !(Z_TYPE_P(directories) == IS_ARRAY); @@ -1907,7 +1742,7 @@ PHP_METHOD(Phalcon_Autoload_Loader, checkDirectories) ZEPHIR_CPY_WRT(&directory, &_5$$5); ZEPHIR_INIT_NVAR(&_6$$5); ZVAL_STRING(&_6$$5, "sha256"); - ZEPHIR_CALL_FUNCTION(&_7$$5, "hash", &_8, 71, &_6$$5, &directory); + ZEPHIR_CALL_FUNCTION(&_7$$5, "hash", &_8, 72, &_6$$5, &directory); zephir_check_call_status(); zephir_array_update_zval(&results, &_7$$5, &directory, PH_COPY | PH_SEPARATE); } ZEND_HASH_FOREACH_END(); @@ -1929,7 +1764,7 @@ PHP_METHOD(Phalcon_Autoload_Loader, checkDirectories) ZEPHIR_CPY_WRT(&directory, &_10$$6); ZEPHIR_INIT_NVAR(&_11$$6); ZVAL_STRING(&_11$$6, "sha256"); - ZEPHIR_CALL_FUNCTION(&_12$$6, "hash", &_8, 71, &_11$$6, &directory); + ZEPHIR_CALL_FUNCTION(&_12$$6, "hash", &_8, 72, &_11$$6, &directory); zephir_check_call_status(); zephir_array_update_zval(&results, &_12$$6, &directory, PH_COPY | PH_SEPARATE); ZEPHIR_CALL_METHOD(NULL, directories, "next", NULL, 0); @@ -1958,7 +1793,8 @@ zend_object *zephir_init_properties_Phalcon_Autoload_Loader(zend_class_entry *cl ZVAL_UNDEF(&_11$$8); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/cache/abstractcache.zep.c b/ext/phalcon/cache/abstractcache.zep.c index 341181f32d0..754caad1c49 100644 --- a/ext/phalcon/cache/abstractcache.zep.c +++ b/ext/phalcon/cache/abstractcache.zep.c @@ -57,17 +57,10 @@ PHP_METHOD(Phalcon_Cache_AbstractCache, __construct) zval *this_ptr = getThis(); ZVAL_UNDEF(&adapter_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(adapter, phalcon_cache_adapter_adapterinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &adapter); - - zephir_update_property_zval(this_ptr, ZEND_STRL("adapter"), adapter); } @@ -78,9 +71,6 @@ PHP_METHOD(Phalcon_Cache_AbstractCache, __construct) */ PHP_METHOD(Phalcon_Cache_AbstractCache, getAdapter) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "adapter"); } @@ -110,19 +100,13 @@ PHP_METHOD(Phalcon_Cache_AbstractCache, checkKey) ZVAL_UNDEF(&_4$$3); ZVAL_UNDEF(&_5$$3); ZVAL_UNDEF(&_7$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); zephir_get_strval(&key, key_param); - - ZEPHIR_INIT_VAR(&_0); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "/[^A-Za-z0-9-_.]/"); @@ -172,18 +156,12 @@ PHP_METHOD(Phalcon_Cache_AbstractCache, checkKeys) ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_4$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(keys) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &keys); - - _0 = Z_TYPE_P(keys) == IS_ARRAY; if (!(_0)) { _0 = zephir_zval_is_traversable(keys); @@ -222,9 +200,8 @@ PHP_METHOD(Phalcon_Cache_AbstractCache, doClear) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("adapter"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_METHOD(&_0, "clear", NULL, 0); @@ -253,19 +230,13 @@ PHP_METHOD(Phalcon_Cache_AbstractCache, doDelete) ZVAL_UNDEF(&key); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); zephir_get_strval(&key, key_param); - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "checkkey", NULL, 0, &key); zephir_check_call_status(); zephir_read_property(&_0, this_ptr, ZEND_STRL("adapter"), PH_NOISY_CC | PH_READONLY); @@ -292,18 +263,12 @@ PHP_METHOD(Phalcon_Cache_AbstractCache, doDeleteMultiple) ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$5); ZVAL_UNDEF(&_5$$5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(keys) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &keys); - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "checkkeys", NULL, 0, keys); zephir_check_call_status(); result = 1; @@ -369,25 +334,20 @@ PHP_METHOD(Phalcon_Cache_AbstractCache, doGet) ZVAL_UNDEF(&defaultValue_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(key) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(defaultValue) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &key_param, &defaultValue); zephir_get_strval(&key, key_param); if (!defaultValue) { defaultValue = &defaultValue_sub; defaultValue = &__$null; } - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "checkkey", NULL, 0, &key); zephir_check_call_status(); zephir_read_property(&_0, this_ptr, ZEND_STRL("adapter"), PH_NOISY_CC | PH_READONLY); @@ -415,24 +375,19 @@ PHP_METHOD(Phalcon_Cache_AbstractCache, doGetMultiple) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_4$$4); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ZVAL(keys) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(defaultValue) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &keys, &defaultValue); if (!defaultValue) { defaultValue = &defaultValue_sub; defaultValue = &__$null; } - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "checkkeys", NULL, 0, keys); zephir_check_call_status(); ZEPHIR_INIT_VAR(&results); @@ -489,19 +444,13 @@ PHP_METHOD(Phalcon_Cache_AbstractCache, doHas) ZVAL_UNDEF(&key); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); zephir_get_strval(&key, key_param); - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "checkkey", NULL, 0, &key); zephir_check_call_status(); zephir_read_property(&_0, this_ptr, ZEND_STRL("adapter"), PH_NOISY_CC | PH_READONLY); @@ -541,7 +490,6 @@ PHP_METHOD(Phalcon_Cache_AbstractCache, doSet) ZVAL_UNDEF(&ttl_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(key) @@ -549,18 +497,14 @@ PHP_METHOD(Phalcon_Cache_AbstractCache, doSet) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(ttl) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &key_param, &value, &ttl); zephir_get_strval(&key, key_param); if (!ttl) { ttl = &ttl_sub; ttl = &__$null; } - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "checkkey", NULL, 0, &key); zephir_check_call_status(); zephir_read_property(&_0, this_ptr, ZEND_STRL("adapter"), PH_NOISY_CC | PH_READONLY); @@ -591,24 +535,19 @@ PHP_METHOD(Phalcon_Cache_AbstractCache, doSetMultiple) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_4$$3); ZVAL_UNDEF(&_6$$5); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ZVAL(values) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(ttl) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &values, &ttl); if (!ttl) { ttl = &ttl_sub; ttl = &__$null; } - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "checkkeys", NULL, 0, values); zephir_check_call_status(); result = 1; diff --git a/ext/phalcon/cache/adapterfactory.zep.c b/ext/phalcon/cache/adapterfactory.zep.c index 0f5e02cb418..b63e4927f97 100644 --- a/ext/phalcon/cache/adapterfactory.zep.c +++ b/ext/phalcon/cache/adapterfactory.zep.c @@ -59,17 +59,13 @@ PHP_METHOD(Phalcon_Cache_AdapterFactory, __construct) ZVAL_UNDEF(&factory_sub); ZVAL_UNDEF(&services); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_OBJECT_OF_CLASS(factory, phalcon_storage_serializerfactory_ce) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(services) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &factory, &services_param); if (!services_param) { ZEPHIR_INIT_VAR(&services); @@ -77,8 +73,6 @@ PHP_METHOD(Phalcon_Cache_AdapterFactory, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&services, services_param); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("serializerFactory"), factory); ZEPHIR_CALL_METHOD(NULL, this_ptr, "init", NULL, 0, &services); zephir_check_call_status(); @@ -127,17 +121,13 @@ PHP_METHOD(Phalcon_Cache_AdapterFactory, newInstance) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&options); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(name) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &name_param, &options_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")); @@ -154,13 +144,11 @@ PHP_METHOD(Phalcon_Cache_AdapterFactory, newInstance) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - ZEPHIR_CALL_METHOD(&definition, this_ptr, "getservice", NULL, 0, &name); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_0); zephir_create_array(&_0, 2, 0); - ZEPHIR_OBS_VAR(&_1); + zephir_memory_observe(&_1); zephir_read_property(&_1, this_ptr, ZEND_STRL("serializerFactory"), PH_NOISY_CC); zephir_array_fast_append(&_0, &_1); zephir_array_fast_append(&_0, &options); @@ -174,9 +162,6 @@ PHP_METHOD(Phalcon_Cache_AdapterFactory, newInstance) */ PHP_METHOD(Phalcon_Cache_AdapterFactory, getExceptionClass) { - zval *this_ptr = getThis(); - - RETURN_STRING("Phalcon\\Cache\\Exception\\Exception"); } @@ -188,9 +173,6 @@ PHP_METHOD(Phalcon_Cache_AdapterFactory, getExceptionClass) */ PHP_METHOD(Phalcon_Cache_AdapterFactory, getServices) { - zval *this_ptr = getThis(); - - zephir_create_array(return_value, 6, 0); add_assoc_stringl_ex(return_value, SL("apcu"), SL("Phalcon\\Cache\\Adapter\\Apcu")); diff --git a/ext/phalcon/cache/adapterfactory.zep.h b/ext/phalcon/cache/adapterfactory.zep.h index fa7bb21965f..b72e7902430 100644 --- a/ext/phalcon/cache/adapterfactory.zep.h +++ b/ext/phalcon/cache/adapterfactory.zep.h @@ -10,20 +10,12 @@ PHP_METHOD(Phalcon_Cache_AdapterFactory, getServices); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_cache_adapterfactory___construct, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, factory, Phalcon\\Storage\\SerializerFactory, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, services, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, services, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, services, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_cache_adapterfactory_newinstance, 0, 1, Phalcon\\Cache\\Adapter\\AdapterInterface, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_cache_adapterfactory_getexceptionclass, 0, 0, IS_STRING, 0) diff --git a/ext/phalcon/cache/cache.zep.c b/ext/phalcon/cache/cache.zep.c index 5ee8f447d7b..83a76aaba10 100644 --- a/ext/phalcon/cache/cache.zep.c +++ b/ext/phalcon/cache/cache.zep.c @@ -46,10 +46,8 @@ PHP_METHOD(Phalcon_Cache_Cache, clear) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *this_ptr = getThis(); - - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "doclear", NULL, 0); zephir_check_call_status(); @@ -76,19 +74,13 @@ PHP_METHOD(Phalcon_Cache_Cache, delete) zval *this_ptr = getThis(); ZVAL_UNDEF(&key); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); zephir_get_strval(&key, key_param); - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "dodelete", NULL, 0, &key); zephir_check_call_status(); RETURN_MM(); @@ -105,18 +97,12 @@ PHP_METHOD(Phalcon_Cache_Cache, deleteMultiple) zval *this_ptr = getThis(); ZVAL_UNDEF(&keys_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(keys) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &keys); - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "dodeletemultiple", NULL, 0, keys); zephir_check_call_status(); RETURN_MM(); @@ -145,25 +131,20 @@ PHP_METHOD(Phalcon_Cache_Cache, get) ZVAL_UNDEF(&key); ZVAL_UNDEF(&defaultValue_sub); ZVAL_NULL(&__$null); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(key) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(defaultValue) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &key_param, &defaultValue); zephir_get_strval(&key, key_param); if (!defaultValue) { defaultValue = &defaultValue_sub; defaultValue = &__$null; } - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "doget", NULL, 0, &key, defaultValue); zephir_check_call_status(); RETURN_MM(); @@ -182,24 +163,19 @@ PHP_METHOD(Phalcon_Cache_Cache, getMultiple) ZVAL_UNDEF(&keys_sub); ZVAL_UNDEF(&defaultValue_sub); ZVAL_NULL(&__$null); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ZVAL(keys) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(defaultValue) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &keys, &defaultValue); if (!defaultValue) { defaultValue = &defaultValue_sub; defaultValue = &__$null; } - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "dogetmultiple", NULL, 0, keys, defaultValue); zephir_check_call_status(); RETURN_MM(); @@ -224,19 +200,13 @@ PHP_METHOD(Phalcon_Cache_Cache, has) zval *this_ptr = getThis(); ZVAL_UNDEF(&key); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); zephir_get_strval(&key, key_param); - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "dohas", NULL, 0, &key); zephir_check_call_status(); RETURN_MM(); @@ -272,7 +242,6 @@ PHP_METHOD(Phalcon_Cache_Cache, set) ZVAL_UNDEF(&value_sub); ZVAL_UNDEF(&ttl_sub); ZVAL_NULL(&__$null); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(key) @@ -280,18 +249,14 @@ PHP_METHOD(Phalcon_Cache_Cache, set) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(ttl) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &key_param, &value, &ttl); zephir_get_strval(&key, key_param); if (!ttl) { ttl = &ttl_sub; ttl = &__$null; } - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "doset", NULL, 0, &key, value, ttl); zephir_check_call_status(); RETURN_MM(); @@ -310,24 +275,19 @@ PHP_METHOD(Phalcon_Cache_Cache, setMultiple) ZVAL_UNDEF(&values_sub); ZVAL_UNDEF(&ttl_sub); ZVAL_NULL(&__$null); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ZVAL(values) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(ttl) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &values, &ttl); if (!ttl) { ttl = &ttl_sub; ttl = &__$null; } - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "dosetmultiple", NULL, 0, values, ttl); zephir_check_call_status(); RETURN_MM(); @@ -340,9 +300,6 @@ PHP_METHOD(Phalcon_Cache_Cache, setMultiple) */ PHP_METHOD(Phalcon_Cache_Cache, getExceptionClass) { - zval *this_ptr = getThis(); - - RETURN_STRING("Phalcon\\Cache\\Exception\\InvalidArgumentException"); } diff --git a/ext/phalcon/cache/cachefactory.zep.c b/ext/phalcon/cache/cachefactory.zep.c index 188ea603e8d..dd0a1581986 100644 --- a/ext/phalcon/cache/cachefactory.zep.c +++ b/ext/phalcon/cache/cachefactory.zep.c @@ -52,17 +52,10 @@ PHP_METHOD(Phalcon_Cache_CacheFactory, __construct) zval *this_ptr = getThis(); ZVAL_UNDEF(&factory_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(factory, phalcon_cache_adapterfactory_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &factory); - - zephir_update_property_zval(this_ptr, ZEND_STRL("adapterFactory"), factory); } @@ -108,19 +101,13 @@ PHP_METHOD(Phalcon_Cache_CacheFactory, load) ZVAL_UNDEF(&options); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(config) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &config); ZEPHIR_SEPARATE_PARAM(config); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "checkconfig", NULL, 0, config); zephir_check_call_status(); ZEPHIR_CPY_WRT(config, &_0); @@ -129,9 +116,9 @@ PHP_METHOD(Phalcon_Cache_CacheFactory, load) ZEPHIR_CALL_METHOD(&_0, this_ptr, "checkconfigelement", NULL, 0, config, &_1); zephir_check_call_status(); ZEPHIR_CPY_WRT(config, &_0); - ZEPHIR_OBS_VAR(&name); + zephir_memory_observe(&name); zephir_array_fetch_string(&name, config, SL("adapter"), PH_NOISY, "phalcon/Cache/CacheFactory.zep", 73); - ZEPHIR_OBS_VAR(&options); + zephir_memory_observe(&options); if (!(zephir_array_isset_string_fetch(&options, config, SL("options"), 0))) { ZEPHIR_INIT_NVAR(&options); array_init(&options); @@ -182,17 +169,13 @@ PHP_METHOD(Phalcon_Cache_CacheFactory, newInstance) ZVAL_UNDEF(&adapter); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(name) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &name_param, &options_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")); @@ -209,13 +192,11 @@ PHP_METHOD(Phalcon_Cache_CacheFactory, newInstance) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("adapterFactory"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&adapter, &_0, "newinstance", NULL, 0, &name, &options); zephir_check_call_status(); object_init_ex(return_value, phalcon_cache_cache_ce); - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 188, &adapter); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 189, &adapter); zephir_check_call_status(); RETURN_MM(); } @@ -225,9 +206,6 @@ PHP_METHOD(Phalcon_Cache_CacheFactory, newInstance) */ PHP_METHOD(Phalcon_Cache_CacheFactory, getExceptionClass) { - zval *this_ptr = getThis(); - - RETURN_STRING("Phalcon\\Cache\\Exception\\Exception"); } diff --git a/ext/phalcon/cache/cachefactory.zep.h b/ext/phalcon/cache/cachefactory.zep.h index dd359eabc2f..e651692af78 100644 --- a/ext/phalcon/cache/cachefactory.zep.h +++ b/ext/phalcon/cache/cachefactory.zep.h @@ -18,11 +18,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_cache_cachefactory_newinstance, 0, 1, Phalcon\\Cache\\CacheInterface, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_cache_cachefactory_getexceptionclass, 0, 0, IS_STRING, 0) diff --git a/ext/phalcon/cli/console.zep.c b/ext/phalcon/cli/console.zep.c index d564de32d28..e22dc87e1aa 100644 --- a/ext/phalcon/cli/console.zep.c +++ b/ext/phalcon/cli/console.zep.c @@ -113,24 +113,19 @@ PHP_METHOD(Phalcon_Cli_Console, handle) ZVAL_UNDEF(&_34$$20); ZVAL_UNDEF(&_36$$22); ZVAL_UNDEF(&_37$$22); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY_OR_NULL(arguments) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &arguments_param); if (!arguments_param) { ZEPHIR_INIT_VAR(&arguments); } else { zephir_get_arrval(&arguments, arguments_param); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("container"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_0) == IS_NULL) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_cli_console_exception_ce, "A dependency injection container is required to access internal services", "phalcon/Cli/Console.zep", 45); @@ -191,31 +186,31 @@ PHP_METHOD(Phalcon_Cli_Console, handle) object_init_ex(&_16$$12, phalcon_cli_console_exception_ce); ZEPHIR_INIT_VAR(&_17$$12); ZEPHIR_CONCAT_SVS(&_17$$12, "Module '", &moduleName, "' isn't registered in the console container"); - ZEPHIR_CALL_METHOD(NULL, &_16$$12, "__construct", NULL, 32, &_17$$12); + ZEPHIR_CALL_METHOD(NULL, &_16$$12, "__construct", NULL, 33, &_17$$12); zephir_check_call_status(); zephir_throw_exception_debug(&_16$$12, "phalcon/Cli/Console.zep", 87); ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_OBS_VAR(&module); + zephir_memory_observe(&module); zephir_array_fetch(&module, &modules, &moduleName, PH_NOISY, "phalcon/Cli/Console.zep", 90); if (UNEXPECTED(Z_TYPE_P(&module) != IS_ARRAY)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_cli_console_exception_ce, "Invalid module definition path", "phalcon/Cli/Console.zep", 93); return; } - ZEPHIR_OBS_VAR(&className); + zephir_memory_observe(&className); if (!(zephir_array_isset_string_fetch(&className, &module, SL("className"), 0))) { ZEPHIR_INIT_NVAR(&className); ZVAL_STRING(&className, "Module"); } - ZEPHIR_OBS_VAR(&path); + zephir_memory_observe(&path); if (zephir_array_isset_string_fetch(&path, &module, SL("path"), 0)) { if (UNEXPECTED(!((zephir_file_exists(&path) == SUCCESS)))) { ZEPHIR_INIT_VAR(&_18$$16); object_init_ex(&_18$$16, phalcon_cli_console_exception_ce); ZEPHIR_INIT_VAR(&_19$$16); ZEPHIR_CONCAT_SVS(&_19$$16, "Module definition path '", &path, "' doesn't exist"); - ZEPHIR_CALL_METHOD(NULL, &_18$$16, "__construct", NULL, 32, &_19$$16); + ZEPHIR_CALL_METHOD(NULL, &_18$$16, "__construct", NULL, 33, &_19$$16); zephir_check_call_status(); zephir_throw_exception_debug(&_18$$16, "phalcon/Cli/Console.zep", 104); ZEPHIR_MM_RESTORE(); @@ -303,10 +298,10 @@ PHP_METHOD(Phalcon_Cli_Console, handle) PHP_METHOD(Phalcon_Cli_Console, setArgument) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zephir_fcall_cache_entry *_6 = NULL, *_44 = NULL; + zephir_fcall_cache_entry *_6 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zend_bool str, shift, _0; - zval *arguments_param = NULL, *str_param = NULL, *shift_param = NULL, __$true, arg, pos, args, opts, handleArgs, *_1, _2, _3$$5, _4$$5, _5$$5, _7$$6, _8$$7, _9$$7, _10$$7, _11$$7, _12$$7, _13$$7, _14$$7, _15$$8, _16$$8, _17$$8, _18$$9, _19$$9, _20$$9, _21$$10, _22$$10, _23$$14, _24$$14, _25$$14, _26$$15, _27$$16, _28$$16, _29$$16, _30$$16, _31$$16, _32$$16, _33$$16, _34$$17, _35$$17, _36$$17, _37$$18, _38$$18, _39$$18, _40$$19, _41$$19, _42$$22, _43$$22, _45$$24, _46$$25, _47$$26; + zval *arguments_param = NULL, *str_param = NULL, *shift_param = NULL, __$true, arg, pos, args, opts, handleArgs, *_1, _2, _3$$5, _4$$5, _5$$5, _7$$6, _8$$7, _9$$7, _10$$7, _11$$7, _12$$7, _13$$7, _14$$7, _15$$8, _16$$8, _17$$8, _18$$9, _19$$9, _20$$9, _21$$10, _22$$10, _23$$14, _24$$14, _25$$14, _26$$15, _27$$16, _28$$16, _29$$16, _30$$16, _31$$16, _32$$16, _33$$16, _34$$17, _35$$17, _36$$17, _37$$18, _38$$18, _39$$18, _40$$19, _41$$19, _42$$22, _43$$22, _44$$24, _45$$25, _46$$26; zval arguments; zval *this_ptr = getThis(); @@ -358,10 +353,9 @@ PHP_METHOD(Phalcon_Cli_Console, setArgument) ZVAL_UNDEF(&_41$$19); ZVAL_UNDEF(&_42$$22); ZVAL_UNDEF(&_43$$22); - ZVAL_UNDEF(&_45$$24); - ZVAL_UNDEF(&_46$$25); - ZVAL_UNDEF(&_47$$26); -#if PHP_VERSION_ID >= 80000 + ZVAL_UNDEF(&_44$$24); + ZVAL_UNDEF(&_45$$25); + ZVAL_UNDEF(&_46$$26); bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 3) Z_PARAM_OPTIONAL @@ -369,10 +363,8 @@ PHP_METHOD(Phalcon_Cli_Console, setArgument) Z_PARAM_BOOL(str) Z_PARAM_BOOL(shift) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 3, &arguments_param, &str_param, &shift_param); if (!arguments_param) { ZEPHIR_INIT_VAR(&arguments); @@ -397,8 +389,6 @@ PHP_METHOD(Phalcon_Cli_Console, setArgument) } shift = (Z_TYPE_P(shift_param) == IS_TRUE); } - - ZEPHIR_INIT_VAR(&args); array_init(&args); ZEPHIR_INIT_VAR(&opts); @@ -411,7 +401,7 @@ PHP_METHOD(Phalcon_Cli_Console, setArgument) } if (_0) { ZEPHIR_MAKE_REF(&arguments); - ZEPHIR_CALL_FUNCTION(NULL, "array_shift", NULL, 21, &arguments); + ZEPHIR_CALL_FUNCTION(NULL, "array_shift", NULL, 22, &arguments); ZEPHIR_UNREF(&arguments); zephir_check_call_status(); } @@ -425,7 +415,7 @@ PHP_METHOD(Phalcon_Cli_Console, setArgument) ZEPHIR_INIT_NVAR(&_3$$5); ZVAL_STRING(&_3$$5, "--"); ZVAL_LONG(&_4$$5, 2); - ZEPHIR_CALL_FUNCTION(&_5$$5, "strncmp", &_6, 189, &arg, &_3$$5, &_4$$5); + ZEPHIR_CALL_FUNCTION(&_5$$5, "strncmp", &_6, 190, &arg, &_3$$5, &_4$$5); zephir_check_call_status(); if (ZEPHIR_IS_LONG(&_5$$5, 0)) { ZEPHIR_INIT_NVAR(&_7$$6); @@ -457,7 +447,7 @@ PHP_METHOD(Phalcon_Cli_Console, setArgument) ZEPHIR_INIT_NVAR(&_18$$9); ZVAL_STRING(&_18$$9, "-"); ZVAL_LONG(&_19$$9, 1); - ZEPHIR_CALL_FUNCTION(&_20$$9, "strncmp", &_6, 189, &arg, &_18$$9, &_19$$9); + ZEPHIR_CALL_FUNCTION(&_20$$9, "strncmp", &_6, 190, &arg, &_18$$9, &_19$$9); zephir_check_call_status(); if (ZEPHIR_IS_LONG(&_20$$9, 0)) { ZVAL_LONG(&_21$$10, 1); @@ -487,7 +477,7 @@ PHP_METHOD(Phalcon_Cli_Console, setArgument) ZEPHIR_INIT_NVAR(&_23$$14); ZVAL_STRING(&_23$$14, "--"); ZVAL_LONG(&_24$$14, 2); - ZEPHIR_CALL_FUNCTION(&_25$$14, "strncmp", &_6, 189, &arg, &_23$$14, &_24$$14); + ZEPHIR_CALL_FUNCTION(&_25$$14, "strncmp", &_6, 190, &arg, &_23$$14, &_24$$14); zephir_check_call_status(); if (ZEPHIR_IS_LONG(&_25$$14, 0)) { ZEPHIR_INIT_NVAR(&_26$$15); @@ -519,7 +509,7 @@ PHP_METHOD(Phalcon_Cli_Console, setArgument) ZEPHIR_INIT_NVAR(&_37$$18); ZVAL_STRING(&_37$$18, "-"); ZVAL_LONG(&_38$$18, 1); - ZEPHIR_CALL_FUNCTION(&_39$$18, "strncmp", &_6, 189, &arg, &_37$$18, &_38$$18); + ZEPHIR_CALL_FUNCTION(&_39$$18, "strncmp", &_6, 190, &arg, &_37$$18, &_38$$18); zephir_check_call_status(); if (ZEPHIR_IS_LONG(&_39$$18, 0)) { ZVAL_LONG(&_40$$19, 1); @@ -540,29 +530,29 @@ PHP_METHOD(Phalcon_Cli_Console, setArgument) ZEPHIR_INIT_NVAR(&arg); if (str) { ZEPHIR_INIT_VAR(&_42$$22); - ZEPHIR_CALL_CE_STATIC(&_43$$22, phalcon_cli_router_route_ce, "getdelimiter", &_44, 0); + ZEPHIR_CALL_CE_STATIC(&_43$$22, phalcon_cli_router_route_ce, "getdelimiter", NULL, 0); zephir_check_call_status(); zephir_fast_join(&_42$$22, &_43$$22, &args); zephir_update_property_zval(this_ptr, ZEND_STRL("arguments"), &_42$$22); } else { if (zephir_fast_count_int(&args)) { ZEPHIR_MAKE_REF(&args); - ZEPHIR_CALL_FUNCTION(&_45$$24, "array_shift", NULL, 21, &args); + ZEPHIR_CALL_FUNCTION(&_44$$24, "array_shift", NULL, 22, &args); ZEPHIR_UNREF(&args); zephir_check_call_status(); - zephir_array_update_string(&handleArgs, SL("task"), &_45$$24, PH_COPY | PH_SEPARATE); + zephir_array_update_string(&handleArgs, SL("task"), &_44$$24, PH_COPY | PH_SEPARATE); } if (zephir_fast_count_int(&args)) { ZEPHIR_MAKE_REF(&args); - ZEPHIR_CALL_FUNCTION(&_46$$25, "array_shift", NULL, 21, &args); + ZEPHIR_CALL_FUNCTION(&_45$$25, "array_shift", NULL, 22, &args); ZEPHIR_UNREF(&args); zephir_check_call_status(); - zephir_array_update_string(&handleArgs, SL("action"), &_46$$25, PH_COPY | PH_SEPARATE); + zephir_array_update_string(&handleArgs, SL("action"), &_45$$25, PH_COPY | PH_SEPARATE); } if (zephir_fast_count_int(&args)) { - ZEPHIR_INIT_VAR(&_47$$26); - zephir_fast_array_merge(&_47$$26, &handleArgs, &args); - ZEPHIR_CPY_WRT(&handleArgs, &_47$$26); + ZEPHIR_INIT_VAR(&_46$$26); + zephir_fast_array_merge(&_46$$26, &handleArgs, &args); + ZEPHIR_CPY_WRT(&handleArgs, &_46$$26); } zephir_update_property_zval(this_ptr, ZEND_STRL("arguments"), &handleArgs); } @@ -582,7 +572,8 @@ zend_object *zephir_init_properties_Phalcon_Cli_Console(zend_class_entry *class_ ZVAL_UNDEF(&_5$$5); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/cli/console.zep.h b/ext/phalcon/cli/console.zep.h index b5c4e95b52e..2ec537936d5 100644 --- a/ext/phalcon/cli/console.zep.h +++ b/ext/phalcon/cli/console.zep.h @@ -8,19 +8,11 @@ PHP_METHOD(Phalcon_Cli_Console, setArgument); zend_object *zephir_init_properties_Phalcon_Cli_Console(zend_class_entry *class_type); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_cli_console_handle, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, arguments, IS_ARRAY, 1, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, arguments, 1) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, arguments, IS_ARRAY, 1, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_cli_console_setargument, 0, 0, Phalcon\\Cli\\Console, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, arguments, IS_ARRAY, 1, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, arguments, 1) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, arguments, IS_ARRAY, 1, "[]") ZEND_ARG_TYPE_INFO(0, str, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, shift, _IS_BOOL, 0) ZEND_END_ARG_INFO() diff --git a/ext/phalcon/cli/dispatcher.zep.c b/ext/phalcon/cli/dispatcher.zep.c index 2af6713b450..7e3e0cc0813 100644 --- a/ext/phalcon/cli/dispatcher.zep.c +++ b/ext/phalcon/cli/dispatcher.zep.c @@ -55,6 +55,9 @@ ZEPHIR_INIT_CLASS(Phalcon_Cli_Dispatcher) { ZEPHIR_REGISTER_CLASS_EX(Phalcon\\Cli, Dispatcher, phalcon, cli_dispatcher, phalcon_dispatcher_abstractdispatcher_ce, phalcon_cli_dispatcher_method_entry, 0); + /** + * @var string + */ zend_declare_property_string(phalcon_cli_dispatcher_ce, SL("defaultHandler"), "main", ZEND_ACC_PROTECTED); /** * @var string @@ -93,18 +96,14 @@ PHP_METHOD(Phalcon_Cli_Dispatcher, callActionMethod) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&actionMethod); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_ZVAL(handler) Z_PARAM_STR(actionMethod) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(params) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &handler, &actionMethod_param, ¶ms_param); zephir_get_strval(&actionMethod, actionMethod_param); if (!params_param) { @@ -113,8 +112,6 @@ PHP_METHOD(Phalcon_Cli_Dispatcher, callActionMethod) } else { ZEPHIR_OBS_COPY_OR_DUP(¶ms, params_param); } - - ZEPHIR_CALL_FUNCTION(&_0, "array_values", NULL, 14, ¶ms); zephir_check_call_status(); ZEPHIR_CPY_WRT(¶ms, &_0); @@ -136,9 +133,6 @@ PHP_METHOD(Phalcon_Cli_Dispatcher, callActionMethod) */ PHP_METHOD(Phalcon_Cli_Dispatcher, getActiveTask) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "activeHandler"); } @@ -148,9 +142,6 @@ PHP_METHOD(Phalcon_Cli_Dispatcher, getActiveTask) */ PHP_METHOD(Phalcon_Cli_Dispatcher, getLastTask) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "lastHandler"); } @@ -182,7 +173,6 @@ PHP_METHOD(Phalcon_Cli_Dispatcher, getOption) ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_1$$5); ZVAL_UNDEF(&_2$$5); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_ZVAL(option) @@ -190,10 +180,8 @@ PHP_METHOD(Phalcon_Cli_Dispatcher, getOption) Z_PARAM_ZVAL_OR_NULL(filters) Z_PARAM_ZVAL_OR_NULL(defaultValue) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &option, &filters, &defaultValue); if (!filters) { filters = &filters_sub; @@ -203,11 +191,9 @@ PHP_METHOD(Phalcon_Cli_Dispatcher, getOption) defaultValue = &defaultValue_sub; defaultValue = &__$null; } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("options"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&options, &_0); - ZEPHIR_OBS_VAR(&optionValue); + zephir_memory_observe(&optionValue); if (!(zephir_array_isset_fetch(&optionValue, &options, option, 0))) { RETVAL_ZVAL(defaultValue, 1, 0); RETURN_MM(); @@ -239,9 +225,6 @@ PHP_METHOD(Phalcon_Cli_Dispatcher, getOption) */ PHP_METHOD(Phalcon_Cli_Dispatcher, getOptions) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "options"); } @@ -251,9 +234,6 @@ PHP_METHOD(Phalcon_Cli_Dispatcher, getOptions) */ PHP_METHOD(Phalcon_Cli_Dispatcher, getTaskName) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "handlerName"); } @@ -263,9 +243,6 @@ PHP_METHOD(Phalcon_Cli_Dispatcher, getTaskName) */ PHP_METHOD(Phalcon_Cli_Dispatcher, getTaskSuffix) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "handlerSuffix"); } @@ -280,17 +257,10 @@ PHP_METHOD(Phalcon_Cli_Dispatcher, hasOption) ZVAL_UNDEF(&option_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(option) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &option); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("options"), PH_NOISY_CC | PH_READONLY); RETURN_BOOL(zephir_array_isset(&_0, option)); } @@ -306,19 +276,13 @@ PHP_METHOD(Phalcon_Cli_Dispatcher, setDefaultTask) zval *this_ptr = getThis(); ZVAL_UNDEF(&taskName); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(taskName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &taskName_param); zephir_get_strval(&taskName, taskName_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("defaultHandler"), &taskName); ZEPHIR_MM_RESTORE(); } @@ -334,19 +298,13 @@ PHP_METHOD(Phalcon_Cli_Dispatcher, setOptions) zval *this_ptr = getThis(); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &options_param); zephir_get_arrval(&options, options_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("options"), &options); ZEPHIR_MM_RESTORE(); } @@ -362,19 +320,13 @@ PHP_METHOD(Phalcon_Cli_Dispatcher, setTaskName) zval *this_ptr = getThis(); ZVAL_UNDEF(&taskName); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(taskName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &taskName_param); zephir_get_strval(&taskName, taskName_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("handlerName"), &taskName); ZEPHIR_MM_RESTORE(); } @@ -390,19 +342,13 @@ PHP_METHOD(Phalcon_Cli_Dispatcher, setTaskSuffix) zval *this_ptr = getThis(); ZVAL_UNDEF(&taskSuffix); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(taskSuffix) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &taskSuffix_param); zephir_get_strval(&taskSuffix, taskSuffix_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("handlerSuffix"), &taskSuffix); ZEPHIR_MM_RESTORE(); } @@ -422,18 +368,12 @@ PHP_METHOD(Phalcon_Cli_Dispatcher, handleException) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(exception, zend_ce_exception) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &exception); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("eventsManager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&eventsManager, &_0); if (Z_TYPE_P(&eventsManager) != IS_NULL) { @@ -463,37 +403,30 @@ PHP_METHOD(Phalcon_Cli_Dispatcher, throwDispatchException) ZVAL_UNDEF(&exception); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(message) Z_PARAM_OPTIONAL Z_PARAM_LONG(exceptionCode) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &message_param, &exceptionCode_param); zephir_get_strval(&message, message_param); if (!exceptionCode_param) { exceptionCode = 0; } else { - exceptionCode = zephir_get_intval(exceptionCode_param); - } - - + } ZEPHIR_INIT_VAR(&exception); object_init_ex(&exception, phalcon_cli_dispatcher_exception_ce); ZVAL_LONG(&_0, exceptionCode); - ZEPHIR_CALL_METHOD(NULL, &exception, "__construct", NULL, 32, &message, &_0); + ZEPHIR_CALL_METHOD(NULL, &exception, "__construct", NULL, 33, &message, &_0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_1, this_ptr, "handleexception", NULL, 0, &exception); zephir_check_call_status(); if (ZEPHIR_IS_FALSE_IDENTICAL(&_1)) { RETURN_MM_BOOL(0); } - zephir_throw_exception_debug(&exception, "phalcon/Cli/Dispatcher.zep", 221); + zephir_throw_exception_debug(&exception, "phalcon/Cli/Dispatcher.zep", 224); ZEPHIR_MM_RESTORE(); return; } @@ -514,7 +447,8 @@ zend_object *zephir_init_properties_Phalcon_Cli_Dispatcher(zend_class_entry *cla ZVAL_UNDEF(&_9$$7); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/cli/dispatcher.zep.h b/ext/phalcon/cli/dispatcher.zep.h index b99a2f3d045..0dd2fd14f78 100644 --- a/ext/phalcon/cli/dispatcher.zep.h +++ b/ext/phalcon/cli/dispatcher.zep.h @@ -22,11 +22,7 @@ zend_object *zephir_init_properties_Phalcon_Cli_Dispatcher(zend_class_entry *cla ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_cli_dispatcher_callactionmethod, 0, 0, 2) ZEND_ARG_INFO(0, handler) ZEND_ARG_TYPE_INFO(0, actionMethod, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, params, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, params, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, params, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_cli_dispatcher_getactivetask, 0, 0, Phalcon\\Cli\\TaskInterface, 0) diff --git a/ext/phalcon/cli/router.zep.c b/ext/phalcon/cli/router.zep.c index 6081d80a6f7..9b0779edf3a 100644 --- a/ext/phalcon/cli/router.zep.c +++ b/ext/phalcon/cli/router.zep.c @@ -125,24 +125,17 @@ PHP_METHOD(Phalcon_Cli_Router, __construct) ZVAL_UNDEF(&routes); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_3$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_BOOL(defaultRoutes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &defaultRoutes_param); if (!defaultRoutes_param) { defaultRoutes = 1; } else { - defaultRoutes = zephir_get_boolval(defaultRoutes_param); - } - - + } ZEPHIR_INIT_VAR(&routes); array_init(&routes); if (defaultRoutes) { @@ -153,7 +146,7 @@ PHP_METHOD(Phalcon_Cli_Router, __construct) add_assoc_long_ex(&_1$$3, SL("task"), 1); ZEPHIR_INIT_VAR(&_2$$3); ZVAL_STRING(&_2$$3, "#^(?::delimiter)?([a-zA-Z0-9\\_\\-]+)[:delimiter]{0,1}$#"); - ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 190, &_2$$3, &_1$$3); + ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 191, &_2$$3, &_1$$3); zephir_check_call_status(); zephir_array_append(&routes, &_0$$3, PH_SEPARATE, "phalcon/Cli/Router.zep", 119); ZEPHIR_INIT_NVAR(&_2$$3); @@ -165,7 +158,7 @@ PHP_METHOD(Phalcon_Cli_Router, __construct) add_assoc_long_ex(&_3$$3, SL("params"), 3); ZEPHIR_INIT_VAR(&_4$$3); ZVAL_STRING(&_4$$3, "#^(?::delimiter)?([a-zA-Z0-9\\_\\-]+):delimiter([a-zA-Z0-9\\.\\_]+)(:delimiter.*)*$#"); - ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 190, &_4$$3, &_3$$3); + ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 191, &_4$$3, &_3$$3); zephir_check_call_status(); zephir_array_append(&routes, &_2$$3, PH_SEPARATE, "phalcon/Cli/Router.zep", 128); } @@ -194,17 +187,14 @@ PHP_METHOD(Phalcon_Cli_Router, add) ZVAL_UNDEF(&paths_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&route); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(pattern) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(paths) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &pattern_param, &paths); if (UNEXPECTED(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'pattern' must be of the type string")); @@ -219,11 +209,9 @@ PHP_METHOD(Phalcon_Cli_Router, add) paths = &paths_sub; paths = &__$null; } - - ZEPHIR_INIT_VAR(&route); object_init_ex(&route, phalcon_cli_router_route_ce); - ZEPHIR_CALL_METHOD(NULL, &route, "__construct", NULL, 190, &pattern, paths); + ZEPHIR_CALL_METHOD(NULL, &route, "__construct", NULL, 191, &pattern, paths); zephir_check_call_status(); zephir_update_property_array_append(this_ptr, SL("routes"), &route); RETURN_CCTOR(&route); @@ -234,9 +222,6 @@ PHP_METHOD(Phalcon_Cli_Router, add) */ PHP_METHOD(Phalcon_Cli_Router, getActionName) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "action"); } @@ -246,9 +231,6 @@ PHP_METHOD(Phalcon_Cli_Router, getActionName) */ PHP_METHOD(Phalcon_Cli_Router, getMatchedRoute) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "matchedRoute"); } @@ -258,9 +240,6 @@ PHP_METHOD(Phalcon_Cli_Router, getMatchedRoute) */ PHP_METHOD(Phalcon_Cli_Router, getMatches) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "matches"); } @@ -270,9 +249,6 @@ PHP_METHOD(Phalcon_Cli_Router, getMatches) */ PHP_METHOD(Phalcon_Cli_Router, getModuleName) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "module"); } @@ -287,10 +263,8 @@ PHP_METHOD(Phalcon_Cli_Router, getParams) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *this_ptr = getThis(); - - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getparameters", NULL, 0); zephir_check_call_status(); @@ -302,9 +276,6 @@ PHP_METHOD(Phalcon_Cli_Router, getParams) */ PHP_METHOD(Phalcon_Cli_Router, getParameters) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "params"); } @@ -327,18 +298,12 @@ PHP_METHOD(Phalcon_Cli_Router, getRouteById) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(id) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &id); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("routes"), PH_NOISY_CC | PH_READONLY); zephir_is_iterable(&_0, 0, "phalcon/Cli/Router.zep", 218); if (Z_TYPE_P(&_0) == IS_ARRAY) { @@ -393,15 +358,11 @@ PHP_METHOD(Phalcon_Cli_Router, getRouteByName) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -412,8 +373,6 @@ PHP_METHOD(Phalcon_Cli_Router, getRouteByName) } else { ZEPHIR_INIT_VAR(&name); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("routes"), PH_NOISY_CC | PH_READONLY); zephir_is_iterable(&_0, 0, "phalcon/Cli/Router.zep", 234); if (Z_TYPE_P(&_0) == IS_ARRAY) { @@ -456,9 +415,6 @@ PHP_METHOD(Phalcon_Cli_Router, getRouteByName) */ PHP_METHOD(Phalcon_Cli_Router, getRoutes) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "routes"); } @@ -468,9 +424,6 @@ PHP_METHOD(Phalcon_Cli_Router, getRoutes) */ PHP_METHOD(Phalcon_Cli_Router, getTaskName) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "task"); } @@ -488,9 +441,8 @@ PHP_METHOD(Phalcon_Cli_Router, handle) zval _4$$9, _10$$15, _12$$18, _14$$21, _16$$24, _17$$29, _23$$35, _25$$38, _27$$41, _29$$44; zend_bool _0$$3; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zephir_fcall_cache_entry *_37 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *arguments = NULL, arguments_sub, __$true, __$false, __$null, moduleName, taskName, actionName, params, route, parts, pattern, routeFound, matches, paths, beforeMatch, converters, converter, part, position, matchPosition, strParams, _1$$3, *_2$$3, _3$$3, *_5$$12, _6$$12, _9$$15, _11$$18, _13$$21, _15$$24, *_18$$32, _19$$32, _22$$35, _24$$38, _26$$41, _28$$44, _30$$46, _31$$46, _32$$46, _33$$46, _35$$55, _36$$56, _38$$58; + zval *arguments = NULL, arguments_sub, __$true, __$false, __$null, moduleName, taskName, actionName, params, route, parts, pattern, routeFound, matches, paths, beforeMatch, converters, converter, part, position, matchPosition, strParams, _1$$3, *_2$$3, _3$$3, *_5$$12, _6$$12, _9$$15, _11$$18, _13$$21, _15$$24, *_18$$32, _19$$32, _22$$35, _24$$38, _26$$41, _28$$44, _30$$46, _31$$46, _32$$46, _33$$46, _35$$55, _36$$56, _37$$58; zval *this_ptr = getThis(); ZVAL_UNDEF(&arguments_sub); @@ -532,7 +484,7 @@ PHP_METHOD(Phalcon_Cli_Router, handle) ZVAL_UNDEF(&_33$$46); ZVAL_UNDEF(&_35$$55); ZVAL_UNDEF(&_36$$56); - ZVAL_UNDEF(&_38$$58); + ZVAL_UNDEF(&_37$$58); ZVAL_UNDEF(&_4$$9); ZVAL_UNDEF(&_10$$15); ZVAL_UNDEF(&_12$$18); @@ -544,23 +496,18 @@ PHP_METHOD(Phalcon_Cli_Router, handle) ZVAL_UNDEF(&_27$$41); ZVAL_UNDEF(&_29$$44); ZVAL_UNDEF(&_34$$55); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(arguments) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &arguments); if (!arguments) { arguments = &arguments_sub; arguments = &__$null; } - - ZEPHIR_INIT_VAR(&routeFound); ZVAL_BOOL(&routeFound, 0); ZEPHIR_INIT_VAR(&parts); @@ -914,7 +861,7 @@ PHP_METHOD(Phalcon_Cli_Router, handle) ZEPHIR_INIT_VAR(&strParams); zephir_substr(&strParams, &_34$$55, 1 , 0, ZEPHIR_SUBSTR_NO_LENGTH); if (zephir_is_true(&strParams)) { - ZEPHIR_CALL_CE_STATIC(&_36$$56, phalcon_cli_router_route_ce, "getdelimiter", &_37, 0); + ZEPHIR_CALL_CE_STATIC(&_36$$56, phalcon_cli_router_route_ce, "getdelimiter", NULL, 0); zephir_check_call_status(); ZEPHIR_INIT_NVAR(¶ms); zephir_fast_explode(¶ms, &_36$$56, &strParams, LONG_MAX); @@ -926,9 +873,9 @@ PHP_METHOD(Phalcon_Cli_Router, handle) zephir_array_unset_string(&parts, SL("params"), PH_SEPARATE); } if (zephir_fast_count_int(¶ms)) { - ZEPHIR_INIT_VAR(&_38$$58); - zephir_fast_array_merge(&_38$$58, ¶ms, &parts); - ZEPHIR_CPY_WRT(¶ms, &_38$$58); + ZEPHIR_INIT_VAR(&_37$$58); + zephir_fast_array_merge(&_37$$58, ¶ms, &parts); + ZEPHIR_CPY_WRT(¶ms, &_37$$58); } else { ZEPHIR_CPY_WRT(¶ms, &parts); } @@ -950,19 +897,13 @@ PHP_METHOD(Phalcon_Cli_Router, setDefaultAction) zval *this_ptr = getThis(); ZVAL_UNDEF(&actionName); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(actionName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &actionName_param); zephir_get_strval(&actionName, actionName_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("defaultAction"), &actionName); ZEPHIR_MM_RESTORE(); } @@ -978,19 +919,13 @@ PHP_METHOD(Phalcon_Cli_Router, setDefaultModule) zval *this_ptr = getThis(); ZVAL_UNDEF(&moduleName); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(moduleName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &moduleName_param); zephir_get_strval(&moduleName, moduleName_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("defaultModule"), &moduleName); ZEPHIR_MM_RESTORE(); } @@ -1021,29 +956,27 @@ PHP_METHOD(Phalcon_Cli_Router, setDefaults) ZVAL_UNDEF(&task); ZVAL_UNDEF(&action); ZVAL_UNDEF(¶ms); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(defaults) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &defaults_param); ZEPHIR_OBS_COPY_OR_DUP(&defaults, defaults_param); - - - if (zephir_array_isset_string_fetch(&module, &defaults, SL("module"), 1)) { + zephir_memory_observe(&module); + if (zephir_array_isset_string_fetch(&module, &defaults, SL("module"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("defaultModule"), &module); } - if (zephir_array_isset_string_fetch(&task, &defaults, SL("task"), 1)) { + zephir_memory_observe(&task); + if (zephir_array_isset_string_fetch(&task, &defaults, SL("task"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("defaultTask"), &task); } - if (zephir_array_isset_string_fetch(&action, &defaults, SL("action"), 1)) { + zephir_memory_observe(&action); + if (zephir_array_isset_string_fetch(&action, &defaults, SL("action"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("defaultAction"), &action); } - if (zephir_array_isset_string_fetch(¶ms, &defaults, SL("params"), 1)) { + zephir_memory_observe(¶ms); + if (zephir_array_isset_string_fetch(¶ms, &defaults, SL("params"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("defaultParams"), ¶ms); } RETURN_THIS(); @@ -1060,19 +993,13 @@ PHP_METHOD(Phalcon_Cli_Router, setDefaultTask) zval *this_ptr = getThis(); ZVAL_UNDEF(&taskName); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(taskName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &taskName_param); zephir_get_strval(&taskName, taskName_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("defaultTask"), &taskName); ZEPHIR_MM_RESTORE(); } @@ -1082,9 +1009,6 @@ PHP_METHOD(Phalcon_Cli_Router, setDefaultTask) */ PHP_METHOD(Phalcon_Cli_Router, wasMatched) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "wasMatched"); } @@ -1103,7 +1027,8 @@ zend_object *zephir_init_properties_Phalcon_Cli_Router(zend_class_entry *class_t ZVAL_UNDEF(&_7$$6); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/cli/router/route.zep.c b/ext/phalcon/cli/router/route.zep.c index d7107e5486d..27f4e346be3 100644 --- a/ext/phalcon/cli/router/route.zep.c +++ b/ext/phalcon/cli/router/route.zep.c @@ -108,17 +108,14 @@ PHP_METHOD(Phalcon_Cli_Router_Route, __construct) ZVAL_UNDEF(&uniqueId); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(pattern) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(paths) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &pattern_param, &paths); if (UNEXPECTED(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'pattern' must be of the type string")); @@ -133,20 +130,18 @@ PHP_METHOD(Phalcon_Cli_Router_Route, __construct) paths = &paths_sub; paths = &__$null; } - - - ZEPHIR_OBS_VAR(&_0); + zephir_memory_observe(&_0); zephir_read_static_property_ce(&_0, phalcon_cli_router_route_ce, SL("delimiterPath"), PH_NOISY_CC); zephir_update_property_zval(this_ptr, ZEND_STRL("delimiter"), &_0); ZEPHIR_CALL_METHOD(NULL, this_ptr, "reconfigure", NULL, 0, &pattern, paths); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&_1); + zephir_memory_observe(&_1); zephir_read_static_property_ce(&_1, phalcon_cli_router_route_ce, SL("uniqueId"), PH_NOISY_CC); ZEPHIR_CPY_WRT(&uniqueId, &_1); ZEPHIR_CPY_WRT(&routeId, &uniqueId); zephir_cast_to_string(&_2, &routeId); zephir_update_property_zval(this_ptr, ZEND_STRL("routeId"), &_2); - ZEPHIR_INIT_ZVAL_NREF(_1); + ZVAL_UNDEF(&_1); ZVAL_LONG(&_1, (zephir_get_numberval(&uniqueId) + 1)); zephir_update_static_property_ce(phalcon_cli_router_route_ce, ZEND_STRL("uniqueId"), &_1); ZEPHIR_MM_RESTORE(); @@ -165,17 +160,10 @@ PHP_METHOD(Phalcon_Cli_Router_Route, beforeMatch) zval *this_ptr = getThis(); ZVAL_UNDEF(&callback_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(callback) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &callback); - - zephir_update_property_zval(this_ptr, ZEND_STRL("beforeMatch"), callback); RETURN_THISW(); } @@ -217,15 +205,11 @@ PHP_METHOD(Phalcon_Cli_Router_Route, compilePattern) ZVAL_UNDEF(&_18$$3); ZVAL_UNDEF(&_19$$3); ZVAL_UNDEF(&map); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(pattern) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &pattern_param); if (UNEXPECTED(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'pattern' must be of the type string")); @@ -236,15 +220,13 @@ PHP_METHOD(Phalcon_Cli_Router_Route, compilePattern) } else { ZEPHIR_INIT_VAR(&pattern); } - - if (zephir_memnstr_str(&pattern, SL(":"), "phalcon/Cli/Router/Route.zep", 121)) { zephir_read_property(&_0$$3, this_ptr, ZEND_STRL("delimiter"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&idPattern); ZEPHIR_CONCAT_VS(&idPattern, &_0$$3, "([a-zA-Z0-9\\_\\-]+)"); ZEPHIR_INIT_VAR(&map); zephir_create_array(&map, 7, 0); - ZEPHIR_OBS_VAR(&_1$$3); + zephir_memory_observe(&_1$$3); zephir_read_property(&_1$$3, this_ptr, ZEND_STRL("delimiter"), PH_NOISY_CC); zephir_array_update_string(&map, SL(":delimiter"), &_1$$3, PH_COPY | PH_SEPARATE); zephir_read_property(&_2$$3, this_ptr, ZEND_STRL("delimiter"), PH_NOISY_CC | PH_READONLY); @@ -311,16 +293,12 @@ PHP_METHOD(Phalcon_Cli_Router_Route, convert) ZVAL_UNDEF(&name); ZVAL_UNDEF(&converter_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(name) Z_PARAM_ZVAL(converter) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &name_param, &converter); 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")); @@ -331,8 +309,6 @@ PHP_METHOD(Phalcon_Cli_Router_Route, convert) } else { ZEPHIR_INIT_VAR(&name); } - - zephir_update_property_array(this_ptr, SL("converters"), &name, converter); RETURN_THIS(); } @@ -345,19 +321,15 @@ PHP_METHOD(Phalcon_Cli_Router_Route, delimiter) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *delimiter_param = NULL; zval delimiter; - zval *this_ptr = getThis(); ZVAL_UNDEF(&delimiter); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(delimiter) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &delimiter_param); if (!delimiter_param) { ZEPHIR_INIT_VAR(&delimiter); @@ -372,8 +344,6 @@ PHP_METHOD(Phalcon_Cli_Router_Route, delimiter) ZEPHIR_INIT_VAR(&delimiter); } } - - zephir_update_static_property_ce(phalcon_cli_router_route_ce, ZEND_STRL("delimiterPath"), &delimiter); ZEPHIR_MM_RESTORE(); } @@ -415,15 +385,11 @@ PHP_METHOD(Phalcon_Cli_Router_Route, extractNamedParams) ZVAL_UNDEF(&_28$$27); ZVAL_UNDEF(&_29$$27); ZVAL_UNDEF(&matches); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(pattern) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &pattern_param); if (UNEXPECTED(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'pattern' must be of the type string")); @@ -434,8 +400,6 @@ PHP_METHOD(Phalcon_Cli_Router_Route, extractNamedParams) } else { ZEPHIR_INIT_VAR(&pattern); } - - bracketCount = 0; parenthesesCount = 0; foundPattern = 0; @@ -626,9 +590,6 @@ PHP_METHOD(Phalcon_Cli_Router_Route, extractNamedParams) */ PHP_METHOD(Phalcon_Cli_Router_Route, getBeforeMatch) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "beforeMatch"); } @@ -638,9 +599,6 @@ PHP_METHOD(Phalcon_Cli_Router_Route, getBeforeMatch) */ PHP_METHOD(Phalcon_Cli_Router_Route, getCompiledPattern) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "compiledPattern"); } @@ -650,9 +608,6 @@ PHP_METHOD(Phalcon_Cli_Router_Route, getCompiledPattern) */ PHP_METHOD(Phalcon_Cli_Router_Route, getConverters) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "converters"); } @@ -663,12 +618,8 @@ PHP_METHOD(Phalcon_Cli_Router_Route, getConverters) PHP_METHOD(Phalcon_Cli_Router_Route, getDelimiter) { zval _0; - zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - zephir_read_static_property_ce(&_0, phalcon_cli_router_route_ce, SL("delimiterPath"), PH_NOISY_CC | PH_READONLY); RETURN_CTORW(&_0); } @@ -678,9 +629,6 @@ PHP_METHOD(Phalcon_Cli_Router_Route, getDelimiter) */ PHP_METHOD(Phalcon_Cli_Router_Route, getDescription) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "description"); } @@ -690,9 +638,6 @@ PHP_METHOD(Phalcon_Cli_Router_Route, getDescription) */ PHP_METHOD(Phalcon_Cli_Router_Route, getName) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "name"); } @@ -702,9 +647,6 @@ PHP_METHOD(Phalcon_Cli_Router_Route, getName) */ PHP_METHOD(Phalcon_Cli_Router_Route, getPaths) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "paths"); } @@ -714,9 +656,6 @@ PHP_METHOD(Phalcon_Cli_Router_Route, getPaths) */ PHP_METHOD(Phalcon_Cli_Router_Route, getPattern) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "pattern"); } @@ -732,12 +671,11 @@ PHP_METHOD(Phalcon_Cli_Router_Route, getReversedPaths) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("paths"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_RETURN_CALL_FUNCTION("array_flip", NULL, 99, &_0); + ZEPHIR_RETURN_CALL_FUNCTION("array_flip", NULL, 100, &_0); zephir_check_call_status(); RETURN_MM(); } @@ -747,9 +685,6 @@ PHP_METHOD(Phalcon_Cli_Router_Route, getReversedPaths) */ PHP_METHOD(Phalcon_Cli_Router_Route, getRouteId) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "routeId"); } @@ -790,17 +725,14 @@ PHP_METHOD(Phalcon_Cli_Router_Route, reConfigure) ZVAL_UNDEF(&_5$$21); ZVAL_UNDEF(&_6$$21); ZVAL_UNDEF(&_7$$21); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(pattern) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(paths) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &pattern_param, &paths); if (UNEXPECTED(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'pattern' must be of the type string")); @@ -817,8 +749,6 @@ PHP_METHOD(Phalcon_Cli_Router_Route, reConfigure) } else { ZEPHIR_SEPARATE_PARAM(paths); } - - if (Z_TYPE_P(paths) == IS_NULL) { ZEPHIR_INIT_NVAR(paths); array_init(paths); @@ -883,7 +813,7 @@ PHP_METHOD(Phalcon_Cli_Router_Route, reConfigure) ZEPHIR_CPY_WRT(&realClassName, &taskName); } ZEPHIR_INIT_VAR(&_2$$9); - zephir_uncamelize(&_2$$9, &realClassName, NULL ); + zephir_uncamelize(&_2$$9, &realClassName, NULL ); zephir_array_update_string(&routePaths, SL("task"), &_2$$9, PH_COPY | PH_SEPARATE); } if (Z_TYPE_P(&actionName) != IS_NULL) { @@ -900,7 +830,7 @@ PHP_METHOD(Phalcon_Cli_Router_Route, reConfigure) if (zephir_memnstr_str(&pattern, SL("{"), "phalcon/Cli/Router/Route.zep", 484)) { ZEPHIR_CALL_METHOD(&extracted, this_ptr, "extractnamedparams", NULL, 0, &pattern); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&pcrePattern); + zephir_memory_observe(&pcrePattern); zephir_array_fetch_long(&pcrePattern, &extracted, 0, PH_NOISY, "phalcon/Cli/Router/Route.zep", 489); ZEPHIR_INIT_VAR(&_3$$18); zephir_array_fetch_long(&_4$$18, &extracted, 1, PH_NOISY | PH_READONLY, "phalcon/Cli/Router/Route.zep", 490); @@ -934,13 +864,9 @@ PHP_METHOD(Phalcon_Cli_Router_Route, reConfigure) PHP_METHOD(Phalcon_Cli_Router_Route, reset) { zval _0; - zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, 0); zephir_update_static_property_ce(phalcon_cli_router_route_ce, ZEND_STRL("uniqueId"), &_0); } @@ -956,15 +882,11 @@ PHP_METHOD(Phalcon_Cli_Router_Route, setDescription) zval *this_ptr = getThis(); ZVAL_UNDEF(&description); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(description) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &description_param); if (UNEXPECTED(Z_TYPE_P(description_param) != IS_STRING && Z_TYPE_P(description_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'description' must be of the type string")); @@ -975,8 +897,6 @@ PHP_METHOD(Phalcon_Cli_Router_Route, setDescription) } else { ZEPHIR_INIT_VAR(&description); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("description"), &description); RETURN_THIS(); } @@ -1001,15 +921,11 @@ PHP_METHOD(Phalcon_Cli_Router_Route, setName) zval *this_ptr = getThis(); ZVAL_UNDEF(&name); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -1020,8 +936,6 @@ PHP_METHOD(Phalcon_Cli_Router_Route, setName) } else { ZEPHIR_INIT_VAR(&name); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("name"), &name); RETURN_THIS(); } @@ -1036,7 +950,8 @@ zend_object *zephir_init_properties_Phalcon_Cli_Router_Route(zend_class_entry *c ZVAL_UNDEF(&_3$$4); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/cli/router/route.zep.h b/ext/phalcon/cli/router/route.zep.h index 945cf3f22a8..92b1df03817 100644 --- a/ext/phalcon/cli/router/route.zep.h +++ b/ext/phalcon/cli/router/route.zep.h @@ -109,11 +109,7 @@ ZEPHIR_INIT_FUNCS(phalcon_cli_router_route_method_entry) { PHP_ME(Phalcon_Cli_Router_Route, convert, arginfo_phalcon_cli_router_route_convert, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Cli_Router_Route, delimiter, arginfo_phalcon_cli_router_route_delimiter, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) PHP_ME(Phalcon_Cli_Router_Route, extractNamedParams, arginfo_phalcon_cli_router_route_extractnamedparams, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Cli_Router_Route, getBeforeMatch, arginfo_phalcon_cli_router_route_getbeforematch, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Cli_Router_Route, getBeforeMatch, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Cli_Router_Route, getBeforeMatch, arginfo_phalcon_cli_router_route_getbeforematch, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Cli_Router_Route, getCompiledPattern, arginfo_phalcon_cli_router_route_getcompiledpattern, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Cli_Router_Route, getConverters, arginfo_phalcon_cli_router_route_getconverters, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Cli_Router_Route, getDelimiter, arginfo_phalcon_cli_router_route_getdelimiter, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) diff --git a/ext/phalcon/cli/task.zep.c b/ext/phalcon/cli/task.zep.c index 366803c0713..6a0342c537f 100644 --- a/ext/phalcon/cli/task.zep.c +++ b/ext/phalcon/cli/task.zep.c @@ -70,10 +70,8 @@ PHP_METHOD(Phalcon_Cli_Task, __construct) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *this_ptr = getThis(); - - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); if ((zephir_method_exists_ex(this_ptr, ZEND_STRL("onconstruct")) == SUCCESS)) { ZEPHIR_CALL_METHOD(NULL, this_ptr, "onconstruct", NULL, 0); @@ -87,9 +85,6 @@ PHP_METHOD(Phalcon_Cli_Task, __construct) */ PHP_METHOD(Phalcon_Cli_Task, getEventsManager) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "eventsManager"); } @@ -103,17 +98,10 @@ PHP_METHOD(Phalcon_Cli_Task, setEventsManager) zval *this_ptr = getThis(); ZVAL_UNDEF(&eventsManager_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(eventsManager, phalcon_events_managerinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &eventsManager); - - zephir_update_property_zval(this_ptr, ZEND_STRL("eventsManager"), eventsManager); } diff --git a/ext/phalcon/cli/task.zep.h b/ext/phalcon/cli/task.zep.h index bed615d67aa..2b69feb4965 100644 --- a/ext/phalcon/cli/task.zep.h +++ b/ext/phalcon/cli/task.zep.h @@ -19,11 +19,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_cli_task_seteventsmanage ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_cli_task_method_entry) { -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Cli_Task, __construct, arginfo_phalcon_cli_task___construct, ZEND_ACC_FINAL|ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) -#else - PHP_ME(Phalcon_Cli_Task, __construct, NULL, ZEND_ACC_FINAL|ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) -#endif +PHP_ME(Phalcon_Cli_Task, __construct, arginfo_phalcon_cli_task___construct, ZEND_ACC_FINAL|ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) PHP_ME(Phalcon_Cli_Task, getEventsManager, arginfo_phalcon_cli_task_geteventsmanager, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Cli_Task, setEventsManager, arginfo_phalcon_cli_task_seteventsmanager, ZEND_ACC_PUBLIC) PHP_FE_END diff --git a/ext/phalcon/config/adapter/grouped.zep.c b/ext/phalcon/config/adapter/grouped.zep.c index a4b3fed6bdb..c6f010b2f6b 100644 --- a/ext/phalcon/config/adapter/grouped.zep.c +++ b/ext/phalcon/config/adapter/grouped.zep.c @@ -93,12 +93,12 @@ ZEPHIR_INIT_CLASS(Phalcon_Config_Adapter_Grouped) */ PHP_METHOD(Phalcon_Config_Adapter_Grouped, __construct) { - zend_bool _4$$3, _21$$11; + zend_bool _3$$3, _20$$11; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; + zephir_fcall_cache_entry *_4 = NULL, *_7 = NULL, *_9 = NULL, *_15 = NULL, *_17 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL, *_5 = NULL, *_8 = NULL, *_10 = NULL, *_16 = NULL, *_18 = NULL; - zval defaultAdapter, _15$$9, _29$$17; - zval *arrayConfig_param = NULL, *defaultAdapter_param = NULL, configArray, configInstance, configName, _1, *_2, _3, _12$$3, _13$$3, _6$$5, _11$$5, _7$$6, _9$$6, _14$$9, _17$$8, _19$$10, _20$$10, _26$$11, _27$$11, _22$$13, _25$$13, _23$$14, _24$$14, _28$$17, _30$$16, _31$$18, _32$$18; + zval defaultAdapter, _14$$9, _28$$17; + zval *arrayConfig_param = NULL, *defaultAdapter_param = NULL, configArray, configInstance, configName, _0, *_1, _2, _11$$3, _12$$3, _5$$5, _10$$5, _6$$6, _8$$6, _13$$9, _16$$8, _18$$10, _19$$10, _25$$11, _26$$11, _21$$13, _24$$13, _22$$14, _23$$14, _27$$17, _29$$16, _30$$18, _31$$18; zval arrayConfig; zval *this_ptr = getThis(); @@ -106,42 +106,38 @@ PHP_METHOD(Phalcon_Config_Adapter_Grouped, __construct) ZVAL_UNDEF(&configArray); ZVAL_UNDEF(&configInstance); ZVAL_UNDEF(&configName); - ZVAL_UNDEF(&_1); - ZVAL_UNDEF(&_3); + ZVAL_UNDEF(&_0); + ZVAL_UNDEF(&_2); + ZVAL_UNDEF(&_11$$3); ZVAL_UNDEF(&_12$$3); - ZVAL_UNDEF(&_13$$3); - ZVAL_UNDEF(&_6$$5); - ZVAL_UNDEF(&_11$$5); - ZVAL_UNDEF(&_7$$6); - ZVAL_UNDEF(&_9$$6); - ZVAL_UNDEF(&_14$$9); - ZVAL_UNDEF(&_17$$8); + ZVAL_UNDEF(&_5$$5); + ZVAL_UNDEF(&_10$$5); + ZVAL_UNDEF(&_6$$6); + ZVAL_UNDEF(&_8$$6); + ZVAL_UNDEF(&_13$$9); + ZVAL_UNDEF(&_16$$8); + ZVAL_UNDEF(&_18$$10); ZVAL_UNDEF(&_19$$10); - ZVAL_UNDEF(&_20$$10); + ZVAL_UNDEF(&_25$$11); ZVAL_UNDEF(&_26$$11); - ZVAL_UNDEF(&_27$$11); - ZVAL_UNDEF(&_22$$13); - ZVAL_UNDEF(&_25$$13); + ZVAL_UNDEF(&_21$$13); + ZVAL_UNDEF(&_24$$13); + ZVAL_UNDEF(&_22$$14); ZVAL_UNDEF(&_23$$14); - ZVAL_UNDEF(&_24$$14); - ZVAL_UNDEF(&_28$$17); - ZVAL_UNDEF(&_30$$16); + ZVAL_UNDEF(&_27$$17); + ZVAL_UNDEF(&_29$$16); + ZVAL_UNDEF(&_30$$18); ZVAL_UNDEF(&_31$$18); - ZVAL_UNDEF(&_32$$18); ZVAL_UNDEF(&defaultAdapter); - ZVAL_UNDEF(&_15$$9); - ZVAL_UNDEF(&_29$$17); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; + ZVAL_UNDEF(&_14$$9); + ZVAL_UNDEF(&_28$$17); ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(arrayConfig) Z_PARAM_OPTIONAL Z_PARAM_STR(defaultAdapter) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &arrayConfig_param, &defaultAdapter_param); ZEPHIR_OBS_COPY_OR_DUP(&arrayConfig, arrayConfig_param); if (!defaultAdapter_param) { @@ -158,61 +154,59 @@ PHP_METHOD(Phalcon_Config_Adapter_Grouped, __construct) ZEPHIR_INIT_VAR(&defaultAdapter); } } - - - ZEPHIR_INIT_VAR(&_1); - array_init(&_1); - ZEPHIR_CALL_PARENT(NULL, phalcon_config_adapter_grouped_ce, getThis(), "__construct", &_0, 0, &_1); + ZEPHIR_INIT_VAR(&_0); + array_init(&_0); + ZEPHIR_CALL_PARENT(NULL, phalcon_config_adapter_grouped_ce, getThis(), "__construct", NULL, 0, &_0); zephir_check_call_status(); zephir_is_iterable(&arrayConfig, 0, "phalcon/Config/Adapter/Grouped.zep", 121); if (Z_TYPE_P(&arrayConfig) == IS_ARRAY) { - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&arrayConfig), _2) + ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&arrayConfig), _1) { ZEPHIR_INIT_NVAR(&configName); - ZVAL_COPY(&configName, _2); + ZVAL_COPY(&configName, _1); ZEPHIR_CPY_WRT(&configInstance, &configName); - _4$$3 = Z_TYPE_P(&configName) == IS_OBJECT; - if (_4$$3) { - _4$$3 = zephir_instance_of_ev(&configName, phalcon_config_configinterface_ce); + _3$$3 = Z_TYPE_P(&configName) == IS_OBJECT; + if (_3$$3) { + _3$$3 = zephir_instance_of_ev(&configName, phalcon_config_configinterface_ce); } - if (_4$$3) { - ZEPHIR_CALL_METHOD(NULL, this_ptr, "merge", &_5, 0, &configInstance); + if (_3$$3) { + ZEPHIR_CALL_METHOD(NULL, this_ptr, "merge", &_4, 0, &configInstance); zephir_check_call_status(); continue; } else if (Z_TYPE_P(&configName) == IS_STRING) { - ZEPHIR_INIT_NVAR(&_6$$5); - ZVAL_STRING(&_6$$5, ""); - if (ZEPHIR_IS_IDENTICAL(&_6$$5, &defaultAdapter)) { - ZEPHIR_INIT_NVAR(&_7$$6); - object_init_ex(&_7$$6, phalcon_config_configfactory_ce); - ZEPHIR_CALL_METHOD(NULL, &_7$$6, "__construct", &_8, 191); + ZEPHIR_INIT_NVAR(&_5$$5); + ZVAL_STRING(&_5$$5, ""); + if (ZEPHIR_IS_IDENTICAL(&_5$$5, &defaultAdapter)) { + ZEPHIR_INIT_NVAR(&_6$$6); + object_init_ex(&_6$$6, phalcon_config_configfactory_ce); + ZEPHIR_CALL_METHOD(NULL, &_6$$6, "__construct", &_7, 192); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_9$$6, &_7$$6, "load", &_10, 192, &configName); + ZEPHIR_CALL_METHOD(&_8$$6, &_6$$6, "load", &_9, 193, &configName); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "merge", &_5, 0, &_9$$6); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "merge", &_4, 0, &_8$$6); zephir_check_call_status(); continue; } - ZEPHIR_INIT_NVAR(&_11$$5); - zephir_create_array(&_11$$5, 2, 0); - zephir_array_update_string(&_11$$5, SL("filePath"), &configName, PH_COPY | PH_SEPARATE); - zephir_array_update_string(&_11$$5, SL("adapter"), &defaultAdapter, PH_COPY | PH_SEPARATE); - ZEPHIR_CPY_WRT(&configInstance, &_11$$5); + ZEPHIR_INIT_NVAR(&_10$$5); + zephir_create_array(&_10$$5, 2, 0); + zephir_array_update_string(&_10$$5, SL("filePath"), &configName, PH_COPY | PH_SEPARATE); + zephir_array_update_string(&_10$$5, SL("adapter"), &defaultAdapter, PH_COPY | PH_SEPARATE); + ZEPHIR_CPY_WRT(&configInstance, &_10$$5); } else if (!(zephir_array_isset_string(&configInstance, SL("adapter")))) { zephir_array_update_string(&configInstance, SL("adapter"), &defaultAdapter, PH_COPY | PH_SEPARATE); } - zephir_array_fetch_string(&_12$$3, &configInstance, SL("adapter"), PH_NOISY | PH_READONLY, "phalcon/Config/Adapter/Grouped.zep", 105); - ZEPHIR_INIT_NVAR(&_13$$3); - ZVAL_STRING(&_13$$3, "array"); - if (ZEPHIR_IS_IDENTICAL(&_13$$3, &_12$$3)) { + zephir_array_fetch_string(&_11$$3, &configInstance, SL("adapter"), PH_NOISY | PH_READONLY, "phalcon/Config/Adapter/Grouped.zep", 105); + ZEPHIR_INIT_NVAR(&_12$$3); + ZVAL_STRING(&_12$$3, "array"); + if (ZEPHIR_IS_IDENTICAL(&_12$$3, &_11$$3)) { if (!(zephir_array_isset_string(&configInstance, SL("config")))) { + ZEPHIR_INIT_NVAR(&_13$$9); + object_init_ex(&_13$$9, phalcon_config_exception_ce); ZEPHIR_INIT_NVAR(&_14$$9); - object_init_ex(&_14$$9, phalcon_config_exception_ce); - ZEPHIR_INIT_NVAR(&_15$$9); - ZEPHIR_CONCAT_SS(&_15$$9, "To use 'array' adapter you have to specify ", "the 'config' as an array."); - ZEPHIR_CALL_METHOD(NULL, &_14$$9, "__construct", &_16, 32, &_15$$9); + ZEPHIR_CONCAT_SS(&_14$$9, "To use 'array' adapter you have to specify ", "the 'config' as an array."); + ZEPHIR_CALL_METHOD(NULL, &_13$$9, "__construct", &_15, 33, &_14$$9); zephir_check_call_status(); - zephir_throw_exception_debug(&_14$$9, "phalcon/Config/Adapter/Grouped.zep", 110); + zephir_throw_exception_debug(&_13$$9, "phalcon/Config/Adapter/Grouped.zep", 110); ZEPHIR_MM_RESTORE(); return; } @@ -220,75 +214,75 @@ PHP_METHOD(Phalcon_Config_Adapter_Grouped, __construct) zephir_array_fetch_string(&configArray, &configInstance, SL("config"), PH_NOISY, "phalcon/Config/Adapter/Grouped.zep", 113); ZEPHIR_INIT_NVAR(&configInstance); object_init_ex(&configInstance, phalcon_config_config_ce); - zephir_read_property(&_17$$8, this_ptr, ZEND_STRL("insensitive"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_METHOD(NULL, &configInstance, "__construct", &_18, 22, &configArray, &_17$$8); + zephir_read_property(&_16$$8, this_ptr, ZEND_STRL("insensitive"), PH_NOISY_CC | PH_READONLY); + ZEPHIR_CALL_METHOD(NULL, &configInstance, "__construct", &_17, 23, &configArray, &_16$$8); zephir_check_call_status(); } else { - ZEPHIR_INIT_NVAR(&_19$$10); - object_init_ex(&_19$$10, phalcon_config_configfactory_ce); - ZEPHIR_CALL_METHOD(NULL, &_19$$10, "__construct", &_8, 191); + ZEPHIR_INIT_NVAR(&_18$$10); + object_init_ex(&_18$$10, phalcon_config_configfactory_ce); + ZEPHIR_CALL_METHOD(NULL, &_18$$10, "__construct", &_7, 192); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_20$$10, &_19$$10, "load", &_10, 192, &configInstance); + ZEPHIR_CALL_METHOD(&_19$$10, &_18$$10, "load", &_9, 193, &configInstance); zephir_check_call_status(); - ZEPHIR_CPY_WRT(&configInstance, &_20$$10); + ZEPHIR_CPY_WRT(&configInstance, &_19$$10); } - ZEPHIR_CALL_METHOD(NULL, this_ptr, "merge", &_5, 0, &configInstance); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "merge", &_4, 0, &configInstance); zephir_check_call_status(); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &arrayConfig, "rewind", NULL, 0); zephir_check_call_status(); while (1) { - ZEPHIR_CALL_METHOD(&_3, &arrayConfig, "valid", NULL, 0); + ZEPHIR_CALL_METHOD(&_2, &arrayConfig, "valid", NULL, 0); zephir_check_call_status(); - if (!zend_is_true(&_3)) { + if (!zend_is_true(&_2)) { break; } ZEPHIR_CALL_METHOD(&configName, &arrayConfig, "current", NULL, 0); zephir_check_call_status(); ZEPHIR_CPY_WRT(&configInstance, &configName); - _21$$11 = Z_TYPE_P(&configName) == IS_OBJECT; - if (_21$$11) { - _21$$11 = zephir_instance_of_ev(&configName, phalcon_config_configinterface_ce); + _20$$11 = Z_TYPE_P(&configName) == IS_OBJECT; + if (_20$$11) { + _20$$11 = zephir_instance_of_ev(&configName, phalcon_config_configinterface_ce); } - if (_21$$11) { - ZEPHIR_CALL_METHOD(NULL, this_ptr, "merge", &_5, 0, &configInstance); + if (_20$$11) { + ZEPHIR_CALL_METHOD(NULL, this_ptr, "merge", &_4, 0, &configInstance); zephir_check_call_status(); continue; } else if (Z_TYPE_P(&configName) == IS_STRING) { - ZEPHIR_INIT_NVAR(&_22$$13); - ZVAL_STRING(&_22$$13, ""); - if (ZEPHIR_IS_IDENTICAL(&_22$$13, &defaultAdapter)) { - ZEPHIR_INIT_NVAR(&_23$$14); - object_init_ex(&_23$$14, phalcon_config_configfactory_ce); - ZEPHIR_CALL_METHOD(NULL, &_23$$14, "__construct", &_8, 191); + ZEPHIR_INIT_NVAR(&_21$$13); + ZVAL_STRING(&_21$$13, ""); + if (ZEPHIR_IS_IDENTICAL(&_21$$13, &defaultAdapter)) { + ZEPHIR_INIT_NVAR(&_22$$14); + object_init_ex(&_22$$14, phalcon_config_configfactory_ce); + ZEPHIR_CALL_METHOD(NULL, &_22$$14, "__construct", &_7, 192); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_24$$14, &_23$$14, "load", &_10, 192, &configName); + ZEPHIR_CALL_METHOD(&_23$$14, &_22$$14, "load", &_9, 193, &configName); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "merge", &_5, 0, &_24$$14); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "merge", &_4, 0, &_23$$14); zephir_check_call_status(); continue; } - ZEPHIR_INIT_NVAR(&_25$$13); - zephir_create_array(&_25$$13, 2, 0); - zephir_array_update_string(&_25$$13, SL("filePath"), &configName, PH_COPY | PH_SEPARATE); - zephir_array_update_string(&_25$$13, SL("adapter"), &defaultAdapter, PH_COPY | PH_SEPARATE); - ZEPHIR_CPY_WRT(&configInstance, &_25$$13); + ZEPHIR_INIT_NVAR(&_24$$13); + zephir_create_array(&_24$$13, 2, 0); + zephir_array_update_string(&_24$$13, SL("filePath"), &configName, PH_COPY | PH_SEPARATE); + zephir_array_update_string(&_24$$13, SL("adapter"), &defaultAdapter, PH_COPY | PH_SEPARATE); + ZEPHIR_CPY_WRT(&configInstance, &_24$$13); } else if (!(zephir_array_isset_string(&configInstance, SL("adapter")))) { zephir_array_update_string(&configInstance, SL("adapter"), &defaultAdapter, PH_COPY | PH_SEPARATE); } - zephir_array_fetch_string(&_26$$11, &configInstance, SL("adapter"), PH_NOISY | PH_READONLY, "phalcon/Config/Adapter/Grouped.zep", 105); - ZEPHIR_INIT_NVAR(&_27$$11); - ZVAL_STRING(&_27$$11, "array"); - if (ZEPHIR_IS_IDENTICAL(&_27$$11, &_26$$11)) { + zephir_array_fetch_string(&_25$$11, &configInstance, SL("adapter"), PH_NOISY | PH_READONLY, "phalcon/Config/Adapter/Grouped.zep", 105); + ZEPHIR_INIT_NVAR(&_26$$11); + ZVAL_STRING(&_26$$11, "array"); + if (ZEPHIR_IS_IDENTICAL(&_26$$11, &_25$$11)) { if (!(zephir_array_isset_string(&configInstance, SL("config")))) { + ZEPHIR_INIT_NVAR(&_27$$17); + object_init_ex(&_27$$17, phalcon_config_exception_ce); ZEPHIR_INIT_NVAR(&_28$$17); - object_init_ex(&_28$$17, phalcon_config_exception_ce); - ZEPHIR_INIT_NVAR(&_29$$17); - ZEPHIR_CONCAT_SS(&_29$$17, "To use 'array' adapter you have to specify ", "the 'config' as an array."); - ZEPHIR_CALL_METHOD(NULL, &_28$$17, "__construct", &_16, 32, &_29$$17); + ZEPHIR_CONCAT_SS(&_28$$17, "To use 'array' adapter you have to specify ", "the 'config' as an array."); + ZEPHIR_CALL_METHOD(NULL, &_27$$17, "__construct", &_15, 33, &_28$$17); zephir_check_call_status(); - zephir_throw_exception_debug(&_28$$17, "phalcon/Config/Adapter/Grouped.zep", 110); + zephir_throw_exception_debug(&_27$$17, "phalcon/Config/Adapter/Grouped.zep", 110); ZEPHIR_MM_RESTORE(); return; } @@ -296,19 +290,19 @@ PHP_METHOD(Phalcon_Config_Adapter_Grouped, __construct) zephir_array_fetch_string(&configArray, &configInstance, SL("config"), PH_NOISY, "phalcon/Config/Adapter/Grouped.zep", 113); ZEPHIR_INIT_NVAR(&configInstance); object_init_ex(&configInstance, phalcon_config_config_ce); - zephir_read_property(&_30$$16, this_ptr, ZEND_STRL("insensitive"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_METHOD(NULL, &configInstance, "__construct", &_18, 22, &configArray, &_30$$16); + zephir_read_property(&_29$$16, this_ptr, ZEND_STRL("insensitive"), PH_NOISY_CC | PH_READONLY); + ZEPHIR_CALL_METHOD(NULL, &configInstance, "__construct", &_17, 23, &configArray, &_29$$16); zephir_check_call_status(); } else { - ZEPHIR_INIT_NVAR(&_31$$18); - object_init_ex(&_31$$18, phalcon_config_configfactory_ce); - ZEPHIR_CALL_METHOD(NULL, &_31$$18, "__construct", &_8, 191); + ZEPHIR_INIT_NVAR(&_30$$18); + object_init_ex(&_30$$18, phalcon_config_configfactory_ce); + ZEPHIR_CALL_METHOD(NULL, &_30$$18, "__construct", &_7, 192); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_32$$18, &_31$$18, "load", &_10, 192, &configInstance); + ZEPHIR_CALL_METHOD(&_31$$18, &_30$$18, "load", &_9, 193, &configInstance); zephir_check_call_status(); - ZEPHIR_CPY_WRT(&configInstance, &_32$$18); + ZEPHIR_CPY_WRT(&configInstance, &_31$$18); } - ZEPHIR_CALL_METHOD(NULL, this_ptr, "merge", &_5, 0, &configInstance); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "merge", &_4, 0, &configInstance); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &arrayConfig, "next", NULL, 0); zephir_check_call_status(); diff --git a/ext/phalcon/config/adapter/ini.zep.c b/ext/phalcon/config/adapter/ini.zep.c index 96e52d2b7fc..5745df1d426 100644 --- a/ext/phalcon/config/adapter/ini.zep.c +++ b/ext/phalcon/config/adapter/ini.zep.c @@ -94,7 +94,7 @@ PHP_METHOD(Phalcon_Config_Adapter_Ini, __construct) zend_ulong _7, _11$$5, _24$$10; zval config; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zephir_fcall_cache_entry *_15 = NULL, *_21 = NULL, *_33 = NULL; + zephir_fcall_cache_entry *_15 = NULL, *_21 = NULL; zend_long mode, ZEPHIR_LAST_CALL_STATUS; zval *filePath_param = NULL, *mode_param = NULL, directives, iniConfig, lastValue, path, section, sections, _0, _1, *_5, _6, _2$$3, _3$$3, _4$$3, *_9$$5, _10$$5, _13$$6, _16$$7, _18$$8, _19$$8, _20$$4, *_22$$10, _23$$10, _26$$11, _28$$12, _30$$13, _31$$13, _32$$9; zval filePath, _14$$6, _17$$7, _27$$11, _29$$12; @@ -130,26 +130,19 @@ PHP_METHOD(Phalcon_Config_Adapter_Ini, __construct) ZVAL_UNDEF(&_31$$13); ZVAL_UNDEF(&_32$$9); ZVAL_UNDEF(&config); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(filePath) Z_PARAM_OPTIONAL Z_PARAM_LONG(mode) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &filePath_param, &mode_param); zephir_get_strval(&filePath, filePath_param); if (!mode_param) { mode = 1; } else { - mode = zephir_get_intval(mode_param); - } - - + } ZVAL_BOOL(&_0, 1); ZVAL_LONG(&_1, mode); ZEPHIR_CALL_METHOD(&iniConfig, this_ptr, "phpparseinifile", NULL, 0, &filePath, &_0, &_1); @@ -161,7 +154,7 @@ PHP_METHOD(Phalcon_Config_Adapter_Ini, __construct) zephir_basename(&_3$$3, &filePath); ZEPHIR_INIT_VAR(&_4$$3); ZEPHIR_CONCAT_SVS(&_4$$3, "Configuration file ", &_3$$3, " cannot be loaded"); - ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 32, &_4$$3); + ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 33, &_4$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_2$$3, "phalcon/Config/Adapter/Ini.zep", 79); ZEPHIR_MM_RESTORE(); @@ -313,7 +306,7 @@ PHP_METHOD(Phalcon_Config_Adapter_Ini, __construct) } ZEPHIR_INIT_NVAR(&directives); ZEPHIR_INIT_NVAR(§ion); - ZEPHIR_CALL_PARENT(NULL, phalcon_config_adapter_ini_ce, getThis(), "__construct", &_33, 0, &config); + ZEPHIR_CALL_PARENT(NULL, phalcon_config_adapter_ini_ce, getThis(), "__construct", NULL, 0, &config); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -324,7 +317,7 @@ PHP_METHOD(Phalcon_Config_Adapter_Ini, __construct) * * @param mixed $ini * - * @return array|float|int|mixed|string|null + * @return mixed */ PHP_METHOD(Phalcon_Config_Adapter_Ini, cast) { @@ -348,19 +341,13 @@ PHP_METHOD(Phalcon_Config_Adapter_Ini, cast) ZVAL_UNDEF(&_7$$6); ZVAL_UNDEF(&castMap); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(ini) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &ini); ZEPHIR_SEPARATE_PARAM(ini); - - if (Z_TYPE_P(ini) == IS_ARRAY) { ZEPHIR_RETURN_CALL_METHOD(this_ptr, "castarray", NULL, 0, ini); zephir_check_call_status(); @@ -430,19 +417,13 @@ PHP_METHOD(Phalcon_Config_Adapter_Ini, castArray) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_4$$3); ZVAL_UNDEF(&_6$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(ini) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &ini_param); zephir_get_arrval(&ini, ini_param); - - zephir_is_iterable(&ini, 1, "phalcon/Config/Adapter/Ini.zep", 175); if (Z_TYPE_P(&ini) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&ini), _2, _3, _0) @@ -510,20 +491,14 @@ PHP_METHOD(Phalcon_Config_Adapter_Ini, parseIniString) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(path) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &path_param, &value); zephir_get_strval(&path, path_param); - - ZEPHIR_CALL_METHOD(&castValue, this_ptr, "cast", NULL, 0, value); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_0); @@ -542,7 +517,7 @@ PHP_METHOD(Phalcon_Config_Adapter_Ini, parseIniString) ZEPHIR_INIT_VAR(&_3); zephir_substr(&_3, &path, zephir_get_intval(&_2), 0, ZEPHIR_SUBSTR_NO_LENGTH); zephir_get_strval(&path, &_3); - ZEPHIR_CALL_METHOD(&result, this_ptr, "parseinistring", NULL, 193, &path, &castValue); + ZEPHIR_CALL_METHOD(&result, this_ptr, "parseinistring", NULL, 194, &path, &castValue); zephir_check_call_status(); zephir_create_array(return_value, 1, 0); zephir_array_update_zval(return_value, &key, &result, PH_COPY); @@ -559,40 +534,31 @@ PHP_METHOD(Phalcon_Config_Adapter_Ini, phpParseIniFile) zend_bool processSections; zval *filename_param = NULL, *processSections_param = NULL, *scannerMode_param = NULL, _0, _1; zval filename; - zval *this_ptr = getThis(); ZVAL_UNDEF(&filename); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(filename) Z_PARAM_OPTIONAL Z_PARAM_BOOL(processSections) Z_PARAM_LONG(scannerMode) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &filename_param, &processSections_param, &scannerMode_param); zephir_get_strval(&filename, filename_param); if (!processSections_param) { processSections = 0; } else { - processSections = zephir_get_boolval(processSections_param); - } + } if (!scannerMode_param) { scannerMode = 1; } else { - scannerMode = zephir_get_intval(scannerMode_param); - } - - + } ZVAL_BOOL(&_0, (processSections ? 1 : 0)); ZVAL_LONG(&_1, scannerMode); - ZEPHIR_RETURN_CALL_FUNCTION("parse_ini_file", NULL, 194, &filename, &_0, &_1); + ZEPHIR_RETURN_CALL_FUNCTION("parse_ini_file", NULL, 195, &filename, &_0, &_1); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/config/adapter/ini.zep.h b/ext/phalcon/config/adapter/ini.zep.h index 3b9c8c513b7..05bb3364549 100644 --- a/ext/phalcon/config/adapter/ini.zep.h +++ b/ext/phalcon/config/adapter/ini.zep.h @@ -14,7 +14,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_config_adapter_ini___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_config_adapter_ini_cast, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_config_adapter_ini_cast, 0, 1, IS_MIXED, 0) ZEND_ARG_INFO(0, ini) ZEND_END_ARG_INFO() diff --git a/ext/phalcon/config/adapter/json.zep.c b/ext/phalcon/config/adapter/json.zep.c index 251f37a0859..51f1ddf3c29 100644 --- a/ext/phalcon/config/adapter/json.zep.c +++ b/ext/phalcon/config/adapter/json.zep.c @@ -63,25 +63,19 @@ PHP_METHOD(Phalcon_Config_Adapter_Json, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; - zval *filePath_param = NULL, _1, _2, _3, _4; + zval *filePath_param = NULL, _0, _1, _2, _3; zval filePath; - zval *this_ptr = getThis(); ZVAL_UNDEF(&filePath); + ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); - ZVAL_UNDEF(&_4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(filePath) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &filePath_param); if (UNEXPECTED(Z_TYPE_P(filePath_param) != IS_STRING && Z_TYPE_P(filePath_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'filePath' must be of the type string")); @@ -92,21 +86,19 @@ PHP_METHOD(Phalcon_Config_Adapter_Json, __construct) } else { ZEPHIR_INIT_VAR(&filePath); } - - - ZEPHIR_INIT_VAR(&_1); - object_init_ex(&_1, phalcon_support_helper_json_decode_ce); - if (zephir_has_constructor(&_1)) { - ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 0); + ZEPHIR_INIT_VAR(&_0); + object_init_ex(&_0, phalcon_support_helper_json_decode_ce); + if (zephir_has_constructor(&_0)) { + ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 0); zephir_check_call_status(); } - ZEPHIR_INIT_VAR(&_3); - zephir_file_get_contents(&_3, &filePath); - ZVAL_BOOL(&_4, 1); - ZEPHIR_CALL_METHOD(&_2, &_1, "__invoke", NULL, 195, &_3, &_4); + ZEPHIR_INIT_VAR(&_2); + zephir_file_get_contents(&_2, &filePath); + ZVAL_BOOL(&_3, 1); + ZEPHIR_CALL_METHOD(&_1, &_0, "__invoke", NULL, 196, &_2, &_3); zephir_check_call_status(); - ZEPHIR_CALL_PARENT(NULL, phalcon_config_adapter_json_ce, getThis(), "__construct", &_0, 0, &_2); + ZEPHIR_CALL_PARENT(NULL, phalcon_config_adapter_json_ce, getThis(), "__construct", NULL, 0, &_1); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } diff --git a/ext/phalcon/config/adapter/php.zep.c b/ext/phalcon/config/adapter/php.zep.c index 21bb1eca96f..b70caa96f4d 100644 --- a/ext/phalcon/config/adapter/php.zep.c +++ b/ext/phalcon/config/adapter/php.zep.c @@ -78,22 +78,16 @@ PHP_METHOD(Phalcon_Config_Adapter_Php, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; - zval *filePath_param = NULL, _1; + zval *filePath_param = NULL, _0; zval filePath; - zval *this_ptr = getThis(); ZVAL_UNDEF(&filePath); - ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; + ZVAL_UNDEF(&_0); ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(filePath) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &filePath_param); if (UNEXPECTED(Z_TYPE_P(filePath_param) != IS_STRING && Z_TYPE_P(filePath_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'filePath' must be of the type string")); @@ -104,13 +98,11 @@ PHP_METHOD(Phalcon_Config_Adapter_Php, __construct) } else { ZEPHIR_INIT_VAR(&filePath); } - - - ZEPHIR_OBSERVE_OR_NULLIFY_PPZV(&_1); - if (zephir_require_zval_ret(&_1, &filePath) == FAILURE) { + ZEPHIR_OBSERVE_OR_NULLIFY_PPZV(&_0); + if (zephir_require_zval_ret(&_0, &filePath) == FAILURE) { RETURN_MM_NULL(); } - ZEPHIR_CALL_PARENT(NULL, phalcon_config_adapter_php_ce, getThis(), "__construct", &_0, 0, &_1); + ZEPHIR_CALL_PARENT(NULL, phalcon_config_adapter_php_ce, getThis(), "__construct", NULL, 0, &_0); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } diff --git a/ext/phalcon/config/adapter/yaml.zep.c b/ext/phalcon/config/adapter/yaml.zep.c index f6635114cd0..4931e37d2be 100644 --- a/ext/phalcon/config/adapter/yaml.zep.c +++ b/ext/phalcon/config/adapter/yaml.zep.c @@ -80,7 +80,6 @@ ZEPHIR_INIT_CLASS(Phalcon_Config_Adapter_Yaml) PHP_METHOD(Phalcon_Config_Adapter_Yaml, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zephir_fcall_cache_entry *_7 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS, ndocs; zval callbacks; zval *filePath_param = NULL, *callbacks_param = NULL, yamlConfig, _0, _1, _2$$5, _3$$5, _4$$6, _5$$6, _6$$6; @@ -97,17 +96,14 @@ PHP_METHOD(Phalcon_Config_Adapter_Yaml, __construct) ZVAL_UNDEF(&_5$$6); ZVAL_UNDEF(&_6$$6); ZVAL_UNDEF(&callbacks); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(filePath) Z_PARAM_OPTIONAL Z_PARAM_ARRAY_OR_NULL(callbacks) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &filePath_param, &callbacks_param); if (UNEXPECTED(Z_TYPE_P(filePath_param) != IS_STRING && Z_TYPE_P(filePath_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'filePath' must be of the type string")); @@ -123,8 +119,6 @@ PHP_METHOD(Phalcon_Config_Adapter_Yaml, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&callbacks, callbacks_param); } - - ndocs = 0; ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "yaml"); @@ -150,13 +144,13 @@ PHP_METHOD(Phalcon_Config_Adapter_Yaml, __construct) zephir_basename(&_5$$6, &filePath); ZEPHIR_INIT_VAR(&_6$$6); ZEPHIR_CONCAT_SVS(&_6$$6, "Configuration file ", &_5$$6, " can't be loaded"); - ZEPHIR_CALL_METHOD(NULL, &_4$$6, "__construct", NULL, 32, &_6$$6); + ZEPHIR_CALL_METHOD(NULL, &_4$$6, "__construct", NULL, 33, &_6$$6); zephir_check_call_status(); zephir_throw_exception_debug(&_4$$6, "phalcon/Config/Adapter/Yaml.zep", 76); ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_CALL_PARENT(NULL, phalcon_config_adapter_yaml_ce, getThis(), "__construct", &_7, 0, &yamlConfig); + ZEPHIR_CALL_PARENT(NULL, phalcon_config_adapter_yaml_ce, getThis(), "__construct", NULL, 0, &yamlConfig); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -169,14 +163,12 @@ PHP_METHOD(Phalcon_Config_Adapter_Yaml, phpYamlParseFile) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *filename, filename_sub, *pos = NULL, pos_sub, *ndocs = NULL, ndocs_sub, *callbacks = NULL, callbacks_sub, __$null; - zval *this_ptr = getThis(); ZVAL_UNDEF(&filename_sub); ZVAL_UNDEF(&pos_sub); ZVAL_UNDEF(&ndocs_sub); ZVAL_UNDEF(&callbacks_sub); ZVAL_NULL(&__$null); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 4) Z_PARAM_ZVAL(filename) @@ -185,10 +177,8 @@ PHP_METHOD(Phalcon_Config_Adapter_Yaml, phpYamlParseFile) Z_PARAM_ZVAL_OR_NULL(ndocs) Z_PARAM_ZVAL(callbacks) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 3, &filename, &pos, &ndocs, &callbacks); if (!pos) { pos = &pos_sub; @@ -204,10 +194,8 @@ PHP_METHOD(Phalcon_Config_Adapter_Yaml, phpYamlParseFile) ZEPHIR_INIT_VAR(callbacks); array_init(callbacks); } - - ZEPHIR_MAKE_REF(ndocs); - ZEPHIR_RETURN_CALL_FUNCTION("yaml_parse_file", NULL, 196, filename, pos, ndocs, callbacks); + ZEPHIR_RETURN_CALL_FUNCTION("yaml_parse_file", NULL, 197, filename, pos, ndocs, callbacks); ZEPHIR_UNREF(ndocs); zephir_check_call_status(); RETURN_MM(); @@ -219,23 +207,16 @@ PHP_METHOD(Phalcon_Config_Adapter_Yaml, phpExtensionLoaded) zend_long ZEPHIR_LAST_CALL_STATUS; zval *name_param = NULL; zval name; - zval *this_ptr = getThis(); ZVAL_UNDEF(&name); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &name_param); zephir_get_strval(&name, name_param); - - - ZEPHIR_RETURN_CALL_FUNCTION("extension_loaded", NULL, 197, &name); + ZEPHIR_RETURN_CALL_FUNCTION("extension_loaded", NULL, 198, &name); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/config/adapter/yaml.zep.h b/ext/phalcon/config/adapter/yaml.zep.h index 086a1eff5e6..be20d763512 100644 --- a/ext/phalcon/config/adapter/yaml.zep.h +++ b/ext/phalcon/config/adapter/yaml.zep.h @@ -9,11 +9,7 @@ PHP_METHOD(Phalcon_Config_Adapter_Yaml, phpExtensionLoaded); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_config_adapter_yaml___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, filePath, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, callbacks, IS_ARRAY, 1, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, callbacks, 1) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, callbacks, IS_ARRAY, 1, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_config_adapter_yaml_phpyamlparsefile, 0, 0, 1) diff --git a/ext/phalcon/config/config.zep.c b/ext/phalcon/config/config.zep.c index 3830959820d..87fc67ee00f 100644 --- a/ext/phalcon/config/config.zep.c +++ b/ext/phalcon/config/config.zep.c @@ -75,9 +75,6 @@ ZEPHIR_INIT_CLASS(Phalcon_Config_Config) */ PHP_METHOD(Phalcon_Config_Config, getPathDelimiter) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "pathDelimiter"); } @@ -114,24 +111,18 @@ PHP_METHOD(Phalcon_Config_Config, merge) ZVAL_UNDEF(&result); ZVAL_UNDEF(&source); ZVAL_UNDEF(&_1$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(toMerge) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &toMerge); - - ZEPHIR_CALL_METHOD(&source, this_ptr, "toarray", NULL, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, this_ptr, "clear", NULL, 0); zephir_check_call_status(); if (Z_TYPE_P(toMerge) == IS_ARRAY) { - ZEPHIR_CALL_METHOD(&result, this_ptr, "internalmerge", NULL, 20, &source, toMerge); + ZEPHIR_CALL_METHOD(&result, this_ptr, "internalmerge", NULL, 21, &source, toMerge); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, this_ptr, "init", NULL, 0, &result); zephir_check_call_status(); @@ -144,7 +135,7 @@ PHP_METHOD(Phalcon_Config_Config, merge) if (_0) { ZEPHIR_CALL_METHOD(&_1$$4, toMerge, "toarray", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&result, this_ptr, "internalmerge", NULL, 20, &source, &_1$$4); + ZEPHIR_CALL_METHOD(&result, this_ptr, "internalmerge", NULL, 21, &source, &_1$$4); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, this_ptr, "init", NULL, 0, &result); zephir_check_call_status(); @@ -188,7 +179,6 @@ PHP_METHOD(Phalcon_Config_Config, path) ZVAL_UNDEF(&_1$$4); ZVAL_UNDEF(&_3$$5); ZVAL_UNDEF(&_4$$5); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(path) @@ -196,10 +186,8 @@ PHP_METHOD(Phalcon_Config_Config, path) Z_PARAM_ZVAL_OR_NULL(defaultValue) Z_PARAM_STR_OR_NULL(delimiter) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &path_param, &defaultValue, &delimiter_param); zephir_get_strval(&path, path_param); if (!defaultValue) { @@ -211,8 +199,6 @@ PHP_METHOD(Phalcon_Config_Config, path) } else { zephir_get_strval(&delimiter, delimiter_param); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "has", NULL, 0, &path); zephir_check_call_status(); if (ZEPHIR_IS_TRUE_IDENTICAL(&_0)) { @@ -236,7 +222,7 @@ PHP_METHOD(Phalcon_Config_Config, path) break; } ZEPHIR_MAKE_REF(&keys); - ZEPHIR_CALL_FUNCTION(&key, "array_shift", &_2, 21, &keys); + ZEPHIR_CALL_FUNCTION(&key, "array_shift", &_2, 22, &keys); ZEPHIR_UNREF(&keys); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_3$$5, &config, "has", NULL, 0, &key); @@ -275,24 +261,19 @@ PHP_METHOD(Phalcon_Config_Config, setPathDelimiter) zval *this_ptr = getThis(); ZVAL_UNDEF(&delimiter); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(delimiter) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &delimiter_param); if (!delimiter_param) { ZEPHIR_INIT_VAR(&delimiter); } else { zephir_get_strval(&delimiter, delimiter_param); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("pathDelimiter"), &delimiter); RETURN_THIS(); } @@ -310,51 +291,48 @@ PHP_METHOD(Phalcon_Config_Config, setPathDelimiter) */ PHP_METHOD(Phalcon_Config_Config, toArray) { - zend_bool _5$$3, _7$$5; - zend_string *_4; - zend_ulong _3; + zend_bool _4$$3, _6$$5; + zend_string *_3; + zend_ulong _2; zval results; - zval data, key, value, *_1, _2, _6$$4, _8$$6; + zval data, key, value, *_0, _1, _5$$4, _7$$6; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; - zval *this_ptr = getThis(); ZVAL_UNDEF(&data); ZVAL_UNDEF(&key); ZVAL_UNDEF(&value); - ZVAL_UNDEF(&_2); - ZVAL_UNDEF(&_6$$4); - ZVAL_UNDEF(&_8$$6); + ZVAL_UNDEF(&_1); + ZVAL_UNDEF(&_5$$4); + ZVAL_UNDEF(&_7$$6); ZVAL_UNDEF(&results); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&results); array_init(&results); - ZEPHIR_CALL_PARENT(&data, phalcon_config_config_ce, getThis(), "toarray", &_0, 0); + ZEPHIR_CALL_PARENT(&data, phalcon_config_config_ce, getThis(), "toarray", NULL, 0); zephir_check_call_status(); zephir_is_iterable(&data, 0, "phalcon/Config/Config.zep", 203); if (Z_TYPE_P(&data) == IS_ARRAY) { - ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&data), _3, _4, _1) + ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&data), _2, _3, _0) { ZEPHIR_INIT_NVAR(&key); - if (_4 != NULL) { - ZVAL_STR_COPY(&key, _4); + if (_3 != NULL) { + ZVAL_STR_COPY(&key, _3); } else { - ZVAL_LONG(&key, _3); + ZVAL_LONG(&key, _2); } ZEPHIR_INIT_NVAR(&value); - ZVAL_COPY(&value, _1); - _5$$3 = Z_TYPE_P(&value) == IS_OBJECT; - if (_5$$3) { - _5$$3 = 1 == (zephir_method_exists_ex(&value, ZEND_STRL("toarray")) == SUCCESS); + ZVAL_COPY(&value, _0); + _4$$3 = Z_TYPE_P(&value) == IS_OBJECT; + if (_4$$3) { + _4$$3 = 1 == (zephir_method_exists_ex(&value, ZEND_STRL("toarray")) == SUCCESS); } - if (_5$$3) { - ZEPHIR_CALL_METHOD(&_6$$4, &value, "toarray", NULL, 0); + if (_4$$3) { + ZEPHIR_CALL_METHOD(&_5$$4, &value, "toarray", NULL, 0); zephir_check_call_status(); - ZEPHIR_CPY_WRT(&value, &_6$$4); + ZEPHIR_CPY_WRT(&value, &_5$$4); } zephir_array_update_zval(&results, &key, &value, PH_COPY | PH_SEPARATE); } ZEND_HASH_FOREACH_END(); @@ -362,23 +340,23 @@ PHP_METHOD(Phalcon_Config_Config, toArray) ZEPHIR_CALL_METHOD(NULL, &data, "rewind", NULL, 0); zephir_check_call_status(); while (1) { - ZEPHIR_CALL_METHOD(&_2, &data, "valid", NULL, 0); + ZEPHIR_CALL_METHOD(&_1, &data, "valid", NULL, 0); zephir_check_call_status(); - if (!zend_is_true(&_2)) { + if (!zend_is_true(&_1)) { break; } ZEPHIR_CALL_METHOD(&key, &data, "key", NULL, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&value, &data, "current", NULL, 0); zephir_check_call_status(); - _7$$5 = Z_TYPE_P(&value) == IS_OBJECT; - if (_7$$5) { - _7$$5 = 1 == (zephir_method_exists_ex(&value, ZEND_STRL("toarray")) == SUCCESS); + _6$$5 = Z_TYPE_P(&value) == IS_OBJECT; + if (_6$$5) { + _6$$5 = 1 == (zephir_method_exists_ex(&value, ZEND_STRL("toarray")) == SUCCESS); } - if (_7$$5) { - ZEPHIR_CALL_METHOD(&_8$$6, &value, "toarray", NULL, 0); + if (_6$$5) { + ZEPHIR_CALL_METHOD(&_7$$6, &value, "toarray", NULL, 0); zephir_check_call_status(); - ZEPHIR_CPY_WRT(&value, &_8$$6); + ZEPHIR_CPY_WRT(&value, &_7$$6); } zephir_array_update_zval(&results, &key, &value, PH_COPY | PH_SEPARATE); ZEPHIR_CALL_METHOD(NULL, &data, "next", NULL, 0); @@ -421,21 +399,15 @@ PHP_METHOD(Phalcon_Config_Config, internalMerge) ZVAL_UNDEF(&_12$$5); ZVAL_UNDEF(&_13$$6); ZVAL_UNDEF(&_14$$6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ARRAY(source) Z_PARAM_ARRAY(target) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &source_param, &target_param); zephir_get_arrval(&source, source_param); zephir_get_arrval(&target, target_param); - - zephir_is_iterable(&target, 0, "phalcon/Config/Config.zep", 232); if (Z_TYPE_P(&target) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&target), _2, _3, _0) @@ -460,7 +432,7 @@ PHP_METHOD(Phalcon_Config_Config, internalMerge) } if (_5$$3) { zephir_array_fetch(&_8$$4, &source, &key, PH_NOISY | PH_READONLY, "phalcon/Config/Config.zep", 224); - ZEPHIR_CALL_METHOD(&_7$$4, this_ptr, "internalmerge", &_9, 20, &_8$$4, &value); + ZEPHIR_CALL_METHOD(&_7$$4, this_ptr, "internalmerge", &_9, 21, &_8$$4, &value); zephir_check_call_status(); zephir_array_update_zval(&source, &key, &_7$$4, PH_COPY | PH_SEPARATE); continue; @@ -492,7 +464,7 @@ PHP_METHOD(Phalcon_Config_Config, internalMerge) } if (_11$$5) { zephir_array_fetch(&_14$$6, &source, &key, PH_NOISY | PH_READONLY, "phalcon/Config/Config.zep", 224); - ZEPHIR_CALL_METHOD(&_13$$6, this_ptr, "internalmerge", &_9, 20, &_14$$6, &value); + ZEPHIR_CALL_METHOD(&_13$$6, this_ptr, "internalmerge", &_9, 21, &_14$$6, &value); zephir_check_call_status(); zephir_array_update_zval(&source, &key, &_13$$6, PH_COPY | PH_SEPARATE); continue; @@ -529,20 +501,14 @@ PHP_METHOD(Phalcon_Config_Config, setData) ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ZVAL(element) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &element, &value); ZEPHIR_SEPARATE_PARAM(element); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("data"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&data, &_0); zephir_cast_to_string(&_1, element); @@ -559,7 +525,7 @@ PHP_METHOD(Phalcon_Config_Config, setData) ZEPHIR_INIT_VAR(&_2$$3); object_init_ex(&_2$$3, phalcon_config_config_ce); zephir_read_property(&_3$$3, this_ptr, ZEND_STRL("insensitive"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 22, value, &_3$$3); + ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 23, value, &_3$$3); zephir_check_call_status(); zephir_array_update_zval(&data, element, &_2$$3, PH_COPY | PH_SEPARATE); } else { diff --git a/ext/phalcon/config/configfactory.zep.c b/ext/phalcon/config/configfactory.zep.c index 30b3fa953d1..14c74965a2e 100644 --- a/ext/phalcon/config/configfactory.zep.c +++ b/ext/phalcon/config/configfactory.zep.c @@ -64,16 +64,12 @@ PHP_METHOD(Phalcon_Config_ConfigFactory, __construct) zval *this_ptr = getThis(); ZVAL_UNDEF(&services); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(services) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &services_param); if (!services_param) { ZEPHIR_INIT_VAR(&services); @@ -81,8 +77,6 @@ PHP_METHOD(Phalcon_Config_ConfigFactory, __construct) } else { zephir_get_arrval(&services, services_param); } - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "init", NULL, 0, &services); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); @@ -118,30 +112,24 @@ PHP_METHOD(Phalcon_Config_ConfigFactory, load) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(config) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &config); - - ZEPHIR_CALL_METHOD(&configArray, this_ptr, "parseconfig", NULL, 0, config); zephir_check_call_status(); zephir_array_fetch_string(&_0, &configArray, SL("adapter"), PH_NOISY | PH_READONLY, "phalcon/Config/ConfigFactory.zep", 60); ZEPHIR_INIT_VAR(&adapter); zephir_fast_strtolower(&adapter, &_0); - ZEPHIR_OBS_VAR(&filePath); + zephir_memory_observe(&filePath); zephir_array_fetch_string(&filePath, &configArray, SL("filePath"), PH_NOISY, "phalcon/Config/ConfigFactory.zep", 61); ZVAL_LONG(&_1, 4); - ZEPHIR_CALL_FUNCTION(&_2, "pathinfo", NULL, 88, &filePath, &_1); + ZEPHIR_CALL_FUNCTION(&_2, "pathinfo", NULL, 89, &filePath, &_1); zephir_check_call_status(); if (1 == ZEPHIR_IS_EMPTY(&_2)) { - ZEPHIR_CALL_FUNCTION(&_3$$3, "lcfirst", NULL, 76, &adapter); + ZEPHIR_CALL_FUNCTION(&_3$$3, "lcfirst", NULL, 77, &adapter); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_4$$3); ZEPHIR_CONCAT_SV(&_4$$3, ".", &_3$$3); @@ -202,7 +190,6 @@ PHP_METHOD(Phalcon_Config_ConfigFactory, newInstance) ZVAL_NULL(&__$null); ZVAL_UNDEF(&definition); ZVAL_UNDEF(&arguments); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(name) @@ -210,10 +197,8 @@ PHP_METHOD(Phalcon_Config_ConfigFactory, newInstance) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(params) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &name_param, &fileName_param, ¶ms); zephir_get_strval(&name, name_param); zephir_get_strval(&fileName, fileName_param); @@ -221,8 +206,6 @@ PHP_METHOD(Phalcon_Config_ConfigFactory, newInstance) params = ¶ms_sub; params = &__$null; } - - ZEPHIR_CALL_METHOD(&definition, this_ptr, "getservice", NULL, 0, &name); zephir_check_call_status(); ZEPHIR_INIT_VAR(&arguments); @@ -247,9 +230,6 @@ PHP_METHOD(Phalcon_Config_ConfigFactory, newInstance) */ PHP_METHOD(Phalcon_Config_ConfigFactory, getExceptionClass) { - zval *this_ptr = getThis(); - - RETURN_STRING("Phalcon\\Config\\Exception"); } @@ -261,9 +241,6 @@ PHP_METHOD(Phalcon_Config_ConfigFactory, getExceptionClass) */ PHP_METHOD(Phalcon_Config_ConfigFactory, getServices) { - zval *this_ptr = getThis(); - - zephir_create_array(return_value, 5, 0); add_assoc_stringl_ex(return_value, SL("grouped"), SL("Phalcon\\Config\\Adapter\\Grouped")); @@ -294,23 +271,17 @@ PHP_METHOD(Phalcon_Config_ConfigFactory, parseConfig) ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_3$$5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(config) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &config); ZEPHIR_SEPARATE_PARAM(config); - - if (Z_TYPE_P(config) == IS_STRING) { ZEPHIR_CPY_WRT(&oldConfig, config); ZVAL_LONG(&_0$$3, 4); - ZEPHIR_CALL_FUNCTION(&extension, "pathinfo", NULL, 88, config, &_0$$3); + ZEPHIR_CALL_FUNCTION(&extension, "pathinfo", NULL, 89, config, &_0$$3); zephir_check_call_status(); if (1 == ZEPHIR_IS_EMPTY(&extension)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_config_exception_ce, "You need to provide the extension in the file path", "phalcon/Config/ConfigFactory.zep", 161); @@ -335,7 +306,7 @@ PHP_METHOD(Phalcon_Config_ConfigFactory, parseConfig) ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_config_exception_ce, "Config must be array or Phalcon\\Config\\Config object", "phalcon/Config/ConfigFactory.zep", 177); return; } - ZEPHIR_CALL_METHOD(NULL, this_ptr, "checkconfigarray", NULL, 198, config); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "checkconfigarray", NULL, 199, config); zephir_check_call_status(); RETVAL_ZVAL(config, 1, 0); RETURN_MM(); @@ -351,22 +322,15 @@ PHP_METHOD(Phalcon_Config_ConfigFactory, checkConfigArray) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *config_param = NULL; zval config; - zval *this_ptr = getThis(); ZVAL_UNDEF(&config); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(config) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &config_param); zephir_get_arrval(&config, config_param); - - if (1 != zephir_array_isset_string(&config, SL("filePath"))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_config_exception_ce, "You must provide 'filePath' option in factory config parameter.", "phalcon/Config/ConfigFactory.zep", 195); return; diff --git a/ext/phalcon/config/configfactory.zep.h b/ext/phalcon/config/configfactory.zep.h index 3a56e5141e8..1c4ab444ba3 100644 --- a/ext/phalcon/config/configfactory.zep.h +++ b/ext/phalcon/config/configfactory.zep.h @@ -12,11 +12,7 @@ PHP_METHOD(Phalcon_Config_ConfigFactory, parseConfig); PHP_METHOD(Phalcon_Config_ConfigFactory, checkConfigArray); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_config_configfactory___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, services, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, services, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, services, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_config_configfactory_load, 0, 1, Phalcon\\Config\\ConfigInterface, 0) diff --git a/ext/phalcon/datamapper/pdo/connection.zep.c b/ext/phalcon/datamapper/pdo/connection.zep.c index 3ac8346b9a1..648b9739094 100644 --- a/ext/phalcon/datamapper/pdo/connection.zep.c +++ b/ext/phalcon/datamapper/pdo/connection.zep.c @@ -92,7 +92,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection, __construct) ZVAL_UNDEF(&queries); ZVAL_UNDEF(&available); ZVAL_UNDEF(&_5); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 6) Z_PARAM_STR(dsn) @@ -103,10 +102,8 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection, __construct) Z_PARAM_ARRAY(queries) Z_PARAM_OBJECT_OF_CLASS_OR_NULL(profiler, phalcon_datamapper_pdo_profiler_profilerinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 5, &dsn_param, &username_param, &password_param, &options_param, &queries_param, &profiler); zephir_get_strval(&dsn, dsn_param); if (!username_param) { @@ -137,8 +134,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection, __construct) } else { ZEPHIR_SEPARATE_PARAM(profiler); } - - ZEPHIR_INIT_VAR(&parts); zephir_fast_explode_str(&parts, SL(":"), &dsn, LONG_MAX); ZEPHIR_INIT_VAR(&available); @@ -154,7 +149,7 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection, __construct) zephir_array_fetch_long(&_2$$3, &parts, 0, PH_NOISY | PH_READONLY, "phalcon/DataMapper/Pdo/Connection.zep", 67); ZEPHIR_INIT_VAR(&_3$$3); ZEPHIR_CONCAT_SVS(&_3$$3, "Driver not supported [", &_2$$3, "]"); - ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 199, &_3$$3); + ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 200, &_3$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_1$$3, "phalcon/DataMapper/Pdo/Connection.zep", 68); ZEPHIR_MM_RESTORE(); @@ -176,7 +171,7 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection, __construct) if (Z_TYPE_P(profiler) == IS_NULL) { ZEPHIR_INIT_NVAR(profiler); object_init_ex(profiler, phalcon_datamapper_pdo_profiler_profiler_ce); - ZEPHIR_CALL_METHOD(NULL, profiler, "__construct", NULL, 200); + ZEPHIR_CALL_METHOD(NULL, profiler, "__construct", NULL, 201); zephir_check_call_status(); } ZEPHIR_CALL_METHOD(NULL, this_ptr, "setprofiler", NULL, 0, profiler); @@ -202,15 +197,14 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection, __debugInfo) ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_5); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_create_array(return_value, 1, 0); ZEPHIR_INIT_VAR(&_0); zephir_create_array(&_0, 5, 0); zephir_read_property(&_1, this_ptr, ZEND_STRL("arguments"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_OBS_VAR(&_2); + zephir_memory_observe(&_2); zephir_array_fetch_long(&_2, &_1, 0, PH_NOISY, "phalcon/DataMapper/Pdo/Connection.zep", 102); zephir_array_fast_append(&_0, &_2); ZEPHIR_INIT_VAR(&_3); @@ -258,9 +252,8 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection, connect) ZVAL_UNDEF(&_7$$3); ZVAL_UNDEF(&_8$$3); ZVAL_UNDEF(&_10$$3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("pdo"), PH_NOISY_CC | PH_READONLY); if (!(zephir_is_true(&_0))) { @@ -270,19 +263,19 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection, connect) ZEPHIR_CALL_METHOD(NULL, &_1$$3, "start", NULL, 0, &_2$$3); zephir_check_call_status(); zephir_read_property(&_3$$3, this_ptr, ZEND_STRL("arguments"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_OBS_VAR(&dsn); + zephir_memory_observe(&dsn); zephir_array_fetch_long(&dsn, &_3$$3, 0, PH_NOISY, "phalcon/DataMapper/Pdo/Connection.zep", 122); zephir_read_property(&_4$$3, this_ptr, ZEND_STRL("arguments"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_OBS_VAR(&username); + zephir_memory_observe(&username); zephir_array_fetch_long(&username, &_4$$3, 1, PH_NOISY, "phalcon/DataMapper/Pdo/Connection.zep", 123); zephir_read_property(&_5$$3, this_ptr, ZEND_STRL("arguments"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_OBS_VAR(&password); + zephir_memory_observe(&password); zephir_array_fetch_long(&password, &_5$$3, 2, PH_NOISY, "phalcon/DataMapper/Pdo/Connection.zep", 124); zephir_read_property(&_6$$3, this_ptr, ZEND_STRL("arguments"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_OBS_VAR(&options); + zephir_memory_observe(&options); zephir_array_fetch_long(&options, &_6$$3, 3, PH_NOISY, "phalcon/DataMapper/Pdo/Connection.zep", 125); zephir_read_property(&_7$$3, this_ptr, ZEND_STRL("arguments"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_OBS_VAR(&queries); + zephir_memory_observe(&queries); zephir_array_fetch_long(&queries, &_7$$3, 4, PH_NOISY, "phalcon/DataMapper/Pdo/Connection.zep", 126); ZEPHIR_INIT_NVAR(&_2$$3); object_init_ex(&_2$$3, php_pdo_get_dbh_ce()); @@ -337,9 +330,8 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection, disconnect) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("profiler"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_1); @@ -361,7 +353,8 @@ zend_object *zephir_init_properties_Phalcon_DataMapper_Pdo_Connection(zend_class ZVAL_UNDEF(&_1$$3); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/datamapper/pdo/connection.zep.h b/ext/phalcon/datamapper/pdo/connection.zep.h index 7da1fb2a08e..40729847a17 100644 --- a/ext/phalcon/datamapper/pdo/connection.zep.h +++ b/ext/phalcon/datamapper/pdo/connection.zep.h @@ -13,16 +13,8 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_datamapper_pdo_connection___construct, 0, ZEND_ARG_TYPE_INFO(0, dsn, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, username, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 1) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, queries, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, queries, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, queries, IS_ARRAY, 0, "[]") ZEND_ARG_OBJ_INFO(0, profiler, Phalcon\\DataMapper\\Pdo\\Profiler\\ProfilerInterface, 1) ZEND_END_ARG_INFO() diff --git a/ext/phalcon/datamapper/pdo/connection/abstractconnection.zep.c b/ext/phalcon/datamapper/pdo/connection/abstractconnection.zep.c index 1c1be1599f5..d40f4514971 100644 --- a/ext/phalcon/datamapper/pdo/connection/abstractconnection.zep.c +++ b/ext/phalcon/datamapper/pdo/connection/abstractconnection.zep.c @@ -83,20 +83,14 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, __call) ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&arguments); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ZVAL(name) Z_PARAM_ARRAY(arguments) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &name, &arguments_param); zephir_get_arrval(&arguments, arguments_param); - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "connect", NULL, 0); zephir_check_call_status(); zephir_read_property(&_0, this_ptr, ZEND_STRL("pdo"), PH_NOISY_CC | PH_READONLY); @@ -107,7 +101,7 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, __call) ZEPHIR_CONCAT_SVSVS(&message, "Class '", &className, "' does not have a method '", name, "'"); ZEPHIR_INIT_VAR(&_1$$3); object_init_ex(&_1$$3, spl_ce_BadMethodCallException); - ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 75, &message); + ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 76, &message); zephir_check_call_status(); zephir_throw_exception_debug(&_1$$3, "phalcon/DataMapper/Pdo/Connection/AbstractConnection.zep", 59); ZEPHIR_MM_RESTORE(); @@ -115,7 +109,7 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, __call) } ZEPHIR_INIT_VAR(&_2); zephir_create_array(&_2, 2, 0); - ZEPHIR_OBS_VAR(&_3); + zephir_memory_observe(&_3); zephir_read_property(&_3, this_ptr, ZEND_STRL("pdo"), PH_NOISY_CC); zephir_array_fast_append(&_2, &_3); zephir_array_fast_append(&_2, name); @@ -142,9 +136,8 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, beginTransactio ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(NULL, this_ptr, "connect", NULL, 0); zephir_check_call_status(); @@ -180,9 +173,8 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, commit) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(NULL, this_ptr, "connect", NULL, 0); zephir_check_call_status(); @@ -227,9 +219,8 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, errorCode) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(NULL, this_ptr, "connect", NULL, 0); zephir_check_call_status(); @@ -252,9 +243,8 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, errorInfo) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(NULL, this_ptr, "connect", NULL, 0); zephir_check_call_status(); @@ -286,19 +276,13 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, exec) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(statement) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &statement_param); zephir_get_strval(&statement, statement_param); - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "connect", NULL, 0); zephir_check_call_status(); zephir_read_property(&_0, this_ptr, ZEND_STRL("profiler"), PH_NOISY_CC | PH_READONLY); @@ -335,17 +319,13 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, fetchAffected) ZVAL_UNDEF(&statement); ZVAL_UNDEF(&sth); ZVAL_UNDEF(&values); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(statement) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(values) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &statement_param, &values_param); zephir_get_strval(&statement, statement_param); if (!values_param) { @@ -354,8 +334,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, fetchAffected) } else { zephir_get_arrval(&values, values_param); } - - ZEPHIR_CALL_METHOD(&sth, this_ptr, "perform", NULL, 0, &statement, &values); zephir_check_call_status(); ZEPHIR_RETURN_CALL_METHOD(&sth, "rowcount", NULL, 0); @@ -385,17 +363,13 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, fetchAll) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&values); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(statement) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(values) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &statement_param, &values_param); zephir_get_strval(&statement, statement_param); if (!values_param) { @@ -404,8 +378,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, fetchAll) } else { zephir_get_arrval(&values, values_param); } - - ZEPHIR_INIT_VAR(&_0); zephir_create_array(&_0, 1, 0); ZEPHIR_INIT_VAR(&_1); @@ -450,17 +422,13 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, fetchAssoc) ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&values); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(statement) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(values) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &statement_param, &values_param); zephir_get_strval(&statement, statement_param); if (!values_param) { @@ -469,8 +437,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, fetchAssoc) } else { zephir_get_arrval(&values, values_param); } - - ZEPHIR_INIT_VAR(&data); array_init(&data); ZEPHIR_CALL_METHOD(&sth, this_ptr, "perform", NULL, 0, &statement, &values); @@ -514,18 +480,14 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, fetchColumn) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&values); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(statement) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(values) Z_PARAM_LONG(column) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &statement_param, &values_param, &column_param); zephir_get_strval(&statement, statement_param); if (!values_param) { @@ -537,10 +499,7 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, fetchColumn) if (!column_param) { column = 0; } else { - column = zephir_get_intval(column_param); - } - - + } ZEPHIR_INIT_VAR(&_0); zephir_create_array(&_0, 2, 0); ZEPHIR_INIT_VAR(&_1); @@ -580,18 +539,14 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, fetchGroup) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&values); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(statement) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(values) Z_PARAM_LONG(flags) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &statement_param, &values_param, &flags_param); zephir_get_strval(&statement, statement_param); if (!values_param) { @@ -603,10 +558,7 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, fetchGroup) if (!flags_param) { flags = 2; } else { - flags = zephir_get_intval(flags_param); - } - - + } ZEPHIR_INIT_VAR(&_0); zephir_create_array(&_0, 1, 0); ZEPHIR_INIT_VAR(&_1); @@ -649,8 +601,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, fetchObject) ZVAL_UNDEF(&sth); ZVAL_UNDEF(&values); ZVAL_UNDEF(&arguments); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 4) Z_PARAM_STR(statement) Z_PARAM_OPTIONAL @@ -658,10 +608,8 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, fetchObject) Z_PARAM_STR(className) Z_PARAM_ARRAY(arguments) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 3, &statement_param, &values_param, &className_param, &arguments_param); zephir_get_strval(&statement, statement_param); if (!values_param) { @@ -682,8 +630,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, fetchObject) } else { zephir_get_arrval(&arguments, arguments_param); } - - ZEPHIR_CALL_METHOD(&sth, this_ptr, "perform", NULL, 0, &statement, &values); zephir_check_call_status(); ZEPHIR_RETURN_CALL_METHOD(&sth, "fetchobject", NULL, 0, &className, &arguments); @@ -723,8 +669,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, fetchObjects) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&values); ZVAL_UNDEF(&arguments); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 4) Z_PARAM_STR(statement) Z_PARAM_OPTIONAL @@ -732,10 +676,8 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, fetchObjects) Z_PARAM_STR(className) Z_PARAM_ARRAY(arguments) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 3, &statement_param, &values_param, &className_param, &arguments_param); zephir_get_strval(&statement, statement_param); if (!values_param) { @@ -756,8 +698,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, fetchObjects) } else { zephir_get_arrval(&arguments, arguments_param); } - - ZEPHIR_CALL_METHOD(&sth, this_ptr, "perform", NULL, 0, &statement, &values); zephir_check_call_status(); ZVAL_LONG(&_0, 8); @@ -787,17 +727,13 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, fetchOne) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&values); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(statement) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(values) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &statement_param, &values_param); zephir_get_strval(&statement, statement_param); if (!values_param) { @@ -806,8 +742,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, fetchOne) } else { zephir_get_arrval(&values, values_param); } - - ZEPHIR_INIT_VAR(&_0); zephir_create_array(&_0, 1, 0); ZEPHIR_INIT_VAR(&_1); @@ -842,17 +776,13 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, fetchPairs) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&values); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(statement) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(values) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &statement_param, &values_param); zephir_get_strval(&statement, statement_param); if (!values_param) { @@ -861,8 +791,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, fetchPairs) } else { zephir_get_arrval(&values, values_param); } - - ZEPHIR_INIT_VAR(&_0); zephir_create_array(&_0, 1, 0); ZEPHIR_INIT_VAR(&_1); @@ -896,17 +824,13 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, fetchValue) ZVAL_UNDEF(&sth); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&values); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(statement) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(values) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &statement_param, &values_param); zephir_get_strval(&statement, statement_param); if (!values_param) { @@ -915,8 +839,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, fetchValue) } else { zephir_get_arrval(&values, values_param); } - - ZEPHIR_CALL_METHOD(&sth, this_ptr, "perform", NULL, 0, &statement, &values); zephir_check_call_status(); ZVAL_LONG(&_0, 0); @@ -935,10 +857,8 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, getAdapter) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *this_ptr = getThis(); - - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(NULL, this_ptr, "connect", NULL, 0); zephir_check_call_status(); @@ -961,19 +881,12 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, getAttribute) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(attribute) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &attribute_param); - attribute = zephir_get_intval(attribute_param); - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "connect", NULL, 0); zephir_check_call_status(); zephir_read_property(&_0, this_ptr, ZEND_STRL("pdo"), PH_NOISY_CC | PH_READONLY); @@ -993,11 +906,8 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, getAvailableDri zend_class_entry *_0; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *this_ptr = getThis(); - - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); _0 = zephir_fetch_class_str_ex(SL("PDO"), ZEND_FETCH_CLASS_AUTO); ZEPHIR_RETURN_CALL_CE_STATIC(_0, "getavailabledrivers", NULL, 0); @@ -1019,9 +929,8 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, getDriverName) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(NULL, this_ptr, "connect", NULL, 0); zephir_check_call_status(); @@ -1039,9 +948,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, getDriverName) */ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, getProfiler) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "profiler"); } @@ -1067,16 +973,12 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, getQuoteNames) ZVAL_UNDEF(&_0$$5); ZVAL_UNDEF(&_1$$6); ZVAL_UNDEF("es); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR(driver) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &driver_param); if (!driver_param) { ZEPHIR_INIT_VAR(&driver); @@ -1084,8 +986,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, getQuoteNames) } else { zephir_get_strval(&driver, driver_param); } - - ZEPHIR_CPY_WRT(&option, &driver); if (ZEPHIR_IS_EMPTY(&option)) { ZEPHIR_CALL_METHOD(&option, this_ptr, "getdrivername", NULL, 0); @@ -1143,9 +1043,8 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, inTransaction) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(NULL, this_ptr, "connect", NULL, 0); zephir_check_call_status(); @@ -1175,11 +1074,10 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, isConnected) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_OBS_VAR(&_0); + zephir_memory_observe(&_0); zephir_read_property(&_0, this_ptr, ZEND_STRL("pdo"), PH_NOISY_CC); RETURN_MM_BOOL(zephir_get_boolval(&_0)); } @@ -1207,24 +1105,19 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, lastInsertId) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &name_param); if (!name_param) { ZEPHIR_INIT_VAR(&name); } else { zephir_get_strval(&name, name_param); } - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "connect", NULL, 0); zephir_check_call_status(); zephir_read_property(&_0, this_ptr, ZEND_STRL("profiler"), PH_NOISY_CC | PH_READONLY); @@ -1274,17 +1167,13 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, perform) ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_7); ZVAL_UNDEF(&values); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(statement) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(values) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &statement_param, &values_param); zephir_get_strval(&statement, statement_param); if (!values_param) { @@ -1293,8 +1182,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, perform) } else { zephir_get_arrval(&values, values_param); } - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "connect", NULL, 0); zephir_check_call_status(); zephir_read_property(&_0, this_ptr, ZEND_STRL("profiler"), PH_NOISY_CC | PH_READONLY); @@ -1373,17 +1260,13 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, prepare) ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(statement) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &statement_param, &options_param); zephir_get_strval(&statement, statement_param); if (!options_param) { @@ -1392,8 +1275,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, prepare) } else { zephir_get_arrval(&options, options_param); } - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "connect", NULL, 0); zephir_check_call_status(); zephir_read_property(&_0, this_ptr, ZEND_STRL("profiler"), PH_NOISY_CC | PH_READONLY); @@ -1437,19 +1318,13 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, query) ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(statement) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &statement_param); zephir_get_strval(&statement, statement_param); - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "connect", NULL, 0); zephir_check_call_status(); zephir_read_property(&_0, this_ptr, ZEND_STRL("profiler"), PH_NOISY_CC | PH_READONLY); @@ -1459,7 +1334,7 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, query) zephir_check_call_status(); ZEPHIR_INIT_VAR(&_2); zephir_create_array(&_2, 2, 0); - ZEPHIR_OBS_VAR(&_3); + zephir_memory_observe(&_3); zephir_read_property(&_3, this_ptr, ZEND_STRL("pdo"), PH_NOISY_CC); zephir_array_fast_append(&_2, &_3); ZEPHIR_INIT_NVAR(&_1); @@ -1515,25 +1390,18 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, quote) ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_7$$4); ZVAL_UNDEF(&_11$$5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ZVAL(value) Z_PARAM_OPTIONAL Z_PARAM_LONG(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &value, &type_param); if (!type_param) { type = 2; } else { - type = zephir_get_intval(type_param); - } - - + } ZEPHIR_INIT_VAR(&elements); array_init(&elements); ZEPHIR_CALL_METHOD(NULL, this_ptr, "connect", NULL, 0); @@ -1617,9 +1485,8 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, rollBack) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(NULL, this_ptr, "connect", NULL, 0); zephir_check_call_status(); @@ -1655,20 +1522,13 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, setAttribute) ZVAL_UNDEF(&value_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_LONG(attribute) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &attribute_param, &value); - attribute = zephir_get_intval(attribute_param); - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "connect", NULL, 0); zephir_check_call_status(); zephir_read_property(&_0, this_ptr, ZEND_STRL("pdo"), PH_NOISY_CC | PH_READONLY); @@ -1689,17 +1549,10 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, setProfiler) zval *this_ptr = getThis(); ZVAL_UNDEF(&profiler_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(profiler, phalcon_datamapper_pdo_profiler_profilerinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &profiler); - - zephir_update_property_zval(this_ptr, ZEND_STRL("profiler"), profiler); } @@ -1717,7 +1570,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, performBind) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS, _0$$3; zval *statement, statement_sub, *name, name_sub, *arguments, arguments_sub, key, parameters, type, _7, _9, _2$$4, _3$$7, _4$$7, _6$$8; - zval *this_ptr = getThis(); ZVAL_UNDEF(&statement_sub); ZVAL_UNDEF(&name_sub); @@ -1733,21 +1585,15 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, performBind) ZVAL_UNDEF(&_6$$8); ZVAL_UNDEF(&_8); ZVAL_UNDEF(&_5$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_OBJECT_OF_CLASS(statement, zephir_get_internal_ce(SL("pdostatement"))) Z_PARAM_ZVAL(name) Z_PARAM_ZVAL(arguments) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &statement, &name, &arguments); ZEPHIR_SEPARATE_PARAM(arguments); - - ZEPHIR_CPY_WRT(&key, name); if (Z_TYPE_P(&key) == IS_LONG) { _0$$3 = (zephir_get_numberval(&key) + 1); @@ -1756,7 +1602,7 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, performBind) } if (Z_TYPE_P(arguments) == IS_ARRAY) { if (zephir_array_isset_long(arguments, 1)) { - ZEPHIR_OBS_VAR(&type); + zephir_memory_observe(&type); zephir_array_fetch_long(&type, arguments, 1, PH_NOISY, "phalcon/DataMapper/Pdo/Connection/AbstractConnection.zep", 743); } else { ZEPHIR_INIT_NVAR(&type); @@ -1764,7 +1610,7 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, performBind) } _1$$4 = ZEPHIR_IS_LONG_IDENTICAL(&type, 5); if (_1$$4) { - ZEPHIR_OBS_VAR(&_2$$4); + zephir_memory_observe(&_2$$4); zephir_array_fetch_long(&_2$$4, arguments, 0, PH_NOISY, "phalcon/DataMapper/Pdo/Connection/AbstractConnection.zep", 748); _1$$4 = ((Z_TYPE_P(&_2$$4) == IS_TRUE || Z_TYPE_P(&_2$$4) == IS_FALSE) == 1); } @@ -1830,8 +1676,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, fetchData) ZVAL_UNDEF(&arguments); ZVAL_UNDEF(&values); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 4) Z_PARAM_STR(method) Z_PARAM_ARRAY(arguments) @@ -1839,10 +1683,8 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, fetchData) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(values) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 1, &method_param, &arguments_param, &statement_param, &values_param); zephir_get_strval(&method, method_param); zephir_get_arrval(&arguments, arguments_param); @@ -1853,8 +1695,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_AbstractConnection, fetchData) } else { zephir_get_arrval(&values, values_param); } - - ZEPHIR_CALL_METHOD(&sth, this_ptr, "perform", NULL, 0, &statement, &values); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_0); diff --git a/ext/phalcon/datamapper/pdo/connection/abstractconnection.zep.h b/ext/phalcon/datamapper/pdo/connection/abstractconnection.zep.h index 9a30fe1d0c9..ddec7b9b965 100644 --- a/ext/phalcon/datamapper/pdo/connection/abstractconnection.zep.h +++ b/ext/phalcon/datamapper/pdo/connection/abstractconnection.zep.h @@ -69,110 +69,58 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_datamapper_pdo_connection_abstractconnection_fetchaffected, 0, 1, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, statement, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, values, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_datamapper_pdo_connection_abstractconnection_fetchall, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, statement, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, values, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_datamapper_pdo_connection_abstractconnection_fetchassoc, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, statement, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, values, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_datamapper_pdo_connection_abstractconnection_fetchcolumn, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, statement, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, values, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") ZEND_ARG_TYPE_INFO(0, column, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_datamapper_pdo_connection_abstractconnection_fetchgroup, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, statement, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, values, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) ZEND_END_ARG_INFO() -#if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_phalcon_datamapper_pdo_connection_abstractconnection_fetchobject, 0, 1, MAY_BE_OBJECT) -#else -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_datamapper_pdo_connection_abstractconnection_fetchobject, 0, 1, IS_OBJECT, 0) -#endif ZEND_ARG_TYPE_INFO(0, statement, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, values, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") ZEND_ARG_TYPE_INFO(0, className, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, arguments, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, arguments, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, arguments, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_datamapper_pdo_connection_abstractconnection_fetchobjects, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, statement, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, values, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") ZEND_ARG_TYPE_INFO(0, className, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, arguments, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, arguments, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, arguments, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_datamapper_pdo_connection_abstractconnection_fetchone, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, statement, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, values, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_datamapper_pdo_connection_abstractconnection_fetchpairs, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, statement, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, values, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_datamapper_pdo_connection_abstractconnection_fetchvalue, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, statement, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, values, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_datamapper_pdo_connection_abstractconnection_getadapter, 0, 0, PDO, 0) @@ -207,20 +155,12 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_datamapper_pdo_connection_abstractconnection_perform, 0, 1, PDOStatement, 0) ZEND_ARG_TYPE_INFO(0, statement, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, values, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_datamapper_pdo_connection_abstractconnection_prepare, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, statement, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_datamapper_pdo_connection_abstractconnection_query, 0, 0, 1) @@ -255,11 +195,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_datamapper_pdo_connectio ZEND_ARG_TYPE_INFO(0, method, IS_STRING, 0) ZEND_ARG_ARRAY_INFO(0, arguments, 0) ZEND_ARG_TYPE_INFO(0, statement, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, values, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_datamapper_pdo_connection_abstractconnection_method_entry) { diff --git a/ext/phalcon/datamapper/pdo/connection/connectioninterface.zep.h b/ext/phalcon/datamapper/pdo/connection/connectioninterface.zep.h index 1e3563c7fa2..25c682b9c01 100644 --- a/ext/phalcon/datamapper/pdo/connection/connectioninterface.zep.h +++ b/ext/phalcon/datamapper/pdo/connection/connectioninterface.zep.h @@ -11,110 +11,58 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_datamapper_pdo_connection_connectioninterface_fetchaffected, 0, 1, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, statement, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, values, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_datamapper_pdo_connection_connectioninterface_fetchall, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, statement, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, values, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_datamapper_pdo_connection_connectioninterface_fetchassoc, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, statement, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, values, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_datamapper_pdo_connection_connectioninterface_fetchcolumn, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, statement, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, values, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") ZEND_ARG_TYPE_INFO(0, column, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_datamapper_pdo_connection_connectioninterface_fetchgroup, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, statement, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, values, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) ZEND_END_ARG_INFO() -#if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_phalcon_datamapper_pdo_connection_connectioninterface_fetchobject, 0, 1, MAY_BE_OBJECT) -#else -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_datamapper_pdo_connection_connectioninterface_fetchobject, 0, 1, IS_OBJECT, 0) -#endif ZEND_ARG_TYPE_INFO(0, statement, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, values, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") ZEND_ARG_TYPE_INFO(0, className, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, arguments, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, arguments, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, arguments, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_datamapper_pdo_connection_connectioninterface_fetchobjects, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, statement, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, values, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") ZEND_ARG_TYPE_INFO(0, className, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, arguments, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, arguments, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, arguments, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_datamapper_pdo_connection_connectioninterface_fetchone, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, statement, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, values, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_datamapper_pdo_connection_connectioninterface_fetchpairs, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, statement, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, values, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_datamapper_pdo_connection_connectioninterface_fetchvalue, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, statement, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, values, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_datamapper_pdo_connection_connectioninterface_getadapter, 0, 0, PDO, 0) @@ -128,11 +76,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_datamapper_pdo_connection_connectioninterface_perform, 0, 1, PDOStatement, 0) ZEND_ARG_TYPE_INFO(0, statement, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, values, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_datamapper_pdo_connection_connectioninterface_setprofiler, 0, 0, 1) diff --git a/ext/phalcon/datamapper/pdo/connection/decorated.zep.c b/ext/phalcon/datamapper/pdo/connection/decorated.zep.c index d8b4e50a78b..da912d71ac4 100644 --- a/ext/phalcon/datamapper/pdo/connection/decorated.zep.c +++ b/ext/phalcon/datamapper/pdo/connection/decorated.zep.c @@ -64,17 +64,14 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_Decorated, __construct) ZVAL_UNDEF(&pdo_sub); ZVAL_UNDEF(&profiler_sub); ZVAL_NULL(&__$null); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_OBJECT_OF_CLASS(pdo, php_pdo_get_dbh_ce()) Z_PARAM_OPTIONAL Z_PARAM_OBJECT_OF_CLASS_OR_NULL(profiler, phalcon_datamapper_pdo_profiler_profilerinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &pdo, &profiler); if (!profiler) { profiler = &profiler_sub; @@ -82,13 +79,11 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_Decorated, __construct) } else { ZEPHIR_SEPARATE_PARAM(profiler); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("pdo"), pdo); if (Z_TYPE_P(profiler) == IS_NULL) { ZEPHIR_INIT_NVAR(profiler); object_init_ex(profiler, phalcon_datamapper_pdo_profiler_profiler_ce); - ZEPHIR_CALL_METHOD(NULL, profiler, "__construct", NULL, 200); + ZEPHIR_CALL_METHOD(NULL, profiler, "__construct", NULL, 201); zephir_check_call_status(); } ZEPHIR_CALL_METHOD(NULL, this_ptr, "setprofiler", NULL, 0, profiler); @@ -101,9 +96,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_Decorated, __construct) */ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_Decorated, connect) { - zval *this_ptr = getThis(); - - } @@ -114,9 +106,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_Decorated, connect) */ PHP_METHOD(Phalcon_DataMapper_Pdo_Connection_Decorated, disconnect) { - zval *this_ptr = getThis(); - - ZEPHIR_THROW_EXCEPTION_DEBUG_STRW(phalcon_datamapper_pdo_exception_cannotdisconnect_ce, "Cannot disconnect a Decorated connection instance", "phalcon/DataMapper/Pdo/Connection/Decorated.zep", 66); return; diff --git a/ext/phalcon/datamapper/pdo/connection/pdointerface.zep.h b/ext/phalcon/datamapper/pdo/connection/pdointerface.zep.h index a6357d7b7e9..4fae7279c18 100644 --- a/ext/phalcon/datamapper/pdo/connection/pdointerface.zep.h +++ b/ext/phalcon/datamapper/pdo/connection/pdointerface.zep.h @@ -35,11 +35,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_datamapper_pdo_connection_pdointerface_prepare, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, statement, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_datamapper_pdo_connection_pdointerface_query, 0, 0, 1) diff --git a/ext/phalcon/datamapper/pdo/connectionlocator.zep.c b/ext/phalcon/datamapper/pdo/connectionlocator.zep.c index 115850712d7..11a821fcd26 100644 --- a/ext/phalcon/datamapper/pdo/connectionlocator.zep.c +++ b/ext/phalcon/datamapper/pdo/connectionlocator.zep.c @@ -96,18 +96,14 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_ConnectionLocator, __construct) ZVAL_UNDEF(&_6); ZVAL_UNDEF(&read); ZVAL_UNDEF(&write); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_OBJECT_OF_CLASS(master, phalcon_datamapper_pdo_connection_connectioninterface_ce) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(read) Z_PARAM_ARRAY(write) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &master, &read_param, &write_param); if (!read_param) { ZEPHIR_INIT_VAR(&read); @@ -121,8 +117,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_ConnectionLocator, __construct) } else { zephir_get_arrval(&write, write_param); } - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "setmaster", NULL, 0, master); zephir_check_call_status(); zephir_is_iterable(&read, 0, "phalcon/DataMapper/Pdo/ConnectionLocator.zep", 74); @@ -207,9 +201,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_ConnectionLocator, __construct) */ PHP_METHOD(Phalcon_DataMapper_Pdo_ConnectionLocator, getMaster) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "master"); } @@ -234,16 +225,12 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_ConnectionLocator, getRead) ZVAL_UNDEF(&name); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &name_param); if (!name_param) { ZEPHIR_INIT_VAR(&name); @@ -251,8 +238,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_ConnectionLocator, getRead) } else { zephir_get_strval(&name, name_param); } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "read"); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getconnection", NULL, 0, &_0, &name); @@ -280,16 +265,12 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_ConnectionLocator, getWrite) ZVAL_UNDEF(&name); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &name_param); if (!name_param) { ZEPHIR_INIT_VAR(&name); @@ -297,8 +278,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_ConnectionLocator, getWrite) } else { zephir_get_strval(&name, name_param); } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "write"); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getconnection", NULL, 0, &_0, &name); @@ -319,17 +298,10 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_ConnectionLocator, setMaster) zval *this_ptr = getThis(); ZVAL_UNDEF(&callableObject_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(callableObject, phalcon_datamapper_pdo_connection_connectioninterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &callableObject); - - zephir_update_property_zval(this_ptr, ZEND_STRL("master"), callableObject); RETURN_THISW(); } @@ -351,20 +323,14 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_ConnectionLocator, setRead) ZVAL_UNDEF(&name); ZVAL_UNDEF(&callableObject_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(name) Z_PARAM_ZVAL(callableObject) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &name_param, &callableObject); zephir_get_strval(&name, name_param); - - zephir_update_property_array(this_ptr, SL("read"), &name, callableObject); RETURN_THIS(); } @@ -386,20 +352,14 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_ConnectionLocator, setWrite) ZVAL_UNDEF(&name); ZVAL_UNDEF(&callableObject_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(name) Z_PARAM_ZVAL(callableObject) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &name_param, &callableObject); zephir_get_strval(&name, name_param); - - zephir_update_property_array(this_ptr, SL("write"), &name, callableObject); RETURN_THIS(); } @@ -434,17 +394,13 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_ConnectionLocator, getConnection) ZVAL_UNDEF(&_3$$5); ZVAL_UNDEF(&_4$$6); ZVAL_UNDEF(&_5$$6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(type) Z_PARAM_OPTIONAL Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &type_param, &name_param); zephir_get_strval(&type, type_param); if (!name_param) { @@ -453,9 +409,7 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_ConnectionLocator, getConnection) } else { zephir_get_strval(&name, name_param); } - - - ZEPHIR_OBS_VAR(&collection); + zephir_memory_observe(&collection); zephir_read_property_zval(&collection, this_ptr, &type, PH_NOISY_CC); ZEPHIR_CPY_WRT(&requested, &name); zephir_read_property(&_0, this_ptr, ZEND_STRL("instances"), PH_NOISY_CC | PH_READONLY); @@ -468,7 +422,7 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_ConnectionLocator, getConnection) ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, ""); if (ZEPHIR_IS_IDENTICAL(&_1, &requested)) { - ZEPHIR_CALL_FUNCTION(&requested, "array_rand", NULL, 201, &collection); + ZEPHIR_CALL_FUNCTION(&requested, "array_rand", NULL, 202, &collection); zephir_check_call_status(); } if (!(zephir_array_isset(&collection, &requested))) { @@ -476,7 +430,7 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_ConnectionLocator, getConnection) object_init_ex(&_2$$5, phalcon_datamapper_pdo_exception_connectionnotfound_ce); ZEPHIR_INIT_VAR(&_3$$5); ZEPHIR_CONCAT_SVSV(&_3$$5, "Connection not found: ", &type, ":", &requested); - ZEPHIR_CALL_METHOD(NULL, &_2$$5, "__construct", NULL, 32, &_3$$5); + ZEPHIR_CALL_METHOD(NULL, &_2$$5, "__construct", NULL, 33, &_3$$5); zephir_check_call_status(); zephir_throw_exception_debug(&_2$$5, "phalcon/DataMapper/Pdo/ConnectionLocator.zep", 206); ZEPHIR_MM_RESTORE(); @@ -508,7 +462,8 @@ zend_object *zephir_init_properties_Phalcon_DataMapper_Pdo_ConnectionLocator(zen ZVAL_UNDEF(&_5$$5); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/datamapper/pdo/connectionlocator.zep.h b/ext/phalcon/datamapper/pdo/connectionlocator.zep.h index ff607c37a96..1a527d33cfb 100644 --- a/ext/phalcon/datamapper/pdo/connectionlocator.zep.h +++ b/ext/phalcon/datamapper/pdo/connectionlocator.zep.h @@ -15,16 +15,8 @@ zend_object *zephir_init_properties_Phalcon_DataMapper_Pdo_ConnectionLocator(zen ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_datamapper_pdo_connectionlocator___construct, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, master, Phalcon\\DataMapper\\Pdo\\Connection\\ConnectionInterface, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, read, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, read, 0) -#endif -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, write, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, write, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, read, IS_ARRAY, 0, "[]") +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, write, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_datamapper_pdo_connectionlocator_getmaster, 0, 0, Phalcon\\DataMapper\\Pdo\\Connection\\ConnectionInterface, 0) diff --git a/ext/phalcon/datamapper/pdo/profiler/memorylogger.zep.c b/ext/phalcon/datamapper/pdo/profiler/memorylogger.zep.c index f5e794a0163..0c6e7a4708a 100644 --- a/ext/phalcon/datamapper/pdo/profiler/memorylogger.zep.c +++ b/ext/phalcon/datamapper/pdo/profiler/memorylogger.zep.c @@ -66,17 +66,13 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_MemoryLogger, alert) ZVAL_UNDEF(&message); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&context); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(message) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(context) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &message_param, &context_param); zephir_get_strval(&message, message_param); if (!context_param) { @@ -85,8 +81,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_MemoryLogger, alert) } else { zephir_get_arrval(&context, context_param); } - - ZVAL_LONG(&_0, 2); ZEPHIR_CALL_METHOD(NULL, this_ptr, "log", NULL, 0, &_0, &message, &context); zephir_check_call_status(); @@ -109,17 +103,13 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_MemoryLogger, critical) ZVAL_UNDEF(&message); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&context); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(message) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(context) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &message_param, &context_param); zephir_get_strval(&message, message_param); if (!context_param) { @@ -128,8 +118,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_MemoryLogger, critical) } else { zephir_get_arrval(&context, context_param); } - - ZVAL_LONG(&_0, 1); ZEPHIR_CALL_METHOD(NULL, this_ptr, "log", NULL, 0, &_0, &message, &context); zephir_check_call_status(); @@ -152,17 +140,13 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_MemoryLogger, debug) ZVAL_UNDEF(&message); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&context); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(message) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(context) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &message_param, &context_param); zephir_get_strval(&message, message_param); if (!context_param) { @@ -171,8 +155,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_MemoryLogger, debug) } else { zephir_get_arrval(&context, context_param); } - - ZVAL_LONG(&_0, 7); ZEPHIR_CALL_METHOD(NULL, this_ptr, "log", NULL, 0, &_0, &message, &context); zephir_check_call_status(); @@ -195,17 +177,13 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_MemoryLogger, emergency) ZVAL_UNDEF(&message); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&context); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(message) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(context) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &message_param, &context_param); zephir_get_strval(&message, message_param); if (!context_param) { @@ -214,8 +192,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_MemoryLogger, emergency) } else { zephir_get_arrval(&context, context_param); } - - ZVAL_LONG(&_0, 0); ZEPHIR_CALL_METHOD(NULL, this_ptr, "log", NULL, 0, &_0, &message, &context); zephir_check_call_status(); @@ -238,17 +214,13 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_MemoryLogger, error) ZVAL_UNDEF(&message); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&context); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(message) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(context) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &message_param, &context_param); zephir_get_strval(&message, message_param); if (!context_param) { @@ -257,8 +229,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_MemoryLogger, error) } else { zephir_get_arrval(&context, context_param); } - - ZVAL_LONG(&_0, 3); ZEPHIR_CALL_METHOD(NULL, this_ptr, "log", NULL, 0, &_0, &message, &context); zephir_check_call_status(); @@ -278,22 +248,15 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_MemoryLogger, getAdapter) zend_long ZEPHIR_LAST_CALL_STATUS; zval *name_param = NULL; zval name; - zval *this_ptr = getThis(); ZVAL_UNDEF(&name); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &name_param); zephir_get_strval(&name, name_param); - - object_init_ex(return_value, phalcon_logger_adapter_noop_ce); if (zephir_has_constructor(return_value)) { ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 0); @@ -310,9 +273,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_MemoryLogger, getAdapter) */ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_MemoryLogger, getAdapters) { - zval *this_ptr = getThis(); - - array_init(return_value); return; @@ -323,9 +283,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_MemoryLogger, getAdapters) */ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_MemoryLogger, getLogLevel) { - zval *this_ptr = getThis(); - - RETURN_LONG(8); } @@ -337,9 +294,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_MemoryLogger, getLogLevel) */ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_MemoryLogger, getMessages) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "messages"); } @@ -349,9 +303,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_MemoryLogger, getMessages) */ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_MemoryLogger, getName) { - zval *this_ptr = getThis(); - - RETURN_STRING("memory logger"); } @@ -372,17 +323,13 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_MemoryLogger, info) ZVAL_UNDEF(&message); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&context); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(message) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(context) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &message_param, &context_param); zephir_get_strval(&message, message_param); if (!context_param) { @@ -391,8 +338,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_MemoryLogger, info) } else { zephir_get_arrval(&context, context_param); } - - ZVAL_LONG(&_0, 6); ZEPHIR_CALL_METHOD(NULL, this_ptr, "log", NULL, 0, &_0, &message, &context); zephir_check_call_status(); @@ -415,17 +360,13 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_MemoryLogger, notice) ZVAL_UNDEF(&message); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&context); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(message) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(context) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &message_param, &context_param); zephir_get_strval(&message, message_param); if (!context_param) { @@ -434,8 +375,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_MemoryLogger, notice) } else { zephir_get_arrval(&context, context_param); } - - ZVAL_LONG(&_0, 5); ZEPHIR_CALL_METHOD(NULL, this_ptr, "log", NULL, 0, &_0, &message, &context); zephir_check_call_status(); @@ -458,17 +397,13 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_MemoryLogger, warning) ZVAL_UNDEF(&message); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&context); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(message) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(context) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &message_param, &context_param); zephir_get_strval(&message, message_param); if (!context_param) { @@ -477,8 +412,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_MemoryLogger, warning) } else { zephir_get_arrval(&context, context_param); } - - ZVAL_LONG(&_0, 4); ZEPHIR_CALL_METHOD(NULL, this_ptr, "log", NULL, 0, &_0, &message, &context); zephir_check_call_status(); @@ -513,18 +446,14 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_MemoryLogger, log) ZVAL_UNDEF(&message); ZVAL_UNDEF(&context); ZVAL_UNDEF(&replace); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_ZVAL(level) Z_PARAM_STR(message) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(context) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &level, &message_param, &context_param); zephir_get_strval(&message, message_param); if (!context_param) { @@ -533,8 +462,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_MemoryLogger, log) } else { zephir_get_arrval(&context, context_param); } - - ZEPHIR_INIT_VAR(&replace); array_init(&replace); zephir_is_iterable(&context, 0, "phalcon/DataMapper/Pdo/Profiler/MemoryLogger.zep", 170); @@ -589,7 +516,8 @@ zend_object *zephir_init_properties_Phalcon_DataMapper_Pdo_Profiler_MemoryLogger ZVAL_UNDEF(&_1$$3); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/datamapper/pdo/profiler/memorylogger.zep.h b/ext/phalcon/datamapper/pdo/profiler/memorylogger.zep.h index 0bff7c4be8f..34e2036fa9a 100644 --- a/ext/phalcon/datamapper/pdo/profiler/memorylogger.zep.h +++ b/ext/phalcon/datamapper/pdo/profiler/memorylogger.zep.h @@ -22,51 +22,31 @@ zend_object *zephir_init_properties_Phalcon_DataMapper_Pdo_Profiler_MemoryLogger ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_datamapper_pdo_profiler_memorylogger_alert, 0, 1, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, context, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_datamapper_pdo_profiler_memorylogger_critical, 0, 1, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, context, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_datamapper_pdo_profiler_memorylogger_debug, 0, 1, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, context, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_datamapper_pdo_profiler_memorylogger_emergency, 0, 1, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, context, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_datamapper_pdo_profiler_memorylogger_error, 0, 1, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, context, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_datamapper_pdo_profiler_memorylogger_getadapter, 0, 1, Phalcon\\Logger\\Adapter\\AdapterInterface, 0) @@ -88,42 +68,26 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_datamapper_pdo_profiler_memorylogger_info, 0, 1, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, context, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_datamapper_pdo_profiler_memorylogger_notice, 0, 1, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, context, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_datamapper_pdo_profiler_memorylogger_warning, 0, 1, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, context, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_datamapper_pdo_profiler_memorylogger_log, 0, 2, IS_VOID, 0) ZEND_ARG_INFO(0, level) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, context, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_datamapper_pdo_profiler_memorylogger_zephir_init_properties_phalcon_datamapper_pdo_profiler_memorylogger, 0, 0, 0) diff --git a/ext/phalcon/datamapper/pdo/profiler/profiler.zep.c b/ext/phalcon/datamapper/pdo/profiler/profiler.zep.c index a0fe84657fa..40df62b7431 100644 --- a/ext/phalcon/datamapper/pdo/profiler/profiler.zep.c +++ b/ext/phalcon/datamapper/pdo/profiler/profiler.zep.c @@ -85,16 +85,13 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_Profiler, __construct) ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_OBJECT_OF_CLASS_OR_NULL(logger, phalcon_logger_loggerinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &logger); if (!logger) { logger = &logger_sub; @@ -102,8 +99,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_Profiler, __construct) } else { ZEPHIR_SEPARATE_PARAM(logger); } - - if (Z_TYPE_P(logger) == IS_NULL) { ZEPHIR_INIT_NVAR(logger); object_init_ex(logger, phalcon_datamapper_pdo_profiler_memorylogger_ce); @@ -117,7 +112,7 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_Profiler, __construct) ZEPHIR_INIT_NVAR(&_0); ZVAL_STRING(&_0, "{method} ({duration}s): {statement} {backtrace}"); zephir_update_property_zval(this_ptr, ZEND_STRL("logFormat"), &_0); - ZEPHIR_INIT_ZVAL_NREF(_1); + ZVAL_UNDEF(&_1); ZVAL_LONG(&_1, 7); zephir_update_property_zval(this_ptr, ZEND_STRL("logLevel"), &_1); zephir_update_property_zval(this_ptr, ZEND_STRL("logger"), logger); @@ -168,17 +163,14 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_Profiler, finish) ZVAL_UNDEF(&_14$$3); ZVAL_UNDEF(&_15$$3); ZVAL_UNDEF(&values); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(statement) Z_PARAM_ARRAY(values) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 2, &statement_param, &values_param); if (!statement_param) { ZEPHIR_INIT_VAR(&statement); @@ -191,17 +183,15 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_Profiler, finish) } else { zephir_get_arrval(&values, values_param); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("active"), PH_NOISY_CC | PH_READONLY); if (UNEXPECTED(zephir_is_true(&_0))) { ZEPHIR_INIT_VAR(&ex); object_init_ex(&ex, phalcon_datamapper_pdo_exception_exception_ce); - ZEPHIR_CALL_METHOD(NULL, &ex, "__construct", NULL, 32); + ZEPHIR_CALL_METHOD(NULL, &ex, "__construct", NULL, 33); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&finish, "hrtime", NULL, 202, &__$true); + ZEPHIR_CALL_FUNCTION(&finish, "hrtime", NULL, 203, &__$true); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_1$$3, &ex, "gettraceasstring", NULL, 203); + ZEPHIR_CALL_METHOD(&_1$$3, &ex, "gettraceasstring", NULL, 204); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_2$$3); ZVAL_STRING(&_2$$3, "backtrace"); @@ -251,9 +241,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_Profiler, finish) */ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_Profiler, getLogFormat) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "logFormat"); } @@ -265,9 +252,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_Profiler, getLogFormat) */ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_Profiler, getLogger) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "logger"); } @@ -279,9 +263,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_Profiler, getLogger) */ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_Profiler, getLogLevel) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "logLevel"); } @@ -293,9 +274,6 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_Profiler, getLogLevel) */ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_Profiler, isActive) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "active"); } @@ -315,18 +293,10 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_Profiler, setActive) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(active) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &active_param); - active = zephir_get_boolval(active_param); - - if (active) { zephir_update_property_zval(this_ptr, ZEND_STRL("active"), &__$true); } else { @@ -350,19 +320,13 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_Profiler, setLogFormat) zval *this_ptr = getThis(); ZVAL_UNDEF(&logFormat); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(logFormat) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &logFormat_param); zephir_get_strval(&logFormat, logFormat_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("logFormat"), &logFormat); RETURN_THIS(); } @@ -382,19 +346,13 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_Profiler, setLogLevel) zval *this_ptr = getThis(); ZVAL_UNDEF(&logLevel); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(logLevel) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &logLevel_param); zephir_get_strval(&logLevel, logLevel_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("logLevel"), &logLevel); RETURN_THIS(); } @@ -418,25 +376,19 @@ PHP_METHOD(Phalcon_DataMapper_Pdo_Profiler_Profiler, start) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(method) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &method_param); zephir_get_strval(&method, method_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("active"), PH_NOISY_CC | PH_READONLY); if (UNEXPECTED(zephir_is_true(&_0))) { ZEPHIR_INIT_VAR(&_1$$3); zephir_create_array(&_1$$3, 2, 0); zephir_array_update_string(&_1$$3, SL("method"), &method, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_FUNCTION(&_2$$3, "hrtime", NULL, 202, &__$true); + ZEPHIR_CALL_FUNCTION(&_2$$3, "hrtime", NULL, 203, &__$true); zephir_check_call_status(); zephir_array_update_string(&_1$$3, SL("start"), &_2$$3, PH_COPY | PH_SEPARATE); zephir_update_property_zval(this_ptr, ZEND_STRL("context"), &_1$$3); @@ -452,7 +404,8 @@ zend_object *zephir_init_properties_Phalcon_DataMapper_Pdo_Profiler_Profiler(zen ZVAL_UNDEF(&_1$$3); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/datamapper/pdo/profiler/profiler.zep.h b/ext/phalcon/datamapper/pdo/profiler/profiler.zep.h index 6aaf0388239..344257eabee 100644 --- a/ext/phalcon/datamapper/pdo/profiler/profiler.zep.h +++ b/ext/phalcon/datamapper/pdo/profiler/profiler.zep.h @@ -22,11 +22,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_datamapper_pdo_profiler_profiler_finish, 0, 0, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, statement, IS_STRING, 1) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, values, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_datamapper_pdo_profiler_profiler_getlogformat, 0, 0, IS_STRING, 0) diff --git a/ext/phalcon/datamapper/pdo/profiler/profilerinterface.zep.h b/ext/phalcon/datamapper/pdo/profiler/profilerinterface.zep.h index 2003194348b..7a64fbf0e87 100644 --- a/ext/phalcon/datamapper/pdo/profiler/profilerinterface.zep.h +++ b/ext/phalcon/datamapper/pdo/profiler/profilerinterface.zep.h @@ -6,11 +6,7 @@ ZEPHIR_INIT_CLASS(Phalcon_DataMapper_Pdo_Profiler_ProfilerInterface); ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_datamapper_pdo_profiler_profilerinterface_finish, 0, 0, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, statement, IS_STRING, 1) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, values, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, values, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_datamapper_pdo_profiler_profilerinterface_getlogger, 0, 0, Phalcon\\Logger\\LoggerInterface, 0) diff --git a/ext/phalcon/datamapper/query/abstractconditions.zep.c b/ext/phalcon/datamapper/query/abstractconditions.zep.c index a0cb76d610f..41eb93a9244 100644 --- a/ext/phalcon/datamapper/query/abstractconditions.zep.c +++ b/ext/phalcon/datamapper/query/abstractconditions.zep.c @@ -60,19 +60,12 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractConditions, limit) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(limit) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &limit_param); - limit = zephir_get_intval(limit_param); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "LIMIT"); ZEPHIR_INIT_VAR(&_1); @@ -97,19 +90,12 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractConditions, offset) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(offset) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &offset_param); - offset = zephir_get_intval(offset_param); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "OFFSET"); ZEPHIR_INIT_VAR(&_1); @@ -139,7 +125,6 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractConditions, andWhere) ZVAL_UNDEF(&value_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(condition) @@ -147,10 +132,8 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractConditions, andWhere) Z_PARAM_ZVAL_OR_NULL(value) Z_PARAM_LONG(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &condition_param, &value, &type_param); zephir_get_strval(&condition, condition_param); if (!value) { @@ -160,10 +143,7 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractConditions, andWhere) if (!type_param) { type = -1; } else { - type = zephir_get_intval(type_param); - } - - + } ZVAL_LONG(&_0, type); ZEPHIR_CALL_METHOD(NULL, this_ptr, "where", NULL, 0, &condition, value, &_0); zephir_check_call_status(); @@ -192,7 +172,6 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractConditions, appendWhere) ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(condition) @@ -200,10 +179,8 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractConditions, appendWhere) Z_PARAM_ZVAL_OR_NULL(value) Z_PARAM_LONG(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &condition_param, &value, &type_param); zephir_get_strval(&condition, condition_param); if (!value) { @@ -213,10 +190,7 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractConditions, appendWhere) if (!type_param) { type = -1; } else { - type = zephir_get_intval(type_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "WHERE"); ZVAL_LONG(&_1, type); @@ -241,18 +215,12 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractConditions, orderBy) ZVAL_UNDEF(&orderBy_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(orderBy) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &orderBy); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "ORDER"); ZEPHIR_CALL_METHOD(NULL, this_ptr, "processvalue", NULL, 0, &_0, orderBy); @@ -283,7 +251,6 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractConditions, orWhere) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(condition) @@ -291,10 +258,8 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractConditions, orWhere) Z_PARAM_ZVAL_OR_NULL(value) Z_PARAM_LONG(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &condition_param, &value, &type_param); zephir_get_strval(&condition, condition_param); if (!value) { @@ -304,10 +269,7 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractConditions, orWhere) if (!type_param) { type = -1; } else { - type = zephir_get_intval(type_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "WHERE"); ZEPHIR_INIT_VAR(&_1); @@ -341,7 +303,6 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractConditions, where) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(condition) @@ -349,10 +310,8 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractConditions, where) Z_PARAM_ZVAL_OR_NULL(value) Z_PARAM_LONG(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &condition_param, &value, &type_param); zephir_get_strval(&condition, condition_param); if (!value) { @@ -362,10 +321,7 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractConditions, where) if (!type_param) { type = -1; } else { - type = zephir_get_intval(type_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "WHERE"); ZEPHIR_INIT_VAR(&_1); @@ -402,19 +358,13 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractConditions, whereEquals) ZVAL_UNDEF(&_8$$10); ZVAL_UNDEF(&_9$$11); ZVAL_UNDEF(&_10$$12); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(columnsValues) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &columnsValues_param); zephir_get_arrval(&columnsValues, columnsValues_param); - - zephir_is_iterable(&columnsValues, 0, "phalcon/DataMapper/Query/AbstractConditions.zep", 162); if (Z_TYPE_P(&columnsValues) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&columnsValues), _2, _3, _0) @@ -515,7 +465,6 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractConditions, addCondition) ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 5) Z_PARAM_STR(store) @@ -525,10 +474,8 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractConditions, addCondition) Z_PARAM_ZVAL_OR_NULL(value) Z_PARAM_LONG(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 2, &store_param, &andor_param, &condition_param, &value, &type_param); zephir_get_strval(&store, store_param); zephir_get_strval(&andor, andor_param); @@ -540,10 +487,7 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractConditions, addCondition) if (!type_param) { type = -1; } else { - type = zephir_get_intval(type_param); - } - - + } if (!(ZEPHIR_IS_EMPTY(value))) { ZVAL_LONG(&_1$$3, type); ZEPHIR_CALL_METHOD(&_0$$3, this_ptr, "bindinline", NULL, 0, value, &_1$$3); @@ -583,19 +527,13 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractConditions, buildBy) ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &type_param); zephir_get_strval(&type, type_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("store"), PH_NOISY_CC | PH_READONLY); zephir_array_fetch(&_1, &_0, &type, PH_NOISY | PH_READONLY, "phalcon/DataMapper/Query/AbstractConditions.zep", 201); if (ZEPHIR_IS_EMPTY(&_1)) { @@ -632,19 +570,13 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractConditions, buildCondition) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &type_param); zephir_get_strval(&type, type_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("store"), PH_NOISY_CC | PH_READONLY); zephir_array_fetch(&_1, &_0, &type, PH_NOISY | PH_READONLY, "phalcon/DataMapper/Query/AbstractConditions.zep", 218); if (ZEPHIR_IS_EMPTY(&_1)) { @@ -683,9 +615,8 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractConditions, buildLimitEarly) ZVAL_UNDEF(&_9$$3); ZVAL_UNDEF(&_10$$3); ZVAL_UNDEF(&_11$$3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&limit); zephir_read_property(&_0, this_ptr, ZEND_STRL("connection"), PH_NOISY_CC | PH_READONLY); @@ -732,9 +663,8 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractConditions, buildLimit) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("connection"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&suffix, &_0, "getdrivername", NULL, 0); @@ -780,9 +710,8 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractConditions, buildLimitCommon) ZVAL_UNDEF(&_9$$4); ZVAL_UNDEF(&_11$$5); ZVAL_UNDEF(&_12$$5); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&limit); zephir_read_property(&_0, this_ptr, ZEND_STRL("store"), PH_NOISY_CC | PH_READONLY); @@ -838,9 +767,8 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractConditions, buildLimitSqlsrv) ZVAL_UNDEF(&_7$$3); ZVAL_UNDEF(&_8$$3); ZVAL_UNDEF(&_9$$3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&limit); zephir_read_property(&_0, this_ptr, ZEND_STRL("store"), PH_NOISY_CC | PH_READONLY); @@ -895,7 +823,6 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractConditions, appendCondition) ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_4$$4); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 4) Z_PARAM_STR(store) @@ -904,10 +831,8 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractConditions, appendCondition) Z_PARAM_ZVAL_OR_NULL(value) Z_PARAM_LONG(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 2, &store_param, &condition_param, &value, &type_param); zephir_get_strval(&store, store_param); zephir_get_strval(&condition, condition_param); @@ -918,10 +843,7 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractConditions, appendCondition) if (!type_param) { type = -1; } else { - type = zephir_get_intval(type_param); - } - - + } if (!(ZEPHIR_IS_EMPTY(value))) { ZVAL_LONG(&_1$$3, type); ZEPHIR_CALL_METHOD(&_0$$3, this_ptr, "bindinline", NULL, 0, value, &_1$$3); @@ -937,7 +859,7 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractConditions, appendCondition) } zephir_read_property(&_5, this_ptr, ZEND_STRL("store"), PH_NOISY_CC | PH_READONLY); zephir_array_fetch(&_6, &_5, &store, PH_NOISY | PH_READONLY, "phalcon/DataMapper/Query/AbstractConditions.zep", 331); - ZEPHIR_CALL_FUNCTION(&key, "array_key_last", NULL, 39, &_6); + ZEPHIR_CALL_FUNCTION(&key, "array_key_last", NULL, 40, &_6); zephir_check_call_status(); zephir_read_property(&_7, this_ptr, ZEND_STRL("store"), PH_NOISY_CC | PH_READONLY); zephir_array_fetch(&_8, &_7, &store, PH_NOISY | PH_READONLY, "phalcon/DataMapper/Query/AbstractConditions.zep", 333); @@ -967,21 +889,15 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractConditions, processValue) ZVAL_UNDEF(&_1$$4); ZVAL_UNDEF(&_2$$4); ZVAL_UNDEF(&_3$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(store) Z_PARAM_ZVAL(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &store_param, &data); zephir_get_strval(&store, store_param); ZEPHIR_SEPARATE_PARAM(data); - - if (Z_TYPE_P(data) == IS_STRING) { ZEPHIR_INIT_VAR(&_0$$3); zephir_create_array(&_0$$3, 1, 0); diff --git a/ext/phalcon/datamapper/query/abstractquery.zep.c b/ext/phalcon/datamapper/query/abstractquery.zep.c index e7bf6b18189..b829a0ad246 100644 --- a/ext/phalcon/datamapper/query/abstractquery.zep.c +++ b/ext/phalcon/datamapper/query/abstractquery.zep.c @@ -75,19 +75,13 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractQuery, __construct) ZVAL_UNDEF(&bind_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(connection, phalcon_datamapper_pdo_connection_ce) Z_PARAM_OBJECT_OF_CLASS(bind, phalcon_datamapper_query_bind_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &connection, &bind); - - zephir_update_property_zval(this_ptr, ZEND_STRL("bind"), bind); zephir_update_property_zval(this_ptr, ZEND_STRL("connection"), connection); ZEPHIR_INIT_VAR(&_0); @@ -118,25 +112,18 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractQuery, bindInline) ZVAL_UNDEF(&value_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ZVAL(value) Z_PARAM_OPTIONAL Z_PARAM_LONG(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &value, &type_param); if (!type_param) { type = -1; } else { - type = zephir_get_intval(type_param); - } - - + } zephir_read_property(&_0, this_ptr, ZEND_STRL("bind"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_1, type); ZEPHIR_RETURN_CALL_METHOD(&_0, "bindinline", NULL, 0, value, &_1); @@ -165,27 +152,20 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractQuery, bindValue) ZVAL_UNDEF(&value_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(key) Z_PARAM_ZVAL(value) Z_PARAM_OPTIONAL Z_PARAM_LONG(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &key_param, &value, &type_param); zephir_get_strval(&key, key_param); if (!type_param) { type = -1; } else { - type = zephir_get_intval(type_param); - } - - + } zephir_read_property(&_0, this_ptr, ZEND_STRL("bind"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_1, type); ZEPHIR_CALL_METHOD(NULL, &_0, "setvalue", NULL, 0, &key, value, &_1); @@ -210,19 +190,13 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractQuery, bindValues) ZVAL_UNDEF(&values); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(values) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &values_param); zephir_get_arrval(&values, values_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("bind"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(NULL, &_0, "setvalues", NULL, 0, &values); zephir_check_call_status(); @@ -242,9 +216,8 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractQuery, getBindValues) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("bind"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_METHOD(&_0, "toarray", NULL, 0); @@ -276,9 +249,8 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractQuery, perform) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("connection"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&_1, this_ptr, "getstatement", NULL, 0); @@ -309,31 +281,24 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractQuery, setFlag) ZVAL_UNDEF(&flags); ZVAL_UNDEF(&_0$$4); ZVAL_UNDEF(&_1$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(flag) Z_PARAM_OPTIONAL Z_PARAM_BOOL(enable) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &flag_param, &enable_param); zephir_get_strval(&flag, flag_param); if (!enable_param) { enable = 1; } else { - enable = zephir_get_boolval(enable_param); - } - - + } if (enable) { zephir_update_property_array_multi(this_ptr, SL("store"), &__$true, SL("sz"), 3, SL("FLAGS"), &flag); } else { zephir_read_property(&_0$$4, this_ptr, ZEND_STRL("store"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_OBS_VAR(&flags); + zephir_memory_observe(&flags); zephir_array_fetch_string(&flags, &_0$$4, SL("FLAGS"), PH_NOISY, "phalcon/DataMapper/Query/AbstractQuery.zep", 144); zephir_array_unset(&flags, &flag, PH_SEPARATE); ZEPHIR_INIT_VAR(&_1$$4); @@ -362,26 +327,19 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractQuery, quoteIdentifier) ZVAL_UNDEF(&name); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(name) Z_PARAM_OPTIONAL Z_PARAM_LONG(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &name_param, &type_param); zephir_get_strval(&name, name_param); if (!type_param) { type = 2; } else { - type = zephir_get_intval(type_param); - } - - + } zephir_read_property(&_0, this_ptr, ZEND_STRL("connection"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_1, type); ZEPHIR_RETURN_CALL_METHOD(&_0, "quote", NULL, 0, &name, &_1); @@ -416,9 +374,8 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractQuery, reset) ZVAL_UNDEF(&_15); ZVAL_UNDEF(&_16); ZVAL_UNDEF(&_17); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); array_init(&_0); @@ -485,9 +442,8 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractQuery, buildFlags) ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_5); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("store"), PH_NOISY_CC | PH_READONLY); zephir_array_fetch_string(&_1, &_0, SL("FLAGS"), PH_NOISY | PH_READONLY, "phalcon/DataMapper/Query/AbstractQuery.zep", 190); @@ -522,9 +478,8 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractQuery, buildReturning) ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_5); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("store"), PH_NOISY_CC | PH_READONLY); zephir_array_fetch_string(&_1, &_0, SL("RETURNING"), PH_NOISY | PH_READONLY, "phalcon/DataMapper/Query/AbstractQuery.zep", 204); @@ -555,23 +510,18 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractQuery, indent) zval glue, _1; zval *collection_param = NULL, *glue_param = NULL, _0; zval collection; - zval *this_ptr = getThis(); ZVAL_UNDEF(&collection); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&glue); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(collection) Z_PARAM_OPTIONAL Z_PARAM_STR(glue) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &collection_param, &glue_param); zephir_get_arrval(&collection, collection_param); if (!glue_param) { @@ -580,8 +530,6 @@ PHP_METHOD(Phalcon_DataMapper_Query_AbstractQuery, indent) } else { zephir_get_strval(&glue, glue_param); } - - if (ZEPHIR_IS_EMPTY(&collection)) { RETURN_MM_STRING(""); } @@ -601,7 +549,8 @@ zend_object *zephir_init_properties_Phalcon_DataMapper_Query_AbstractQuery(zend_ ZVAL_UNDEF(&_1$$3); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/datamapper/query/abstractquery.zep.h b/ext/phalcon/datamapper/query/abstractquery.zep.h index 232b909d674..be62032fba9 100644 --- a/ext/phalcon/datamapper/query/abstractquery.zep.h +++ b/ext/phalcon/datamapper/query/abstractquery.zep.h @@ -82,23 +82,11 @@ ZEPHIR_INIT_FUNCS(phalcon_datamapper_query_abstractquery_method_entry) { PHP_ME(Phalcon_DataMapper_Query_AbstractQuery, bindValues, arginfo_phalcon_datamapper_query_abstractquery_bindvalues, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_DataMapper_Query_AbstractQuery, getBindValues, arginfo_phalcon_datamapper_query_abstractquery_getbindvalues, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_DataMapper_Query_AbstractQuery, getStatement, arginfo_phalcon_datamapper_query_abstractquery_getstatement, ZEND_ACC_ABSTRACT|ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_DataMapper_Query_AbstractQuery, perform, arginfo_phalcon_datamapper_query_abstractquery_perform, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_DataMapper_Query_AbstractQuery, perform, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_DataMapper_Query_AbstractQuery, perform, arginfo_phalcon_datamapper_query_abstractquery_perform, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_DataMapper_Query_AbstractQuery, setFlag, arginfo_phalcon_datamapper_query_abstractquery_setflag, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_DataMapper_Query_AbstractQuery, quoteIdentifier, arginfo_phalcon_datamapper_query_abstractquery_quoteidentifier, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_DataMapper_Query_AbstractQuery, reset, arginfo_phalcon_datamapper_query_abstractquery_reset, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_DataMapper_Query_AbstractQuery, reset, NULL, ZEND_ACC_PUBLIC) -#endif -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_DataMapper_Query_AbstractQuery, buildFlags, arginfo_phalcon_datamapper_query_abstractquery_buildflags, ZEND_ACC_PROTECTED) -#else - PHP_ME(Phalcon_DataMapper_Query_AbstractQuery, buildFlags, NULL, ZEND_ACC_PROTECTED) -#endif +PHP_ME(Phalcon_DataMapper_Query_AbstractQuery, reset, arginfo_phalcon_datamapper_query_abstractquery_reset, ZEND_ACC_PUBLIC) +PHP_ME(Phalcon_DataMapper_Query_AbstractQuery, buildFlags, arginfo_phalcon_datamapper_query_abstractquery_buildflags, ZEND_ACC_PROTECTED) PHP_ME(Phalcon_DataMapper_Query_AbstractQuery, buildReturning, arginfo_phalcon_datamapper_query_abstractquery_buildreturning, ZEND_ACC_PROTECTED) PHP_ME(Phalcon_DataMapper_Query_AbstractQuery, indent, arginfo_phalcon_datamapper_query_abstractquery_indent, ZEND_ACC_PROTECTED) PHP_FE_END diff --git a/ext/phalcon/datamapper/query/bind.zep.c b/ext/phalcon/datamapper/query/bind.zep.c index 4f1cd5cc123..1bb2316747f 100644 --- a/ext/phalcon/datamapper/query/bind.zep.c +++ b/ext/phalcon/datamapper/query/bind.zep.c @@ -75,25 +75,18 @@ PHP_METHOD(Phalcon_DataMapper_Query_Bind, bindInline) ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ZVAL(value) Z_PARAM_OPTIONAL Z_PARAM_LONG(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &value, &type_param); if (!type_param) { type = -1; } else { - type = zephir_get_intval(type_param); - } - - + } _0 = Z_TYPE_P(value) == IS_OBJECT; if (_0) { _0 = zephir_instance_of_ev(value, phalcon_datamapper_query_select_ce); @@ -111,7 +104,7 @@ PHP_METHOD(Phalcon_DataMapper_Query_Bind, bindInline) RETURN_MM(); } zephir_read_property(&_3, this_ptr, ZEND_STRL("inlineCount"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_INIT_ZVAL_NREF(_4); + ZVAL_UNDEF(&_4); ZVAL_LONG(&_4, (zephir_get_numberval(&_3) + 1)); zephir_update_property_zval(this_ptr, ZEND_STRL("inlineCount"), &_4); zephir_read_property(&_4, this_ptr, ZEND_STRL("inlineCount"), PH_NOISY_CC | PH_READONLY); @@ -139,19 +132,13 @@ PHP_METHOD(Phalcon_DataMapper_Query_Bind, remove) ZVAL_UNDEF(&key); ZVAL_UNDEF(&store); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); zephir_get_strval(&key, key_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("store"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&store, &_0); zephir_array_unset(&store, &key, PH_SEPARATE); @@ -179,27 +166,20 @@ PHP_METHOD(Phalcon_DataMapper_Query_Bind, setValue) ZVAL_UNDEF(&value_sub); ZVAL_UNDEF(&localType); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(key) Z_PARAM_ZVAL(value) Z_PARAM_OPTIONAL Z_PARAM_LONG(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &key_param, &value, &type_param); zephir_get_strval(&key, key_param); if (!type_param) { type = -1; } else { - type = zephir_get_intval(type_param); - } - - + } ZEPHIR_INIT_VAR(&localType); ZVAL_LONG(&localType, type); if (ZEPHIR_IS_LONG_IDENTICAL(&localType, -1)) { @@ -237,26 +217,19 @@ PHP_METHOD(Phalcon_DataMapper_Query_Bind, setValues) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_4$$3); ZVAL_UNDEF(&_6$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(values) Z_PARAM_OPTIONAL Z_PARAM_LONG(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &values_param, &type_param); zephir_get_arrval(&values, values_param); if (!type_param) { type = -1; } else { - type = zephir_get_intval(type_param); - } - - + } zephir_is_iterable(&values, 0, "phalcon/DataMapper/Query/Bind.zep", 108); if (Z_TYPE_P(&values) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&values), _2, _3, _0) @@ -305,9 +278,6 @@ PHP_METHOD(Phalcon_DataMapper_Query_Bind, setValues) */ PHP_METHOD(Phalcon_DataMapper_Query_Bind, toArray) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "store"); } @@ -322,20 +292,12 @@ PHP_METHOD(Phalcon_DataMapper_Query_Bind, toArray) PHP_METHOD(Phalcon_DataMapper_Query_Bind, getType) { zval *value, value_sub; - zval *this_ptr = getThis(); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &value); - - if (Z_TYPE_P(value) == IS_NULL) { RETURN_LONG(0); } @@ -379,21 +341,14 @@ PHP_METHOD(Phalcon_DataMapper_Query_Bind, inlineArray) ZVAL_UNDEF(&_8$$4); ZVAL_UNDEF(&_9$$4); ZVAL_UNDEF(&_10$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ARRAY(data) Z_PARAM_LONG(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &data_param, &type_param); zephir_get_arrval(&data, data_param); - type = zephir_get_intval(type_param); - - ZEPHIR_INIT_VAR(&keys); array_init(&keys); zephir_is_iterable(&data, 0, "phalcon/DataMapper/Query/Bind.zep", 167); @@ -403,7 +358,7 @@ PHP_METHOD(Phalcon_DataMapper_Query_Bind, inlineArray) ZEPHIR_INIT_NVAR(&value); ZVAL_COPY(&value, _0); zephir_read_property(&_2$$3, this_ptr, ZEND_STRL("inlineCount"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_INIT_ZVAL_NREF(_3$$3); + ZVAL_UNDEF(&_3$$3); ZVAL_LONG(&_3$$3, (zephir_get_numberval(&_2$$3) + 1)); zephir_update_property_zval(this_ptr, ZEND_STRL("inlineCount"), &_3$$3); zephir_read_property(&_3$$3, this_ptr, ZEND_STRL("inlineCount"), PH_NOISY_CC | PH_READONLY); @@ -428,7 +383,7 @@ PHP_METHOD(Phalcon_DataMapper_Query_Bind, inlineArray) ZEPHIR_CALL_METHOD(&value, &data, "current", NULL, 0); zephir_check_call_status(); zephir_read_property(&_7$$4, this_ptr, ZEND_STRL("inlineCount"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_INIT_ZVAL_NREF(_8$$4); + ZVAL_UNDEF(&_8$$4); ZVAL_LONG(&_8$$4, (zephir_get_numberval(&_7$$4) + 1)); zephir_update_property_zval(this_ptr, ZEND_STRL("inlineCount"), &_8$$4); zephir_read_property(&_8$$4, this_ptr, ZEND_STRL("inlineCount"), PH_NOISY_CC | PH_READONLY); @@ -459,7 +414,8 @@ zend_object *zephir_init_properties_Phalcon_DataMapper_Query_Bind(zend_class_ent ZVAL_UNDEF(&_1$$3); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/datamapper/query/delete.zep.c b/ext/phalcon/datamapper/query/delete.zep.c index dacd970f91d..533be6b3d58 100644 --- a/ext/phalcon/datamapper/query/delete.zep.c +++ b/ext/phalcon/datamapper/query/delete.zep.c @@ -53,41 +53,34 @@ PHP_METHOD(Phalcon_DataMapper_Query_Delete, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; - zval *connection, connection_sub, *bind, bind_sub, _1, _2, _3, _4; + zval *connection, connection_sub, *bind, bind_sub, _0, _1, _2, _3; zval *this_ptr = getThis(); ZVAL_UNDEF(&connection_sub); ZVAL_UNDEF(&bind_sub); + ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); - ZVAL_UNDEF(&_4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(connection, phalcon_datamapper_pdo_connection_ce) Z_PARAM_OBJECT_OF_CLASS(bind, phalcon_datamapper_query_bind_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &connection, &bind); - - - ZEPHIR_CALL_PARENT(NULL, phalcon_datamapper_query_delete_ce, getThis(), "__construct", &_0, 0, connection, bind); + ZEPHIR_CALL_PARENT(NULL, phalcon_datamapper_query_delete_ce, getThis(), "__construct", NULL, 0, connection, bind); zephir_check_call_status(); + ZEPHIR_INIT_VAR(&_0); + ZVAL_STRING(&_0, "FROM"); ZEPHIR_INIT_VAR(&_1); - ZVAL_STRING(&_1, "FROM"); + ZVAL_STRING(&_1, ""); + zephir_update_property_array(this_ptr, SL("store"), &_0, &_1); ZEPHIR_INIT_VAR(&_2); - ZVAL_STRING(&_2, ""); - zephir_update_property_array(this_ptr, SL("store"), &_1, &_2); + array_init(&_2); ZEPHIR_INIT_VAR(&_3); - array_init(&_3); - ZEPHIR_INIT_VAR(&_4); - ZVAL_STRING(&_4, "RETURNING"); - zephir_update_property_array(this_ptr, SL("store"), &_4, &_3); + ZVAL_STRING(&_3, "RETURNING"); + zephir_update_property_array(this_ptr, SL("store"), &_3, &_2); ZEPHIR_MM_RESTORE(); } @@ -107,19 +100,13 @@ PHP_METHOD(Phalcon_DataMapper_Query_Delete, from) ZVAL_UNDEF(&table); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(table) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &table_param); zephir_get_strval(&table, table_param); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "FROM"); zephir_update_property_array(this_ptr, SL("store"), &_0, &table); @@ -145,19 +132,13 @@ PHP_METHOD(Phalcon_DataMapper_Query_Delete, returning) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(columns) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &columns_param); zephir_get_arrval(&columns, columns_param); - - ZEPHIR_INIT_VAR(&_0); zephir_read_property(&_1, this_ptr, ZEND_STRL("store"), PH_NOISY_CC | PH_READONLY); zephir_array_fetch_string(&_2, &_1, SL("RETURNING"), PH_NOISY | PH_READONLY, "phalcon/DataMapper/Query/Delete.zep", 63); @@ -184,9 +165,8 @@ PHP_METHOD(Phalcon_DataMapper_Query_Delete, getStatement) ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_5); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&_0, this_ptr, "buildflags", NULL, 0); zephir_check_call_status(); @@ -207,32 +187,30 @@ PHP_METHOD(Phalcon_DataMapper_Query_Delete, getStatement) */ PHP_METHOD(Phalcon_DataMapper_Query_Delete, reset) { - zval _1, _2, _3, _4; + zval _0, _1, _2, _3; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *this_ptr = getThis(); + ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); - ZVAL_UNDEF(&_4); - + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - ZEPHIR_MM_GROW(); - - ZEPHIR_CALL_PARENT(NULL, phalcon_datamapper_query_delete_ce, getThis(), "reset", &_0, 0); + ZEPHIR_CALL_PARENT(NULL, phalcon_datamapper_query_delete_ce, getThis(), "reset", NULL, 0); zephir_check_call_status(); + ZEPHIR_INIT_VAR(&_0); + ZVAL_STRING(&_0, "FROM"); ZEPHIR_INIT_VAR(&_1); - ZVAL_STRING(&_1, "FROM"); + ZVAL_STRING(&_1, ""); + zephir_update_property_array(this_ptr, SL("store"), &_0, &_1); ZEPHIR_INIT_VAR(&_2); - ZVAL_STRING(&_2, ""); - zephir_update_property_array(this_ptr, SL("store"), &_1, &_2); + array_init(&_2); ZEPHIR_INIT_VAR(&_3); - array_init(&_3); - ZEPHIR_INIT_VAR(&_4); - ZVAL_STRING(&_4, "RETURNING"); - zephir_update_property_array(this_ptr, SL("store"), &_4, &_3); + ZVAL_STRING(&_3, "RETURNING"); + zephir_update_property_array(this_ptr, SL("store"), &_3, &_2); ZEPHIR_MM_RESTORE(); } diff --git a/ext/phalcon/datamapper/query/insert.zep.c b/ext/phalcon/datamapper/query/insert.zep.c index 0c045d6080e..b853ca791d2 100644 --- a/ext/phalcon/datamapper/query/insert.zep.c +++ b/ext/phalcon/datamapper/query/insert.zep.c @@ -54,41 +54,34 @@ PHP_METHOD(Phalcon_DataMapper_Query_Insert, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; - zval *connection, connection_sub, *bind, bind_sub, _1, _2, _3, _4; + zval *connection, connection_sub, *bind, bind_sub, _0, _1, _2, _3; zval *this_ptr = getThis(); ZVAL_UNDEF(&connection_sub); ZVAL_UNDEF(&bind_sub); + ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); - ZVAL_UNDEF(&_4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(connection, phalcon_datamapper_pdo_connection_ce) Z_PARAM_OBJECT_OF_CLASS(bind, phalcon_datamapper_query_bind_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &connection, &bind); - - - ZEPHIR_CALL_PARENT(NULL, phalcon_datamapper_query_insert_ce, getThis(), "__construct", &_0, 0, connection, bind); + ZEPHIR_CALL_PARENT(NULL, phalcon_datamapper_query_insert_ce, getThis(), "__construct", NULL, 0, connection, bind); zephir_check_call_status(); + ZEPHIR_INIT_VAR(&_0); + ZVAL_STRING(&_0, "FROM"); ZEPHIR_INIT_VAR(&_1); - ZVAL_STRING(&_1, "FROM"); + ZVAL_STRING(&_1, ""); + zephir_update_property_array(this_ptr, SL("store"), &_0, &_1); ZEPHIR_INIT_VAR(&_2); - ZVAL_STRING(&_2, ""); - zephir_update_property_array(this_ptr, SL("store"), &_1, &_2); + array_init(&_2); ZEPHIR_INIT_VAR(&_3); - array_init(&_3); - ZEPHIR_INIT_VAR(&_4); - ZVAL_STRING(&_4, "RETURNING"); - zephir_update_property_array(this_ptr, SL("store"), &_4, &_3); + ZVAL_STRING(&_3, "RETURNING"); + zephir_update_property_array(this_ptr, SL("store"), &_3, &_2); ZEPHIR_MM_RESTORE(); } @@ -113,7 +106,6 @@ PHP_METHOD(Phalcon_DataMapper_Query_Insert, column) ZVAL_NULL(&__$null); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(column) @@ -121,10 +113,8 @@ PHP_METHOD(Phalcon_DataMapper_Query_Insert, column) Z_PARAM_ZVAL_OR_NULL(value) Z_PARAM_LONG(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &column_param, &value, &type_param); zephir_get_strval(&column, column_param); if (!value) { @@ -134,10 +124,7 @@ PHP_METHOD(Phalcon_DataMapper_Query_Insert, column) if (!type_param) { type = -1; } else { - type = zephir_get_intval(type_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZEPHIR_CONCAT_SV(&_0, ":", &column); zephir_update_property_array_multi(this_ptr, SL("store"), &_0, SL("sz"), 3, SL("COLUMNS"), &column); @@ -172,19 +159,13 @@ PHP_METHOD(Phalcon_DataMapper_Query_Insert, columns) ZVAL_UNDEF(&column); ZVAL_UNDEF(&value); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(columns) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &columns_param); zephir_get_arrval(&columns, columns_param); - - zephir_is_iterable(&columns, 0, "phalcon/DataMapper/Query/Insert.zep", 76); if (Z_TYPE_P(&columns) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&columns), _2, _3, _0) @@ -250,19 +231,13 @@ PHP_METHOD(Phalcon_DataMapper_Query_Insert, into) ZVAL_UNDEF(&table); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(table) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &table_param); zephir_get_strval(&table, table_param); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "FROM"); zephir_update_property_array(this_ptr, SL("store"), &_0, &table); @@ -286,24 +261,19 @@ PHP_METHOD(Phalcon_DataMapper_Query_Insert, getLastInsertId) ZVAL_UNDEF(&name); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &name_param); if (!name_param) { ZEPHIR_INIT_VAR(&name); } else { zephir_get_strval(&name, name_param); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("connection"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_METHOD(&_0, "lastinsertid", NULL, 0, &name); zephir_check_call_status(); @@ -325,15 +295,14 @@ PHP_METHOD(Phalcon_DataMapper_Query_Insert, getStatement) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&_0, this_ptr, "buildflags", NULL, 0); zephir_check_call_status(); zephir_read_property(&_1, this_ptr, ZEND_STRL("store"), PH_NOISY_CC | PH_READONLY); zephir_array_fetch_string(&_2, &_1, SL("FROM"), PH_NOISY | PH_READONLY, "phalcon/DataMapper/Query/Insert.zep", 113); - ZEPHIR_CALL_METHOD(&_3, this_ptr, "buildcolumns", NULL, 204); + ZEPHIR_CALL_METHOD(&_3, this_ptr, "buildcolumns", NULL, 205); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_4, this_ptr, "buildreturning", NULL, 0); zephir_check_call_status(); @@ -360,19 +329,13 @@ PHP_METHOD(Phalcon_DataMapper_Query_Insert, returning) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(columns) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &columns_param); zephir_get_arrval(&columns, columns_param); - - ZEPHIR_INIT_VAR(&_0); zephir_read_property(&_1, this_ptr, ZEND_STRL("store"), PH_NOISY_CC | PH_READONLY); zephir_array_fetch_string(&_2, &_1, SL("RETURNING"), PH_NOISY | PH_READONLY, "phalcon/DataMapper/Query/Insert.zep", 127); @@ -388,32 +351,30 @@ PHP_METHOD(Phalcon_DataMapper_Query_Insert, returning) */ PHP_METHOD(Phalcon_DataMapper_Query_Insert, reset) { - zval _1, _2, _3, _4; + zval _0, _1, _2, _3; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *this_ptr = getThis(); + ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); - ZVAL_UNDEF(&_4); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - ZEPHIR_CALL_PARENT(NULL, phalcon_datamapper_query_insert_ce, getThis(), "reset", &_0, 0); + ZEPHIR_CALL_PARENT(NULL, phalcon_datamapper_query_insert_ce, getThis(), "reset", NULL, 0); zephir_check_call_status(); + ZEPHIR_INIT_VAR(&_0); + ZVAL_STRING(&_0, "FROM"); ZEPHIR_INIT_VAR(&_1); - ZVAL_STRING(&_1, "FROM"); + ZVAL_STRING(&_1, ""); + zephir_update_property_array(this_ptr, SL("store"), &_0, &_1); ZEPHIR_INIT_VAR(&_2); - ZVAL_STRING(&_2, ""); - zephir_update_property_array(this_ptr, SL("store"), &_1, &_2); + array_init(&_2); ZEPHIR_INIT_VAR(&_3); - array_init(&_3); - ZEPHIR_INIT_VAR(&_4); - ZVAL_STRING(&_4, "RETURNING"); - zephir_update_property_array(this_ptr, SL("store"), &_4, &_3); + ZVAL_STRING(&_3, "RETURNING"); + zephir_update_property_array(this_ptr, SL("store"), &_3, &_2); ZEPHIR_MM_RESTORE(); } @@ -437,17 +398,14 @@ PHP_METHOD(Phalcon_DataMapper_Query_Insert, set) ZVAL_UNDEF(&value_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(column) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &column_param, &value); zephir_get_strval(&column, column_param); if (!value) { @@ -456,8 +414,6 @@ PHP_METHOD(Phalcon_DataMapper_Query_Insert, set) } else { ZEPHIR_SEPARATE_PARAM(value); } - - if (Z_TYPE_P(value) == IS_NULL) { ZEPHIR_INIT_NVAR(value); ZVAL_STRING(value, "NULL"); @@ -501,9 +457,8 @@ PHP_METHOD(Phalcon_DataMapper_Query_Insert, buildColumns) ZVAL_UNDEF(&_7$$3); ZVAL_UNDEF(&_9$$4); ZVAL_UNDEF(&columns); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&columns); array_init(&columns); diff --git a/ext/phalcon/datamapper/query/queryfactory.zep.c b/ext/phalcon/datamapper/query/queryfactory.zep.c index f3dce8216fd..99e6be5a988 100644 --- a/ext/phalcon/datamapper/query/queryfactory.zep.c +++ b/ext/phalcon/datamapper/query/queryfactory.zep.c @@ -58,16 +58,12 @@ PHP_METHOD(Phalcon_DataMapper_Query_QueryFactory, __construct) zval *this_ptr = getThis(); ZVAL_UNDEF(&selectClass); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR(selectClass) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &selectClass_param); if (!selectClass_param) { ZEPHIR_INIT_VAR(&selectClass); @@ -75,8 +71,6 @@ PHP_METHOD(Phalcon_DataMapper_Query_QueryFactory, __construct) } else { zephir_get_strval(&selectClass, selectClass_param); } - - if (ZEPHIR_IS_EMPTY(&selectClass)) { ZEPHIR_INIT_NVAR(&selectClass); ZVAL_STRING(&selectClass, "Phalcon\\DataMapper\\Query\\Select"); @@ -94,11 +88,8 @@ PHP_METHOD(Phalcon_DataMapper_Query_QueryFactory, newBind) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *this_ptr = getThis(); - - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); object_init_ex(return_value, phalcon_datamapper_query_bind_ce); if (zephir_has_constructor(return_value)) { @@ -125,22 +116,16 @@ PHP_METHOD(Phalcon_DataMapper_Query_QueryFactory, newDelete) ZVAL_UNDEF(&connection_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(connection, phalcon_datamapper_pdo_connection_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &connection); - - object_init_ex(return_value, phalcon_datamapper_query_delete_ce); ZEPHIR_CALL_METHOD(&_0, this_ptr, "newbind", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 205, connection, &_0); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 206, connection, &_0); zephir_check_call_status(); RETURN_MM(); } @@ -161,22 +146,16 @@ PHP_METHOD(Phalcon_DataMapper_Query_QueryFactory, newInsert) ZVAL_UNDEF(&connection_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(connection, phalcon_datamapper_pdo_connection_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &connection); - - object_init_ex(return_value, phalcon_datamapper_query_insert_ce); ZEPHIR_CALL_METHOD(&_0, this_ptr, "newbind", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 206, connection, &_0); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 207, connection, &_0); zephir_check_call_status(); RETURN_MM(); } @@ -202,18 +181,12 @@ PHP_METHOD(Phalcon_DataMapper_Query_QueryFactory, newSelect) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&selectClass); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(connection, phalcon_datamapper_pdo_connection_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &connection); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("selectClass"), PH_NOISY_CC | PH_READONLY); zephir_get_strval(&selectClass, &_0); zephir_fetch_safe_class(&_1, &selectClass); @@ -248,22 +221,16 @@ PHP_METHOD(Phalcon_DataMapper_Query_QueryFactory, newUpdate) ZVAL_UNDEF(&connection_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(connection, phalcon_datamapper_pdo_connection_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &connection); - - object_init_ex(return_value, phalcon_datamapper_query_update_ce); ZEPHIR_CALL_METHOD(&_0, this_ptr, "newbind", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 207, connection, &_0); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 208, connection, &_0); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/datamapper/query/select.zep.c b/ext/phalcon/datamapper/query/select.zep.c index 9492d9cd79d..bae63bcc25f 100644 --- a/ext/phalcon/datamapper/query/select.zep.c +++ b/ext/phalcon/datamapper/query/select.zep.c @@ -90,21 +90,15 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, __call) ZVAL_UNDEF(&proxied); ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_3$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(method) Z_PARAM_ARRAY(params) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &method_param, ¶ms_param); zephir_get_strval(&method, method_param); zephir_get_arrval(¶ms, params_param); - - ZEPHIR_INIT_VAR(&proxied); zephir_create_array(&proxied, 10, 0); zephir_array_update_string(&proxied, SL("fetchAffected"), &__$true, PH_COPY | PH_SEPARATE); @@ -120,7 +114,7 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, __call) if (EXPECTED(zephir_array_isset(&proxied, &method))) { ZEPHIR_INIT_VAR(&_0$$3); zephir_create_array(&_0$$3, 2, 0); - ZEPHIR_OBS_VAR(&_1$$3); + zephir_memory_observe(&_1$$3); zephir_read_property(&_1$$3, this_ptr, ZEND_STRL("connection"), PH_NOISY_CC); zephir_array_fast_append(&_0$$3, &_1$$3); zephir_array_fast_append(&_0$$3, &method); @@ -142,7 +136,7 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, __call) object_init_ex(&_5, spl_ce_BadMethodCallException); ZEPHIR_INIT_VAR(&_6); ZEPHIR_CONCAT_SVS(&_6, "Unknown method: [", &method, "]"); - ZEPHIR_CALL_METHOD(NULL, &_5, "__construct", NULL, 75, &_6); + ZEPHIR_CALL_METHOD(NULL, &_5, "__construct", NULL, 76, &_6); zephir_check_call_status(); zephir_throw_exception_debug(&_5, "phalcon/DataMapper/Query/Select.zep", 83); ZEPHIR_MM_RESTORE(); @@ -170,7 +164,6 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, andHaving) ZVAL_UNDEF(&value_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(condition) @@ -178,10 +171,8 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, andHaving) Z_PARAM_ZVAL_OR_NULL(value) Z_PARAM_LONG(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &condition_param, &value, &type_param); zephir_get_strval(&condition, condition_param); if (!value) { @@ -191,10 +182,7 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, andHaving) if (!type_param) { type = -1; } else { - type = zephir_get_intval(type_param); - } - - + } ZVAL_LONG(&_0, type); ZEPHIR_CALL_METHOD(NULL, this_ptr, "having", NULL, 0, &condition, value, &_0); zephir_check_call_status(); @@ -216,19 +204,13 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, asAlias) zval *this_ptr = getThis(); ZVAL_UNDEF(&asAlias); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(asAlias) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &asAlias_param); zephir_get_strval(&asAlias, asAlias_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("asAlias"), &asAlias); RETURN_THIS(); } @@ -255,7 +237,6 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, appendHaving) ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(condition) @@ -263,10 +244,8 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, appendHaving) Z_PARAM_ZVAL_OR_NULL(value) Z_PARAM_LONG(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &condition_param, &value, &type_param); zephir_get_strval(&condition, condition_param); if (!value) { @@ -276,10 +255,7 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, appendHaving) if (!type_param) { type = -1; } else { - type = zephir_get_intval(type_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "HAVING"); ZVAL_LONG(&_1, type); @@ -323,7 +299,6 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, appendJoin) ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(condition) @@ -331,10 +306,8 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, appendJoin) Z_PARAM_ZVAL_OR_NULL(value) Z_PARAM_LONG(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &condition_param, &value, &type_param); zephir_get_strval(&condition, condition_param); if (!value) { @@ -344,10 +317,7 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, appendJoin) if (!type_param) { type = -1; } else { - type = zephir_get_intval(type_param); - } - - + } if (!(ZEPHIR_IS_EMPTY(value))) { zephir_read_property(&_0$$3, this_ptr, ZEND_STRL("bind"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_2$$3, type); @@ -357,12 +327,12 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, appendJoin) } zephir_read_property(&_3, this_ptr, ZEND_STRL("store"), PH_NOISY_CC | PH_READONLY); zephir_array_fetch_string(&_4, &_3, SL("FROM"), PH_NOISY | PH_READONLY, "phalcon/DataMapper/Query/Select.zep", 158); - ZEPHIR_CALL_FUNCTION(&end, "array_key_last", NULL, 39, &_4); + ZEPHIR_CALL_FUNCTION(&end, "array_key_last", NULL, 40, &_4); zephir_check_call_status(); zephir_read_property(&_5, this_ptr, ZEND_STRL("store"), PH_NOISY_CC | PH_READONLY); zephir_array_fetch_string(&_6, &_5, SL("FROM"), PH_NOISY | PH_READONLY, "phalcon/DataMapper/Query/Select.zep", 159); zephir_array_fetch(&_7, &_6, &end, PH_NOISY | PH_READONLY, "phalcon/DataMapper/Query/Select.zep", 159); - ZEPHIR_CALL_FUNCTION(&key, "array_key_last", NULL, 39, &_7); + ZEPHIR_CALL_FUNCTION(&key, "array_key_last", NULL, 40, &_7); zephir_check_call_status(); zephir_read_property(&_8, this_ptr, ZEND_STRL("store"), PH_NOISY_CC | PH_READONLY); zephir_array_fetch_string(&_9, &_8, SL("FROM"), PH_NOISY | PH_READONLY, "phalcon/DataMapper/Query/Select.zep", 161); @@ -403,19 +373,13 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, columns) ZVAL_UNDEF(&_9); ZVAL_UNDEF(&_4$$5); ZVAL_UNDEF(&_5$$8); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(columns) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &columns_param); zephir_get_arrval(&columns, columns_param); - - ZEPHIR_INIT_VAR(&localColumns); array_init(&localColumns); zephir_is_iterable(&columns, 0, "phalcon/DataMapper/Query/Select.zep", 187); @@ -489,24 +453,17 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, distinct) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_BOOL(enable) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &enable_param); if (!enable_param) { enable = 1; } else { - enable = zephir_get_boolval(enable_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "DISTINCT"); if (enable) { @@ -536,19 +493,13 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, from) ZVAL_UNDEF(&table); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(table) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &table_param); zephir_get_strval(&table, table_param); - - ZEPHIR_INIT_VAR(&_0); zephir_create_array(&_0, 1, 0); zephir_array_fast_append(&_0, &table); @@ -571,23 +522,15 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, forUpdate) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_BOOL(enable) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(0, 1, &enable_param); if (!enable_param) { enable = 1; } else { - enable = zephir_get_boolval(enable_param); - } - - + } if (enable) { zephir_update_property_zval(this_ptr, ZEND_STRL("forUpdate"), &__$true); } else { @@ -612,9 +555,8 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, getStatement) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); zephir_read_property(&_1, this_ptr, ZEND_STRL("store"), PH_NOISY_CC | PH_READONLY); @@ -642,18 +584,12 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, groupBy) ZVAL_UNDEF(&groupBy_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(groupBy) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &groupBy); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "GROUP"); ZEPHIR_CALL_METHOD(NULL, this_ptr, "processvalue", NULL, 0, &_0, groupBy); @@ -673,9 +609,6 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, hasColumns) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - zephir_read_property(&_0, this_ptr, ZEND_STRL("store"), PH_NOISY_CC | PH_READONLY); zephir_array_fetch_string(&_1, &_0, SL("COLUMNS"), PH_NOISY | PH_READONLY, "phalcon/DataMapper/Query/Select.zep", 266); RETURN_BOOL(zephir_fast_count_int(&_1) > 0); @@ -704,7 +637,6 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, having) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(condition) @@ -712,10 +644,8 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, having) Z_PARAM_ZVAL_OR_NULL(value) Z_PARAM_LONG(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &condition_param, &value, &type_param); zephir_get_strval(&condition, condition_param); if (!value) { @@ -725,10 +655,7 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, having) if (!type_param) { type = -1; } else { - type = zephir_get_intval(type_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "HAVING"); ZEPHIR_INIT_VAR(&_1); @@ -785,7 +712,6 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, join) ZVAL_UNDEF(&_16$$5); ZVAL_UNDEF(&_17$$5); ZVAL_UNDEF(&_18$$5); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 5) Z_PARAM_STR(join) @@ -795,10 +721,8 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, join) Z_PARAM_ZVAL_OR_NULL(value) Z_PARAM_LONG(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 2, &join_param, &table_param, &condition_param, &value, &type_param); zephir_get_strval(&join, join_param); zephir_get_strval(&table, table_param); @@ -810,10 +734,7 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, join) if (!type_param) { type = -1; } else { - type = zephir_get_intval(type_param); - } - - + } ZEPHIR_INIT_VAR(&_0); zephir_fast_trim(&_0, &join, NULL , ZEPHIR_TRIM_BOTH); ZEPHIR_INIT_NVAR(&join); @@ -863,7 +784,7 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, join) } zephir_read_property(&_19, this_ptr, ZEND_STRL("store"), PH_NOISY_CC | PH_READONLY); zephir_array_fetch_string(&_20, &_19, SL("FROM"), PH_NOISY | PH_READONLY, "phalcon/DataMapper/Query/Select.zep", 327); - ZEPHIR_CALL_FUNCTION(&key, "array_key_last", NULL, 39, &_20); + ZEPHIR_CALL_FUNCTION(&key, "array_key_last", NULL, 40, &_20); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_21); ZEPHIR_CONCAT_VSVSV(&_21, &join, " ", &table, " ", &condition); @@ -894,7 +815,6 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, orHaving) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(condition) @@ -902,10 +822,8 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, orHaving) Z_PARAM_ZVAL_OR_NULL(value) Z_PARAM_LONG(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &condition_param, &value, &type_param); zephir_get_strval(&condition, condition_param); if (!value) { @@ -915,10 +833,7 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, orHaving) if (!type_param) { type = -1; } else { - type = zephir_get_intval(type_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "HAVING"); ZEPHIR_INIT_VAR(&_1); @@ -937,24 +852,22 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, orHaving) PHP_METHOD(Phalcon_DataMapper_Query_Select, reset) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zval __$true, __$false, _1; + zval __$true, __$false, _0; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *this_ptr = getThis(); ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); - ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZVAL_UNDEF(&_0); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - ZEPHIR_CALL_PARENT(NULL, phalcon_datamapper_query_select_ce, getThis(), "reset", &_0, 0); + ZEPHIR_CALL_PARENT(NULL, phalcon_datamapper_query_select_ce, getThis(), "reset", NULL, 0); zephir_check_call_status(); - ZEPHIR_INIT_VAR(&_1); - ZEPHIR_INIT_NVAR(&_1); - ZVAL_STRING(&_1, ""); - zephir_update_property_zval(this_ptr, ZEND_STRL("asAlias"), &_1); + ZEPHIR_INIT_VAR(&_0); + ZEPHIR_INIT_NVAR(&_0); + ZVAL_STRING(&_0, ""); + zephir_update_property_zval(this_ptr, ZEND_STRL("asAlias"), &_0); if (0) { zephir_update_property_zval(this_ptr, ZEND_STRL("forUpdate"), &__$true); } else { @@ -977,14 +890,13 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, subSelect) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); object_init_ex(return_value, phalcon_datamapper_query_select_ce); zephir_read_property(&_0, this_ptr, ZEND_STRL("connection"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_1, this_ptr, ZEND_STRL("bind"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 208, &_0, &_1); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 209, &_0, &_1); zephir_check_call_status(); RETURN_MM(); } @@ -1003,9 +915,8 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, union) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, " UNION "); @@ -1031,9 +942,8 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, unionAll) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, " UNION ALL "); @@ -1078,16 +988,12 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, getCurrentStatement) ZVAL_UNDEF(&_12); ZVAL_UNDEF(&_13$$4); ZVAL_UNDEF(&_14$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR(suffix) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &suffix_param); if (!suffix_param) { ZEPHIR_INIT_VAR(&suffix); @@ -1095,8 +1001,6 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, getCurrentStatement) } else { zephir_get_strval(&suffix, suffix_param); } - - ZEPHIR_INIT_VAR(&forUpdate); zephir_read_property(&_0, this_ptr, ZEND_STRL("forUpdate"), PH_NOISY_CC | PH_READONLY); if (zephir_is_true(&_0)) { @@ -1107,9 +1011,9 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, getCurrentStatement) zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_2, this_ptr, "buildlimitearly", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_3, this_ptr, "buildcolumns", NULL, 209); + ZEPHIR_CALL_METHOD(&_3, this_ptr, "buildcolumns", NULL, 210); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_4, this_ptr, "buildfrom", NULL, 210); + ZEPHIR_CALL_METHOD(&_4, this_ptr, "buildfrom", NULL, 211); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_6); ZVAL_STRING(&_6, "WHERE"); @@ -1161,9 +1065,8 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, buildColumns) ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$4); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&_0, this_ptr, "hascolumns", NULL, 0); zephir_check_call_status(); @@ -1214,9 +1117,8 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, buildFrom) ZVAL_UNDEF(&_12$$5); ZVAL_UNDEF(&_13$$5); ZVAL_UNDEF(&from); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&from); array_init(&from); @@ -1234,7 +1136,7 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, buildFrom) ZEPHIR_INIT_NVAR(&table); ZVAL_COPY(&table, _4); ZEPHIR_MAKE_REF(&table); - ZEPHIR_CALL_FUNCTION(&_6$$4, "array_shift", &_7, 21, &table); + ZEPHIR_CALL_FUNCTION(&_6$$4, "array_shift", &_7, 22, &table); ZEPHIR_UNREF(&table); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_8$$4, this_ptr, "indent", &_9, 0, &table); @@ -1255,7 +1157,7 @@ PHP_METHOD(Phalcon_DataMapper_Query_Select, buildFrom) ZEPHIR_CALL_METHOD(&table, &_3, "current", NULL, 0); zephir_check_call_status(); ZEPHIR_MAKE_REF(&table); - ZEPHIR_CALL_FUNCTION(&_11$$5, "array_shift", &_7, 21, &table); + ZEPHIR_CALL_FUNCTION(&_11$$5, "array_shift", &_7, 22, &table); ZEPHIR_UNREF(&table); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_12$$5, this_ptr, "indent", &_9, 0, &table); diff --git a/ext/phalcon/datamapper/query/update.zep.c b/ext/phalcon/datamapper/query/update.zep.c index 18972f2e5fe..d130f467f09 100644 --- a/ext/phalcon/datamapper/query/update.zep.c +++ b/ext/phalcon/datamapper/query/update.zep.c @@ -53,41 +53,34 @@ PHP_METHOD(Phalcon_DataMapper_Query_Update, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; - zval *connection, connection_sub, *bind, bind_sub, _1, _2, _3, _4; + zval *connection, connection_sub, *bind, bind_sub, _0, _1, _2, _3; zval *this_ptr = getThis(); ZVAL_UNDEF(&connection_sub); ZVAL_UNDEF(&bind_sub); + ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); - ZVAL_UNDEF(&_4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(connection, phalcon_datamapper_pdo_connection_ce) Z_PARAM_OBJECT_OF_CLASS(bind, phalcon_datamapper_query_bind_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &connection, &bind); - - - ZEPHIR_CALL_PARENT(NULL, phalcon_datamapper_query_update_ce, getThis(), "__construct", &_0, 0, connection, bind); + ZEPHIR_CALL_PARENT(NULL, phalcon_datamapper_query_update_ce, getThis(), "__construct", NULL, 0, connection, bind); zephir_check_call_status(); + ZEPHIR_INIT_VAR(&_0); + ZVAL_STRING(&_0, "FROM"); ZEPHIR_INIT_VAR(&_1); - ZVAL_STRING(&_1, "FROM"); + ZVAL_STRING(&_1, ""); + zephir_update_property_array(this_ptr, SL("store"), &_0, &_1); ZEPHIR_INIT_VAR(&_2); - ZVAL_STRING(&_2, ""); - zephir_update_property_array(this_ptr, SL("store"), &_1, &_2); + array_init(&_2); ZEPHIR_INIT_VAR(&_3); - array_init(&_3); - ZEPHIR_INIT_VAR(&_4); - ZVAL_STRING(&_4, "RETURNING"); - zephir_update_property_array(this_ptr, SL("store"), &_4, &_3); + ZVAL_STRING(&_3, "RETURNING"); + zephir_update_property_array(this_ptr, SL("store"), &_3, &_2); ZEPHIR_MM_RESTORE(); } @@ -112,7 +105,6 @@ PHP_METHOD(Phalcon_DataMapper_Query_Update, column) ZVAL_NULL(&__$null); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(column) @@ -120,10 +112,8 @@ PHP_METHOD(Phalcon_DataMapper_Query_Update, column) Z_PARAM_ZVAL_OR_NULL(value) Z_PARAM_LONG(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &column_param, &value, &type_param); zephir_get_strval(&column, column_param); if (!value) { @@ -133,10 +123,7 @@ PHP_METHOD(Phalcon_DataMapper_Query_Update, column) if (!type_param) { type = -1; } else { - type = zephir_get_intval(type_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZEPHIR_CONCAT_SV(&_0, ":", &column); zephir_update_property_array_multi(this_ptr, SL("store"), &_0, SL("sz"), 3, SL("COLUMNS"), &column); @@ -171,19 +158,13 @@ PHP_METHOD(Phalcon_DataMapper_Query_Update, columns) ZVAL_UNDEF(&column); ZVAL_UNDEF(&value); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(columns) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &columns_param); zephir_get_arrval(&columns, columns_param); - - zephir_is_iterable(&columns, 0, "phalcon/DataMapper/Query/Update.zep", 76); if (Z_TYPE_P(&columns) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&columns), _2, _3, _0) @@ -249,19 +230,13 @@ PHP_METHOD(Phalcon_DataMapper_Query_Update, from) ZVAL_UNDEF(&table); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(table) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &table_param); zephir_get_strval(&table, table_param); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "FROM"); zephir_update_property_array(this_ptr, SL("store"), &_0, &table); @@ -285,15 +260,14 @@ PHP_METHOD(Phalcon_DataMapper_Query_Update, getStatement) ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_6); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&_0, this_ptr, "buildflags", NULL, 0); zephir_check_call_status(); zephir_read_property(&_1, this_ptr, ZEND_STRL("store"), PH_NOISY_CC | PH_READONLY); zephir_array_fetch_string(&_2, &_1, SL("FROM"), PH_NOISY | PH_READONLY, "phalcon/DataMapper/Query/Update.zep", 101); - ZEPHIR_CALL_METHOD(&_3, this_ptr, "buildcolumns", NULL, 211); + ZEPHIR_CALL_METHOD(&_3, this_ptr, "buildcolumns", NULL, 212); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_5); ZVAL_STRING(&_5, "WHERE"); @@ -317,9 +291,6 @@ PHP_METHOD(Phalcon_DataMapper_Query_Update, hasColumns) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - zephir_read_property(&_0, this_ptr, ZEND_STRL("store"), PH_NOISY_CC | PH_READONLY); zephir_array_fetch_string(&_1, &_0, SL("COLUMNS"), PH_NOISY | PH_READONLY, "phalcon/DataMapper/Query/Update.zep", 113); RETURN_BOOL(zephir_fast_count_int(&_1) > 0); @@ -344,19 +315,13 @@ PHP_METHOD(Phalcon_DataMapper_Query_Update, returning) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(columns) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &columns_param); zephir_get_arrval(&columns, columns_param); - - ZEPHIR_INIT_VAR(&_0); zephir_read_property(&_1, this_ptr, ZEND_STRL("store"), PH_NOISY_CC | PH_READONLY); zephir_array_fetch_string(&_2, &_1, SL("RETURNING"), PH_NOISY | PH_READONLY, "phalcon/DataMapper/Query/Update.zep", 126); @@ -372,32 +337,30 @@ PHP_METHOD(Phalcon_DataMapper_Query_Update, returning) */ PHP_METHOD(Phalcon_DataMapper_Query_Update, reset) { - zval _1, _2, _3, _4; + zval _0, _1, _2, _3; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *this_ptr = getThis(); + ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); - ZVAL_UNDEF(&_4); - + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - ZEPHIR_MM_GROW(); - - ZEPHIR_CALL_PARENT(NULL, phalcon_datamapper_query_update_ce, getThis(), "reset", &_0, 0); + ZEPHIR_CALL_PARENT(NULL, phalcon_datamapper_query_update_ce, getThis(), "reset", NULL, 0); zephir_check_call_status(); + ZEPHIR_INIT_VAR(&_0); + ZVAL_STRING(&_0, "FROM"); ZEPHIR_INIT_VAR(&_1); - ZVAL_STRING(&_1, "FROM"); + ZVAL_STRING(&_1, ""); + zephir_update_property_array(this_ptr, SL("store"), &_0, &_1); ZEPHIR_INIT_VAR(&_2); - ZVAL_STRING(&_2, ""); - zephir_update_property_array(this_ptr, SL("store"), &_1, &_2); + array_init(&_2); ZEPHIR_INIT_VAR(&_3); - array_init(&_3); - ZEPHIR_INIT_VAR(&_4); - ZVAL_STRING(&_4, "RETURNING"); - zephir_update_property_array(this_ptr, SL("store"), &_4, &_3); + ZVAL_STRING(&_3, "RETURNING"); + zephir_update_property_array(this_ptr, SL("store"), &_3, &_2); ZEPHIR_MM_RESTORE(); } @@ -421,17 +384,14 @@ PHP_METHOD(Phalcon_DataMapper_Query_Update, set) ZVAL_UNDEF(&value_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(column) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &column_param, &value); zephir_get_strval(&column, column_param); if (!value) { @@ -440,8 +400,6 @@ PHP_METHOD(Phalcon_DataMapper_Query_Update, set) } else { ZEPHIR_SEPARATE_PARAM(value); } - - if (Z_TYPE_P(value) == IS_NULL) { ZEPHIR_INIT_NVAR(value); ZVAL_STRING(value, "NULL"); @@ -481,9 +439,8 @@ PHP_METHOD(Phalcon_DataMapper_Query_Update, buildColumns) ZVAL_UNDEF(&_9$$4); ZVAL_UNDEF(&_10$$4); ZVAL_UNDEF(&assignments); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&assignments); array_init(&assignments); diff --git a/ext/phalcon/db/abstractdb.zep.c b/ext/phalcon/db/abstractdb.zep.c index 1e921fc777b..9700218abbd 100644 --- a/ext/phalcon/db/abstractdb.zep.c +++ b/ext/phalcon/db/abstractdb.zep.c @@ -85,29 +85,22 @@ PHP_METHOD(Phalcon_Db_AbstractDb, setup) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *options_param = NULL, escapeIdentifiers, forceCasting; zval options; - zval *this_ptr = getThis(); ZVAL_UNDEF(&options); ZVAL_UNDEF(&escapeIdentifiers); ZVAL_UNDEF(&forceCasting); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &options_param); ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); - - - ZEPHIR_OBS_VAR(&escapeIdentifiers); + zephir_memory_observe(&escapeIdentifiers); if (zephir_array_isset_string_fetch(&escapeIdentifiers, &options, SL("escapeSqlIdentifiers"), 0)) { ZEPHIR_GLOBAL(db).escape_identifiers = zend_is_true(&escapeIdentifiers); } - ZEPHIR_OBS_VAR(&forceCasting); + zephir_memory_observe(&forceCasting); if (zephir_array_isset_string_fetch(&forceCasting, &options, SL("forceCasting"), 0)) { ZEPHIR_GLOBAL(db).force_casting = zend_is_true(&forceCasting); } diff --git a/ext/phalcon/db/adapter/abstractadapter.zep.c b/ext/phalcon/db/adapter/abstractadapter.zep.c index a6fb48ee469..b198075e8a1 100644 --- a/ext/phalcon/db/adapter/abstractadapter.zep.c +++ b/ext/phalcon/db/adapter/abstractadapter.zep.c @@ -152,26 +152,20 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, __construct) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(descriptor) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &descriptor_param); ZEPHIR_OBS_COPY_OR_DUP(&descriptor, descriptor_param); - - - ZEPHIR_OBS_VAR(&connectionId); + zephir_memory_observe(&connectionId); zephir_read_static_property_ce(&connectionId, phalcon_db_adapter_abstractadapter_ce, SL("connectionConsecutive"), PH_NOISY_CC); zephir_update_property_zval(this_ptr, ZEND_STRL("connectionId"), &connectionId); - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, (zephir_get_numberval(&connectionId) + 1)); zephir_update_static_property_ce(phalcon_db_adapter_abstractadapter_ce, ZEND_STRL("connectionConsecutive"), &_0); - ZEPHIR_OBS_VAR(&dialectClass); + zephir_memory_observe(&dialectClass); if (!(zephir_array_isset_string_fetch(&dialectClass, &descriptor, SL("dialectClass"), 0))) { zephir_read_property(&_1$$3, this_ptr, ZEND_STRL("dialectType"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_NVAR(&dialectClass); @@ -205,17 +199,13 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, addColumn) ZVAL_UNDEF(&column_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) Z_PARAM_OBJECT_OF_CLASS(column, phalcon_db_columninterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &tableName_param, &schemaName_param, &column); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -235,8 +225,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, addColumn) } else { ZEPHIR_INIT_VAR(&schemaName); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("dialect"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&_1, &_0, "addcolumn", NULL, 0, &tableName, &schemaName, column); zephir_check_call_status(); @@ -261,17 +249,13 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, addForeignKey) ZVAL_UNDEF(&reference_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) Z_PARAM_OBJECT_OF_CLASS(reference, phalcon_db_referenceinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &tableName_param, &schemaName_param, &reference); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -291,8 +275,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, addForeignKey) } else { ZEPHIR_INIT_VAR(&schemaName); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("dialect"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&_1, &_0, "addforeignkey", NULL, 0, &tableName, &schemaName, reference); zephir_check_call_status(); @@ -317,17 +299,13 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, addIndex) ZVAL_UNDEF(&index_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) Z_PARAM_OBJECT_OF_CLASS(index, phalcon_db_indexinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &tableName_param, &schemaName_param, &index); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -347,8 +325,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, addIndex) } else { ZEPHIR_INIT_VAR(&schemaName); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("dialect"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&_1, &_0, "addindex", NULL, 0, &tableName, &schemaName, index); zephir_check_call_status(); @@ -373,17 +349,13 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, addPrimaryKey) ZVAL_UNDEF(&index_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) Z_PARAM_OBJECT_OF_CLASS(index, phalcon_db_indexinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &tableName_param, &schemaName_param, &index); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -403,8 +375,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, addPrimaryKey) } else { ZEPHIR_INIT_VAR(&schemaName); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("dialect"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&_1, &_0, "addprimarykey", NULL, 0, &tableName, &schemaName, index); zephir_check_call_status(); @@ -429,15 +399,11 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, createSavepoint) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -448,8 +414,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, createSavepoint) } else { ZEPHIR_INIT_VAR(&name); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("dialect"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&dialect, &_0); ZEPHIR_CALL_METHOD(&_1, &dialect, "supportssavepoints", NULL, 0); @@ -483,17 +447,13 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, createTable) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&definition); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) Z_PARAM_ARRAY(definition) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &tableName_param, &schemaName_param, &definition_param); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -514,9 +474,7 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, createTable) ZEPHIR_INIT_VAR(&schemaName); } ZEPHIR_OBS_COPY_OR_DUP(&definition, definition_param); - - - ZEPHIR_OBS_VAR(&columns); + zephir_memory_observe(&columns); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&columns, &definition, SL("columns"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_db_exception_ce, "The table must contain at least one column", "phalcon/Db/Adapter/AbstractAdapter.zep", 247); return; @@ -550,7 +508,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, createView) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&definition); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(viewName) @@ -558,10 +515,8 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, createView) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schemaName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &viewName_param, &definition_param, &schemaName_param); if (UNEXPECTED(Z_TYPE_P(viewName_param) != IS_STRING && Z_TYPE_P(viewName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'viewName' must be of the type string")); @@ -578,8 +533,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, createView) } else { zephir_get_strval(&schemaName, schemaName_param); } - - if (UNEXPECTED(!(zephir_array_isset_string(&definition, SL("sql"))))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_db_exception_ce, "The table must contain at least one column", "phalcon/Db/Adapter/AbstractAdapter.zep", 269); return; @@ -629,7 +582,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, delete) ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&placeholders); ZVAL_UNDEF(&dataTypes); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 4) Z_PARAM_ZVAL(table) @@ -638,10 +590,8 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, delete) Z_PARAM_ARRAY(placeholders) Z_PARAM_ARRAY(dataTypes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 3, &table, &whereCondition_param, &placeholders_param, &dataTypes_param); if (!whereCondition_param) { ZEPHIR_INIT_VAR(&whereCondition); @@ -660,8 +610,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, delete) } else { zephir_get_arrval(&dataTypes, dataTypes_param); } - - ZEPHIR_CALL_METHOD(&escapedTable, this_ptr, "escapeidentifier", NULL, 0, table); zephir_check_call_status(); ZEPHIR_INIT_VAR(&sql); @@ -715,17 +663,14 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, describeIndexes) ZVAL_UNDEF(&_7$$6); ZVAL_UNDEF(&_12$$9); ZVAL_UNDEF(&_14$$10); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(table) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schema) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &table_param, &schema_param); if (UNEXPECTED(Z_TYPE_P(table_param) != IS_STRING && Z_TYPE_P(table_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'table' must be of the type string")); @@ -741,8 +686,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, describeIndexes) } else { zephir_get_strval(&schema, schema_param); } - - ZEPHIR_INIT_VAR(&indexes); array_init(&indexes); zephir_read_property(&_1, this_ptr, ZEND_STRL("dialect"), PH_NOISY_CC | PH_READONLY); @@ -813,7 +756,7 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, describeIndexes) ZVAL_COPY(&indexColumns, _8); ZEPHIR_INIT_NVAR(&_12$$9); object_init_ex(&_12$$9, phalcon_db_index_ce); - ZEPHIR_CALL_METHOD(NULL, &_12$$9, "__construct", &_13, 33, &name, &indexColumns); + ZEPHIR_CALL_METHOD(NULL, &_12$$9, "__construct", &_13, 34, &name, &indexColumns); zephir_check_call_status(); zephir_array_update_zval(&indexObjects, &name, &_12$$9, PH_COPY | PH_SEPARATE); } ZEND_HASH_FOREACH_END(); @@ -832,7 +775,7 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, describeIndexes) zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_14$$10); object_init_ex(&_14$$10, phalcon_db_index_ce); - ZEPHIR_CALL_METHOD(NULL, &_14$$10, "__construct", &_13, 33, &name, &indexColumns); + ZEPHIR_CALL_METHOD(NULL, &_14$$10, "__construct", &_13, 34, &name, &indexColumns); zephir_check_call_status(); zephir_array_update_zval(&indexObjects, &name, &_14$$10, PH_COPY | PH_SEPARATE); ZEPHIR_CALL_METHOD(NULL, &indexes, "next", NULL, 0); @@ -903,17 +846,14 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, describeReferences) ZVAL_UNDEF(&_19$$6); ZVAL_UNDEF(&_25$$9); ZVAL_UNDEF(&_29$$10); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(table) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schema) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &table_param, &schema_param); if (UNEXPECTED(Z_TYPE_P(table_param) != IS_STRING && Z_TYPE_P(table_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'table' must be of the type string")); @@ -937,8 +877,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, describeReferences) ZEPHIR_INIT_VAR(&schema); } } - - ZEPHIR_INIT_VAR(&references); array_init(&references); zephir_read_property(&_1, this_ptr, ZEND_STRL("dialect"), PH_NOISY_CC | PH_READONLY); @@ -1071,7 +1009,7 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, describeReferences) ZEPHIR_OBS_NVAR(&_26$$9); zephir_array_fetch_string(&_26$$9, &arrayReference, SL("referencedColumns"), PH_NOISY, "phalcon/Db/Adapter/AbstractAdapter.zep", 413); zephir_array_update_string(&_25$$9, SL("referencedColumns"), &_26$$9, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(NULL, &_24$$9, "__construct", &_27, 34, &name, &_25$$9); + ZEPHIR_CALL_METHOD(NULL, &_24$$9, "__construct", &_27, 35, &name, &_25$$9); zephir_check_call_status(); zephir_array_update_zval(&referenceObjects, &name, &_24$$9, PH_COPY | PH_SEPARATE); } ZEND_HASH_FOREACH_END(); @@ -1104,7 +1042,7 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, describeReferences) ZEPHIR_OBS_NVAR(&_30$$10); zephir_array_fetch_string(&_30$$10, &arrayReference, SL("referencedColumns"), PH_NOISY, "phalcon/Db/Adapter/AbstractAdapter.zep", 413); zephir_array_update_string(&_29$$10, SL("referencedColumns"), &_30$$10, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(NULL, &_28$$10, "__construct", &_27, 34, &name, &_29$$10); + ZEPHIR_CALL_METHOD(NULL, &_28$$10, "__construct", &_27, 35, &name, &_29$$10); zephir_check_call_status(); zephir_array_update_zval(&referenceObjects, &name, &_28$$10, PH_COPY | PH_SEPARATE); ZEPHIR_CALL_METHOD(NULL, &references, "next", NULL, 0); @@ -1132,17 +1070,13 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, dropColumn) ZVAL_UNDEF(&columnName); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) Z_PARAM_STR(columnName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &tableName_param, &schemaName_param, &columnName_param); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -1163,8 +1097,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, dropColumn) ZEPHIR_INIT_VAR(&schemaName); } zephir_get_strval(&columnName, columnName_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("dialect"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&_1, &_0, "dropcolumn", NULL, 0, &tableName, &schemaName, &columnName); zephir_check_call_status(); @@ -1189,17 +1121,13 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, dropForeignKey) ZVAL_UNDEF(&referenceName); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) Z_PARAM_STR(referenceName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &tableName_param, &schemaName_param, &referenceName_param); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -1228,8 +1156,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, dropForeignKey) } else { ZEPHIR_INIT_VAR(&referenceName); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("dialect"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&_1, &_0, "dropforeignkey", NULL, 0, &tableName, &schemaName, &referenceName); zephir_check_call_status(); @@ -1254,17 +1180,13 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, dropIndex) ZVAL_UNDEF(&indexName_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) Z_PARAM_ZVAL(indexName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &tableName_param, &schemaName_param, &indexName); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -1284,8 +1206,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, dropIndex) } else { ZEPHIR_INIT_VAR(&schemaName); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("dialect"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&_1, &_0, "dropindex", NULL, 0, &tableName, &schemaName, indexName); zephir_check_call_status(); @@ -1309,16 +1229,12 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, dropPrimaryKey) ZVAL_UNDEF(&schemaName); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &tableName_param, &schemaName_param); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -1338,8 +1254,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, dropPrimaryKey) } else { ZEPHIR_INIT_VAR(&schemaName); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("dialect"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&_1, &_0, "dropprimarykey", NULL, 0, &tableName, &schemaName); zephir_check_call_status(); @@ -1365,7 +1279,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, dropTable) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(tableName) @@ -1373,10 +1286,8 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, dropTable) Z_PARAM_STR_OR_NULL(schemaName) Z_PARAM_BOOL(ifExists) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &tableName_param, &schemaName_param, &ifExists_param); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -1403,10 +1314,7 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, dropTable) if (!ifExists_param) { ifExists = 1; } else { - ifExists = zephir_get_boolval(ifExists_param); - } - - + } zephir_read_property(&_0, this_ptr, ZEND_STRL("dialect"), PH_NOISY_CC | PH_READONLY); if (ifExists) { ZVAL_BOOL(&_2, 1); @@ -1437,7 +1345,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, dropView) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(viewName) @@ -1445,10 +1352,8 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, dropView) Z_PARAM_STR_OR_NULL(schemaName) Z_PARAM_BOOL(ifExists) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &viewName_param, &schemaName_param, &ifExists_param); if (UNEXPECTED(Z_TYPE_P(viewName_param) != IS_STRING && Z_TYPE_P(viewName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'viewName' must be of the type string")); @@ -1475,10 +1380,7 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, dropView) if (!ifExists_param) { ifExists = 1; } else { - ifExists = zephir_get_boolval(ifExists_param); - } - - + } zephir_read_property(&_0, this_ptr, ZEND_STRL("dialect"), PH_NOISY_CC | PH_READONLY); if (ifExists) { ZVAL_BOOL(&_2, 1); @@ -1523,18 +1425,12 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, escapeIdentifier) ZVAL_UNDEF(&_4$$3); ZVAL_UNDEF(&_5$$3); ZVAL_UNDEF(&_6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(identifier) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &identifier); - - if (Z_TYPE_P(identifier) == IS_ARRAY) { zephir_read_property(&_0$$3, this_ptr, ZEND_STRL("dialect"), PH_NOISY_CC | PH_READONLY); zephir_array_fetch_long(&_2$$3, identifier, 0, PH_NOISY | PH_READONLY, "phalcon/Db/Adapter/AbstractAdapter.zep", 522); @@ -1595,8 +1491,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, fetchAll) ZVAL_UNDEF(&_0$$4); ZVAL_UNDEF(&bindParams); ZVAL_UNDEF(&bindTypes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 4) Z_PARAM_STR(sqlQuery) Z_PARAM_OPTIONAL @@ -1604,17 +1498,14 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, fetchAll) Z_PARAM_ARRAY(bindParams) Z_PARAM_ARRAY(bindTypes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 3, &sqlQuery_param, &fetchMode_param, &bindParams_param, &bindTypes_param); zephir_get_strval(&sqlQuery, sqlQuery_param); if (!fetchMode_param) { fetchMode = 2; } else { - fetchMode = zephir_get_intval(fetchMode_param); - } + } if (!bindParams_param) { ZEPHIR_INIT_VAR(&bindParams); array_init(&bindParams); @@ -1627,8 +1518,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, fetchAll) } else { zephir_get_arrval(&bindTypes, bindTypes_param); } - - ZEPHIR_CALL_METHOD(&result, this_ptr, "query", NULL, 0, &sqlQuery, &bindParams, &bindTypes); zephir_check_call_status(); if (Z_TYPE_P(&result) != IS_OBJECT) { @@ -1680,18 +1569,14 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, fetchColumn) ZVAL_UNDEF(&columnValue); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&placeholders); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(sqlQuery) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(placeholders) Z_PARAM_ZVAL(column) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &sqlQuery_param, &placeholders_param, &column); zephir_get_strval(&sqlQuery, sqlQuery_param); if (!placeholders_param) { @@ -1705,8 +1590,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, fetchColumn) ZEPHIR_INIT_VAR(column); ZVAL_LONG(column, 0); } - - ZVAL_LONG(&_0, 4); ZEPHIR_CALL_METHOD(&row, this_ptr, "fetchone", NULL, 0, &sqlQuery, &_0, &placeholders); zephir_check_call_status(); @@ -1746,8 +1629,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, fetchOne) ZVAL_UNDEF(&result); ZVAL_UNDEF(&bindParams); ZVAL_UNDEF(&bindTypes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 4) Z_PARAM_STR(sqlQuery) Z_PARAM_OPTIONAL @@ -1755,10 +1636,8 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, fetchOne) Z_PARAM_ARRAY(bindParams) Z_PARAM_ARRAY(bindTypes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 3, &sqlQuery_param, &fetchMode, &bindParams_param, &bindTypes_param); if (UNEXPECTED(Z_TYPE_P(sqlQuery_param) != IS_STRING && Z_TYPE_P(sqlQuery_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'sqlQuery' must be of the type string")); @@ -1786,8 +1665,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, fetchOne) } else { zephir_get_arrval(&bindTypes, bindTypes_param); } - - ZEPHIR_CALL_METHOD(&result, this_ptr, "query", NULL, 0, &sqlQuery, &bindParams, &bindTypes); zephir_check_call_status(); if (Z_TYPE_P(&result) != IS_OBJECT) { @@ -1816,15 +1693,11 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, forUpdate) ZVAL_UNDEF(&sqlQuery); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(sqlQuery) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &sqlQuery_param); if (UNEXPECTED(Z_TYPE_P(sqlQuery_param) != IS_STRING && Z_TYPE_P(sqlQuery_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'sqlQuery' must be of the type string")); @@ -1835,8 +1708,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, forUpdate) } else { ZEPHIR_INIT_VAR(&sqlQuery); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("dialect"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_METHOD(&_0, "forupdate", NULL, 0, &sqlQuery); zephir_check_call_status(); @@ -1855,18 +1726,12 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, getColumnDefinition) ZVAL_UNDEF(&column_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(column, phalcon_db_columninterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &column); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("dialect"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_METHOD(&_0, "getcolumndefinition", NULL, 0, column); zephir_check_call_status(); @@ -1885,18 +1750,12 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, getColumnList) ZVAL_UNDEF(&columnList_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(columnList) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &columnList); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("dialect"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_METHOD(&_0, "getcolumnlist", NULL, 0, columnList); zephir_check_call_status(); @@ -1908,9 +1767,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, getColumnList) */ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, getConnectionId) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "connectionId"); } @@ -1940,17 +1796,15 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, getDefaultIdValue) zval _0; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); object_init_ex(return_value, phalcon_db_rawvalue_ce); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "null"); - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 35, &_0); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 36, &_0); zephir_check_call_status(); RETURN_MM(); } @@ -1981,17 +1835,15 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, getDefaultValue) zval _0; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); object_init_ex(return_value, phalcon_db_rawvalue_ce); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "DEFAULT"); - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 35, &_0); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 36, &_0); zephir_check_call_status(); RETURN_MM(); } @@ -2001,9 +1853,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, getDefaultValue) */ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, getDescriptor) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "descriptor"); } @@ -2013,9 +1862,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, getDescriptor) */ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, getDialect) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "dialect"); } @@ -2025,9 +1871,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, getDialect) */ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, getDialectType) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "dialectType"); } @@ -2037,9 +1880,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, getDialectType) */ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, getEventsManager) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "eventsManager"); } @@ -2053,9 +1893,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, getNestedTransactionSavepointName zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - zephir_read_property(&_0, this_ptr, ZEND_STRL("transactionLevel"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CONCAT_SV(return_value, "PHALCON_SAVEPOINT_", &_0); return; @@ -2066,9 +1903,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, getNestedTransactionSavepointName */ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, getRealSQLStatement) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "realSqlStatement"); } @@ -2078,9 +1912,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, getRealSQLStatement) */ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, getSQLBindTypes) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "sqlBindTypes"); } @@ -2090,9 +1921,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, getSQLBindTypes) */ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, getSQLStatement) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "sqlStatement"); } @@ -2102,9 +1930,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, getSQLStatement) */ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, getSQLVariables) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "sqlVariables"); } @@ -2114,9 +1939,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, getSQLVariables) */ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, getType) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "type"); } @@ -2182,7 +2004,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, insert) ZVAL_UNDEF(&_20$$23); ZVAL_UNDEF(&_21$$24); ZVAL_UNDEF(&values); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 4) Z_PARAM_STR(table) @@ -2191,10 +2012,8 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, insert) Z_PARAM_ZVAL_OR_NULL(fields) Z_PARAM_ZVAL_OR_NULL(dataTypes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 2, &table_param, &values_param, &fields, &dataTypes); zephir_get_strval(&table, table_param); ZEPHIR_OBS_COPY_OR_DUP(&values, values_param); @@ -2206,14 +2025,12 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, insert) dataTypes = &dataTypes_sub; dataTypes = &__$null; } - - if (UNEXPECTED(!(zephir_fast_count_int(&values)))) { ZEPHIR_INIT_VAR(&_0$$3); object_init_ex(&_0$$3, phalcon_db_exception_ce); ZEPHIR_INIT_VAR(&_1$$3); ZEPHIR_CONCAT_SVS(&_1$$3, "Unable to insert into ", &table, " without data"); - ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 32, &_1$$3); + ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 33, &_1$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_0$$3, "phalcon/Db/Adapter/AbstractAdapter.zep", 826); ZEPHIR_MM_RESTORE(); @@ -2419,7 +2236,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, insertAsDict) ZVAL_UNDEF(&field); ZVAL_UNDEF(&value); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(table) @@ -2427,18 +2243,14 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, insertAsDict) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(dataTypes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &table_param, &data, &dataTypes); zephir_get_strval(&table, table_param); if (!dataTypes) { dataTypes = &dataTypes_sub; dataTypes = &__$null; } - - ZEPHIR_INIT_VAR(&values); array_init(&values); ZEPHIR_INIT_VAR(&fields); @@ -2496,9 +2308,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, insertAsDict) */ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, isNestedTransactionsWithSavepoints) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "transactionsWithSavepoints"); } @@ -2521,16 +2330,12 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, limit) ZVAL_UNDEF(&sqlQuery); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(sqlQuery) Z_PARAM_LONG(number) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &sqlQuery_param, &number_param); if (UNEXPECTED(Z_TYPE_P(sqlQuery_param) != IS_STRING && Z_TYPE_P(sqlQuery_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'sqlQuery' must be of the type string")); @@ -2541,9 +2346,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, limit) } else { ZEPHIR_INIT_VAR(&sqlQuery); } - number = zephir_get_intval(number_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("dialect"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_1, number); ZEPHIR_RETURN_CALL_METHOD(&_0, "limit", NULL, 0, &sqlQuery, &_1); @@ -2578,16 +2380,13 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, listTables) ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_5$$3); ZVAL_UNDEF(&_6$$4); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schemaName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &schemaName_param); if (!schemaName_param) { ZEPHIR_INIT_VAR(&schemaName); @@ -2602,8 +2401,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, listTables) ZEPHIR_INIT_VAR(&schemaName); } } - - ZEPHIR_INIT_VAR(&allTables); array_init(&allTables); zephir_read_property(&_0, this_ptr, ZEND_STRL("dialect"), PH_NOISY_CC | PH_READONLY); @@ -2669,16 +2466,13 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, listViews) ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_5$$3); ZVAL_UNDEF(&_6$$4); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schemaName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &schemaName_param); if (!schemaName_param) { ZEPHIR_INIT_VAR(&schemaName); @@ -2693,8 +2487,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, listViews) ZEPHIR_INIT_VAR(&schemaName); } } - - ZEPHIR_INIT_VAR(&allTables); array_init(&allTables); zephir_read_property(&_0, this_ptr, ZEND_STRL("dialect"), PH_NOISY_CC | PH_READONLY); @@ -2751,7 +2543,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, modifyColumn) ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 4) Z_PARAM_STR(tableName) @@ -2760,10 +2551,8 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, modifyColumn) Z_PARAM_OPTIONAL Z_PARAM_OBJECT_OF_CLASS_OR_NULL(currentColumn, phalcon_db_columninterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 1, &tableName_param, &schemaName_param, &column, ¤tColumn); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -2787,8 +2576,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, modifyColumn) currentColumn = ¤tColumn_sub; currentColumn = &__$null; } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("dialect"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&_1, &_0, "modifycolumn", NULL, 0, &tableName, &schemaName, column, currentColumn); zephir_check_call_status(); @@ -2814,15 +2601,11 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, releaseSavepoint) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -2833,8 +2616,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, releaseSavepoint) } else { ZEPHIR_INIT_VAR(&name); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("dialect"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&dialect, &_0); ZEPHIR_CALL_METHOD(&_1, &dialect, "supportssavepoints", NULL, 0); @@ -2871,15 +2652,11 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, rollbackSavepoint) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -2890,8 +2667,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, rollbackSavepoint) } else { ZEPHIR_INIT_VAR(&name); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("dialect"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&dialect, &_0); ZEPHIR_CALL_METHOD(&_1, &dialect, "supportssavepoints", NULL, 0); @@ -2916,17 +2691,10 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, setEventsManager) zval *this_ptr = getThis(); ZVAL_UNDEF(&eventsManager_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(eventsManager, phalcon_events_managerinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &eventsManager); - - zephir_update_property_zval(this_ptr, ZEND_STRL("eventsManager"), eventsManager); } @@ -2939,17 +2707,10 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, setDialect) zval *this_ptr = getThis(); ZVAL_UNDEF(&dialect_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(dialect, phalcon_db_dialectinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &dialect); - - zephir_update_property_zval(this_ptr, ZEND_STRL("dialect"), dialect); } @@ -2969,19 +2730,12 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, setNestedTransactionsWithSavepoin ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(nestedTransactionsWithSavepoints) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &nestedTransactionsWithSavepoints_param); - nestedTransactionsWithSavepoints = zephir_get_boolval(nestedTransactionsWithSavepoints_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("transactionLevel"), PH_NOISY_CC | PH_READONLY); if (UNEXPECTED(ZEPHIR_GT_LONG(&_0, 0))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_db_exception_ce, "Nested transaction with savepoints behavior cannot be changed while a transaction is open", "phalcon/Db/Adapter/AbstractAdapter.zep", 1090); @@ -3015,15 +2769,11 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, sharedLock) ZVAL_UNDEF(&sqlQuery); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(sqlQuery) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &sqlQuery_param); if (UNEXPECTED(Z_TYPE_P(sqlQuery_param) != IS_STRING && Z_TYPE_P(sqlQuery_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'sqlQuery' must be of the type string")); @@ -3034,8 +2784,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, sharedLock) } else { ZEPHIR_INIT_VAR(&sqlQuery); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("dialect"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_METHOD(&_0, "sharedlock", NULL, 0, &sqlQuery); zephir_check_call_status(); @@ -3048,9 +2796,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, sharedLock) */ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, supportSequences) { - zval *this_ptr = getThis(); - - RETURN_BOOL(0); } @@ -3079,17 +2824,14 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, tableExists) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(tableName) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schemaName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &tableName_param, &schemaName_param); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -3113,8 +2855,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, tableExists) ZEPHIR_INIT_VAR(&schemaName); } } - - zephir_read_property(&_1, this_ptr, ZEND_STRL("dialect"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&_2, &_1, "tableexists", NULL, 0, &tableName, &schemaName); zephir_check_call_status(); @@ -3149,17 +2889,14 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, tableOptions) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(tableName) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schemaName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &tableName_param, &schemaName_param); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -3175,8 +2912,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, tableOptions) } else { zephir_get_strval(&schemaName, schemaName_param); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("dialect"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&sql, &_0, "tableoptions", NULL, 0, &tableName, &schemaName); zephir_check_call_status(); @@ -3271,7 +3006,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, update) ZVAL_UNDEF(&_13$$14); ZVAL_UNDEF(&_15$$17); ZVAL_UNDEF(&_16$$18); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 5) Z_PARAM_STR(table) @@ -3281,10 +3015,8 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, update) Z_PARAM_ZVAL_OR_NULL(whereCondition) Z_PARAM_ZVAL_OR_NULL(dataTypes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 2, &table_param, &fields, &values, &whereCondition, &dataTypes); zephir_get_strval(&table, table_param); if (!whereCondition) { @@ -3295,8 +3027,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, update) dataTypes = &dataTypes_sub; dataTypes = &__$null; } - - ZEPHIR_INIT_VAR(&placeholders); array_init(&placeholders); ZEPHIR_INIT_VAR(&updateValues); @@ -3439,15 +3169,15 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, update) ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_db_exception_ce, "Invalid WHERE clause conditions", "phalcon/Db/Adapter/AbstractAdapter.zep", 1267); return; } - ZEPHIR_OBS_VAR(&conditions); + zephir_memory_observe(&conditions); if (zephir_array_isset_string_fetch(&conditions, whereCondition, SL("conditions"), 0)) { zephir_concat_self(&updateSql, &conditions); } - ZEPHIR_OBS_VAR(&whereBind); + zephir_memory_observe(&whereBind); if (zephir_array_isset_string_fetch(&whereBind, whereCondition, SL("bind"), 0)) { zephir_merge_append(&updateValues, &whereBind); } - ZEPHIR_OBS_VAR(&whereTypes); + zephir_memory_observe(&whereTypes); if (zephir_array_isset_string_fetch(&whereTypes, whereCondition, SL("bindTypes"), 0)) { zephir_merge_append(&bindDataTypes, &whereTypes); } @@ -3504,7 +3234,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, updateAsDict) ZVAL_UNDEF(&field); ZVAL_UNDEF(&value); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 4) Z_PARAM_STR(table) @@ -3513,10 +3242,8 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, updateAsDict) Z_PARAM_ZVAL_OR_NULL(whereCondition) Z_PARAM_ZVAL_OR_NULL(dataTypes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 2, &table_param, &data, &whereCondition, &dataTypes); zephir_get_strval(&table, table_param); if (!whereCondition) { @@ -3527,8 +3254,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, updateAsDict) dataTypes = &dataTypes_sub; dataTypes = &__$null; } - - ZEPHIR_INIT_VAR(&values); array_init(&values); ZEPHIR_INIT_VAR(&fields); @@ -3587,9 +3312,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, updateAsDict) */ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, useExplicitIdValue) { - zval *this_ptr = getThis(); - - RETURN_BOOL(0); } @@ -3602,9 +3324,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, useExplicitIdValue) */ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, supportsDefaultValue) { - zval *this_ptr = getThis(); - - RETURN_BOOL(1); } @@ -3633,17 +3352,14 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, viewExists) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(viewName) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schemaName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &viewName_param, &schemaName_param); if (UNEXPECTED(Z_TYPE_P(viewName_param) != IS_STRING && Z_TYPE_P(viewName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'viewName' must be of the type string")); @@ -3667,8 +3383,6 @@ PHP_METHOD(Phalcon_Db_Adapter_AbstractAdapter, viewExists) ZEPHIR_INIT_VAR(&schemaName); } } - - zephir_read_property(&_1, this_ptr, ZEND_STRL("dialect"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&_2, &_1, "viewexists", NULL, 0, &viewName, &schemaName); zephir_check_call_status(); @@ -3691,7 +3405,8 @@ zend_object *zephir_init_properties_Phalcon_Db_Adapter_AbstractAdapter(zend_clas ZVAL_UNDEF(&_5$$5); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/db/adapter/abstractadapter.zep.h b/ext/phalcon/db/adapter/abstractadapter.zep.h index f4b0b15698b..43efa070c9e 100644 --- a/ext/phalcon/db/adapter/abstractadapter.zep.h +++ b/ext/phalcon/db/adapter/abstractadapter.zep.h @@ -110,16 +110,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_adapter_abstractadapter_delete, 0, 1, _IS_BOOL, 0) ZEND_ARG_INFO(0, table) ZEND_ARG_TYPE_INFO(0, whereCondition, IS_STRING, 1) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, placeholders, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, placeholders, 0) -#endif -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, dataTypes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, dataTypes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, placeholders, IS_ARRAY, 0, "[]") +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, dataTypes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_adapter_abstractadapter_describeindexes, 0, 1, IS_ARRAY, 0) @@ -174,41 +166,21 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_adapter_abstractadapter_fetchall, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, sqlQuery, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, fetchMode, IS_LONG, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindParams, 0) -#endif -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindTypes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_db_adapter_abstractadapter_fetchcolumn, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, sqlQuery, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, placeholders, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, placeholders, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, placeholders, IS_ARRAY, 0, "[]") ZEND_ARG_INFO(0, column) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_adapter_abstractadapter_fetchone, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, sqlQuery, IS_STRING, 0) ZEND_ARG_INFO(0, fetchMode) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindParams, 0) -#endif -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindTypes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_adapter_abstractadapter_forupdate, 0, 1, IS_STRING, 0) diff --git a/ext/phalcon/db/adapter/adapterinterface.zep.h b/ext/phalcon/db/adapter/adapterinterface.zep.h index d3dbb7afac3..d9075f50969 100644 --- a/ext/phalcon/db/adapter/adapterinterface.zep.h +++ b/ext/phalcon/db/adapter/adapterinterface.zep.h @@ -43,11 +43,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_adapter_adapterinterface_connect, 0, 0, IS_VOID, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, descriptor, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, descriptor, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, descriptor, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_adapter_adapterinterface_createsavepoint, 0, 1, _IS_BOOL, 0) @@ -69,16 +65,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_adapter_adapterinterface_delete, 0, 1, _IS_BOOL, 0) ZEND_ARG_INFO(0, table) ZEND_ARG_TYPE_INFO(0, whereCondition, IS_STRING, 1) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, placeholders, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, placeholders, 0) -#endif -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, dataTypes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, dataTypes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, placeholders, IS_ARRAY, 0, "[]") +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, dataTypes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_adapter_adapterinterface_describecolumns, 0, 1, IS_ARRAY, 0) @@ -141,56 +129,28 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_adapter_adapterinterface_execute, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, sqlStatement, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindParams, 0) -#endif -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindTypes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_adapter_adapterinterface_fetchall, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, sqlQuery, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, fetchMode, IS_LONG, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindParams, 0) -#endif -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindTypes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_db_adapter_adapterinterface_fetchcolumn, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, sqlQuery, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, placeholders, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, placeholders, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, placeholders, IS_ARRAY, 0, "[]") ZEND_ARG_INFO(0, column) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_adapter_adapterinterface_fetchone, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, sqlQuery, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, fetchMode, IS_LONG, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindParams, 0) -#endif -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindTypes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_adapter_adapterinterface_forupdate, 0, 1, IS_STRING, 0) @@ -289,16 +249,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_db_adapter_adapterinterface_query, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, sqlStatement, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindParams, 0) -#endif -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindTypes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_adapter_adapterinterface_releasesavepoint, 0, 1, _IS_BOOL, 0) diff --git a/ext/phalcon/db/adapter/pdo/abstractpdo.zep.c b/ext/phalcon/db/adapter/pdo/abstractpdo.zep.c index 0739b5826ff..295f21193c6 100644 --- a/ext/phalcon/db/adapter/pdo/abstractpdo.zep.c +++ b/ext/phalcon/db/adapter/pdo/abstractpdo.zep.c @@ -88,29 +88,22 @@ ZEPHIR_INIT_CLASS(Phalcon_Db_Adapter_Pdo_AbstractPdo) PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zephir_fcall_cache_entry *_0 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *descriptor_param = NULL; zval descriptor; zval *this_ptr = getThis(); ZVAL_UNDEF(&descriptor); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(descriptor) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &descriptor_param); ZEPHIR_OBS_COPY_OR_DUP(&descriptor, descriptor_param); - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "connect", NULL, 0, &descriptor); zephir_check_call_status(); - ZEPHIR_CALL_PARENT(NULL, phalcon_db_adapter_pdo_abstractpdo_ce, getThis(), "__construct", &_0, 0, &descriptor); + ZEPHIR_CALL_PARENT(NULL, phalcon_db_adapter_pdo_abstractpdo_ce, getThis(), "__construct", NULL, 0, &descriptor); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -129,9 +122,6 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, __construct) */ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, affectedRows) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "affectedRows"); } @@ -156,24 +146,17 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, begin) ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$4); ZVAL_UNDEF(&_8$$6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_BOOL(nesting) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &nesting_param); if (!nesting_param) { nesting = 1; } else { - nesting = zephir_get_boolval(nesting_param); - } - - + } RETURN_ON_FAILURE(zephir_property_incr(this_ptr, SL("transactionLevel"))); zephir_read_property(&_0, this_ptr, ZEND_STRL("transactionLevel"), PH_NOISY_CC | PH_READONLY); if (ZEPHIR_IS_LONG_IDENTICAL(&_0, 1)) { @@ -241,24 +224,17 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, commit) ZVAL_UNDEF(&_3$$5); ZVAL_UNDEF(&_8$$6); ZVAL_UNDEF(&_10$$8); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_BOOL(nesting) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &nesting_param); if (!nesting_param) { nesting = 1; } else { - nesting = zephir_get_boolval(nesting_param); - } - - + } zephir_read_property(&_0, this_ptr, ZEND_STRL("transactionLevel"), PH_NOISY_CC | PH_READONLY); if (ZEPHIR_IS_LONG_IDENTICAL(&_0, 0)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_db_exception_ce, "There is no active transaction", "phalcon/Db/Adapter/Pdo/AbstractPdo.zep", 151); @@ -324,9 +300,6 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, close) zval *this_ptr = getThis(); ZVAL_NULL(&__$null); - - - zephir_update_property_zval(this_ptr, ZEND_STRL("pdo"), &__$null); } @@ -387,16 +360,12 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, connect) ZVAL_UNDEF(&_3$$9); ZVAL_UNDEF(&_10$$11); ZVAL_UNDEF(&_11$$12); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(descriptor) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &descriptor_param); if (!descriptor_param) { ZEPHIR_INIT_VAR(&descriptor); @@ -404,19 +373,17 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, connect) } else { ZEPHIR_OBS_COPY_OR_DUP(&descriptor, descriptor_param); } - - ZEPHIR_INIT_VAR(&dsnParts); array_init(&dsnParts); if (ZEPHIR_IS_EMPTY(&descriptor)) { zephir_read_property(&_0$$3, this_ptr, ZEND_STRL("descriptor"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&descriptor, &_0$$3); } - ZEPHIR_OBS_VAR(&username); + zephir_memory_observe(&username); if (zephir_array_isset_string_fetch(&username, &descriptor, SL("username"), 0)) { zephir_array_unset_string(&descriptor, SL("username"), PH_SEPARATE); } - ZEPHIR_OBS_VAR(&password); + zephir_memory_observe(&password); if (zephir_array_isset_string_fetch(&password, &descriptor, SL("password"), 0)) { zephir_array_unset_string(&descriptor, SL("password"), PH_SEPARATE); } @@ -429,14 +396,14 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, connect) _1 = Z_TYPE_P(&_2) == IS_ARRAY; } if (_1) { - ZEPHIR_OBS_VAR(&options); + zephir_memory_observe(&options); zephir_array_fetch_string(&options, &descriptor, SL("options"), PH_NOISY, "phalcon/Db/Adapter/Pdo/AbstractPdo.zep", 266); zephir_array_unset_string(&descriptor, SL("options"), PH_SEPARATE); } else { ZEPHIR_INIT_NVAR(&options); array_init(&options); } - ZEPHIR_OBS_VAR(&persistent); + zephir_memory_observe(&persistent); if (zephir_array_isset_string_fetch(&persistent, &descriptor, SL("persistent"), 0)) { ZEPHIR_INIT_VAR(&_3$$9); ZVAL_BOOL(&_3$$9, zephir_get_boolval(&persistent)); @@ -445,7 +412,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, connect) ZEPHIR_INIT_VAR(&_4); ZVAL_LONG(&_4, 2); zephir_array_update_long(&options, 3, &_4, PH_COPY | PH_SEPARATE ZEPHIR_DEBUG_PARAMS_DUMMY); - ZEPHIR_OBS_VAR(&dsnAttributesCustomRaw); + zephir_memory_observe(&dsnAttributesCustomRaw); if (zephir_array_isset_string_fetch(&dsnAttributesCustomRaw, &descriptor, SL("dsn"), 0)) { zephir_array_append(&dsnParts, &dsnAttributesCustomRaw, PH_SEPARATE, "phalcon/Db/Adapter/Pdo/AbstractPdo.zep", 282); zephir_array_unset_string(&descriptor, SL("dsn"), PH_SEPARATE); @@ -526,7 +493,6 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, convertBoundParams) zval params; zval *sql_param = NULL, *params_param = NULL, boundSql, placeHolders, bindPattern, matches, placeMatch, value, _0, _1, _2, *_3$$3, _4$$3, _9$$3, _5$$4, _6$$5, _7$$8, _8$$9; zval sql; - zval *this_ptr = getThis(); ZVAL_UNDEF(&sql); ZVAL_UNDEF(&boundSql); @@ -545,17 +511,13 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, convertBoundParams) ZVAL_UNDEF(&_7$$8); ZVAL_UNDEF(&_8$$9); ZVAL_UNDEF(¶ms); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(sql) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(params) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &sql_param, ¶ms_param); if (UNEXPECTED(Z_TYPE_P(sql_param) != IS_STRING && Z_TYPE_P(sql_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'sql' must be of the type string")); @@ -572,8 +534,6 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, convertBoundParams) } else { zephir_get_arrval(¶ms, params_param); } - - ZEPHIR_INIT_VAR(&placeHolders); array_init(&placeHolders); ZEPHIR_INIT_VAR(&bindPattern); @@ -641,7 +601,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, convertBoundParams) ZEPHIR_INIT_NVAR(&placeMatch); ZEPHIR_INIT_VAR(&_9$$3); ZVAL_STRING(&_9$$3, "?"); - ZEPHIR_CALL_FUNCTION(&boundSql, "preg_replace", NULL, 40, &bindPattern, &_9$$3, &sql); + ZEPHIR_CALL_FUNCTION(&boundSql, "preg_replace", NULL, 41, &bindPattern, &_9$$3, &sql); zephir_check_call_status(); } else { ZEPHIR_CPY_WRT(&boundSql, &sql); @@ -670,19 +630,13 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, escapeString) ZVAL_UNDEF(&str); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(str) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &str_param); zephir_get_strval(&str, str_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("pdo"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_METHOD(&_0, "quote", NULL, 0, &str); zephir_check_call_status(); @@ -731,18 +685,14 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, execute) ZVAL_UNDEF(&_5$$9); ZVAL_UNDEF(&bindParams); ZVAL_UNDEF(&bindTypes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(sqlStatement) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(bindParams) Z_PARAM_ARRAY(bindTypes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &sqlStatement_param, &bindParams_param, &bindTypes_param); if (UNEXPECTED(Z_TYPE_P(sqlStatement_param) != IS_STRING && Z_TYPE_P(sqlStatement_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'sqlStatement' must be of the type string")); @@ -765,8 +715,6 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, execute) } else { ZEPHIR_OBS_COPY_OR_DUP(&bindTypes, bindTypes_param); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("eventsManager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&eventsManager, &_0); if (Z_TYPE_P(&eventsManager) == IS_OBJECT) { @@ -845,7 +793,6 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, executePrepared) zend_long ZEPHIR_LAST_CALL_STATUS; zval placeholders; zval *statement, statement_sub, *placeholders_param = NULL, *dataTypes, dataTypes_sub, wildcard, value, type, castValue, parameter, position, itemValue, *_0, _1, _6$$12, *_10$$22, _11$$22, _14$$24, _15$$25, _16$$27, _17$$28, *_18$$31, _19$$31, _22$$32, _23$$33, _26$$43, *_28$$53, _29$$53, _32$$55, _33$$56, _34$$58, _35$$59, *_36$$62, _37$$62, _40$$63, _41$$64; - zval *this_ptr = getThis(); ZVAL_UNDEF(&statement_sub); ZVAL_UNDEF(&dataTypes_sub); @@ -880,21 +827,15 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, executePrepared) ZVAL_UNDEF(&_8$$13); ZVAL_UNDEF(&_25$$39); ZVAL_UNDEF(&_27$$44); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_OBJECT_OF_CLASS(statement, zephir_get_internal_ce(SL("pdostatement"))) Z_PARAM_ARRAY(placeholders) Z_PARAM_ZVAL(dataTypes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &statement, &placeholders_param, &dataTypes); ZEPHIR_OBS_COPY_OR_DUP(&placeholders, placeholders_param); - - zephir_is_iterable(&placeholders, 0, "phalcon/Db/Adapter/Pdo/AbstractPdo.zep", 567); if (Z_TYPE_P(&placeholders) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&placeholders), _2, _3, _0) @@ -933,7 +874,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, executePrepared) do { if (ZEPHIR_IS_LONG(&type, 1)) { ZVAL_LONG(&_6$$12, 10); - ZEPHIR_CALL_FUNCTION(&castValue, "intval", &_7, 41, &value, &_6$$12); + ZEPHIR_CALL_FUNCTION(&castValue, "intval", &_7, 42, &value, &_6$$12); zephir_check_call_status(); break; } @@ -1114,7 +1055,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, executePrepared) do { if (ZEPHIR_IS_LONG(&type, 1)) { ZVAL_LONG(&_26$$43, 10); - ZEPHIR_CALL_FUNCTION(&castValue, "intval", &_7, 41, &value, &_26$$43); + ZEPHIR_CALL_FUNCTION(&castValue, "intval", &_7, 42, &value, &_26$$43); zephir_check_call_status(); break; } @@ -1278,9 +1219,8 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, getErrorInfo) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("pdo"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_METHOD(&_0, "errorinfo", NULL, 0); @@ -1293,9 +1233,6 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, getErrorInfo) */ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, getInternalHandler) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "pdo"); } @@ -1305,9 +1242,6 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, getInternalHandler) */ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, getTransactionLevel) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "transactionLevel"); } @@ -1332,9 +1266,8 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, isUnderTransaction) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("pdo"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_METHOD(&_0, "intransaction", NULL, 0); @@ -1377,16 +1310,13 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, lastInsertId) ZVAL_UNDEF(&name); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &name_param); if (!name_param) { ZEPHIR_INIT_VAR(&name); @@ -1401,8 +1331,6 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, lastInsertId) ZEPHIR_INIT_VAR(&name); } } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("pdo"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_METHOD(&_0, "lastinsertid", NULL, 0, &name); zephir_check_call_status(); @@ -1440,15 +1368,11 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, prepare) ZVAL_UNDEF(&sqlStatement); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(sqlStatement) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &sqlStatement_param); if (UNEXPECTED(Z_TYPE_P(sqlStatement_param) != IS_STRING && Z_TYPE_P(sqlStatement_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'sqlStatement' must be of the type string")); @@ -1459,8 +1383,6 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, prepare) } else { ZEPHIR_INIT_VAR(&sqlStatement); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("pdo"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_METHOD(&_0, "prepare", NULL, 0, &sqlStatement); zephir_check_call_status(); @@ -1507,18 +1429,14 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, query) ZVAL_UNDEF(&_4$$9); ZVAL_UNDEF(&bindParams); ZVAL_UNDEF(&bindTypes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(sqlStatement) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(bindParams) Z_PARAM_ARRAY(bindTypes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &sqlStatement_param, &bindParams_param, &bindTypes_param); if (UNEXPECTED(Z_TYPE_P(sqlStatement_param) != IS_STRING && Z_TYPE_P(sqlStatement_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'sqlStatement' must be of the type string")); @@ -1541,8 +1459,6 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, query) } else { ZEPHIR_OBS_COPY_OR_DUP(&bindTypes, bindTypes_param); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("eventsManager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&eventsManager, &_0); if (Z_TYPE_P(&eventsManager) == IS_OBJECT) { @@ -1586,7 +1502,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, query) zephir_check_call_status(); } object_init_ex(return_value, phalcon_db_result_pdoresult_ce); - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 42, this_ptr, &statement, &sqlStatement, &bindParams, &bindTypes); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 43, this_ptr, &statement, &sqlStatement, &bindParams, &bindTypes); zephir_check_call_status(); RETURN_MM(); } @@ -1615,24 +1531,17 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, rollback) ZVAL_UNDEF(&_3$$5); ZVAL_UNDEF(&_8$$6); ZVAL_UNDEF(&_10$$8); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_BOOL(nesting) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &nesting_param); if (!nesting_param) { nesting = 1; } else { - nesting = zephir_get_boolval(nesting_param); - } - - + } zephir_read_property(&_0, this_ptr, ZEND_STRL("transactionLevel"), PH_NOISY_CC | PH_READONLY); if (ZEPHIR_IS_LONG_IDENTICAL(&_0, 0)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_db_exception_ce, "There is no active transaction", "phalcon/Db/Adapter/Pdo/AbstractPdo.zep", 755); @@ -1732,21 +1641,15 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, prepareRealSql) ZVAL_UNDEF(¶meters); ZVAL_UNDEF(&keys); ZVAL_UNDEF(&values); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(statement) Z_PARAM_ARRAY(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &statement_param, ¶meters_param); zephir_get_strval(&statement, statement_param); zephir_get_arrval(¶meters, parameters_param); - - ZEPHIR_CPY_WRT(&result, &statement); ZEPHIR_CPY_WRT(&values, ¶meters); if (!(ZEPHIR_IS_EMPTY(¶meters))) { @@ -1833,7 +1736,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_AbstractPdo, prepareRealSql) ZEPHIR_INIT_NVAR(&value); ZEPHIR_INIT_NVAR(&key); ZVAL_LONG(&_16$$3, 1); - ZEPHIR_CALL_FUNCTION(&result, "preg_replace", NULL, 40, &keys, &values, &statement, &_16$$3); + ZEPHIR_CALL_FUNCTION(&result, "preg_replace", NULL, 41, &keys, &values, &statement, &_16$$3); zephir_check_call_status(); } zephir_update_property_zval(this_ptr, ZEND_STRL("realSqlStatement"), &result); diff --git a/ext/phalcon/db/adapter/pdo/abstractpdo.zep.h b/ext/phalcon/db/adapter/pdo/abstractpdo.zep.h index 33e34c11489..9644e114254 100644 --- a/ext/phalcon/db/adapter/pdo/abstractpdo.zep.h +++ b/ext/phalcon/db/adapter/pdo/abstractpdo.zep.h @@ -44,20 +44,12 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_adapter_pdo_abstractpdo_connect, 0, 0, IS_VOID, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, descriptor, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, descriptor, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, descriptor, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_adapter_pdo_abstractpdo_convertboundparams, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, sql, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, params, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, params, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, params, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_adapter_pdo_abstractpdo_escapestring, 0, 1, IS_STRING, 0) @@ -66,16 +58,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_adapter_pdo_abstractpdo_execute, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, sqlStatement, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindParams, 0) -#endif -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindTypes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_db_adapter_pdo_abstractpdo_executeprepared, 0, 3, PDOStatement, 0) @@ -106,16 +90,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_db_adapter_pdo_abstractpdo_query, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, sqlStatement, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindParams, 0) -#endif -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindTypes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_adapter_pdo_abstractpdo_rollback, 0, 0, _IS_BOOL, 0) @@ -143,11 +119,7 @@ ZEPHIR_INIT_FUNCS(phalcon_db_adapter_pdo_abstractpdo_method_entry) { PHP_ME(Phalcon_Db_Adapter_Pdo_AbstractPdo, execute, arginfo_phalcon_db_adapter_pdo_abstractpdo_execute, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Db_Adapter_Pdo_AbstractPdo, executePrepared, arginfo_phalcon_db_adapter_pdo_abstractpdo_executeprepared, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Db_Adapter_Pdo_AbstractPdo, getErrorInfo, arginfo_phalcon_db_adapter_pdo_abstractpdo_geterrorinfo, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Db_Adapter_Pdo_AbstractPdo, getInternalHandler, arginfo_phalcon_db_adapter_pdo_abstractpdo_getinternalhandler, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Db_Adapter_Pdo_AbstractPdo, getInternalHandler, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Db_Adapter_Pdo_AbstractPdo, getInternalHandler, arginfo_phalcon_db_adapter_pdo_abstractpdo_getinternalhandler, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Db_Adapter_Pdo_AbstractPdo, getTransactionLevel, arginfo_phalcon_db_adapter_pdo_abstractpdo_gettransactionlevel, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Db_Adapter_Pdo_AbstractPdo, isUnderTransaction, arginfo_phalcon_db_adapter_pdo_abstractpdo_isundertransaction, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Db_Adapter_Pdo_AbstractPdo, lastInsertId, arginfo_phalcon_db_adapter_pdo_abstractpdo_lastinsertid, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/db/adapter/pdo/mysql.zep.c b/ext/phalcon/db/adapter/pdo/mysql.zep.c index 65f84eecc6a..785866a797c 100644 --- a/ext/phalcon/db/adapter/pdo/mysql.zep.c +++ b/ext/phalcon/db/adapter/pdo/mysql.zep.c @@ -82,28 +82,20 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Mysql, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_2 = NULL; zval *descriptor_param = NULL, __$false, _0, _1; zval descriptor; - zval *this_ptr = getThis(); ZVAL_UNDEF(&descriptor); ZVAL_BOOL(&__$false, 0); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(descriptor) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &descriptor_param); ZEPHIR_OBS_COPY_OR_DUP(&descriptor, descriptor_param); - - zephir_array_fetch_string(&_0, &descriptor, SL("options"), PH_READONLY, "phalcon/Db/Adapter/Pdo/Mysql.zep", 74); if (!(zephir_array_isset_long(&_0, 20))) { zephir_array_update_multi(&descriptor, &__$false, SL("sl"), 3, SL("options"), 20); @@ -112,7 +104,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Mysql, __construct) if (!(zephir_array_isset_long(&_1, 17))) { zephir_array_update_multi(&descriptor, &__$false, SL("sl"), 3, SL("options"), 17); } - ZEPHIR_CALL_PARENT(NULL, phalcon_db_adapter_pdo_mysql_ce, getThis(), "__construct", &_2, 0, &descriptor); + ZEPHIR_CALL_PARENT(NULL, phalcon_db_adapter_pdo_mysql_ce, getThis(), "__construct", NULL, 0, &descriptor); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -137,17 +129,13 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Mysql, addForeignKey) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) Z_PARAM_OBJECT_OF_CLASS(reference, phalcon_db_referenceinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &tableName_param, &schemaName_param, &reference); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -167,8 +155,6 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Mysql, addForeignKey) } else { ZEPHIR_INIT_VAR(&schemaName); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("dialect"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&_1, &_0, "getforeignkeychecks", NULL, 0); zephir_check_call_status(); @@ -344,17 +330,14 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Mysql, describeColumns) ZVAL_UNDEF(&_121$$93); ZVAL_UNDEF(&_123$$94); ZVAL_UNDEF(&definition); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(table) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schema) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &table_param, &schema_param); zephir_get_strval(&table, table_param); if (!schema_param) { @@ -362,8 +345,6 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Mysql, describeColumns) } else { zephir_get_strval(&schema, schema_param); } - - ZEPHIR_INIT_VAR(&oldColumn); ZVAL_NULL(&oldColumn); ZEPHIR_INIT_VAR(&sizePattern); @@ -666,7 +647,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Mysql, describeColumns) zephir_array_fetch_long(&columnName, &field, 0, PH_NOISY | PH_READONLY, "phalcon/Db/Adapter/Pdo/Mysql.zep", 495); ZEPHIR_INIT_NVAR(&_63$$3); object_init_ex(&_63$$3, phalcon_db_column_ce); - ZEPHIR_CALL_METHOD(NULL, &_63$$3, "__construct", &_64, 212, &columnName, &definition); + ZEPHIR_CALL_METHOD(NULL, &_63$$3, "__construct", &_64, 213, &columnName, &definition); zephir_check_call_status(); zephir_array_append(&columns, &_63$$3, PH_SEPARATE, "phalcon/Db/Adapter/Pdo/Mysql.zep", 496); ZEPHIR_CPY_WRT(&oldColumn, &columnName); @@ -968,7 +949,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Mysql, describeColumns) zephir_array_fetch_long(&columnName, &field, 0, PH_NOISY, "phalcon/Db/Adapter/Pdo/Mysql.zep", 495); ZEPHIR_INIT_NVAR(&_124$$49); object_init_ex(&_124$$49, phalcon_db_column_ce); - ZEPHIR_CALL_METHOD(NULL, &_124$$49, "__construct", &_64, 212, &columnName, &definition); + ZEPHIR_CALL_METHOD(NULL, &_124$$49, "__construct", &_64, 213, &columnName, &definition); zephir_check_call_status(); zephir_array_append(&columns, &_124$$49, PH_SEPARATE, "phalcon/Db/Adapter/Pdo/Mysql.zep", 496); ZEPHIR_CPY_WRT(&oldColumn, &columnName); @@ -1039,17 +1020,14 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Mysql, describeIndexes) ZVAL_UNDEF(&_32$$20); ZVAL_UNDEF(&_33$$20); ZVAL_UNDEF(&_34$$20); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(table) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schema) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &table_param, &schema_param); if (UNEXPECTED(Z_TYPE_P(table_param) != IS_STRING && Z_TYPE_P(table_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'table' must be of the type string")); @@ -1073,8 +1051,6 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Mysql, describeIndexes) ZEPHIR_INIT_VAR(&schema); } } - - ZEPHIR_INIT_VAR(&indexes); array_init(&indexes); zephir_read_property(&_1, this_ptr, ZEND_STRL("dialect"), PH_NOISY_CC | PH_READONLY); @@ -1200,7 +1176,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Mysql, describeIndexes) object_init_ex(&_28$$19, phalcon_db_index_ce); zephir_array_fetch_string(&_29$$19, &index, SL("columns"), PH_NOISY | PH_READONLY, "phalcon/Db/Adapter/Pdo/Mysql.zep", 551); zephir_array_fetch_string(&_30$$19, &index, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Db/Adapter/Pdo/Mysql.zep", 553); - ZEPHIR_CALL_METHOD(NULL, &_28$$19, "__construct", &_31, 33, &name, &_29$$19, &_30$$19); + ZEPHIR_CALL_METHOD(NULL, &_28$$19, "__construct", &_31, 34, &name, &_29$$19, &_30$$19); zephir_check_call_status(); zephir_array_update_zval(&indexObjects, &name, &_28$$19, PH_COPY | PH_SEPARATE); } ZEND_HASH_FOREACH_END(); @@ -1221,7 +1197,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Mysql, describeIndexes) object_init_ex(&_32$$20, phalcon_db_index_ce); zephir_array_fetch_string(&_33$$20, &index, SL("columns"), PH_NOISY | PH_READONLY, "phalcon/Db/Adapter/Pdo/Mysql.zep", 551); zephir_array_fetch_string(&_34$$20, &index, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Db/Adapter/Pdo/Mysql.zep", 553); - ZEPHIR_CALL_METHOD(NULL, &_32$$20, "__construct", &_31, 33, &name, &_33$$20, &_34$$20); + ZEPHIR_CALL_METHOD(NULL, &_32$$20, "__construct", &_31, 34, &name, &_33$$20, &_34$$20); zephir_check_call_status(); zephir_array_update_zval(&indexObjects, &name, &_32$$20, PH_COPY | PH_SEPARATE); ZEPHIR_CALL_METHOD(NULL, &indexes, "next", NULL, 0); @@ -1298,17 +1274,14 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Mysql, describeReferences) ZVAL_UNDEF(&_23$$6); ZVAL_UNDEF(&_29$$9); ZVAL_UNDEF(&_33$$10); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(table) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schema) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &table_param, &schema_param); if (UNEXPECTED(Z_TYPE_P(table_param) != IS_STRING && Z_TYPE_P(table_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'table' must be of the type string")); @@ -1332,8 +1305,6 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Mysql, describeReferences) ZEPHIR_INIT_VAR(&schema); } } - - ZEPHIR_INIT_VAR(&references); array_init(&references); zephir_read_property(&_1, this_ptr, ZEND_STRL("dialect"), PH_NOISY_CC | PH_READONLY); @@ -1496,7 +1467,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Mysql, describeReferences) ZEPHIR_OBS_NVAR(&_30$$9); zephir_array_fetch_string(&_30$$9, &arrayReference, SL("onDelete"), PH_NOISY, "phalcon/Db/Adapter/Pdo/Mysql.zep", 620); zephir_array_update_string(&_29$$9, SL("onDelete"), &_30$$9, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(NULL, &_28$$9, "__construct", &_31, 34, &name, &_29$$9); + ZEPHIR_CALL_METHOD(NULL, &_28$$9, "__construct", &_31, 35, &name, &_29$$9); zephir_check_call_status(); zephir_array_update_zval(&referenceObjects, &name, &_28$$9, PH_COPY | PH_SEPARATE); } ZEND_HASH_FOREACH_END(); @@ -1535,7 +1506,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Mysql, describeReferences) ZEPHIR_OBS_NVAR(&_34$$10); zephir_array_fetch_string(&_34$$10, &arrayReference, SL("onDelete"), PH_NOISY, "phalcon/Db/Adapter/Pdo/Mysql.zep", 620); zephir_array_update_string(&_33$$10, SL("onDelete"), &_34$$10, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(NULL, &_32$$10, "__construct", &_31, 34, &name, &_33$$10); + ZEPHIR_CALL_METHOD(NULL, &_32$$10, "__construct", &_31, 35, &name, &_33$$10); zephir_check_call_status(); zephir_array_update_zval(&referenceObjects, &name, &_32$$10, PH_COPY | PH_SEPARATE); ZEPHIR_CALL_METHOD(NULL, &references, "next", NULL, 0); @@ -1552,9 +1523,6 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Mysql, describeReferences) */ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Mysql, getDsnDefaults) { - zval *this_ptr = getThis(); - - zephir_create_array(return_value, 1, 0); add_assoc_stringl_ex(return_value, SL("charset"), SL("utf8mb4")); diff --git a/ext/phalcon/db/adapter/pdo/postgresql.zep.c b/ext/phalcon/db/adapter/pdo/postgresql.zep.c index 4a9519c1014..c2130b76a2a 100644 --- a/ext/phalcon/db/adapter/pdo/postgresql.zep.c +++ b/ext/phalcon/db/adapter/pdo/postgresql.zep.c @@ -69,34 +69,26 @@ ZEPHIR_INIT_CLASS(Phalcon_Db_Adapter_Pdo_Postgresql) PHP_METHOD(Phalcon_Db_Adapter_Pdo_Postgresql, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zephir_fcall_cache_entry *_1 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *descriptor_param = NULL, _0$$3; zval descriptor; - zval *this_ptr = getThis(); ZVAL_UNDEF(&descriptor); ZVAL_UNDEF(&_0$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(descriptor) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &descriptor_param); ZEPHIR_OBS_COPY_OR_DUP(&descriptor, descriptor_param); - - if (zephir_array_isset_string(&descriptor, SL("charset"))) { ZEPHIR_INIT_VAR(&_0$$3); ZVAL_STRING(&_0$$3, "Postgres does not allow the charset to be changed in the DSN."); ZEPHIR_CALL_FUNCTION(NULL, "trigger_error", NULL, 7, &_0$$3); zephir_check_call_status(); } - ZEPHIR_CALL_PARENT(NULL, phalcon_db_adapter_pdo_postgresql_ce, getThis(), "__construct", &_1, 0, &descriptor); + ZEPHIR_CALL_PARENT(NULL, phalcon_db_adapter_pdo_postgresql_ce, getThis(), "__construct", NULL, 0, &descriptor); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -110,7 +102,6 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Postgresql, connect) zend_bool _2$$6; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_4 = NULL; zval *descriptor_param = NULL, __$null, schema, sql, _0$$3, _1$$6, _3$$6; zval descriptor; zval *this_ptr = getThis(); @@ -122,16 +113,12 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Postgresql, connect) ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_1$$6); ZVAL_UNDEF(&_3$$6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(descriptor) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &descriptor_param); if (!descriptor_param) { ZEPHIR_INIT_VAR(&descriptor); @@ -139,13 +126,11 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Postgresql, connect) } else { ZEPHIR_OBS_COPY_OR_DUP(&descriptor, descriptor_param); } - - if (ZEPHIR_IS_EMPTY(&descriptor)) { zephir_read_property(&_0$$3, this_ptr, ZEND_STRL("descriptor"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&descriptor, &_0$$3); } - ZEPHIR_OBS_VAR(&schema); + zephir_memory_observe(&schema); if (zephir_array_isset_string_fetch(&schema, &descriptor, SL("schema"), 0)) { zephir_array_unset_string(&descriptor, SL("schema"), PH_SEPARATE); } else { @@ -153,7 +138,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Postgresql, connect) ZVAL_NULL(&schema); } if (zephir_array_isset_string(&descriptor, SL("password"))) { - ZEPHIR_OBS_VAR(&_1$$6); + zephir_memory_observe(&_1$$6); zephir_array_fetch_string(&_1$$6, &descriptor, SL("password"), PH_NOISY, "phalcon/Db/Adapter/Pdo/Postgresql.zep", 85); _2$$6 = Z_TYPE_P(&_1$$6) == IS_STRING; if (_2$$6) { @@ -164,7 +149,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Postgresql, connect) zephir_array_update_string(&descriptor, SL("password"), &__$null, PH_COPY | PH_SEPARATE); } } - ZEPHIR_CALL_PARENT(NULL, phalcon_db_adapter_pdo_postgresql_ce, getThis(), "connect", &_4, 0, &descriptor); + ZEPHIR_CALL_PARENT(NULL, phalcon_db_adapter_pdo_postgresql_ce, getThis(), "connect", NULL, 0, &descriptor); zephir_check_call_status(); if (!(ZEPHIR_IS_EMPTY(&schema))) { ZEPHIR_INIT_VAR(&sql); @@ -203,17 +188,13 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Postgresql, createTable) ZVAL_UNDEF(&_7$$12); ZVAL_UNDEF(&_8$$12); ZVAL_UNDEF(&definition); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) Z_PARAM_ARRAY(definition) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &tableName_param, &schemaName_param, &definition_param); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -234,9 +215,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Postgresql, createTable) ZEPHIR_INIT_VAR(&schemaName); } ZEPHIR_OBS_COPY_OR_DUP(&definition, definition_param); - - - ZEPHIR_OBS_VAR(&columns); + zephir_memory_observe(&columns); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&columns, &definition, SL("columns"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_db_exception_ce, "The table must contain at least one column", "phalcon/Db/Adapter/Pdo/Postgresql.zep", 107); return; @@ -471,17 +450,14 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Postgresql, describeColumns) ZVAL_UNDEF(&_114$$76); ZVAL_UNDEF(&_115$$76); ZVAL_UNDEF(&_117$$78); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(table) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schema) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &table_param, &schema_param); zephir_get_strval(&table, table_param); if (!schema_param) { @@ -489,8 +465,6 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Postgresql, describeColumns) } else { zephir_get_strval(&schema, schema_param); } - - ZEPHIR_INIT_VAR(&oldColumn); ZVAL_NULL(&oldColumn); ZEPHIR_INIT_VAR(&columns); @@ -768,13 +742,13 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Postgresql, describeColumns) ZVAL_STRING(&_52$$38, "/^'|'?::[[:alnum:][:space:]]+$/"); ZEPHIR_INIT_NVAR(&_53$$38); ZVAL_STRING(&_53$$38, ""); - ZEPHIR_CALL_FUNCTION(&_54$$38, "preg_replace", &_55, 40, &_52$$38, &_53$$38, &_51$$38); + ZEPHIR_CALL_FUNCTION(&_54$$38, "preg_replace", &_55, 41, &_52$$38, &_53$$38, &_51$$38); zephir_check_call_status(); zephir_array_update_string(&definition, SL("default"), &_54$$38, PH_COPY | PH_SEPARATE); zephir_array_fetch_string(&_56$$38, &definition, SL("default"), PH_NOISY | PH_READONLY, "phalcon/Db/Adapter/Pdo/Postgresql.zep", 509); ZEPHIR_INIT_NVAR(&_52$$38); ZVAL_STRING(&_52$$38, "null"); - ZEPHIR_CALL_FUNCTION(&_57$$38, "strcasecmp", &_58, 38, &_56$$38, &_52$$38); + ZEPHIR_CALL_FUNCTION(&_57$$38, "strcasecmp", &_58, 39, &_56$$38, &_52$$38); zephir_check_call_status(); if (ZEPHIR_IS_LONG(&_57$$38, 0)) { zephir_array_update_string(&definition, SL("default"), &__$null, PH_COPY | PH_SEPARATE); @@ -788,7 +762,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Postgresql, describeColumns) zephir_array_fetch_long(&columnName, &field, 0, PH_NOISY | PH_READONLY, "phalcon/Db/Adapter/Pdo/Postgresql.zep", 524); ZEPHIR_INIT_NVAR(&_61$$3); object_init_ex(&_61$$3, phalcon_db_column_ce); - ZEPHIR_CALL_METHOD(NULL, &_61$$3, "__construct", &_62, 212, &columnName, &definition); + ZEPHIR_CALL_METHOD(NULL, &_61$$3, "__construct", &_62, 213, &columnName, &definition); zephir_check_call_status(); zephir_array_append(&columns, &_61$$3, PH_SEPARATE, "phalcon/Db/Adapter/Pdo/Postgresql.zep", 525); ZEPHIR_CPY_WRT(&oldColumn, &columnName); @@ -1066,13 +1040,13 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Postgresql, describeColumns) ZVAL_STRING(&_111$$76, "/^'|'?::[[:alnum:][:space:]]+$/"); ZEPHIR_INIT_NVAR(&_112$$76); ZVAL_STRING(&_112$$76, ""); - ZEPHIR_CALL_FUNCTION(&_113$$76, "preg_replace", &_55, 40, &_111$$76, &_112$$76, &_110$$76); + ZEPHIR_CALL_FUNCTION(&_113$$76, "preg_replace", &_55, 41, &_111$$76, &_112$$76, &_110$$76); zephir_check_call_status(); zephir_array_update_string(&definition, SL("default"), &_113$$76, PH_COPY | PH_SEPARATE); zephir_array_fetch_string(&_114$$76, &definition, SL("default"), PH_NOISY | PH_READONLY, "phalcon/Db/Adapter/Pdo/Postgresql.zep", 509); ZEPHIR_INIT_NVAR(&_111$$76); ZVAL_STRING(&_111$$76, "null"); - ZEPHIR_CALL_FUNCTION(&_115$$76, "strcasecmp", &_58, 38, &_114$$76, &_111$$76); + ZEPHIR_CALL_FUNCTION(&_115$$76, "strcasecmp", &_58, 39, &_114$$76, &_111$$76); zephir_check_call_status(); if (ZEPHIR_IS_LONG(&_115$$76, 0)) { zephir_array_update_string(&definition, SL("default"), &__$null, PH_COPY | PH_SEPARATE); @@ -1087,7 +1061,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Postgresql, describeColumns) zephir_array_fetch_long(&columnName, &field, 0, PH_NOISY, "phalcon/Db/Adapter/Pdo/Postgresql.zep", 524); ZEPHIR_INIT_NVAR(&_118$$41); object_init_ex(&_118$$41, phalcon_db_column_ce); - ZEPHIR_CALL_METHOD(NULL, &_118$$41, "__construct", &_62, 212, &columnName, &definition); + ZEPHIR_CALL_METHOD(NULL, &_118$$41, "__construct", &_62, 213, &columnName, &definition); zephir_check_call_status(); zephir_array_append(&columns, &_118$$41, PH_SEPARATE, "phalcon/Db/Adapter/Pdo/Postgresql.zep", 525); ZEPHIR_CPY_WRT(&oldColumn, &columnName); @@ -1164,17 +1138,14 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Postgresql, describeReferences) ZVAL_UNDEF(&_23$$6); ZVAL_UNDEF(&_29$$9); ZVAL_UNDEF(&_33$$10); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(table) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schema) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &table_param, &schema_param); if (UNEXPECTED(Z_TYPE_P(table_param) != IS_STRING && Z_TYPE_P(table_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'table' must be of the type string")); @@ -1198,8 +1169,6 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Postgresql, describeReferences) ZEPHIR_INIT_VAR(&schema); } } - - ZEPHIR_INIT_VAR(&references); array_init(&references); zephir_read_property(&_1, this_ptr, ZEND_STRL("dialect"), PH_NOISY_CC | PH_READONLY); @@ -1362,7 +1331,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Postgresql, describeReferences) ZEPHIR_OBS_NVAR(&_30$$9); zephir_array_fetch_string(&_30$$9, &arrayReference, SL("onDelete"), PH_NOISY, "phalcon/Db/Adapter/Pdo/Postgresql.zep", 593); zephir_array_update_string(&_29$$9, SL("onDelete"), &_30$$9, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(NULL, &_28$$9, "__construct", &_31, 34, &name, &_29$$9); + ZEPHIR_CALL_METHOD(NULL, &_28$$9, "__construct", &_31, 35, &name, &_29$$9); zephir_check_call_status(); zephir_array_update_zval(&referenceObjects, &name, &_28$$9, PH_COPY | PH_SEPARATE); } ZEND_HASH_FOREACH_END(); @@ -1401,7 +1370,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Postgresql, describeReferences) ZEPHIR_OBS_NVAR(&_34$$10); zephir_array_fetch_string(&_34$$10, &arrayReference, SL("onDelete"), PH_NOISY, "phalcon/Db/Adapter/Pdo/Postgresql.zep", 593); zephir_array_update_string(&_33$$10, SL("onDelete"), &_34$$10, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(NULL, &_32$$10, "__construct", &_31, 34, &name, &_33$$10); + ZEPHIR_CALL_METHOD(NULL, &_32$$10, "__construct", &_31, 35, &name, &_33$$10); zephir_check_call_status(); zephir_array_update_zval(&referenceObjects, &name, &_32$$10, PH_COPY | PH_SEPARATE); ZEPHIR_CALL_METHOD(NULL, &references, "next", NULL, 0); @@ -1438,17 +1407,15 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Postgresql, getDefaultIdValue) zval _0; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); object_init_ex(return_value, phalcon_db_rawvalue_ce); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "DEFAULT"); - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 35, &_0); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 36, &_0); zephir_check_call_status(); RETURN_MM(); } @@ -1482,7 +1449,6 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Postgresql, modifyColumn) ZVAL_UNDEF(&_7$$10); ZVAL_UNDEF(&_8$$10); ZVAL_UNDEF(&_9$$10); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 4) Z_PARAM_STR(tableName) @@ -1491,10 +1457,8 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Postgresql, modifyColumn) Z_PARAM_OPTIONAL Z_PARAM_OBJECT_OF_CLASS_OR_NULL(currentColumn, phalcon_db_columninterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 1, &tableName_param, &schemaName_param, &column, ¤tColumn); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -1518,8 +1482,6 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Postgresql, modifyColumn) currentColumn = ¤tColumn_sub; currentColumn = &__$null; } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("dialect"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&sql, &_0, "modifycolumn", NULL, 0, &tableName, &schemaName, column, currentColumn); zephir_check_call_status(); @@ -1597,6 +1559,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Postgresql, modifyColumn) ZEPHIR_CALL_METHOD(&_7$$10, this_ptr, "execute", NULL, 0, &_9$$10); zephir_check_call_status(); } else { + ZEPHIR_INIT_NVAR(&_7$$10); ZVAL_BOOL(&_7$$10, 1); } RETURN_CCTOR(&_7$$10); @@ -1610,9 +1573,6 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Postgresql, modifyColumn) */ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Postgresql, supportSequences) { - zval *this_ptr = getThis(); - - RETURN_BOOL(1); } @@ -1623,9 +1583,6 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Postgresql, supportSequences) */ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Postgresql, useExplicitIdValue) { - zval *this_ptr = getThis(); - - RETURN_BOOL(1); } @@ -1635,9 +1592,6 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Postgresql, useExplicitIdValue) */ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Postgresql, getDsnDefaults) { - zval *this_ptr = getThis(); - - array_init(return_value); return; diff --git a/ext/phalcon/db/adapter/pdo/postgresql.zep.h b/ext/phalcon/db/adapter/pdo/postgresql.zep.h index 577b2bee24c..184def58410 100644 --- a/ext/phalcon/db/adapter/pdo/postgresql.zep.h +++ b/ext/phalcon/db/adapter/pdo/postgresql.zep.h @@ -20,11 +20,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_adapter_pdo_postgresql_connect, 0, 0, IS_VOID, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, descriptor, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, descriptor, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, descriptor, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_adapter_pdo_postgresql_createtable, 0, 3, _IS_BOOL, 0) diff --git a/ext/phalcon/db/adapter/pdo/sqlite.zep.c b/ext/phalcon/db/adapter/pdo/sqlite.zep.c index cd7f752af75..b0dc58a574f 100644 --- a/ext/phalcon/db/adapter/pdo/sqlite.zep.c +++ b/ext/phalcon/db/adapter/pdo/sqlite.zep.c @@ -65,34 +65,26 @@ ZEPHIR_INIT_CLASS(Phalcon_Db_Adapter_Pdo_Sqlite) PHP_METHOD(Phalcon_Db_Adapter_Pdo_Sqlite, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zephir_fcall_cache_entry *_1 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *descriptor_param = NULL, _0$$3; zval descriptor; - zval *this_ptr = getThis(); ZVAL_UNDEF(&descriptor); ZVAL_UNDEF(&_0$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(descriptor) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &descriptor_param); ZEPHIR_OBS_COPY_OR_DUP(&descriptor, descriptor_param); - - if (zephir_array_isset_string(&descriptor, SL("charset"))) { ZEPHIR_INIT_VAR(&_0$$3); ZVAL_STRING(&_0$$3, "SQLite does not allow the charset to be changed in the DSN."); ZEPHIR_CALL_FUNCTION(NULL, "trigger_error", NULL, 7, &_0$$3); zephir_check_call_status(); } - ZEPHIR_CALL_PARENT(NULL, phalcon_db_adapter_pdo_sqlite_ce, getThis(), "__construct", &_1, 0, &descriptor); + ZEPHIR_CALL_PARENT(NULL, phalcon_db_adapter_pdo_sqlite_ce, getThis(), "__construct", NULL, 0, &descriptor); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -105,7 +97,6 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Sqlite, connect) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_1 = NULL; zval *descriptor_param = NULL, dbname, _0$$3; zval descriptor; zval *this_ptr = getThis(); @@ -113,16 +104,12 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Sqlite, connect) ZVAL_UNDEF(&descriptor); ZVAL_UNDEF(&dbname); ZVAL_UNDEF(&_0$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(descriptor) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &descriptor_param); if (!descriptor_param) { ZEPHIR_INIT_VAR(&descriptor); @@ -130,13 +117,11 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Sqlite, connect) } else { ZEPHIR_OBS_COPY_OR_DUP(&descriptor, descriptor_param); } - - if (ZEPHIR_IS_EMPTY(&descriptor)) { zephir_read_property(&_0$$3, this_ptr, ZEND_STRL("descriptor"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&descriptor, &_0$$3); } - ZEPHIR_OBS_VAR(&dbname); + zephir_memory_observe(&dbname); if (zephir_array_isset_string_fetch(&dbname, &descriptor, SL("dbname"), 0)) { zephir_array_update_string(&descriptor, SL("dsn"), &dbname, PH_COPY | PH_SEPARATE); zephir_array_unset_string(&descriptor, SL("dbname"), PH_SEPARATE); @@ -144,7 +129,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Sqlite, connect) ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_db_exception_ce, "The database must be specified with either 'dbname' or 'dsn'.", "phalcon/Db/Adapter/Pdo/Sqlite.zep", 82); return; } - ZEPHIR_CALL_PARENT(NULL, phalcon_db_adapter_pdo_sqlite_ce, getThis(), "connect", &_1, 0, &descriptor); + ZEPHIR_CALL_PARENT(NULL, phalcon_db_adapter_pdo_sqlite_ce, getThis(), "connect", NULL, 0, &descriptor); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -252,17 +237,14 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Sqlite, describeColumns) ZVAL_UNDEF(&_74$$52); ZVAL_UNDEF(&_75$$52); ZVAL_UNDEF(&_76$$52); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(table) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schema) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &table_param, &schema_param); if (UNEXPECTED(Z_TYPE_P(table_param) != IS_STRING && Z_TYPE_P(table_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'table' must be of the type string")); @@ -286,8 +268,6 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Sqlite, describeColumns) ZEPHIR_INIT_VAR(&schema); } } - - ZEPHIR_INIT_VAR(&oldColumn); ZVAL_NULL(&oldColumn); ZEPHIR_INIT_VAR(&sizePattern); @@ -436,7 +416,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Sqlite, describeColumns) zephir_array_fetch_long(&_32$$3, &field, 4, PH_NOISY | PH_READONLY, "phalcon/Db/Adapter/Pdo/Sqlite.zep", 295); ZEPHIR_INIT_NVAR(&_33$$3); ZVAL_STRING(&_33$$3, "null"); - ZEPHIR_CALL_FUNCTION(&_34$$3, "strcasecmp", &_35, 38, &_32$$3, &_33$$3); + ZEPHIR_CALL_FUNCTION(&_34$$3, "strcasecmp", &_35, 39, &_32$$3, &_33$$3); zephir_check_call_status(); _31$$3 = !ZEPHIR_IS_LONG_IDENTICAL(&_34$$3, 0); } @@ -446,14 +426,14 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Sqlite, describeColumns) ZVAL_STRING(&_37$$27, "/^'|'$/"); ZEPHIR_INIT_NVAR(&_38$$27); ZVAL_STRING(&_38$$27, ""); - ZEPHIR_CALL_FUNCTION(&_39$$27, "preg_replace", &_40, 40, &_37$$27, &_38$$27, &_36$$27); + ZEPHIR_CALL_FUNCTION(&_39$$27, "preg_replace", &_40, 41, &_37$$27, &_38$$27, &_36$$27); zephir_check_call_status(); zephir_array_update_string(&definition, SL("default"), &_39$$27, PH_COPY | PH_SEPARATE); } zephir_array_fetch_long(&columnName, &field, 1, PH_NOISY | PH_READONLY, "phalcon/Db/Adapter/Pdo/Sqlite.zep", 306); ZEPHIR_INIT_NVAR(&_33$$3); object_init_ex(&_33$$3, phalcon_db_column_ce); - ZEPHIR_CALL_METHOD(NULL, &_33$$3, "__construct", &_41, 212, &columnName, &definition); + ZEPHIR_CALL_METHOD(NULL, &_33$$3, "__construct", &_41, 213, &columnName, &definition); zephir_check_call_status(); zephir_array_append(&columns, &_33$$3, PH_SEPARATE, "phalcon/Db/Adapter/Pdo/Sqlite.zep", 307); ZEPHIR_CPY_WRT(&oldColumn, &columnName); @@ -600,7 +580,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Sqlite, describeColumns) zephir_array_fetch_long(&_70$$28, &field, 4, PH_NOISY | PH_READONLY, "phalcon/Db/Adapter/Pdo/Sqlite.zep", 295); ZEPHIR_INIT_NVAR(&_71$$28); ZVAL_STRING(&_71$$28, "null"); - ZEPHIR_CALL_FUNCTION(&_72$$28, "strcasecmp", &_35, 38, &_70$$28, &_71$$28); + ZEPHIR_CALL_FUNCTION(&_72$$28, "strcasecmp", &_35, 39, &_70$$28, &_71$$28); zephir_check_call_status(); _69$$28 = !ZEPHIR_IS_LONG_IDENTICAL(&_72$$28, 0); } @@ -610,7 +590,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Sqlite, describeColumns) ZVAL_STRING(&_74$$52, "/^'|'$/"); ZEPHIR_INIT_NVAR(&_75$$52); ZVAL_STRING(&_75$$52, ""); - ZEPHIR_CALL_FUNCTION(&_76$$52, "preg_replace", &_40, 40, &_74$$52, &_75$$52, &_73$$52); + ZEPHIR_CALL_FUNCTION(&_76$$52, "preg_replace", &_40, 41, &_74$$52, &_75$$52, &_73$$52); zephir_check_call_status(); zephir_array_update_string(&definition, SL("default"), &_76$$52, PH_COPY | PH_SEPARATE); } @@ -618,7 +598,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Sqlite, describeColumns) zephir_array_fetch_long(&columnName, &field, 1, PH_NOISY, "phalcon/Db/Adapter/Pdo/Sqlite.zep", 306); ZEPHIR_INIT_NVAR(&_71$$28); object_init_ex(&_71$$28, phalcon_db_column_ce); - ZEPHIR_CALL_METHOD(NULL, &_71$$28, "__construct", &_41, 212, &columnName, &definition); + ZEPHIR_CALL_METHOD(NULL, &_71$$28, "__construct", &_41, 213, &columnName, &definition); zephir_check_call_status(); zephir_array_append(&columns, &_71$$28, PH_SEPARATE, "phalcon/Db/Adapter/Pdo/Sqlite.zep", 307); ZEPHIR_CPY_WRT(&oldColumn, &columnName); @@ -709,17 +689,14 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Sqlite, describeIndexes) ZVAL_UNDEF(&_53$$24); ZVAL_UNDEF(&_54$$24); ZVAL_UNDEF(&_55$$24); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(table) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schema) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &table_param, &schema_param); if (UNEXPECTED(Z_TYPE_P(table_param) != IS_STRING && Z_TYPE_P(table_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'table' must be of the type string")); @@ -743,8 +720,6 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Sqlite, describeIndexes) ZEPHIR_INIT_VAR(&schema); } } - - ZEPHIR_INIT_VAR(&indexes); array_init(&indexes); zephir_read_property(&_1, this_ptr, ZEND_STRL("dialect"), PH_NOISY_CC | PH_READONLY); @@ -950,7 +925,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Sqlite, describeIndexes) object_init_ex(&_49$$23, phalcon_db_index_ce); zephir_array_fetch_string(&_50$$23, &index, SL("columns"), PH_NOISY | PH_READONLY, "phalcon/Db/Adapter/Pdo/Sqlite.zep", 374); zephir_array_fetch_string(&_51$$23, &index, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Db/Adapter/Pdo/Sqlite.zep", 376); - ZEPHIR_CALL_METHOD(NULL, &_49$$23, "__construct", &_52, 33, &name, &_50$$23, &_51$$23); + ZEPHIR_CALL_METHOD(NULL, &_49$$23, "__construct", &_52, 34, &name, &_50$$23, &_51$$23); zephir_check_call_status(); zephir_array_update_zval(&indexObjects, &name, &_49$$23, PH_COPY | PH_SEPARATE); } ZEND_HASH_FOREACH_END(); @@ -971,7 +946,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Sqlite, describeIndexes) object_init_ex(&_53$$24, phalcon_db_index_ce); zephir_array_fetch_string(&_54$$24, &index, SL("columns"), PH_NOISY | PH_READONLY, "phalcon/Db/Adapter/Pdo/Sqlite.zep", 374); zephir_array_fetch_string(&_55$$24, &index, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Db/Adapter/Pdo/Sqlite.zep", 376); - ZEPHIR_CALL_METHOD(NULL, &_53$$24, "__construct", &_52, 33, &name, &_54$$24, &_55$$24); + ZEPHIR_CALL_METHOD(NULL, &_53$$24, "__construct", &_52, 34, &name, &_54$$24, &_55$$24); zephir_check_call_status(); zephir_array_update_zval(&indexObjects, &name, &_53$$24, PH_COPY | PH_SEPARATE); ZEPHIR_CALL_METHOD(NULL, &indexes, "next", NULL, 0); @@ -1037,17 +1012,14 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Sqlite, describeReferences) ZVAL_UNDEF(&_21$$6); ZVAL_UNDEF(&_27$$9); ZVAL_UNDEF(&_31$$10); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(table) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schema) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &table_param, &schema_param); if (UNEXPECTED(Z_TYPE_P(table_param) != IS_STRING && Z_TYPE_P(table_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'table' must be of the type string")); @@ -1071,8 +1043,6 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Sqlite, describeReferences) ZEPHIR_INIT_VAR(&schema); } } - - ZEPHIR_INIT_VAR(&references); array_init(&references); zephir_read_property(&_1, this_ptr, ZEND_STRL("dialect"), PH_NOISY_CC | PH_READONLY); @@ -1215,7 +1185,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Sqlite, describeReferences) ZEPHIR_OBS_NVAR(&_28$$9); zephir_array_fetch_string(&_28$$9, &arrayReference, SL("referencedColumns"), PH_NOISY, "phalcon/Db/Adapter/Pdo/Sqlite.zep", 429); zephir_array_update_string(&_27$$9, SL("referencedColumns"), &_28$$9, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(NULL, &_26$$9, "__construct", &_29, 34, &name, &_27$$9); + ZEPHIR_CALL_METHOD(NULL, &_26$$9, "__construct", &_29, 35, &name, &_27$$9); zephir_check_call_status(); zephir_array_update_zval(&referenceObjects, &name, &_26$$9, PH_COPY | PH_SEPARATE); } ZEND_HASH_FOREACH_END(); @@ -1248,7 +1218,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Sqlite, describeReferences) ZEPHIR_OBS_NVAR(&_32$$10); zephir_array_fetch_string(&_32$$10, &arrayReference, SL("referencedColumns"), PH_NOISY, "phalcon/Db/Adapter/Pdo/Sqlite.zep", 429); zephir_array_update_string(&_31$$10, SL("referencedColumns"), &_32$$10, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(NULL, &_30$$10, "__construct", &_29, 34, &name, &_31$$10); + ZEPHIR_CALL_METHOD(NULL, &_30$$10, "__construct", &_29, 35, &name, &_31$$10); zephir_check_call_status(); zephir_array_update_zval(&referenceObjects, &name, &_30$$10, PH_COPY | PH_SEPARATE); ZEPHIR_CALL_METHOD(NULL, &references, "next", NULL, 0); @@ -1284,17 +1254,15 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Sqlite, getDefaultValue) zval _0; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); object_init_ex(return_value, phalcon_db_rawvalue_ce); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "NULL"); - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 35, &_0); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 36, &_0); zephir_check_call_status(); RETURN_MM(); } @@ -1305,9 +1273,6 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Sqlite, getDefaultValue) */ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Sqlite, useExplicitIdValue) { - zval *this_ptr = getThis(); - - RETURN_BOOL(1); } @@ -1319,9 +1284,6 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Sqlite, useExplicitIdValue) */ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Sqlite, supportsDefaultValue) { - zval *this_ptr = getThis(); - - RETURN_BOOL(0); } @@ -1331,9 +1293,6 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Sqlite, supportsDefaultValue) */ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Sqlite, getDsnDefaults) { - zval *this_ptr = getThis(); - - array_init(return_value); return; diff --git a/ext/phalcon/db/adapter/pdo/sqlite.zep.h b/ext/phalcon/db/adapter/pdo/sqlite.zep.h index 8994be04d14..73a0e1e7a3b 100644 --- a/ext/phalcon/db/adapter/pdo/sqlite.zep.h +++ b/ext/phalcon/db/adapter/pdo/sqlite.zep.h @@ -19,11 +19,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_adapter_pdo_sqlite_connect, 0, 0, IS_VOID, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, descriptor, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, descriptor, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, descriptor, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_adapter_pdo_sqlite_describecolumns, 0, 1, IS_ARRAY, 0) diff --git a/ext/phalcon/db/adapter/pdofactory.zep.c b/ext/phalcon/db/adapter/pdofactory.zep.c index 00468bf1a33..d682e8e4448 100644 --- a/ext/phalcon/db/adapter/pdofactory.zep.c +++ b/ext/phalcon/db/adapter/pdofactory.zep.c @@ -48,16 +48,12 @@ PHP_METHOD(Phalcon_Db_Adapter_PdoFactory, __construct) zval *this_ptr = getThis(); ZVAL_UNDEF(&services); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(services) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &services_param); if (!services_param) { ZEPHIR_INIT_VAR(&services); @@ -65,8 +61,6 @@ PHP_METHOD(Phalcon_Db_Adapter_PdoFactory, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&services, services_param); } - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "init", NULL, 0, &services); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); @@ -104,19 +98,13 @@ PHP_METHOD(Phalcon_Db_Adapter_PdoFactory, load) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(config) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &config); ZEPHIR_SEPARATE_PARAM(config); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "checkconfig", NULL, 0, config); zephir_check_call_status(); ZEPHIR_CPY_WRT(config, &_0); @@ -125,7 +113,7 @@ PHP_METHOD(Phalcon_Db_Adapter_PdoFactory, load) ZEPHIR_CALL_METHOD(&_0, this_ptr, "checkconfigelement", NULL, 0, config, &_1); zephir_check_call_status(); ZEPHIR_CPY_WRT(config, &_0); - ZEPHIR_OBS_VAR(&name); + zephir_memory_observe(&name); zephir_array_fetch_string(&name, config, SL("adapter"), PH_NOISY, "phalcon/Db/Adapter/PdoFactory.zep", 50); zephir_array_unset_string(config, SL("adapter"), PH_SEPARATE); ZEPHIR_INIT_NVAR(&_1); @@ -139,7 +127,7 @@ PHP_METHOD(Phalcon_Db_Adapter_PdoFactory, load) array_init(&_2); ZEPHIR_INIT_VAR(&_3); ZVAL_STRING(&_3, "options"); - ZEPHIR_CALL_METHOD(&options, &_1, "__invoke", NULL, 158, config, &_3, &_2); + ZEPHIR_CALL_METHOD(&options, &_1, "__invoke", NULL, 159, config, &_3, &_2); zephir_check_call_status(); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "newinstance", NULL, 0, &name, &options); zephir_check_call_status(); @@ -162,17 +150,13 @@ PHP_METHOD(Phalcon_Db_Adapter_PdoFactory, newInstance) ZVAL_UNDEF(&definition); ZVAL_UNDEF(&options); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(name) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &name_param, &options_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")); @@ -189,8 +173,6 @@ PHP_METHOD(Phalcon_Db_Adapter_PdoFactory, newInstance) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - ZEPHIR_CALL_METHOD(&definition, this_ptr, "getservice", NULL, 0, &name); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_0); @@ -206,9 +188,6 @@ PHP_METHOD(Phalcon_Db_Adapter_PdoFactory, newInstance) */ PHP_METHOD(Phalcon_Db_Adapter_PdoFactory, getExceptionClass) { - zval *this_ptr = getThis(); - - RETURN_STRING("Phalcon\\Db\\Exception"); } @@ -220,9 +199,6 @@ PHP_METHOD(Phalcon_Db_Adapter_PdoFactory, getExceptionClass) */ PHP_METHOD(Phalcon_Db_Adapter_PdoFactory, getServices) { - zval *this_ptr = getThis(); - - zephir_create_array(return_value, 3, 0); add_assoc_stringl_ex(return_value, SL("mysql"), SL("Phalcon\\Db\\Adapter\\Pdo\\Mysql")); diff --git a/ext/phalcon/db/adapter/pdofactory.zep.h b/ext/phalcon/db/adapter/pdofactory.zep.h index 318b5a66b1b..327a8deda4b 100644 --- a/ext/phalcon/db/adapter/pdofactory.zep.h +++ b/ext/phalcon/db/adapter/pdofactory.zep.h @@ -10,11 +10,7 @@ PHP_METHOD(Phalcon_Db_Adapter_PdoFactory, getExceptionClass); PHP_METHOD(Phalcon_Db_Adapter_PdoFactory, getServices); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_db_adapter_pdofactory___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, services, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, services, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, services, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_db_adapter_pdofactory_load, 0, 1, Phalcon\\Db\\Adapter\\AdapterInterface, 0) @@ -23,11 +19,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_db_adapter_pdofactory_newinstance, 0, 1, Phalcon\\Db\\Adapter\\AdapterInterface, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_adapter_pdofactory_getexceptionclass, 0, 0, IS_STRING, 0) diff --git a/ext/phalcon/db/column.zep.c b/ext/phalcon/db/column.zep.c index 0ad3304e11e..ff62c415c1e 100644 --- a/ext/phalcon/db/column.zep.c +++ b/ext/phalcon/db/column.zep.c @@ -369,16 +369,12 @@ PHP_METHOD(Phalcon_Db_Column, __construct) ZVAL_UNDEF(&typeValues); ZVAL_UNDEF(&comment); ZVAL_UNDEF(&definition); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(name) Z_PARAM_ARRAY(definition) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &name_param, &definition_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")); @@ -390,36 +386,34 @@ PHP_METHOD(Phalcon_Db_Column, __construct) ZEPHIR_INIT_VAR(&name); } ZEPHIR_OBS_COPY_OR_DUP(&definition, definition_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("name"), &name); - ZEPHIR_OBS_VAR(&type); + zephir_memory_observe(&type); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&type, &definition, SL("type"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_db_exception_ce, "Column type is required", "phalcon/Db/Column.zep", 348); return; } zephir_update_property_zval(this_ptr, ZEND_STRL("type"), &type); - ZEPHIR_OBS_VAR(&typeReference); + zephir_memory_observe(&typeReference); if (zephir_array_isset_string_fetch(&typeReference, &definition, SL("typeReference"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("typeReference"), &typeReference); } - ZEPHIR_OBS_VAR(&typeValues); + zephir_memory_observe(&typeValues); if (zephir_array_isset_string_fetch(&typeValues, &definition, SL("typeValues"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("typeValues"), &typeValues); } - ZEPHIR_OBS_VAR(¬Null); + zephir_memory_observe(¬Null); if (zephir_array_isset_string_fetch(¬Null, &definition, SL("notNull"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("notNull"), ¬Null); } - ZEPHIR_OBS_VAR(&primary); + zephir_memory_observe(&primary); if (zephir_array_isset_string_fetch(&primary, &definition, SL("primary"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("primary"), &primary); } - ZEPHIR_OBS_VAR(&size); + zephir_memory_observe(&size); if (zephir_array_isset_string_fetch(&size, &definition, SL("size"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("size"), &size); } - ZEPHIR_OBS_VAR(&scale); + zephir_memory_observe(&scale); if (zephir_array_isset_string_fetch(&scale, &definition, SL("scale"), 0)) { do { if (ZEPHIR_IS_LONG(&type, 14) || ZEPHIR_IS_LONG(&type, 3) || ZEPHIR_IS_LONG(&type, 9) || ZEPHIR_IS_LONG(&type, 7) || ZEPHIR_IS_LONG(&type, 0) || ZEPHIR_IS_LONG(&type, 21) || ZEPHIR_IS_LONG(&type, 22) || ZEPHIR_IS_LONG(&type, 26)) { @@ -431,19 +425,19 @@ PHP_METHOD(Phalcon_Db_Column, __construct) } while(0); } - ZEPHIR_OBS_VAR(&defaultValue); + zephir_memory_observe(&defaultValue); if (zephir_array_isset_string_fetch(&defaultValue, &definition, SL("default"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("defaultValue"), &defaultValue); } - ZEPHIR_OBS_VAR(&dunsigned); + zephir_memory_observe(&dunsigned); if (zephir_array_isset_string_fetch(&dunsigned, &definition, SL("unsigned"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("unsigned"), &dunsigned); } - ZEPHIR_OBS_VAR(&isNumeric); + zephir_memory_observe(&isNumeric); if (zephir_array_isset_string_fetch(&isNumeric, &definition, SL("isNumeric"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("isNumeric"), &isNumeric); } - ZEPHIR_OBS_VAR(&autoIncrement); + zephir_memory_observe(&autoIncrement); if (zephir_array_isset_string_fetch(&autoIncrement, &definition, SL("autoIncrement"), 0)) { if (!(zephir_is_true(&autoIncrement))) { if (0) { @@ -487,9 +481,6 @@ PHP_METHOD(Phalcon_Db_Column, __construct) */ PHP_METHOD(Phalcon_Db_Column, getAfterPosition) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "after"); } @@ -499,9 +490,6 @@ PHP_METHOD(Phalcon_Db_Column, getAfterPosition) */ PHP_METHOD(Phalcon_Db_Column, getBindType) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "bindType"); } @@ -511,9 +499,6 @@ PHP_METHOD(Phalcon_Db_Column, getBindType) */ PHP_METHOD(Phalcon_Db_Column, getComment) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "comment"); } @@ -523,9 +508,6 @@ PHP_METHOD(Phalcon_Db_Column, getComment) */ PHP_METHOD(Phalcon_Db_Column, getDefault) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "defaultValue"); } @@ -535,9 +517,6 @@ PHP_METHOD(Phalcon_Db_Column, getDefault) */ PHP_METHOD(Phalcon_Db_Column, getName) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "name"); } @@ -547,9 +526,6 @@ PHP_METHOD(Phalcon_Db_Column, getName) */ PHP_METHOD(Phalcon_Db_Column, getScale) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "scale"); } @@ -559,9 +535,6 @@ PHP_METHOD(Phalcon_Db_Column, getScale) */ PHP_METHOD(Phalcon_Db_Column, getSize) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "size"); } @@ -571,9 +544,6 @@ PHP_METHOD(Phalcon_Db_Column, getSize) */ PHP_METHOD(Phalcon_Db_Column, getType) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "type"); } @@ -583,9 +553,6 @@ PHP_METHOD(Phalcon_Db_Column, getType) */ PHP_METHOD(Phalcon_Db_Column, getTypeReference) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "typeReference"); } @@ -595,9 +562,6 @@ PHP_METHOD(Phalcon_Db_Column, getTypeReference) */ PHP_METHOD(Phalcon_Db_Column, getTypeValues) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "typeValues"); } @@ -614,9 +578,8 @@ PHP_METHOD(Phalcon_Db_Column, hasDefault) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&_0, this_ptr, "isautoincrement", NULL, 0); zephir_check_call_status(); @@ -632,9 +595,6 @@ PHP_METHOD(Phalcon_Db_Column, hasDefault) */ PHP_METHOD(Phalcon_Db_Column, isAutoIncrement) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "autoIncrement"); } @@ -644,9 +604,6 @@ PHP_METHOD(Phalcon_Db_Column, isAutoIncrement) */ PHP_METHOD(Phalcon_Db_Column, isFirst) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "first"); } @@ -656,9 +613,6 @@ PHP_METHOD(Phalcon_Db_Column, isFirst) */ PHP_METHOD(Phalcon_Db_Column, isNotNull) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "notNull"); } @@ -668,9 +622,6 @@ PHP_METHOD(Phalcon_Db_Column, isNotNull) */ PHP_METHOD(Phalcon_Db_Column, isNumeric) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "isNumeric"); } @@ -680,9 +631,6 @@ PHP_METHOD(Phalcon_Db_Column, isNumeric) */ PHP_METHOD(Phalcon_Db_Column, isPrimary) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "primary"); } @@ -692,9 +640,6 @@ PHP_METHOD(Phalcon_Db_Column, isPrimary) */ PHP_METHOD(Phalcon_Db_Column, isUnsigned) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "unsigned"); } diff --git a/ext/phalcon/db/column.zep.h b/ext/phalcon/db/column.zep.h index ab7ee4c966b..0b4e3b64408 100644 --- a/ext/phalcon/db/column.zep.h +++ b/ext/phalcon/db/column.zep.h @@ -83,25 +83,13 @@ ZEPHIR_INIT_FUNCS(phalcon_db_column_method_entry) { PHP_ME(Phalcon_Db_Column, getAfterPosition, arginfo_phalcon_db_column_getafterposition, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Db_Column, getBindType, arginfo_phalcon_db_column_getbindtype, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Db_Column, getComment, arginfo_phalcon_db_column_getcomment, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Db_Column, getDefault, arginfo_phalcon_db_column_getdefault, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Db_Column, getDefault, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Db_Column, getDefault, arginfo_phalcon_db_column_getdefault, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Db_Column, getName, arginfo_phalcon_db_column_getname, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Db_Column, getScale, arginfo_phalcon_db_column_getscale, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Db_Column, getSize, arginfo_phalcon_db_column_getsize, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Db_Column, getSize, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Db_Column, getSize, arginfo_phalcon_db_column_getsize, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Db_Column, getType, arginfo_phalcon_db_column_gettype, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Db_Column, getTypeReference, arginfo_phalcon_db_column_gettypereference, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Db_Column, getTypeValues, arginfo_phalcon_db_column_gettypevalues, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Db_Column, getTypeValues, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Db_Column, getTypeValues, arginfo_phalcon_db_column_gettypevalues, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Db_Column, hasDefault, arginfo_phalcon_db_column_hasdefault, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Db_Column, isAutoIncrement, arginfo_phalcon_db_column_isautoincrement, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Db_Column, isFirst, arginfo_phalcon_db_column_isfirst, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/db/dialect.zep.c b/ext/phalcon/db/dialect.zep.c index 47cbe8de392..a84c08a24ca 100644 --- a/ext/phalcon/db/dialect.zep.c +++ b/ext/phalcon/db/dialect.zep.c @@ -61,18 +61,13 @@ PHP_METHOD(Phalcon_Db_Dialect, createSavepoint) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *name_param = NULL; zval name; - zval *this_ptr = getThis(); ZVAL_UNDEF(&name); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -83,8 +78,6 @@ PHP_METHOD(Phalcon_Db_Dialect, createSavepoint) } else { ZEPHIR_INIT_VAR(&name); } - - ZEPHIR_CONCAT_SV(return_value, "SAVEPOINT ", &name); RETURN_MM(); } @@ -124,17 +117,14 @@ PHP_METHOD(Phalcon_Db_Dialect, escape) ZVAL_UNDEF(&_19$$9); ZVAL_UNDEF(&_21$$9); ZVAL_UNDEF(&_7); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(str) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(escapeChar) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &str_param, &escapeChar_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")); @@ -150,13 +140,11 @@ PHP_METHOD(Phalcon_Db_Dialect, escape) } else { zephir_get_strval(&escapeChar, escapeChar_param); } - - if (!(ZEPHIR_GLOBAL(db).escape_identifiers)) { RETURN_CTOR(&str); } if (ZEPHIR_IS_EMPTY(&escapeChar)) { - ZEPHIR_OBS_VAR(&_0$$4); + zephir_memory_observe(&_0$$4); zephir_read_property(&_0$$4, this_ptr, ZEND_STRL("escapeChar"), PH_NOISY_CC); zephir_cast_to_string(&_1$$4, &_0$$4); ZEPHIR_CPY_WRT(&escapeChar, &_1$$4); @@ -270,17 +258,14 @@ PHP_METHOD(Phalcon_Db_Dialect, escapeSchema) ZVAL_UNDEF(&_1$$4); ZVAL_UNDEF(&_0$$4); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(str) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(escapeChar) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &str_param, &escapeChar_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")); @@ -296,13 +281,11 @@ PHP_METHOD(Phalcon_Db_Dialect, escapeSchema) } else { zephir_get_strval(&escapeChar, escapeChar_param); } - - if (!(ZEPHIR_GLOBAL(db).escape_identifiers)) { RETURN_CTOR(&str); } if (ZEPHIR_IS_STRING(&escapeChar, "")) { - ZEPHIR_OBS_VAR(&_0$$4); + zephir_memory_observe(&_0$$4); zephir_read_property(&_0$$4, this_ptr, ZEND_STRL("escapeChar"), PH_NOISY_CC); zephir_cast_to_string(&_1$$4, &_0$$4); ZEPHIR_CPY_WRT(&escapeChar, &_1$$4); @@ -327,18 +310,13 @@ PHP_METHOD(Phalcon_Db_Dialect, forUpdate) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *sqlQuery_param = NULL; zval sqlQuery; - zval *this_ptr = getThis(); ZVAL_UNDEF(&sqlQuery); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(sqlQuery) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &sqlQuery_param); if (UNEXPECTED(Z_TYPE_P(sqlQuery_param) != IS_STRING && Z_TYPE_P(sqlQuery_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'sqlQuery' must be of the type string")); @@ -349,8 +327,6 @@ PHP_METHOD(Phalcon_Db_Dialect, forUpdate) } else { ZEPHIR_INIT_VAR(&sqlQuery); } - - ZEPHIR_CONCAT_VS(return_value, &sqlQuery, " FOR UPDATE"); RETURN_MM(); } @@ -385,7 +361,6 @@ PHP_METHOD(Phalcon_Db_Dialect, getColumnList) ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_4$$4); ZVAL_UNDEF(&escapeChar); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_ARRAY(columnList) @@ -393,10 +368,8 @@ PHP_METHOD(Phalcon_Db_Dialect, getColumnList) Z_PARAM_STR_OR_NULL(escapeChar) Z_PARAM_ARRAY(bindCounts) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &columnList_param, &escapeChar_param, &bindCounts_param); ZEPHIR_OBS_COPY_OR_DUP(&columnList, columnList_param); if (!escapeChar_param) { @@ -410,8 +383,6 @@ PHP_METHOD(Phalcon_Db_Dialect, getColumnList) } else { ZEPHIR_OBS_COPY_OR_DUP(&bindCounts, bindCounts_param); } - - ZEPHIR_INIT_VAR(&columns); array_init(&columns); zephir_is_iterable(&columnList, 0, "phalcon/Db/Dialect.zep", 128); @@ -420,7 +391,7 @@ PHP_METHOD(Phalcon_Db_Dialect, getColumnList) { ZEPHIR_INIT_NVAR(&column); ZVAL_COPY(&column, _0); - ZEPHIR_CALL_METHOD(&_2$$3, this_ptr, "getsqlcolumn", &_3, 43, &column, &escapeChar, &bindCounts); + ZEPHIR_CALL_METHOD(&_2$$3, this_ptr, "getsqlcolumn", &_3, 44, &column, &escapeChar, &bindCounts); zephir_check_call_status(); zephir_array_append(&columns, &_2$$3, PH_SEPARATE, "phalcon/Db/Dialect.zep", 125); } ZEND_HASH_FOREACH_END(); @@ -435,7 +406,7 @@ PHP_METHOD(Phalcon_Db_Dialect, getColumnList) } ZEPHIR_CALL_METHOD(&column, &columnList, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_4$$4, this_ptr, "getsqlcolumn", &_3, 43, &column, &escapeChar, &bindCounts); + ZEPHIR_CALL_METHOD(&_4$$4, this_ptr, "getsqlcolumn", &_3, 44, &column, &escapeChar, &bindCounts); zephir_check_call_status(); zephir_array_append(&columns, &_4$$4, PH_SEPARATE, "phalcon/Db/Dialect.zep", 125); ZEPHIR_CALL_METHOD(NULL, &columnList, "next", NULL, 0); @@ -452,9 +423,6 @@ PHP_METHOD(Phalcon_Db_Dialect, getColumnList) */ PHP_METHOD(Phalcon_Db_Dialect, getCustomFunctions) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "customFunctions"); } @@ -489,7 +457,6 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlColumn) ZVAL_UNDEF(&_2$$7); ZVAL_UNDEF(&escapeChar); ZVAL_UNDEF(&bindCounts); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_ZVAL(column) @@ -497,10 +464,8 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlColumn) Z_PARAM_STR_OR_NULL(escapeChar) Z_PARAM_ARRAY(bindCounts) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &column, &escapeChar_param, &bindCounts_param); ZEPHIR_SEPARATE_PARAM(column); if (!escapeChar_param) { @@ -514,8 +479,6 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlColumn) } else { ZEPHIR_OBS_COPY_OR_DUP(&bindCounts, bindCounts_param); } - - if (Z_TYPE_P(column) != IS_ARRAY) { ZVAL_NULL(&_0$$3); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "preparequalified", NULL, 0, column, &_0$$3, &escapeChar); @@ -523,7 +486,7 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlColumn) RETURN_MM(); } if (!(zephir_array_isset_string(column, SL("type")))) { - ZEPHIR_OBS_VAR(&columnField); + zephir_memory_observe(&columnField); zephir_array_fetch_long(&columnField, column, 0, PH_NOISY, "phalcon/Db/Dialect.zep", 160); if (Z_TYPE_P(&columnField) == IS_ARRAY) { ZEPHIR_INIT_VAR(&columnExpression); @@ -542,7 +505,7 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlColumn) zephir_array_update_string(&_2$$7, SL("name"), &columnField, PH_COPY | PH_SEPARATE); ZEPHIR_CPY_WRT(&columnExpression, &_2$$7); } - ZEPHIR_OBS_VAR(&columnDomain); + zephir_memory_observe(&columnDomain); _3$$4 = zephir_array_isset_long_fetch(&columnDomain, column, 1, 0); if (_3$$4) { _3$$4 = !ZEPHIR_IS_STRING_IDENTICAL(&columnDomain, ""); @@ -550,7 +513,7 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlColumn) if (_3$$4) { zephir_array_update_string(&columnExpression, SL("domain"), &columnDomain, PH_COPY | PH_SEPARATE); } - ZEPHIR_OBS_VAR(&columnAlias); + zephir_memory_observe(&columnAlias); _4$$4 = zephir_array_isset_long_fetch(&columnAlias, column, 2, 0); if (_4$$4) { _4$$4 = zephir_is_true(&columnAlias); @@ -613,7 +576,6 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpression) ZVAL_UNDEF(&_9$$18); ZVAL_UNDEF(&_10$$18); ZVAL_UNDEF(&escapeChar); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_ARRAY(expression) @@ -621,10 +583,8 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpression) Z_PARAM_STR_OR_NULL(escapeChar) Z_PARAM_ARRAY(bindCounts) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &expression_param, &escapeChar_param, &bindCounts_param); ZEPHIR_OBS_COPY_OR_DUP(&expression, expression_param); if (!escapeChar_param) { @@ -638,26 +598,24 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpression) } else { ZEPHIR_OBS_COPY_OR_DUP(&bindCounts, bindCounts_param); } - - - ZEPHIR_OBS_VAR(&type); + zephir_memory_observe(&type); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&type, &expression, SL("type"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_db_exception_ce, "Invalid SQL expression", "phalcon/Db/Dialect.zep", 224); return; } do { if (ZEPHIR_IS_STRING(&type, "scalar")) { - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getsqlexpressionscalar", NULL, 44, &expression, &escapeChar, &bindCounts); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getsqlexpressionscalar", NULL, 45, &expression, &escapeChar, &bindCounts); zephir_check_call_status(); RETURN_MM(); } if (ZEPHIR_IS_STRING(&type, "object")) { - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getsqlexpressionobject", NULL, 45, &expression, &escapeChar, &bindCounts); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getsqlexpressionobject", NULL, 46, &expression, &escapeChar, &bindCounts); zephir_check_call_status(); RETURN_MM(); } if (ZEPHIR_IS_STRING(&type, "qualified")) { - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getsqlexpressionqualified", NULL, 46, &expression, &escapeChar); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getsqlexpressionqualified", NULL, 47, &expression, &escapeChar); zephir_check_call_status(); RETURN_MM(); } @@ -666,15 +624,15 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpression) RETURN_CTOR(&_0$$7); } if (ZEPHIR_IS_STRING(&type, "placeholder")) { - ZEPHIR_OBS_VAR(×); + zephir_memory_observe(×); if (zephir_array_isset_string_fetch(×, &expression, SL("times"), 0)) { ZEPHIR_INIT_VAR(&placeholders); array_init(&placeholders); - ZEPHIR_OBS_VAR(&rawValue); + zephir_memory_observe(&rawValue); zephir_array_fetch_string(&rawValue, &expression, SL("rawValue"), PH_NOISY, "phalcon/Db/Dialect.zep", 264); - ZEPHIR_OBS_VAR(&value); + zephir_memory_observe(&value); zephir_array_fetch_string(&value, &expression, SL("value"), PH_NOISY, "phalcon/Db/Dialect.zep", 265); - ZEPHIR_OBS_VAR(&postTimes); + zephir_memory_observe(&postTimes); if (zephir_array_isset_fetch(&postTimes, &bindCounts, &rawValue, 0)) { ZEPHIR_CPY_WRT(×, &postTimes); } @@ -706,34 +664,34 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpression) RETURN_CTOR(&_6$$8); } if (ZEPHIR_IS_STRING(&type, "binary-op")) { - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getsqlexpressionbinaryoperations", NULL, 47, &expression, &escapeChar, &bindCounts); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getsqlexpressionbinaryoperations", NULL, 48, &expression, &escapeChar, &bindCounts); zephir_check_call_status(); RETURN_MM(); } if (ZEPHIR_IS_STRING(&type, "unary-op")) { - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getsqlexpressionunaryoperations", NULL, 48, &expression, &escapeChar, &bindCounts); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getsqlexpressionunaryoperations", NULL, 49, &expression, &escapeChar, &bindCounts); zephir_check_call_status(); RETURN_MM(); } if (ZEPHIR_IS_STRING(&type, "parentheses")) { zephir_array_fetch_string(&_8$$14, &expression, SL("left"), PH_NOISY | PH_READONLY, "phalcon/Db/Dialect.zep", 304); - ZEPHIR_CALL_METHOD(&_7$$14, this_ptr, "getsqlexpression", NULL, 49, &_8$$14, &escapeChar, &bindCounts); + ZEPHIR_CALL_METHOD(&_7$$14, this_ptr, "getsqlexpression", NULL, 50, &_8$$14, &escapeChar, &bindCounts); zephir_check_call_status(); ZEPHIR_CONCAT_SVS(return_value, "(", &_7$$14, ")"); RETURN_MM(); } if (ZEPHIR_IS_STRING(&type, "functionCall")) { - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getsqlexpressionfunctioncall", NULL, 50, &expression, &escapeChar, &bindCounts); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getsqlexpressionfunctioncall", NULL, 51, &expression, &escapeChar, &bindCounts); zephir_check_call_status(); RETURN_MM(); } if (ZEPHIR_IS_STRING(&type, "list")) { - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getsqlexpressionlist", NULL, 51, &expression, &escapeChar, &bindCounts); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getsqlexpressionlist", NULL, 52, &expression, &escapeChar, &bindCounts); zephir_check_call_status(); RETURN_MM(); } if (ZEPHIR_IS_STRING(&type, "all")) { - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getsqlexpressionall", NULL, 52, &expression, &escapeChar); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getsqlexpressionall", NULL, 53, &expression, &escapeChar); zephir_check_call_status(); RETURN_MM(); } @@ -745,17 +703,17 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpression) RETURN_MM(); } if (ZEPHIR_IS_STRING(&type, "cast")) { - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getsqlexpressioncastvalue", NULL, 53, &expression, &escapeChar, &bindCounts); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getsqlexpressioncastvalue", NULL, 54, &expression, &escapeChar, &bindCounts); zephir_check_call_status(); RETURN_MM(); } if (ZEPHIR_IS_STRING(&type, "convert")) { - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getsqlexpressionconvertvalue", NULL, 54, &expression, &escapeChar, &bindCounts); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getsqlexpressionconvertvalue", NULL, 55, &expression, &escapeChar, &bindCounts); zephir_check_call_status(); RETURN_MM(); } if (ZEPHIR_IS_STRING(&type, "case")) { - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getsqlexpressioncase", NULL, 55, &expression, &escapeChar, &bindCounts); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getsqlexpressioncase", NULL, 56, &expression, &escapeChar, &bindCounts); zephir_check_call_status(); RETURN_MM(); } @@ -765,7 +723,7 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpression) object_init_ex(&_11, phalcon_db_exception_ce); ZEPHIR_INIT_VAR(&_12); ZEPHIR_CONCAT_SVS(&_12, "Invalid SQL expression type '", &type, "'"); - ZEPHIR_CALL_METHOD(NULL, &_11, "__construct", NULL, 32, &_12); + ZEPHIR_CALL_METHOD(NULL, &_11, "__construct", NULL, 33, &_12); zephir_check_call_status(); zephir_throw_exception_debug(&_11, "phalcon/Db/Dialect.zep", 369); ZEPHIR_MM_RESTORE(); @@ -789,37 +747,32 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlTable) ZVAL_UNDEF(&schemaName); ZVAL_UNDEF(&aliasName); ZVAL_UNDEF(&escapeChar); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ZVAL(table) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(escapeChar) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &table, &escapeChar_param); if (!escapeChar_param) { ZEPHIR_INIT_VAR(&escapeChar); } else { zephir_get_strval(&escapeChar, escapeChar_param); } - - if (Z_TYPE_P(table) == IS_ARRAY) { - ZEPHIR_OBS_VAR(&tableName); + zephir_memory_observe(&tableName); zephir_array_fetch_long(&tableName, table, 0, PH_NOISY, "phalcon/Db/Dialect.zep", 385); - ZEPHIR_OBS_VAR(&schemaName); + zephir_memory_observe(&schemaName); zephir_array_isset_long_fetch(&schemaName, table, 1, 0); - ZEPHIR_OBS_VAR(&aliasName); + zephir_memory_observe(&aliasName); zephir_array_isset_long_fetch(&aliasName, table, 2, 0); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "preparetable", NULL, 0, &tableName, &schemaName, &aliasName, &escapeChar); zephir_check_call_status(); RETURN_MM(); } - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "escape", NULL, 56, table, &escapeChar); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "escape", NULL, 57, table, &escapeChar); zephir_check_call_status(); RETURN_MM(); } @@ -847,7 +800,6 @@ PHP_METHOD(Phalcon_Db_Dialect, limit) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *sqlQuery_param = NULL, *number, number_sub, _0$$3, _1$$3, _3$$3, _4$$4, _5$$4; zval sqlQuery; - zval *this_ptr = getThis(); ZVAL_UNDEF(&sqlQuery); ZVAL_UNDEF(&number_sub); @@ -856,16 +808,12 @@ PHP_METHOD(Phalcon_Db_Dialect, limit) ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$4); ZVAL_UNDEF(&_5$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(sqlQuery) Z_PARAM_ZVAL(number) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &sqlQuery_param, &number); if (UNEXPECTED(Z_TYPE_P(sqlQuery_param) != IS_STRING && Z_TYPE_P(sqlQuery_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'sqlQuery' must be of the type string")); @@ -876,8 +824,6 @@ PHP_METHOD(Phalcon_Db_Dialect, limit) } else { ZEPHIR_INIT_VAR(&sqlQuery); } - - if (Z_TYPE_P(number) == IS_ARRAY) { zephir_array_fetch_long(&_0$$3, number, 0, PH_NOISY | PH_READONLY, "phalcon/Db/Dialect.zep", 428); ZEPHIR_INIT_VAR(&_1$$3); @@ -912,20 +858,14 @@ PHP_METHOD(Phalcon_Db_Dialect, registerCustomFunction) ZVAL_UNDEF(&name); ZVAL_UNDEF(&customFunction_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(name) Z_PARAM_ZVAL(customFunction) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &name_param, &customFunction); zephir_get_strval(&name, name_param); - - zephir_update_property_array(this_ptr, SL("customFunctions"), &name, customFunction); RETURN_THIS(); } @@ -938,18 +878,13 @@ PHP_METHOD(Phalcon_Db_Dialect, releaseSavepoint) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *name_param = NULL; zval name; - zval *this_ptr = getThis(); ZVAL_UNDEF(&name); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -960,8 +895,6 @@ PHP_METHOD(Phalcon_Db_Dialect, releaseSavepoint) } else { ZEPHIR_INIT_VAR(&name); } - - ZEPHIR_CONCAT_SV(return_value, "RELEASE SAVEPOINT ", &name); RETURN_MM(); } @@ -974,18 +907,13 @@ PHP_METHOD(Phalcon_Db_Dialect, rollbackSavepoint) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *name_param = NULL; zval name; - zval *this_ptr = getThis(); ZVAL_UNDEF(&name); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -996,8 +924,6 @@ PHP_METHOD(Phalcon_Db_Dialect, rollbackSavepoint) } else { ZEPHIR_INIT_VAR(&name); } - - ZEPHIR_CONCAT_SV(return_value, "ROLLBACK TO SAVEPOINT ", &name); RETURN_MM(); } @@ -1045,30 +971,24 @@ PHP_METHOD(Phalcon_Db_Dialect, select) ZVAL_UNDEF(&_17$$13); ZVAL_UNDEF(&_19$$14); ZVAL_UNDEF(&_20$$14); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(definition) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &definition_param); ZEPHIR_OBS_COPY_OR_DUP(&definition, definition_param); - - - ZEPHIR_OBS_VAR(&tables); + zephir_memory_observe(&tables); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&tables, &definition, SL("tables"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_db_exception_ce, "The index 'tables' is required in the definition array", "phalcon/Db/Dialect.zep", 477); return; } - ZEPHIR_OBS_VAR(&columns); + zephir_memory_observe(&columns); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&columns, &definition, SL("columns"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_db_exception_ce, "The index 'columns' is required in the definition array", "phalcon/Db/Dialect.zep", 483); return; } - ZEPHIR_OBS_VAR(&distinct); + zephir_memory_observe(&distinct); if (zephir_array_isset_string_fetch(&distinct, &definition, SL("distinct"), 0)) { ZEPHIR_INIT_VAR(&sql); if (zephir_is_true(&distinct)) { @@ -1080,7 +1000,7 @@ PHP_METHOD(Phalcon_Db_Dialect, select) ZEPHIR_INIT_NVAR(&sql); ZVAL_STRING(&sql, "SELECT"); } - ZEPHIR_OBS_VAR(&bindCounts); + zephir_memory_observe(&bindCounts); zephir_array_isset_string_fetch(&bindCounts, &definition, SL("bindCounts"), 0); if (Z_TYPE_P(&bindCounts) != IS_ARRAY) { ZEPHIR_INIT_NVAR(&bindCounts); @@ -1088,78 +1008,78 @@ PHP_METHOD(Phalcon_Db_Dialect, select) } zephir_read_property(&_0, this_ptr, ZEND_STRL("escapeChar"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&escapeChar, &_0); - ZEPHIR_CALL_METHOD(&_1, this_ptr, "getcolumnlist", NULL, 57, &columns, &escapeChar, &bindCounts); + ZEPHIR_CALL_METHOD(&_1, this_ptr, "getcolumnlist", NULL, 58, &columns, &escapeChar, &bindCounts); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_2); ZEPHIR_CONCAT_SV(&_2, " ", &_1); zephir_concat_self(&sql, &_2); - ZEPHIR_CALL_METHOD(&_3, this_ptr, "getsqlexpressionfrom", NULL, 58, &tables, &escapeChar); + ZEPHIR_CALL_METHOD(&_3, this_ptr, "getsqlexpressionfrom", NULL, 59, &tables, &escapeChar); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_4); ZEPHIR_CONCAT_SV(&_4, " ", &_3); zephir_concat_self(&sql, &_4); - ZEPHIR_OBS_VAR(&joins); + zephir_memory_observe(&joins); _5 = zephir_array_isset_string_fetch(&joins, &definition, SL("joins"), 0); if (_5) { _5 = zephir_is_true(&joins); } if (_5) { zephir_array_fetch_string(&_7$$10, &definition, SL("joins"), PH_NOISY | PH_READONLY, "phalcon/Db/Dialect.zep", 517); - ZEPHIR_CALL_METHOD(&_6$$10, this_ptr, "getsqlexpressionjoins", NULL, 59, &_7$$10, &escapeChar, &bindCounts); + ZEPHIR_CALL_METHOD(&_6$$10, this_ptr, "getsqlexpressionjoins", NULL, 60, &_7$$10, &escapeChar, &bindCounts); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_8$$10); ZEPHIR_CONCAT_SV(&_8$$10, " ", &_6$$10); zephir_concat_self(&sql, &_8$$10); } - ZEPHIR_OBS_VAR(&where); + zephir_memory_observe(&where); _9 = zephir_array_isset_string_fetch(&where, &definition, SL("where"), 0); if (_9) { _9 = zephir_is_true(&where); } if (_9) { - ZEPHIR_CALL_METHOD(&_10$$11, this_ptr, "getsqlexpressionwhere", NULL, 60, &where, &escapeChar, &bindCounts); + ZEPHIR_CALL_METHOD(&_10$$11, this_ptr, "getsqlexpressionwhere", NULL, 61, &where, &escapeChar, &bindCounts); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_11$$11); ZEPHIR_CONCAT_SV(&_11$$11, " ", &_10$$11); zephir_concat_self(&sql, &_11$$11); } - ZEPHIR_OBS_VAR(&groupBy); + zephir_memory_observe(&groupBy); _12 = zephir_array_isset_string_fetch(&groupBy, &definition, SL("group"), 0); if (_12) { _12 = zephir_is_true(&groupBy); } if (_12) { - ZEPHIR_CALL_METHOD(&_13$$12, this_ptr, "getsqlexpressiongroupby", NULL, 61, &groupBy, &escapeChar); + ZEPHIR_CALL_METHOD(&_13$$12, this_ptr, "getsqlexpressiongroupby", NULL, 62, &groupBy, &escapeChar); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_14$$12); ZEPHIR_CONCAT_SV(&_14$$12, " ", &_13$$12); zephir_concat_self(&sql, &_14$$12); } - ZEPHIR_OBS_VAR(&having); + zephir_memory_observe(&having); _15 = zephir_array_isset_string_fetch(&having, &definition, SL("having"), 0); if (_15) { _15 = zephir_is_true(&having); } if (_15) { - ZEPHIR_CALL_METHOD(&_16$$13, this_ptr, "getsqlexpressionhaving", NULL, 62, &having, &escapeChar, &bindCounts); + ZEPHIR_CALL_METHOD(&_16$$13, this_ptr, "getsqlexpressionhaving", NULL, 63, &having, &escapeChar, &bindCounts); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_17$$13); ZEPHIR_CONCAT_SV(&_17$$13, " ", &_16$$13); zephir_concat_self(&sql, &_17$$13); } - ZEPHIR_OBS_VAR(&orderBy); + zephir_memory_observe(&orderBy); _18 = zephir_array_isset_string_fetch(&orderBy, &definition, SL("order"), 0); if (_18) { _18 = zephir_is_true(&orderBy); } if (_18) { - ZEPHIR_CALL_METHOD(&_19$$14, this_ptr, "getsqlexpressionorderby", NULL, 63, &orderBy, &escapeChar, &bindCounts); + ZEPHIR_CALL_METHOD(&_19$$14, this_ptr, "getsqlexpressionorderby", NULL, 64, &orderBy, &escapeChar, &bindCounts); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_20$$14); ZEPHIR_CONCAT_SV(&_20$$14, " ", &_19$$14); zephir_concat_self(&sql, &_20$$14); } - ZEPHIR_OBS_VAR(&limit); + zephir_memory_observe(&limit); _21 = zephir_array_isset_string_fetch(&limit, &definition, SL("limit"), 0); if (_21) { _21 = zephir_is_true(&limit); @@ -1169,7 +1089,7 @@ PHP_METHOD(Phalcon_Db_Dialect, select) zephir_create_array(&_22$$15, 2, 0); zephir_array_update_string(&_22$$15, SL("sql"), &sql, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_22$$15, SL("value"), &limit, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(&sql, this_ptr, "getsqlexpressionlimit", NULL, 64, &_22$$15, &escapeChar, &bindCounts); + ZEPHIR_CALL_METHOD(&sql, this_ptr, "getsqlexpressionlimit", NULL, 65, &_22$$15, &escapeChar, &bindCounts); zephir_check_call_status(); } _23 = zephir_array_isset_string_fetch(&forUpdate, &definition, SL("forUpdate"), 1); @@ -1187,9 +1107,6 @@ PHP_METHOD(Phalcon_Db_Dialect, select) */ PHP_METHOD(Phalcon_Db_Dialect, supportsSavepoints) { - zval *this_ptr = getThis(); - - RETURN_BOOL(1); } @@ -1202,10 +1119,8 @@ PHP_METHOD(Phalcon_Db_Dialect, supportsReleaseSavepoints) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *this_ptr = getThis(); - - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "supportssavepoints", NULL, 0); zephir_check_call_status(); @@ -1220,22 +1135,15 @@ PHP_METHOD(Phalcon_Db_Dialect, getColumnSize) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *column, column_sub, _0; - zval *this_ptr = getThis(); ZVAL_UNDEF(&column_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(column, phalcon_db_columninterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &column); - - ZEPHIR_CALL_METHOD(&_0, column, "getsize", NULL, 0); zephir_check_call_status(); ZEPHIR_CONCAT_SVS(return_value, "(", &_0, ")"); @@ -1250,23 +1158,16 @@ PHP_METHOD(Phalcon_Db_Dialect, getColumnSizeAndScale) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *column, column_sub, _0, _1; - zval *this_ptr = getThis(); ZVAL_UNDEF(&column_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(column, phalcon_db_columninterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &column); - - ZEPHIR_CALL_METHOD(&_0, column, "getsize", NULL, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_1, column, "getscale", NULL, 0); @@ -1283,22 +1184,15 @@ PHP_METHOD(Phalcon_Db_Dialect, checkColumnType) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *column, column_sub, _0; - zval *this_ptr = getThis(); ZVAL_UNDEF(&column_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(column, phalcon_db_columninterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &column); - - ZEPHIR_CALL_METHOD(&_0, column, "gettype", NULL, 0); zephir_check_call_status(); if (Z_TYPE_P(&_0) == IS_STRING) { @@ -1319,22 +1213,15 @@ PHP_METHOD(Phalcon_Db_Dialect, checkColumnTypeSql) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *column, column_sub, _0; - zval *this_ptr = getThis(); ZVAL_UNDEF(&column_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(column, phalcon_db_columninterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &column); - - ZEPHIR_CALL_METHOD(&_0, column, "gettype", NULL, 0); zephir_check_call_status(); if (Z_TYPE_P(&_0) != IS_STRING) { @@ -1361,17 +1248,14 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionAll) ZVAL_UNDEF(&domain); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&escapeChar); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(expression) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(escapeChar) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &expression_param, &escapeChar_param); ZEPHIR_OBS_COPY_OR_DUP(&expression, expression_param); if (!escapeChar_param) { @@ -1379,9 +1263,7 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionAll) } else { zephir_get_strval(&escapeChar, escapeChar_param); } - - - ZEPHIR_OBS_VAR(&domain); + zephir_memory_observe(&domain); zephir_array_isset_string_fetch(&domain, &expression, SL("domain"), 0); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "*"); @@ -1416,7 +1298,6 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionBinaryOperations) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&escapeChar); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_ARRAY(expression) @@ -1424,10 +1305,8 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionBinaryOperations) Z_PARAM_STR_OR_NULL(escapeChar) Z_PARAM_ARRAY(bindCounts) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &expression_param, &escapeChar_param, &bindCounts_param); ZEPHIR_OBS_COPY_OR_DUP(&expression, expression_param); if (!escapeChar_param) { @@ -1441,13 +1320,11 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionBinaryOperations) } else { ZEPHIR_OBS_COPY_OR_DUP(&bindCounts, bindCounts_param); } - - zephir_array_fetch_string(&_0, &expression, SL("left"), PH_NOISY | PH_READONLY, "phalcon/Db/Dialect.zep", 654); ZEPHIR_CALL_METHOD(&left, this_ptr, "getsqlexpression", NULL, 0, &_0, &escapeChar, &bindCounts); zephir_check_call_status(); zephir_array_fetch_string(&_1, &expression, SL("right"), PH_NOISY | PH_READONLY, "phalcon/Db/Dialect.zep", 660); - ZEPHIR_CALL_METHOD(&right, this_ptr, "getsqlexpression", NULL, 49, &_1, &escapeChar, &bindCounts); + ZEPHIR_CALL_METHOD(&right, this_ptr, "getsqlexpression", NULL, 50, &_1, &escapeChar, &bindCounts); zephir_check_call_status(); zephir_array_fetch_string(&_2, &expression, SL("op"), PH_NOISY | PH_READONLY, "phalcon/Db/Dialect.zep", 665); ZEPHIR_CONCAT_VSVSV(return_value, &left, " ", &_2, " ", &right); @@ -1500,7 +1377,6 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionCase) ZVAL_UNDEF(&_23$$8); ZVAL_UNDEF(&escapeChar); ZVAL_UNDEF(&sql); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_ARRAY(expression) @@ -1508,10 +1384,8 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionCase) Z_PARAM_STR_OR_NULL(escapeChar) Z_PARAM_ARRAY(bindCounts) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &expression_param, &escapeChar_param, &bindCounts_param); ZEPHIR_OBS_COPY_OR_DUP(&expression, expression_param); if (!escapeChar_param) { @@ -1525,8 +1399,6 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionCase) } else { ZEPHIR_OBS_COPY_OR_DUP(&bindCounts, bindCounts_param); } - - zephir_array_fetch_string(&_1, &expression, SL("expr"), PH_NOISY | PH_READONLY, "phalcon/Db/Dialect.zep", 682); ZEPHIR_CALL_METHOD(&_0, this_ptr, "getsqlexpression", NULL, 0, &_1, &escapeChar, &bindCounts); zephir_check_call_status(); @@ -1543,17 +1415,17 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionCase) zephir_array_fetch_string(&_6$$3, &whenClause, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Db/Dialect.zep", 685); if (ZEPHIR_IS_STRING(&_6$$3, "when")) { zephir_array_fetch_string(&_8$$4, &whenClause, SL("expr"), PH_NOISY | PH_READONLY, "phalcon/Db/Dialect.zep", 687); - ZEPHIR_CALL_METHOD(&_7$$4, this_ptr, "getsqlexpression", NULL, 49, &_8$$4, &escapeChar, &bindCounts); + ZEPHIR_CALL_METHOD(&_7$$4, this_ptr, "getsqlexpression", NULL, 50, &_8$$4, &escapeChar, &bindCounts); zephir_check_call_status(); zephir_array_fetch_string(&_10$$4, &whenClause, SL("then"), PH_NOISY | PH_READONLY, "phalcon/Db/Dialect.zep", 689); - ZEPHIR_CALL_METHOD(&_9$$4, this_ptr, "getsqlexpression", NULL, 49, &_10$$4, &escapeChar, &bindCounts); + ZEPHIR_CALL_METHOD(&_9$$4, this_ptr, "getsqlexpression", NULL, 50, &_10$$4, &escapeChar, &bindCounts); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_11$$4); ZEPHIR_CONCAT_SVSV(&_11$$4, " WHEN ", &_7$$4, " THEN ", &_9$$4); zephir_concat_self(&sql, &_11$$4); } else { zephir_array_fetch_string(&_13$$5, &whenClause, SL("expr"), PH_NOISY | PH_READONLY, "phalcon/Db/Dialect.zep", 691); - ZEPHIR_CALL_METHOD(&_12$$5, this_ptr, "getsqlexpression", NULL, 49, &_13$$5, &escapeChar, &bindCounts); + ZEPHIR_CALL_METHOD(&_12$$5, this_ptr, "getsqlexpression", NULL, 50, &_13$$5, &escapeChar, &bindCounts); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_14$$5); ZEPHIR_CONCAT_SV(&_14$$5, " ELSE ", &_12$$5); @@ -1574,17 +1446,17 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionCase) zephir_array_fetch_string(&_15$$6, &whenClause, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Db/Dialect.zep", 685); if (ZEPHIR_IS_STRING(&_15$$6, "when")) { zephir_array_fetch_string(&_17$$7, &whenClause, SL("expr"), PH_NOISY | PH_READONLY, "phalcon/Db/Dialect.zep", 687); - ZEPHIR_CALL_METHOD(&_16$$7, this_ptr, "getsqlexpression", NULL, 49, &_17$$7, &escapeChar, &bindCounts); + ZEPHIR_CALL_METHOD(&_16$$7, this_ptr, "getsqlexpression", NULL, 50, &_17$$7, &escapeChar, &bindCounts); zephir_check_call_status(); zephir_array_fetch_string(&_19$$7, &whenClause, SL("then"), PH_NOISY | PH_READONLY, "phalcon/Db/Dialect.zep", 689); - ZEPHIR_CALL_METHOD(&_18$$7, this_ptr, "getsqlexpression", NULL, 49, &_19$$7, &escapeChar, &bindCounts); + ZEPHIR_CALL_METHOD(&_18$$7, this_ptr, "getsqlexpression", NULL, 50, &_19$$7, &escapeChar, &bindCounts); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_20$$7); ZEPHIR_CONCAT_SVSV(&_20$$7, " WHEN ", &_16$$7, " THEN ", &_18$$7); zephir_concat_self(&sql, &_20$$7); } else { zephir_array_fetch_string(&_22$$8, &whenClause, SL("expr"), PH_NOISY | PH_READONLY, "phalcon/Db/Dialect.zep", 691); - ZEPHIR_CALL_METHOD(&_21$$8, this_ptr, "getsqlexpression", NULL, 49, &_22$$8, &escapeChar, &bindCounts); + ZEPHIR_CALL_METHOD(&_21$$8, this_ptr, "getsqlexpression", NULL, 50, &_22$$8, &escapeChar, &bindCounts); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_23$$8); ZEPHIR_CONCAT_SV(&_23$$8, " ELSE ", &_21$$8); @@ -1624,7 +1496,6 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionCastValue) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&escapeChar); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_ARRAY(expression) @@ -1632,10 +1503,8 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionCastValue) Z_PARAM_STR_OR_NULL(escapeChar) Z_PARAM_ARRAY(bindCounts) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &expression_param, &escapeChar_param, &bindCounts_param); ZEPHIR_OBS_COPY_OR_DUP(&expression, expression_param); if (!escapeChar_param) { @@ -1649,13 +1518,11 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionCastValue) } else { ZEPHIR_OBS_COPY_OR_DUP(&bindCounts, bindCounts_param); } - - zephir_array_fetch_string(&_0, &expression, SL("left"), PH_NOISY | PH_READONLY, "phalcon/Db/Dialect.zep", 712); ZEPHIR_CALL_METHOD(&left, this_ptr, "getsqlexpression", NULL, 0, &_0, &escapeChar, &bindCounts); zephir_check_call_status(); zephir_array_fetch_string(&_1, &expression, SL("right"), PH_NOISY | PH_READONLY, "phalcon/Db/Dialect.zep", 718); - ZEPHIR_CALL_METHOD(&right, this_ptr, "getsqlexpression", NULL, 49, &_1, &escapeChar, &bindCounts); + ZEPHIR_CALL_METHOD(&right, this_ptr, "getsqlexpression", NULL, 50, &_1, &escapeChar, &bindCounts); zephir_check_call_status(); ZEPHIR_CONCAT_SVSVS(return_value, "CAST(", &left, " AS ", &right, ")"); RETURN_MM(); @@ -1686,7 +1553,6 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionConvertValue) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&escapeChar); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_ARRAY(expression) @@ -1694,10 +1560,8 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionConvertValue) Z_PARAM_STR_OR_NULL(escapeChar) Z_PARAM_ARRAY(bindCounts) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &expression_param, &escapeChar_param, &bindCounts_param); ZEPHIR_OBS_COPY_OR_DUP(&expression, expression_param); if (!escapeChar_param) { @@ -1711,13 +1575,11 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionConvertValue) } else { ZEPHIR_OBS_COPY_OR_DUP(&bindCounts, bindCounts_param); } - - zephir_array_fetch_string(&_0, &expression, SL("left"), PH_NOISY | PH_READONLY, "phalcon/Db/Dialect.zep", 740); ZEPHIR_CALL_METHOD(&left, this_ptr, "getsqlexpression", NULL, 0, &_0, &escapeChar, &bindCounts); zephir_check_call_status(); zephir_array_fetch_string(&_1, &expression, SL("right"), PH_NOISY | PH_READONLY, "phalcon/Db/Dialect.zep", 746); - ZEPHIR_CALL_METHOD(&right, this_ptr, "getsqlexpression", NULL, 49, &_1, &escapeChar, &bindCounts); + ZEPHIR_CALL_METHOD(&right, this_ptr, "getsqlexpression", NULL, 50, &_1, &escapeChar, &bindCounts); zephir_check_call_status(); ZEPHIR_CONCAT_SVSVS(return_value, "CONVERT(", &left, " USING ", &right, ")"); RETURN_MM(); @@ -1743,25 +1605,20 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionFrom) ZVAL_UNDEF(&_2$$4); ZVAL_UNDEF(&_4$$5); ZVAL_UNDEF(&escapeChar); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ZVAL(expression) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(escapeChar) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &expression, &escapeChar_param); if (!escapeChar_param) { ZEPHIR_INIT_VAR(&escapeChar); } else { zephir_get_strval(&escapeChar, escapeChar_param); } - - if (Z_TYPE_P(expression) == IS_ARRAY) { ZEPHIR_INIT_VAR(&tables); array_init(&tables); @@ -1771,7 +1628,7 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionFrom) { ZEPHIR_INIT_NVAR(&table); ZVAL_COPY(&table, _0$$3); - ZEPHIR_CALL_METHOD(&_2$$4, this_ptr, "getsqltable", &_3, 65, &table, &escapeChar); + ZEPHIR_CALL_METHOD(&_2$$4, this_ptr, "getsqltable", &_3, 66, &table, &escapeChar); zephir_check_call_status(); zephir_array_append(&tables, &_2$$4, PH_SEPARATE, "phalcon/Db/Dialect.zep", 765); } ZEND_HASH_FOREACH_END(); @@ -1786,7 +1643,7 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionFrom) } ZEPHIR_CALL_METHOD(&table, expression, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_4$$5, this_ptr, "getsqltable", &_3, 65, &table, &escapeChar); + ZEPHIR_CALL_METHOD(&_4$$5, this_ptr, "getsqltable", &_3, 66, &table, &escapeChar); zephir_check_call_status(); zephir_array_append(&tables, &_4$$5, PH_SEPARATE, "phalcon/Db/Dialect.zep", 765); ZEPHIR_CALL_METHOD(NULL, expression, "next", NULL, 0); @@ -1833,7 +1690,6 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionFunctionCall) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_4$$4); ZVAL_UNDEF(&escapeChar); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_ARRAY(expression) @@ -1841,10 +1697,8 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionFunctionCall) Z_PARAM_STR_OR_NULL(escapeChar) Z_PARAM_ARRAY(bindCounts) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &expression_param, &escapeChar_param, &bindCounts_param); ZEPHIR_OBS_COPY_OR_DUP(&expression, expression_param); if (!escapeChar_param) { @@ -1858,18 +1712,16 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionFunctionCall) } else { ZEPHIR_OBS_COPY_OR_DUP(&bindCounts, bindCounts_param); } - - - ZEPHIR_OBS_VAR(&name); + zephir_memory_observe(&name); zephir_array_fetch_string(&name, &expression, SL("name"), PH_NOISY, "phalcon/Db/Dialect.zep", 789); - ZEPHIR_OBS_VAR(&customFunction); + zephir_memory_observe(&customFunction); zephir_read_property(&_0, this_ptr, ZEND_STRL("customFunctions"), PH_NOISY_CC | PH_READONLY); if (zephir_array_isset_fetch(&customFunction, &_0, &name, 0)) { ZEPHIR_RETURN_CALL_ZVAL_FUNCTION(&customFunction, NULL, 0, this_ptr, &expression, &escapeChar); zephir_check_call_status(); RETURN_MM(); } - ZEPHIR_OBS_VAR(&arguments); + zephir_memory_observe(&arguments); _1 = zephir_array_isset_string_fetch(&arguments, &expression, SL("arguments"), 0); if (_1) { _1 = Z_TYPE_P(&arguments) == IS_ARRAY; @@ -1926,7 +1778,6 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionGroupBy) ZVAL_UNDEF(&_4$$6); ZVAL_UNDEF(&escapeChar); ZVAL_UNDEF(&bindCounts); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_ZVAL(expression) @@ -1934,10 +1785,8 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionGroupBy) Z_PARAM_STR_OR_NULL(escapeChar) Z_PARAM_ARRAY(bindCounts) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &expression, &escapeChar_param, &bindCounts_param); if (!escapeChar_param) { ZEPHIR_INIT_VAR(&escapeChar); @@ -1950,8 +1799,6 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionGroupBy) } else { ZEPHIR_OBS_COPY_OR_DUP(&bindCounts, bindCounts_param); } - - if (Z_TYPE_P(expression) == IS_ARRAY) { ZEPHIR_INIT_VAR(&fields); array_init(&fields); @@ -1984,7 +1831,7 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionGroupBy) ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_db_exception_ce, "Invalid SQL-GROUP-BY expression", "phalcon/Db/Dialect.zep", 834); return; } - ZEPHIR_CALL_METHOD(&_4$$6, this_ptr, "getsqlexpression", &_3, 49, &field, &escapeChar, &bindCounts); + ZEPHIR_CALL_METHOD(&_4$$6, this_ptr, "getsqlexpression", &_3, 50, &field, &escapeChar, &bindCounts); zephir_check_call_status(); zephir_array_append(&fields, &_4$$6, PH_SEPARATE, "phalcon/Db/Dialect.zep", 841); ZEPHIR_CALL_METHOD(NULL, expression, "next", NULL, 0); @@ -2024,7 +1871,6 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionHaving) ZVAL_UNDEF(&bindCounts); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&escapeChar); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_ARRAY(expression) @@ -2032,10 +1878,8 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionHaving) Z_PARAM_STR_OR_NULL(escapeChar) Z_PARAM_ARRAY(bindCounts) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &expression_param, &escapeChar_param, &bindCounts_param); ZEPHIR_OBS_COPY_OR_DUP(&expression, expression_param); if (!escapeChar_param) { @@ -2049,8 +1893,6 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionHaving) } else { ZEPHIR_OBS_COPY_OR_DUP(&bindCounts, bindCounts_param); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "getsqlexpression", NULL, 0, &expression, &escapeChar, &bindCounts); zephir_check_call_status(); ZEPHIR_CONCAT_SV(return_value, "HAVING ", &_0); @@ -2100,7 +1942,6 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionJoins) ZVAL_UNDEF(&escapeChar); ZVAL_UNDEF(&sql); ZVAL_UNDEF(&bindCounts); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_ZVAL(expression) @@ -2108,10 +1949,8 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionJoins) Z_PARAM_STR_OR_NULL(escapeChar) Z_PARAM_ARRAY(bindCounts) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &expression, &escapeChar_param, &bindCounts_param); if (!escapeChar_param) { ZEPHIR_INIT_VAR(&escapeChar); @@ -2124,8 +1963,6 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionJoins) } else { ZEPHIR_OBS_COPY_OR_DUP(&bindCounts, bindCounts_param); } - - ZEPHIR_INIT_VAR(&joinType); ZVAL_STRING(&joinType, ""); ZEPHIR_INIT_VAR(&sql); @@ -2153,7 +1990,7 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionJoins) { ZEPHIR_INIT_NVAR(&condition); ZVAL_COPY(&condition, _4$$6); - ZEPHIR_CALL_METHOD(&_6$$7, this_ptr, "getsqlexpression", &_3, 49, &condition, &escapeChar, &bindCounts); + ZEPHIR_CALL_METHOD(&_6$$7, this_ptr, "getsqlexpression", &_3, 50, &condition, &escapeChar, &bindCounts); zephir_check_call_status(); zephir_array_append(&joinCondition, &_6$$7, PH_SEPARATE, "phalcon/Db/Dialect.zep", 900); } ZEND_HASH_FOREACH_END(); @@ -2168,7 +2005,7 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionJoins) } ZEPHIR_CALL_METHOD(&condition, &joinConditionsArray, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_7$$8, this_ptr, "getsqlexpression", &_3, 49, &condition, &escapeChar, &bindCounts); + ZEPHIR_CALL_METHOD(&_7$$8, this_ptr, "getsqlexpression", &_3, 50, &condition, &escapeChar, &bindCounts); zephir_check_call_status(); zephir_array_append(&joinCondition, &_7$$8, PH_SEPARATE, "phalcon/Db/Dialect.zep", 900); ZEPHIR_CALL_METHOD(NULL, &joinConditionsArray, "next", NULL, 0); @@ -2193,7 +2030,7 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionJoins) zephir_concat_self_str(&joinType, SL(" ")); } zephir_array_fetch_string(&_10$$3, &join, SL("source"), PH_NOISY | PH_READONLY, "phalcon/Db/Dialect.zep", 913); - ZEPHIR_CALL_METHOD(&joinTable, this_ptr, "getsqltable", &_11, 65, &_10$$3, &escapeChar); + ZEPHIR_CALL_METHOD(&joinTable, this_ptr, "getsqltable", &_11, 66, &_10$$3, &escapeChar); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_12$$3); ZEPHIR_CONCAT_SVSVSV(&_12$$3, " ", &joinType, "JOIN ", &joinTable, " ON ", &joinCondition); @@ -2217,7 +2054,7 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionJoins) } if (_13$$11) { if (!(zephir_array_isset_long(&joinConditionsArray, 0))) { - ZEPHIR_CALL_METHOD(&joinCondition, this_ptr, "getsqlexpression", &_3, 49, &joinConditionsArray, &escapeChar, &bindCounts); + ZEPHIR_CALL_METHOD(&joinCondition, this_ptr, "getsqlexpression", &_3, 50, &joinConditionsArray, &escapeChar, &bindCounts); zephir_check_call_status(); } else { ZEPHIR_INIT_NVAR(&joinCondition); @@ -2228,7 +2065,7 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionJoins) { ZEPHIR_INIT_NVAR(&condition); ZVAL_COPY(&condition, _14$$14); - ZEPHIR_CALL_METHOD(&_16$$15, this_ptr, "getsqlexpression", &_3, 49, &condition, &escapeChar, &bindCounts); + ZEPHIR_CALL_METHOD(&_16$$15, this_ptr, "getsqlexpression", &_3, 50, &condition, &escapeChar, &bindCounts); zephir_check_call_status(); zephir_array_append(&joinCondition, &_16$$15, PH_SEPARATE, "phalcon/Db/Dialect.zep", 900); } ZEND_HASH_FOREACH_END(); @@ -2243,7 +2080,7 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionJoins) } ZEPHIR_CALL_METHOD(&condition, &joinConditionsArray, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_17$$16, this_ptr, "getsqlexpression", &_3, 49, &condition, &escapeChar, &bindCounts); + ZEPHIR_CALL_METHOD(&_17$$16, this_ptr, "getsqlexpression", &_3, 50, &condition, &escapeChar, &bindCounts); zephir_check_call_status(); zephir_array_append(&joinCondition, &_17$$16, PH_SEPARATE, "phalcon/Db/Dialect.zep", 900); ZEPHIR_CALL_METHOD(NULL, &joinConditionsArray, "next", NULL, 0); @@ -2268,7 +2105,7 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionJoins) zephir_concat_self_str(&joinType, SL(" ")); } zephir_array_fetch_string(&_20$$11, &join, SL("source"), PH_NOISY | PH_READONLY, "phalcon/Db/Dialect.zep", 913); - ZEPHIR_CALL_METHOD(&joinTable, this_ptr, "getsqltable", &_11, 65, &_20$$11, &escapeChar); + ZEPHIR_CALL_METHOD(&joinTable, this_ptr, "getsqltable", &_11, 66, &_20$$11, &escapeChar); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_21$$11); ZEPHIR_CONCAT_SVSVSV(&_21$$11, " ", &joinType, "JOIN ", &joinTable, " ON ", &joinCondition); @@ -2311,7 +2148,6 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionLimit) ZVAL_UNDEF(&escapeChar); ZVAL_UNDEF(&bindCounts); ZVAL_UNDEF(&_4); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_ZVAL(expression) @@ -2319,10 +2155,8 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionLimit) Z_PARAM_STR_OR_NULL(escapeChar) Z_PARAM_ARRAY(bindCounts) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &expression, &escapeChar_param, &bindCounts_param); if (!escapeChar_param) { ZEPHIR_INIT_VAR(&escapeChar); @@ -2335,20 +2169,18 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionLimit) } else { ZEPHIR_OBS_COPY_OR_DUP(&bindCounts, bindCounts_param); } - - ZEPHIR_INIT_VAR(&sql); ZVAL_STRING(&sql, ""); ZEPHIR_INIT_VAR(&offset); ZVAL_NULL(&offset); - ZEPHIR_OBS_VAR(&value); + zephir_memory_observe(&value); zephir_array_fetch_string(&value, expression, SL("value"), PH_NOISY, "phalcon/Db/Dialect.zep", 934); if (zephir_array_isset_string(expression, SL("sql"))) { ZEPHIR_OBS_NVAR(&sql); zephir_array_fetch_string(&sql, expression, SL("sql"), PH_NOISY, "phalcon/Db/Dialect.zep", 937); } if (Z_TYPE_P(&value) == IS_ARRAY) { - ZEPHIR_OBS_VAR(&_0$$4); + zephir_memory_observe(&_0$$4); zephir_array_fetch_string(&_0$$4, &value, SL("number"), PH_NOISY, "phalcon/Db/Dialect.zep", 941); if (Z_TYPE_P(&_0$$4) == IS_ARRAY) { zephir_array_fetch_string(&_1$$5, &value, SL("number"), PH_NOISY | PH_READONLY, "phalcon/Db/Dialect.zep", 943); @@ -2364,7 +2196,7 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionLimit) _2$$4 = Z_TYPE_P(&offset) == IS_ARRAY; } if (_2$$4) { - ZEPHIR_CALL_METHOD(&_3$$7, this_ptr, "getsqlexpression", NULL, 49, &offset, &escapeChar, &bindCounts); + ZEPHIR_CALL_METHOD(&_3$$7, this_ptr, "getsqlexpression", NULL, 50, &offset, &escapeChar, &bindCounts); zephir_check_call_status(); ZEPHIR_CPY_WRT(&offset, &_3$$7); } @@ -2412,7 +2244,6 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionList) ZVAL_UNDEF(&_4$$5); ZVAL_UNDEF(&_6$$6); ZVAL_UNDEF(&escapeChar); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_ARRAY(expression) @@ -2420,10 +2251,8 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionList) Z_PARAM_STR_OR_NULL(escapeChar) Z_PARAM_ARRAY(bindCounts) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &expression_param, &escapeChar_param, &bindCounts_param); ZEPHIR_OBS_COPY_OR_DUP(&expression, expression_param); if (!escapeChar_param) { @@ -2437,8 +2266,6 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionList) } else { ZEPHIR_OBS_COPY_OR_DUP(&bindCounts, bindCounts_param); } - - ZEPHIR_INIT_VAR(&items); array_init(&items); ZEPHIR_INIT_VAR(&separator); @@ -2447,7 +2274,7 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionList) ZEPHIR_OBS_NVAR(&separator); zephir_array_fetch_string(&separator, &expression, SL("separator"), PH_NOISY, "phalcon/Db/Dialect.zep", 987); } - ZEPHIR_OBS_VAR(&values); + zephir_memory_observe(&values); _0 = zephir_array_isset_long_fetch(&values, &expression, 0, 0); if (!(_0)) { ZEPHIR_OBS_NVAR(&values); @@ -2479,7 +2306,7 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionList) } ZEPHIR_CALL_METHOD(&item, &values, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_6$$6, this_ptr, "getsqlexpression", &_5, 49, &item, &escapeChar, &bindCounts); + ZEPHIR_CALL_METHOD(&_6$$6, this_ptr, "getsqlexpression", &_5, 50, &item, &escapeChar, &bindCounts); zephir_check_call_status(); zephir_array_append(&items, &_6$$6, PH_SEPARATE, "phalcon/Db/Dialect.zep", 993); ZEPHIR_CALL_METHOD(NULL, &values, "next", NULL, 0); @@ -2529,7 +2356,6 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionObject) ZVAL_UNDEF(&domain); ZVAL_UNDEF(&objectExpression); ZVAL_UNDEF(&escapeChar); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_ARRAY(expression) @@ -2537,10 +2363,8 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionObject) Z_PARAM_STR_OR_NULL(escapeChar) Z_PARAM_ARRAY(bindCounts) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &expression_param, &escapeChar_param, &bindCounts_param); ZEPHIR_OBS_COPY_OR_DUP(&expression, expression_param); if (!escapeChar_param) { @@ -2554,8 +2378,6 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionObject) } else { ZEPHIR_OBS_COPY_OR_DUP(&bindCounts, bindCounts_param); } - - ZEPHIR_INIT_VAR(&domain); ZVAL_NULL(&domain); ZEPHIR_INIT_VAR(&objectExpression); @@ -2612,7 +2434,6 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionOrderBy) ZVAL_UNDEF(&_8$$9); ZVAL_UNDEF(&escapeChar); ZVAL_UNDEF(&bindCounts); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_ZVAL(expression) @@ -2620,10 +2441,8 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionOrderBy) Z_PARAM_STR_OR_NULL(escapeChar) Z_PARAM_ARRAY(bindCounts) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &expression, &escapeChar_param, &bindCounts_param); if (!escapeChar_param) { ZEPHIR_INIT_VAR(&escapeChar); @@ -2636,8 +2455,6 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionOrderBy) } else { ZEPHIR_OBS_COPY_OR_DUP(&bindCounts, bindCounts_param); } - - ZEPHIR_INIT_VAR(&fieldSql); ZVAL_NULL(&fieldSql); if (Z_TYPE_P(expression) == IS_ARRAY) { @@ -2684,7 +2501,7 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionOrderBy) return; } zephir_array_fetch_long(&_6$$7, &field, 0, PH_NOISY | PH_READONLY, "phalcon/Db/Dialect.zep", 1053); - ZEPHIR_CALL_METHOD(&fieldSql, this_ptr, "getsqlexpression", &_3, 49, &_6$$7, &escapeChar, &bindCounts); + ZEPHIR_CALL_METHOD(&fieldSql, this_ptr, "getsqlexpression", &_3, 50, &_6$$7, &escapeChar, &bindCounts); zephir_check_call_status(); ZEPHIR_OBS_NVAR(&type); _7$$7 = zephir_array_isset_long_fetch(&type, &field, 1, 0); @@ -2728,17 +2545,14 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionQualified) ZVAL_UNDEF(&column); ZVAL_UNDEF(&domain); ZVAL_UNDEF(&escapeChar); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(expression) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(escapeChar) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &expression_param, &escapeChar_param); ZEPHIR_OBS_COPY_OR_DUP(&expression, expression_param); if (!escapeChar_param) { @@ -2746,11 +2560,9 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionQualified) } else { zephir_get_strval(&escapeChar, escapeChar_param); } - - - ZEPHIR_OBS_VAR(&column); + zephir_memory_observe(&column); zephir_array_fetch_string(&column, &expression, SL("name"), PH_NOISY, "phalcon/Db/Dialect.zep", 1083); - ZEPHIR_OBS_VAR(&domain); + zephir_memory_observe(&domain); if (!(zephir_array_isset_string_fetch(&domain, &expression, SL("domain"), 0))) { ZEPHIR_INIT_NVAR(&domain); ZVAL_NULL(&domain); @@ -2781,7 +2593,6 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionScalar) ZVAL_UNDEF(&value); ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&escapeChar); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_ARRAY(expression) @@ -2789,10 +2600,8 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionScalar) Z_PARAM_STR_OR_NULL(escapeChar) Z_PARAM_ARRAY(bindCounts) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &expression_param, &escapeChar_param, &bindCounts_param); ZEPHIR_OBS_COPY_OR_DUP(&expression, expression_param); if (!escapeChar_param) { @@ -2806,15 +2615,13 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionScalar) } else { ZEPHIR_OBS_COPY_OR_DUP(&bindCounts, bindCounts_param); } - - if (zephir_array_isset_string(&expression, SL("column"))) { zephir_array_fetch_string(&_0$$3, &expression, SL("column"), PH_NOISY | PH_READONLY, "phalcon/Db/Dialect.zep", 1107); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getsqlcolumn", NULL, 43, &_0$$3); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getsqlcolumn", NULL, 44, &_0$$3); zephir_check_call_status(); RETURN_MM(); } - ZEPHIR_OBS_VAR(&value); + zephir_memory_observe(&value); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&value, &expression, SL("value"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_db_exception_ce, "Invalid SQL expression", "phalcon/Db/Dialect.zep", 1111); return; @@ -2854,7 +2661,6 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionUnaryOperations) ZVAL_UNDEF(&_2$$4); ZVAL_UNDEF(&_3$$4); ZVAL_UNDEF(&escapeChar); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_ARRAY(expression) @@ -2862,10 +2668,8 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionUnaryOperations) Z_PARAM_STR_OR_NULL(escapeChar) Z_PARAM_ARRAY(bindCounts) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &expression_param, &escapeChar_param, &bindCounts_param); ZEPHIR_OBS_COPY_OR_DUP(&expression, expression_param); if (!escapeChar_param) { @@ -2879,9 +2683,7 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionUnaryOperations) } else { ZEPHIR_OBS_COPY_OR_DUP(&bindCounts, bindCounts_param); } - - - ZEPHIR_OBS_VAR(&left); + zephir_memory_observe(&left); if (zephir_array_isset_string_fetch(&left, &expression, SL("left"), 0)) { ZEPHIR_CALL_METHOD(&_0$$3, this_ptr, "getsqlexpression", NULL, 0, &left, &escapeChar, &bindCounts); zephir_check_call_status(); @@ -2889,10 +2691,10 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionUnaryOperations) ZEPHIR_CONCAT_VSV(return_value, &_0$$3, " ", &_1$$3); RETURN_MM(); } - ZEPHIR_OBS_VAR(&right); + zephir_memory_observe(&right); if (zephir_array_isset_string_fetch(&right, &expression, SL("right"), 0)) { zephir_array_fetch_string(&_2$$4, &expression, SL("op"), PH_NOISY | PH_READONLY, "phalcon/Db/Dialect.zep", 1145); - ZEPHIR_CALL_METHOD(&_3$$4, this_ptr, "getsqlexpression", NULL, 49, &right, &escapeChar, &bindCounts); + ZEPHIR_CALL_METHOD(&_3$$4, this_ptr, "getsqlexpression", NULL, 50, &right, &escapeChar, &bindCounts); zephir_check_call_status(); ZEPHIR_CONCAT_VSV(return_value, &_2$$4, " ", &_3$$4); RETURN_MM(); @@ -2923,7 +2725,6 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionWhere) ZVAL_UNDEF(&whereSql); ZVAL_UNDEF(&escapeChar); ZVAL_UNDEF(&bindCounts); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_ZVAL(expression) @@ -2931,10 +2732,8 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionWhere) Z_PARAM_STR_OR_NULL(escapeChar) Z_PARAM_ARRAY(bindCounts) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &expression, &escapeChar_param, &bindCounts_param); if (!escapeChar_param) { ZEPHIR_INIT_VAR(&escapeChar); @@ -2947,8 +2746,6 @@ PHP_METHOD(Phalcon_Db_Dialect, getSqlExpressionWhere) } else { ZEPHIR_OBS_COPY_OR_DUP(&bindCounts, bindCounts_param); } - - if (Z_TYPE_P(expression) == IS_ARRAY) { ZEPHIR_CALL_METHOD(&whereSql, this_ptr, "getsqlexpression", NULL, 0, expression, &escapeChar, &bindCounts); zephir_check_call_status(); @@ -2974,7 +2771,6 @@ PHP_METHOD(Phalcon_Db_Dialect, prepareColumnAlias) ZVAL_UNDEF(&alias); ZVAL_UNDEF(&escapeChar); ZVAL_UNDEF(&_0$$3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(qualified) @@ -2982,10 +2778,8 @@ PHP_METHOD(Phalcon_Db_Dialect, prepareColumnAlias) Z_PARAM_STR_OR_NULL(alias) Z_PARAM_STR_OR_NULL(escapeChar) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &qualified_param, &alias_param, &escapeChar_param); if (UNEXPECTED(Z_TYPE_P(qualified_param) != IS_STRING && Z_TYPE_P(qualified_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'qualified' must be of the type string")); @@ -3006,10 +2800,8 @@ PHP_METHOD(Phalcon_Db_Dialect, prepareColumnAlias) } else { zephir_get_strval(&escapeChar, escapeChar_param); } - - if (!ZEPHIR_IS_STRING(&alias, "")) { - ZEPHIR_CALL_METHOD(&_0$$3, this_ptr, "escape", NULL, 56, &alias, &escapeChar); + ZEPHIR_CALL_METHOD(&_0$$3, this_ptr, "escape", NULL, 57, &alias, &escapeChar); zephir_check_call_status(); ZEPHIR_CONCAT_VSV(return_value, &qualified, " AS ", &_0$$3); RETURN_MM(); @@ -3037,7 +2829,6 @@ PHP_METHOD(Phalcon_Db_Dialect, prepareTable) ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$4); ZVAL_UNDEF(&_4$$4); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 4) Z_PARAM_STR(table) @@ -3046,10 +2837,8 @@ PHP_METHOD(Phalcon_Db_Dialect, prepareTable) Z_PARAM_STR_OR_NULL(alias) Z_PARAM_STR_OR_NULL(escapeChar) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 3, &table_param, &schema_param, &alias_param, &escapeChar_param); if (UNEXPECTED(Z_TYPE_P(table_param) != IS_STRING && Z_TYPE_P(table_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'table' must be of the type string")); @@ -3075,20 +2864,18 @@ PHP_METHOD(Phalcon_Db_Dialect, prepareTable) } else { zephir_get_strval(&escapeChar, escapeChar_param); } - - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "escape", NULL, 56, &table, &escapeChar); + ZEPHIR_CALL_METHOD(&_0, this_ptr, "escape", NULL, 57, &table, &escapeChar); zephir_check_call_status(); zephir_get_strval(&table, &_0); if (!ZEPHIR_IS_STRING(&schema, "")) { - ZEPHIR_CALL_METHOD(&_1$$3, this_ptr, "escapeschema", NULL, 66, &schema, &escapeChar); + ZEPHIR_CALL_METHOD(&_1$$3, this_ptr, "escapeschema", NULL, 67, &schema, &escapeChar); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_2$$3); ZEPHIR_CONCAT_VSV(&_2$$3, &_1$$3, ".", &table); zephir_get_strval(&table, &_2$$3); } if (!ZEPHIR_IS_STRING(&alias, "")) { - ZEPHIR_CALL_METHOD(&_3$$4, this_ptr, "escape", NULL, 56, &alias, &escapeChar); + ZEPHIR_CALL_METHOD(&_3$$4, this_ptr, "escape", NULL, 57, &alias, &escapeChar); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_4$$4); ZEPHIR_CONCAT_VSV(&_4$$4, &table, " AS ", &_3$$4); @@ -3112,7 +2899,6 @@ PHP_METHOD(Phalcon_Db_Dialect, prepareQualified) ZVAL_UNDEF(&domain); ZVAL_UNDEF(&escapeChar); ZVAL_UNDEF(&_0$$3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(column) @@ -3120,10 +2906,8 @@ PHP_METHOD(Phalcon_Db_Dialect, prepareQualified) Z_PARAM_STR_OR_NULL(domain) Z_PARAM_STR_OR_NULL(escapeChar) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &column_param, &domain_param, &escapeChar_param); if (UNEXPECTED(Z_TYPE_P(column_param) != IS_STRING && Z_TYPE_P(column_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'column' must be of the type string")); @@ -3144,16 +2928,14 @@ PHP_METHOD(Phalcon_Db_Dialect, prepareQualified) } else { zephir_get_strval(&escapeChar, escapeChar_param); } - - if (!ZEPHIR_IS_STRING(&domain, "")) { ZEPHIR_INIT_VAR(&_0$$3); ZEPHIR_CONCAT_VSV(&_0$$3, &domain, ".", &column); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "escape", NULL, 56, &_0$$3, &escapeChar); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "escape", NULL, 57, &_0$$3, &escapeChar); zephir_check_call_status(); RETURN_MM(); } - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "escape", NULL, 56, &column, &escapeChar); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "escape", NULL, 57, &column, &escapeChar); zephir_check_call_status(); RETURN_MM(); } @@ -3166,7 +2948,8 @@ zend_object *zephir_init_properties_Phalcon_Db_Dialect(zend_class_entry *class_t ZVAL_UNDEF(&_1$$3); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/db/dialect.zep.h b/ext/phalcon/db/dialect.zep.h index 953df356547..4776d1d6d36 100644 --- a/ext/phalcon/db/dialect.zep.h +++ b/ext/phalcon/db/dialect.zep.h @@ -67,11 +67,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_dialect_getcolumnlist, 0, 1, IS_STRING, 0) ZEND_ARG_ARRAY_INFO(0, columnList, 0) ZEND_ARG_TYPE_INFO(0, escapeChar, IS_STRING, 1) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindCounts, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_dialect_getcustomfunctions, 0, 0, IS_ARRAY, 0) @@ -80,21 +76,13 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_dialect_getsqlcolumn, 0, 1, IS_STRING, 0) ZEND_ARG_INFO(0, column) ZEND_ARG_TYPE_INFO(0, escapeChar, IS_STRING, 1) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindCounts, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_dialect_getsqlexpression, 0, 1, IS_STRING, 0) ZEND_ARG_ARRAY_INFO(0, expression, 0) ZEND_ARG_TYPE_INFO(0, escapeChar, IS_STRING, 1) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindCounts, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_dialect_getsqltable, 0, 1, IS_STRING, 0) @@ -154,41 +142,25 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_dialect_getsqlexpressionbinaryoperations, 0, 1, IS_STRING, 0) ZEND_ARG_ARRAY_INFO(0, expression, 0) ZEND_ARG_TYPE_INFO(0, escapeChar, IS_STRING, 1) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindCounts, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_dialect_getsqlexpressioncase, 0, 1, IS_STRING, 0) ZEND_ARG_ARRAY_INFO(0, expression, 0) ZEND_ARG_TYPE_INFO(0, escapeChar, IS_STRING, 1) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindCounts, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_dialect_getsqlexpressioncastvalue, 0, 1, IS_STRING, 0) ZEND_ARG_ARRAY_INFO(0, expression, 0) ZEND_ARG_TYPE_INFO(0, escapeChar, IS_STRING, 1) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindCounts, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_dialect_getsqlexpressionconvertvalue, 0, 1, IS_STRING, 0) ZEND_ARG_ARRAY_INFO(0, expression, 0) ZEND_ARG_TYPE_INFO(0, escapeChar, IS_STRING, 1) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindCounts, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_dialect_getsqlexpressionfrom, 0, 1, IS_STRING, 0) @@ -199,81 +171,49 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_dialect_getsqlexpressionfunctioncall, 0, 1, IS_STRING, 0) ZEND_ARG_ARRAY_INFO(0, expression, 0) ZEND_ARG_TYPE_INFO(0, escapeChar, IS_STRING, 1) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindCounts, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_dialect_getsqlexpressiongroupby, 0, 1, IS_STRING, 0) ZEND_ARG_INFO(0, expression) ZEND_ARG_TYPE_INFO(0, escapeChar, IS_STRING, 1) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindCounts, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_dialect_getsqlexpressionhaving, 0, 1, IS_STRING, 0) ZEND_ARG_ARRAY_INFO(0, expression, 0) ZEND_ARG_TYPE_INFO(0, escapeChar, IS_STRING, 1) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindCounts, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_dialect_getsqlexpressionjoins, 0, 1, IS_STRING, 0) ZEND_ARG_INFO(0, expression) ZEND_ARG_TYPE_INFO(0, escapeChar, IS_STRING, 1) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindCounts, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_dialect_getsqlexpressionlimit, 0, 1, IS_STRING, 0) ZEND_ARG_INFO(0, expression) ZEND_ARG_TYPE_INFO(0, escapeChar, IS_STRING, 1) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindCounts, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_dialect_getsqlexpressionlist, 0, 1, IS_STRING, 0) ZEND_ARG_ARRAY_INFO(0, expression, 0) ZEND_ARG_TYPE_INFO(0, escapeChar, IS_STRING, 1) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindCounts, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_dialect_getsqlexpressionobject, 0, 1, IS_STRING, 0) ZEND_ARG_ARRAY_INFO(0, expression, 0) ZEND_ARG_TYPE_INFO(0, escapeChar, IS_STRING, 1) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindCounts, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_dialect_getsqlexpressionorderby, 0, 1, IS_STRING, 0) ZEND_ARG_INFO(0, expression) ZEND_ARG_TYPE_INFO(0, escapeChar, IS_STRING, 1) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindCounts, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_dialect_getsqlexpressionqualified, 0, 1, IS_STRING, 0) @@ -284,31 +224,19 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_dialect_getsqlexpressionscalar, 0, 1, IS_STRING, 0) ZEND_ARG_ARRAY_INFO(0, expression, 0) ZEND_ARG_TYPE_INFO(0, escapeChar, IS_STRING, 1) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindCounts, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_dialect_getsqlexpressionunaryoperations, 0, 1, IS_STRING, 0) ZEND_ARG_ARRAY_INFO(0, expression, 0) ZEND_ARG_TYPE_INFO(0, escapeChar, IS_STRING, 1) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindCounts, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_dialect_getsqlexpressionwhere, 0, 1, IS_STRING, 0) ZEND_ARG_INFO(0, expression) ZEND_ARG_TYPE_INFO(0, escapeChar, IS_STRING, 1) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindCounts, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_dialect_preparecolumnalias, 0, 1, IS_STRING, 0) diff --git a/ext/phalcon/db/dialect/mysql.zep.c b/ext/phalcon/db/dialect/mysql.zep.c index 14c6e3f33b1..054c96f251c 100644 --- a/ext/phalcon/db/dialect/mysql.zep.c +++ b/ext/phalcon/db/dialect/mysql.zep.c @@ -78,17 +78,13 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, addColumn) ZVAL_UNDEF(&_12$$7); ZVAL_UNDEF(&_13$$7); ZVAL_UNDEF(&_16$$11); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) Z_PARAM_OBJECT_OF_CLASS(column, phalcon_db_columninterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &tableName_param, &schemaName_param, &column); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -108,8 +104,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, addColumn) } else { ZEPHIR_INIT_VAR(&schemaName); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "preparetable", NULL, 0, &tableName, &schemaName); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_1, column, "getname", NULL, 0); @@ -143,7 +137,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, addColumn) } _8$$5 = _7$$5; if (!(_8$$5)) { - ZEPHIR_CALL_FUNCTION(&_9$$5, "is_float", NULL, 213, &defaultValue); + ZEPHIR_CALL_FUNCTION(&_9$$5, "is_float", NULL, 214, &defaultValue); zephir_check_call_status(); _8$$5 = zephir_is_true(&_9$$5); } @@ -154,7 +148,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, addColumn) } else { ZEPHIR_INIT_VAR(&_11$$7); ZVAL_STRING(&_11$$7, "\""); - ZEPHIR_CALL_FUNCTION(&_12$$7, "addcslashes", NULL, 214, &defaultValue, &_11$$7); + ZEPHIR_CALL_FUNCTION(&_12$$7, "addcslashes", NULL, 215, &defaultValue, &_11$$7); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_13$$7); ZEPHIR_CONCAT_SVS(&_13$$7, " DEFAULT \"", &_12$$7, "\""); @@ -214,17 +208,13 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, addForeignKey) ZVAL_UNDEF(&_4$$3); ZVAL_UNDEF(&_13$$4); ZVAL_UNDEF(&_14$$5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) Z_PARAM_OBJECT_OF_CLASS(reference, phalcon_db_referenceinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &tableName_param, &schemaName_param, &reference); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -244,8 +234,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, addForeignKey) } else { ZEPHIR_INIT_VAR(&schemaName); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "preparetable", NULL, 0, &tableName, &schemaName); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_1); @@ -262,7 +250,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, addForeignKey) } ZEPHIR_CALL_METHOD(&_6, reference, "getcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_5, this_ptr, "getcolumnlist", NULL, 57, &_6); + ZEPHIR_CALL_METHOD(&_5, this_ptr, "getcolumnlist", NULL, 58, &_6); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_8, reference, "getreferencedtable", NULL, 0); zephir_check_call_status(); @@ -272,7 +260,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, addForeignKey) zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_11, reference, "getreferencedcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_10, this_ptr, "getcolumnlist", NULL, 57, &_11); + ZEPHIR_CALL_METHOD(&_10, this_ptr, "getcolumnlist", NULL, 58, &_11); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_12); ZEPHIR_CONCAT_SVSVSVS(&_12, " FOREIGN KEY (", &_5, ") REFERENCES ", &_7, "(", &_10, ")"); @@ -317,17 +305,13 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, addIndex) ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_6); ZVAL_UNDEF(&_2$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) Z_PARAM_OBJECT_OF_CLASS(index, phalcon_db_indexinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &tableName_param, &schemaName_param, &index); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -347,8 +331,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, addIndex) } else { ZEPHIR_INIT_VAR(&schemaName); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "preparetable", NULL, 0, &tableName, &schemaName); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_1); @@ -367,7 +349,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, addIndex) zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_5, index, "getcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_4, this_ptr, "getcolumnlist", NULL, 57, &_5); + ZEPHIR_CALL_METHOD(&_4, this_ptr, "getcolumnlist", NULL, 58, &_5); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_6); ZEPHIR_CONCAT_SVSVS(&_6, "`", &_3, "` (", &_4, ")"); @@ -392,17 +374,13 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, addPrimaryKey) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) Z_PARAM_OBJECT_OF_CLASS(index, phalcon_db_indexinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &tableName_param, &schemaName_param, &index); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -422,13 +400,11 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, addPrimaryKey) } else { ZEPHIR_INIT_VAR(&schemaName); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "preparetable", NULL, 0, &tableName, &schemaName); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_2, index, "getcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_1, this_ptr, "getcolumnlist", NULL, 57, &_2); + ZEPHIR_CALL_METHOD(&_1, this_ptr, "getcolumnlist", NULL, 58, &_2); zephir_check_call_status(); ZEPHIR_CONCAT_SVSVS(return_value, "ALTER TABLE ", &_0, " ADD PRIMARY KEY (", &_1, ")"); RETURN_MM(); @@ -548,17 +524,13 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, createTable) ZVAL_UNDEF(&_89$$43); ZVAL_UNDEF(&definition); ZVAL_UNDEF(&createLines); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) Z_PARAM_ARRAY(definition) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &tableName_param, &schemaName_param, &definition_param); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -579,9 +551,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, createTable) ZEPHIR_INIT_VAR(&schemaName); } ZEPHIR_OBS_COPY_OR_DUP(&definition, definition_param); - - - ZEPHIR_OBS_VAR(&columns); + zephir_memory_observe(&columns); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&columns, &definition, SL("columns"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_db_exception_ce, "The index 'columns' is required in the definition array", "phalcon/Db/Dialect/Mysql.zep", 151); return; @@ -590,7 +560,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, createTable) zephir_check_call_status(); ZEPHIR_INIT_VAR(&temporary); ZVAL_BOOL(&temporary, 0); - ZEPHIR_OBS_VAR(&options); + zephir_memory_observe(&options); if (zephir_array_isset_string_fetch(&options, &definition, SL("options"), 0)) { ZEPHIR_OBS_NVAR(&temporary); zephir_array_isset_string_fetch(&temporary, &options, SL("temporary"), 0); @@ -642,7 +612,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, createTable) } _11$$10 = _10$$10; if (!(_11$$10)) { - ZEPHIR_CALL_FUNCTION(&_12$$10, "is_float", &_13, 213, &defaultValue); + ZEPHIR_CALL_FUNCTION(&_12$$10, "is_float", &_13, 214, &defaultValue); zephir_check_call_status(); _11$$10 = zephir_is_true(&_12$$10); } @@ -653,7 +623,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, createTable) } else { ZEPHIR_INIT_NVAR(&_15$$12); ZVAL_STRING(&_15$$12, "\""); - ZEPHIR_CALL_FUNCTION(&_16$$12, "addcslashes", &_17, 214, &defaultValue, &_15$$12); + ZEPHIR_CALL_FUNCTION(&_16$$12, "addcslashes", &_17, 215, &defaultValue, &_15$$12); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_18$$12); ZEPHIR_CONCAT_SVS(&_18$$12, " DEFAULT \"", &_16$$12, "\""); @@ -722,7 +692,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, createTable) } _30$$19 = _29$$19; if (!(_30$$19)) { - ZEPHIR_CALL_FUNCTION(&_31$$19, "is_float", &_13, 213, &defaultValue); + ZEPHIR_CALL_FUNCTION(&_31$$19, "is_float", &_13, 214, &defaultValue); zephir_check_call_status(); _30$$19 = zephir_is_true(&_31$$19); } @@ -733,7 +703,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, createTable) } else { ZEPHIR_INIT_NVAR(&_33$$21); ZVAL_STRING(&_33$$21, "\""); - ZEPHIR_CALL_FUNCTION(&_34$$21, "addcslashes", &_17, 214, &defaultValue, &_33$$21); + ZEPHIR_CALL_FUNCTION(&_34$$21, "addcslashes", &_17, 215, &defaultValue, &_33$$21); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_35$$21); ZEPHIR_CONCAT_SVS(&_35$$21, " DEFAULT \"", &_34$$21, "\""); @@ -765,7 +735,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, createTable) } } ZEPHIR_INIT_NVAR(&column); - ZEPHIR_OBS_VAR(&indexes); + zephir_memory_observe(&indexes); if (zephir_array_isset_string_fetch(&indexes, &definition, SL("indexes"), 0)) { zephir_is_iterable(&indexes, 0, "phalcon/Db/Dialect/Mysql.zep", 248); if (Z_TYPE_P(&indexes) == IS_ARRAY) { @@ -780,7 +750,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, createTable) if (ZEPHIR_IS_STRING(&indexName, "PRIMARY")) { ZEPHIR_CALL_METHOD(&_44$$27, &index, "getcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_43$$27, this_ptr, "getcolumnlist", &_45, 57, &_44$$27); + ZEPHIR_CALL_METHOD(&_43$$27, this_ptr, "getcolumnlist", &_45, 58, &_44$$27); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_46$$27); ZEPHIR_CONCAT_SVS(&_46$$27, "PRIMARY KEY (", &_43$$27, ")"); @@ -789,7 +759,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, createTable) if (!(ZEPHIR_IS_EMPTY(&indexType))) { ZEPHIR_CALL_METHOD(&_48$$29, &index, "getcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_47$$29, this_ptr, "getcolumnlist", &_45, 57, &_48$$29); + ZEPHIR_CALL_METHOD(&_47$$29, this_ptr, "getcolumnlist", &_45, 58, &_48$$29); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_49$$29); ZEPHIR_CONCAT_VSVSVS(&_49$$29, &indexType, " KEY `", &indexName, "` (", &_47$$29, ")"); @@ -797,7 +767,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, createTable) } else { ZEPHIR_CALL_METHOD(&_51$$30, &index, "getcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_50$$30, this_ptr, "getcolumnlist", &_45, 57, &_51$$30); + ZEPHIR_CALL_METHOD(&_50$$30, this_ptr, "getcolumnlist", &_45, 58, &_51$$30); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_52$$30); ZEPHIR_CONCAT_SVSVS(&_52$$30, "KEY `", &indexName, "` (", &_50$$30, ")"); @@ -824,7 +794,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, createTable) if (ZEPHIR_IS_STRING(&indexName, "PRIMARY")) { ZEPHIR_CALL_METHOD(&_54$$32, &index, "getcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_53$$32, this_ptr, "getcolumnlist", &_45, 57, &_54$$32); + ZEPHIR_CALL_METHOD(&_53$$32, this_ptr, "getcolumnlist", &_45, 58, &_54$$32); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_55$$32); ZEPHIR_CONCAT_SVS(&_55$$32, "PRIMARY KEY (", &_53$$32, ")"); @@ -833,7 +803,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, createTable) if (!(ZEPHIR_IS_EMPTY(&indexType))) { ZEPHIR_CALL_METHOD(&_57$$34, &index, "getcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_56$$34, this_ptr, "getcolumnlist", &_45, 57, &_57$$34); + ZEPHIR_CALL_METHOD(&_56$$34, this_ptr, "getcolumnlist", &_45, 58, &_57$$34); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_58$$34); ZEPHIR_CONCAT_VSVSVS(&_58$$34, &indexType, " KEY `", &indexName, "` (", &_56$$34, ")"); @@ -841,7 +811,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, createTable) } else { ZEPHIR_CALL_METHOD(&_60$$35, &index, "getcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_59$$35, this_ptr, "getcolumnlist", &_45, 57, &_60$$35); + ZEPHIR_CALL_METHOD(&_59$$35, this_ptr, "getcolumnlist", &_45, 58, &_60$$35); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_61$$35); ZEPHIR_CONCAT_SVSVS(&_61$$35, "KEY `", &indexName, "` (", &_59$$35, ")"); @@ -855,7 +825,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, createTable) } ZEPHIR_INIT_NVAR(&index); } - ZEPHIR_OBS_VAR(&references); + zephir_memory_observe(&references); if (zephir_array_isset_string_fetch(&references, &definition, SL("references"), 0)) { zephir_is_iterable(&references, 0, "phalcon/Db/Dialect/Mysql.zep", 270); if (Z_TYPE_P(&references) == IS_ARRAY) { @@ -867,7 +837,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, createTable) zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_66$$37, &reference, "getcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_65$$37, this_ptr, "getcolumnlist", &_45, 57, &_66$$37); + ZEPHIR_CALL_METHOD(&_65$$37, this_ptr, "getcolumnlist", &_45, 58, &_66$$37); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_68$$37, &reference, "getreferencedtable", NULL, 0); zephir_check_call_status(); @@ -877,7 +847,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, createTable) zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_71$$37, &reference, "getreferencedcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_70$$37, this_ptr, "getcolumnlist", &_45, 57, &_71$$37); + ZEPHIR_CALL_METHOD(&_70$$37, this_ptr, "getcolumnlist", &_45, 58, &_71$$37); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_72$$37); ZEPHIR_CONCAT_SVSVSSVSVS(&_72$$37, "CONSTRAINT `", &_64$$37, "` FOREIGN KEY (", &_65$$37, ")", " REFERENCES ", &_67$$37, " (", &_70$$37, ")"); @@ -913,7 +883,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, createTable) zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_77$$40, &reference, "getcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_76$$40, this_ptr, "getcolumnlist", &_45, 57, &_77$$40); + ZEPHIR_CALL_METHOD(&_76$$40, this_ptr, "getcolumnlist", &_45, 58, &_77$$40); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_79$$40, &reference, "getreferencedtable", NULL, 0); zephir_check_call_status(); @@ -923,7 +893,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, createTable) zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_82$$40, &reference, "getreferencedcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_81$$40, this_ptr, "getcolumnlist", &_45, 57, &_82$$40); + ZEPHIR_CALL_METHOD(&_81$$40, this_ptr, "getcolumnlist", &_45, 58, &_82$$40); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_83$$40); ZEPHIR_CONCAT_SVSVSSVSVS(&_83$$40, "CONSTRAINT `", &_75$$40, "` FOREIGN KEY (", &_76$$40, ")", " REFERENCES ", &_78$$40, " (", &_81$$40, ")"); @@ -981,7 +951,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, createView) ZVAL_UNDEF(&viewSql); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&definition); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(viewName) @@ -989,10 +958,8 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, createView) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schemaName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &viewName_param, &definition_param, &schemaName_param); if (UNEXPECTED(Z_TYPE_P(viewName_param) != IS_STRING && Z_TYPE_P(viewName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'viewName' must be of the type string")); @@ -1009,9 +976,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, createView) } else { zephir_get_strval(&schemaName, schemaName_param); } - - - ZEPHIR_OBS_VAR(&viewSql); + zephir_memory_observe(&viewSql); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&viewSql, &definition, SL("sql"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_db_exception_ce, "The index 'sql' is required in the definition array", "phalcon/Db/Dialect/Mysql.zep", 291); return; @@ -1042,17 +1007,14 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, describeColumns) ZVAL_UNDEF(&table); ZVAL_UNDEF(&schema); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(table) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schema) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &table_param, &schema_param); if (UNEXPECTED(Z_TYPE_P(table_param) != IS_STRING && Z_TYPE_P(table_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'table' must be of the type string")); @@ -1068,8 +1030,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, describeColumns) } else { zephir_get_strval(&schema, schema_param); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "preparetable", NULL, 0, &table, &schema); zephir_check_call_status(); ZEPHIR_CONCAT_SV(return_value, "SHOW FULL COLUMNS FROM ", &_0); @@ -1090,17 +1050,14 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, describeIndexes) ZVAL_UNDEF(&table); ZVAL_UNDEF(&schema); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(table) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schema) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &table_param, &schema_param); if (UNEXPECTED(Z_TYPE_P(table_param) != IS_STRING && Z_TYPE_P(table_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'table' must be of the type string")); @@ -1116,8 +1073,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, describeIndexes) } else { zephir_get_strval(&schema, schema_param); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "preparetable", NULL, 0, &table, &schema); zephir_check_call_status(); ZEPHIR_CONCAT_SV(return_value, "SHOW INDEXES FROM ", &_0); @@ -1132,24 +1087,20 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, describeReferences) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *table_param = NULL, *schema_param = NULL; zval table, schema, sql, _0$$3, _1$$4; - zval *this_ptr = getThis(); ZVAL_UNDEF(&table); ZVAL_UNDEF(&schema); ZVAL_UNDEF(&sql); ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_1$$4); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(table) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schema) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &table_param, &schema_param); if (UNEXPECTED(Z_TYPE_P(table_param) != IS_STRING && Z_TYPE_P(table_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'table' must be of the type string")); @@ -1165,8 +1116,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, describeReferences) } else { zephir_get_strval(&schema, schema_param); } - - ZEPHIR_INIT_VAR(&sql); ZVAL_STRING(&sql, "SELECT DISTINCT KCU.TABLE_NAME, KCU.COLUMN_NAME, KCU.CONSTRAINT_NAME, KCU.REFERENCED_TABLE_SCHEMA, KCU.REFERENCED_TABLE_NAME, KCU.REFERENCED_COLUMN_NAME, RC.UPDATE_RULE, RC.DELETE_RULE FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE AS KCU LEFT JOIN INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS AS RC ON RC.CONSTRAINT_NAME = KCU.CONSTRAINT_NAME AND RC.CONSTRAINT_SCHEMA = KCU.CONSTRAINT_SCHEMA WHERE KCU.REFERENCED_TABLE_NAME IS NOT NULL AND "); if (!(ZEPHIR_IS_EMPTY(&schema))) { @@ -1196,17 +1145,13 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, dropColumn) ZVAL_UNDEF(&schemaName); ZVAL_UNDEF(&columnName); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) Z_PARAM_STR(columnName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &tableName_param, &schemaName_param, &columnName_param); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -1235,8 +1180,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, dropColumn) } else { ZEPHIR_INIT_VAR(&columnName); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "preparetable", NULL, 0, &tableName, &schemaName); zephir_check_call_status(); ZEPHIR_CONCAT_SVSVS(return_value, "ALTER TABLE ", &_0, " DROP COLUMN `", &columnName, "`"); @@ -1258,17 +1201,13 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, dropForeignKey) ZVAL_UNDEF(&schemaName); ZVAL_UNDEF(&referenceName); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) Z_PARAM_STR(referenceName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &tableName_param, &schemaName_param, &referenceName_param); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -1297,8 +1236,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, dropForeignKey) } else { ZEPHIR_INIT_VAR(&referenceName); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "preparetable", NULL, 0, &tableName, &schemaName); zephir_check_call_status(); ZEPHIR_CONCAT_SVSVS(return_value, "ALTER TABLE ", &_0, " DROP FOREIGN KEY `", &referenceName, "`"); @@ -1320,17 +1257,13 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, dropIndex) ZVAL_UNDEF(&schemaName); ZVAL_UNDEF(&indexName); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) Z_PARAM_STR(indexName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &tableName_param, &schemaName_param, &indexName_param); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -1359,8 +1292,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, dropIndex) } else { ZEPHIR_INIT_VAR(&indexName); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "preparetable", NULL, 0, &tableName, &schemaName); zephir_check_call_status(); ZEPHIR_CONCAT_SVSVS(return_value, "ALTER TABLE ", &_0, " DROP INDEX `", &indexName, "`"); @@ -1381,16 +1312,12 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, dropPrimaryKey) ZVAL_UNDEF(&tableName); ZVAL_UNDEF(&schemaName); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &tableName_param, &schemaName_param); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -1410,8 +1337,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, dropPrimaryKey) } else { ZEPHIR_INIT_VAR(&schemaName); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "preparetable", NULL, 0, &tableName, &schemaName); zephir_check_call_status(); ZEPHIR_CONCAT_SVS(return_value, "ALTER TABLE ", &_0, " DROP PRIMARY KEY"); @@ -1433,7 +1358,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, dropTable) ZVAL_UNDEF(&tableName); ZVAL_UNDEF(&schemaName); ZVAL_UNDEF(&table); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(tableName) @@ -1441,10 +1365,8 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, dropTable) Z_PARAM_STR_OR_NULL(schemaName) Z_PARAM_BOOL(ifExists) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &tableName_param, &schemaName_param, &ifExists_param); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -1469,8 +1391,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, dropTable) } ifExists = (Z_TYPE_P(ifExists_param) == IS_TRUE); } - - ZEPHIR_CALL_METHOD(&table, this_ptr, "preparetable", NULL, 0, &tableName, &schemaName); zephir_check_call_status(); if (ifExists) { @@ -1496,7 +1416,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, dropView) ZVAL_UNDEF(&viewName); ZVAL_UNDEF(&schemaName); ZVAL_UNDEF(&view); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(viewName) @@ -1504,10 +1423,8 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, dropView) Z_PARAM_STR_OR_NULL(schemaName) Z_PARAM_BOOL(ifExists) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &viewName_param, &schemaName_param, &ifExists_param); if (UNEXPECTED(Z_TYPE_P(viewName_param) != IS_STRING && Z_TYPE_P(viewName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'viewName' must be of the type string")); @@ -1532,8 +1449,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, dropView) } ifExists = (Z_TYPE_P(ifExists_param) == IS_TRUE); } - - ZEPHIR_CALL_METHOD(&view, this_ptr, "preparetable", NULL, 0, &viewName, &schemaName); zephir_check_call_status(); if (ifExists) { @@ -1612,18 +1527,12 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, getColumnDefinition) ZVAL_UNDEF(&_50$$64); ZVAL_UNDEF(&_51$$64); ZVAL_UNDEF(&_52$$64); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(column, phalcon_db_columninterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &column); - - ZEPHIR_CALL_METHOD(&columnSql, this_ptr, "checkcolumntypesql", NULL, 0, column); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&columnType, this_ptr, "checkcolumntype", NULL, 0, column); @@ -1635,7 +1544,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, getColumnDefinition) } ZEPHIR_CALL_METHOD(&_0$$3, this_ptr, "getcolumnsize", NULL, 0, column); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_1$$3, this_ptr, "checkcolumnunsigned", NULL, 215, column); + ZEPHIR_CALL_METHOD(&_1$$3, this_ptr, "checkcolumnunsigned", NULL, 216, column); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_2$$3); ZEPHIR_CONCAT_VV(&_2$$3, &_0$$3, &_1$$3); @@ -1697,7 +1606,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, getColumnDefinition) } ZEPHIR_CALL_METHOD(&_7$$18, this_ptr, "getcolumnsizeandscale", NULL, 0, column); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_8$$18, this_ptr, "checkcolumnunsigned", NULL, 215, column); + ZEPHIR_CALL_METHOD(&_8$$18, this_ptr, "checkcolumnunsigned", NULL, 216, column); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_9$$18); ZEPHIR_CONCAT_VV(&_9$$18, &_7$$18, &_8$$18); @@ -1708,9 +1617,9 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, getColumnDefinition) if (ZEPHIR_IS_EMPTY(&columnSql)) { zephir_concat_self_str(&columnSql, SL("DOUBLE")); } - ZEPHIR_CALL_METHOD(&_10$$20, this_ptr, "checkcolumnsizeandscale", NULL, 216, column); + ZEPHIR_CALL_METHOD(&_10$$20, this_ptr, "checkcolumnsizeandscale", NULL, 217, column); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_11$$20, this_ptr, "checkcolumnunsigned", NULL, 215, column); + ZEPHIR_CALL_METHOD(&_11$$20, this_ptr, "checkcolumnunsigned", NULL, 216, column); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_12$$20); ZEPHIR_CONCAT_VV(&_12$$20, &_10$$20, &_11$$20); @@ -1730,9 +1639,9 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, getColumnDefinition) if (ZEPHIR_IS_EMPTY(&columnSql)) { zephir_concat_self_str(&columnSql, SL("FLOAT")); } - ZEPHIR_CALL_METHOD(&_14$$24, this_ptr, "checkcolumnsizeandscale", NULL, 216, column); + ZEPHIR_CALL_METHOD(&_14$$24, this_ptr, "checkcolumnsizeandscale", NULL, 217, column); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_15$$24, this_ptr, "checkcolumnunsigned", NULL, 215, column); + ZEPHIR_CALL_METHOD(&_15$$24, this_ptr, "checkcolumnunsigned", NULL, 216, column); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_16$$24); ZEPHIR_CONCAT_VV(&_16$$24, &_14$$24, &_15$$24); @@ -1745,7 +1654,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, getColumnDefinition) } ZEPHIR_CALL_METHOD(&_17$$26, this_ptr, "getcolumnsize", NULL, 0, column); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_18$$26, this_ptr, "checkcolumnunsigned", NULL, 215, column); + ZEPHIR_CALL_METHOD(&_18$$26, this_ptr, "checkcolumnunsigned", NULL, 216, column); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_19$$26); ZEPHIR_CONCAT_VV(&_19$$26, &_17$$26, &_18$$26); @@ -1782,7 +1691,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, getColumnDefinition) } ZEPHIR_CALL_METHOD(&_20$$36, this_ptr, "getcolumnsize", NULL, 0, column); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_21$$36, this_ptr, "checkcolumnunsigned", NULL, 215, column); + ZEPHIR_CALL_METHOD(&_21$$36, this_ptr, "checkcolumnunsigned", NULL, 216, column); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_22$$36); ZEPHIR_CONCAT_VV(&_22$$36, &_20$$36, &_21$$36); @@ -1801,7 +1710,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, getColumnDefinition) } ZEPHIR_CALL_METHOD(&_23$$40, this_ptr, "getcolumnsize", NULL, 0, column); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_24$$40, this_ptr, "checkcolumnunsigned", NULL, 215, column); + ZEPHIR_CALL_METHOD(&_24$$40, this_ptr, "checkcolumnunsigned", NULL, 216, column); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_25$$40); ZEPHIR_CONCAT_VV(&_25$$40, &_23$$40, &_24$$40); @@ -1852,7 +1761,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, getColumnDefinition) } ZEPHIR_CALL_METHOD(&_30$$52, this_ptr, "getcolumnsize", NULL, 0, column); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_31$$52, this_ptr, "checkcolumnunsigned", NULL, 215, column); + ZEPHIR_CALL_METHOD(&_31$$52, this_ptr, "checkcolumnunsigned", NULL, 216, column); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_32$$52); ZEPHIR_CONCAT_VV(&_32$$52, &_30$$52, &_31$$52); @@ -1881,7 +1790,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, getColumnDefinition) zephir_check_call_status(); ZEPHIR_INIT_VAR(&_36$$59); ZEPHIR_CONCAT_SV(&_36$$59, "Unrecognized MySQL data type at column ", &_35$$59); - ZEPHIR_CALL_METHOD(NULL, &_34$$59, "__construct", NULL, 32, &_36$$59); + ZEPHIR_CALL_METHOD(NULL, &_34$$59, "__construct", NULL, 33, &_36$$59); zephir_check_call_status(); zephir_throw_exception_debug(&_34$$59, "phalcon/Db/Dialect/Mysql.zep", 635); ZEPHIR_MM_RESTORE(); @@ -1901,7 +1810,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, getColumnDefinition) ZVAL_COPY(&value$$61, _37$$61); ZEPHIR_INIT_NVAR(&_39$$62); ZVAL_STRING(&_39$$62, "\""); - ZEPHIR_CALL_FUNCTION(&_40$$62, "addcslashes", &_41, 214, &value$$61, &_39$$62); + ZEPHIR_CALL_FUNCTION(&_40$$62, "addcslashes", &_41, 215, &value$$61, &_39$$62); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_42$$62); ZEPHIR_CONCAT_SVS(&_42$$62, "\"", &_40$$62, "\", "); @@ -1920,7 +1829,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, getColumnDefinition) zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_43$$63); ZVAL_STRING(&_43$$63, "\""); - ZEPHIR_CALL_FUNCTION(&_44$$63, "addcslashes", &_41, 214, &value$$61, &_43$$63); + ZEPHIR_CALL_FUNCTION(&_44$$63, "addcslashes", &_41, 215, &value$$61, &_43$$63); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_45$$63); ZEPHIR_CONCAT_SVS(&_45$$63, "\"", &_44$$63, "\", "); @@ -1940,7 +1849,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, getColumnDefinition) } else { ZEPHIR_INIT_VAR(&_50$$64); ZVAL_STRING(&_50$$64, "\""); - ZEPHIR_CALL_FUNCTION(&_51$$64, "addcslashes", &_41, 214, &typeValues, &_50$$64); + ZEPHIR_CALL_FUNCTION(&_51$$64, "addcslashes", &_41, 215, &typeValues, &_50$$64); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_52$$64); ZEPHIR_CONCAT_SVS(&_52$$64, "(\"", &_51$$64, "\")"); @@ -1957,9 +1866,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, getColumnDefinition) */ PHP_METHOD(Phalcon_Db_Dialect_Mysql, getForeignKeyChecks) { - zval *this_ptr = getThis(); - - RETURN_STRING("SELECT @@foreign_key_checks"); } @@ -1978,27 +1884,21 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, listTables) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *schemaName_param = NULL; zval schemaName; - zval *this_ptr = getThis(); ZVAL_UNDEF(&schemaName); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schemaName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &schemaName_param); if (!schemaName_param) { ZEPHIR_INIT_VAR(&schemaName); } else { zephir_get_strval(&schemaName, schemaName_param); } - - if (!(ZEPHIR_IS_EMPTY(&schemaName))) { ZEPHIR_CONCAT_SVS(return_value, "SHOW TABLES FROM `", &schemaName, "`"); RETURN_MM(); @@ -2014,19 +1914,15 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, listViews) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *schemaName_param = NULL; zval schemaName; - zval *this_ptr = getThis(); ZVAL_UNDEF(&schemaName); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schemaName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &schemaName_param); if (!schemaName_param) { ZEPHIR_INIT_VAR(&schemaName); @@ -2041,8 +1937,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, listViews) ZEPHIR_INIT_VAR(&schemaName); } } - - if (!(ZEPHIR_IS_EMPTY(&schemaName))) { ZEPHIR_CONCAT_SVS(return_value, "SELECT `TABLE_NAME` AS view_name FROM `INFORMATION_SCHEMA`.`VIEWS` WHERE `TABLE_SCHEMA` = '", &schemaName, "' ORDER BY view_name"); RETURN_MM(); @@ -2094,7 +1988,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, modifyColumn) ZVAL_UNDEF(&_21$$12); ZVAL_UNDEF(&_22$$12); ZVAL_UNDEF(&_24$$15); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 4) Z_PARAM_STR(tableName) @@ -2103,10 +1996,8 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, modifyColumn) Z_PARAM_OPTIONAL Z_PARAM_OBJECT_OF_CLASS_OR_NULL(currentColumn, phalcon_db_columninterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 1, &tableName_param, &schemaName_param, &column, ¤tColumn); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -2132,8 +2023,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, modifyColumn) } else { ZEPHIR_SEPARATE_PARAM(currentColumn); } - - ZEPHIR_CALL_METHOD(&columnDefinition, this_ptr, "getcolumndefinition", NULL, 0, column); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_0, this_ptr, "preparetable", NULL, 0, &tableName, &schemaName); @@ -2187,7 +2076,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, modifyColumn) } _13$$8 = _12$$8; if (!(_13$$8)) { - ZEPHIR_CALL_FUNCTION(&_14$$8, "is_float", NULL, 213, &defaultValue); + ZEPHIR_CALL_FUNCTION(&_14$$8, "is_float", NULL, 214, &defaultValue); zephir_check_call_status(); _13$$8 = zephir_is_true(&_14$$8); } @@ -2198,7 +2087,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, modifyColumn) } else { ZEPHIR_INIT_VAR(&_16$$10); ZVAL_STRING(&_16$$10, "\""); - ZEPHIR_CALL_FUNCTION(&_17$$10, "addcslashes", NULL, 214, &defaultValue, &_16$$10); + ZEPHIR_CALL_FUNCTION(&_17$$10, "addcslashes", NULL, 215, &defaultValue, &_16$$10); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_18$$10); ZEPHIR_CONCAT_SVS(&_18$$10, " DEFAULT \"", &_17$$10, "\""); @@ -2249,18 +2138,13 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, sharedLock) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *sqlQuery_param = NULL; zval sqlQuery; - zval *this_ptr = getThis(); ZVAL_UNDEF(&sqlQuery); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(sqlQuery) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &sqlQuery_param); if (UNEXPECTED(Z_TYPE_P(sqlQuery_param) != IS_STRING && Z_TYPE_P(sqlQuery_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'sqlQuery' must be of the type string")); @@ -2271,8 +2155,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, sharedLock) } else { ZEPHIR_INIT_VAR(&sqlQuery); } - - ZEPHIR_CONCAT_VS(return_value, &sqlQuery, " LOCK IN SHARE MODE"); RETURN_MM(); } @@ -2291,21 +2173,17 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, tableExists) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *tableName_param = NULL, *schemaName_param = NULL; zval tableName, schemaName; - zval *this_ptr = getThis(); ZVAL_UNDEF(&tableName); ZVAL_UNDEF(&schemaName); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(tableName) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schemaName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &tableName_param, &schemaName_param); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -2321,8 +2199,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, tableExists) } else { zephir_get_strval(&schemaName, schemaName_param); } - - if (!(ZEPHIR_IS_EMPTY(&schemaName))) { ZEPHIR_CONCAT_SVSVS(return_value, "SELECT IF(COUNT(*) > 0, 1, 0) FROM `INFORMATION_SCHEMA`.`TABLES` WHERE `TABLE_NAME`= '", &tableName, "' AND `TABLE_SCHEMA` = '", &schemaName, "'"); RETURN_MM(); @@ -2339,22 +2215,18 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, tableOptions) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *table_param = NULL, *schema_param = NULL; zval table, schema, sql; - zval *this_ptr = getThis(); ZVAL_UNDEF(&table); ZVAL_UNDEF(&schema); ZVAL_UNDEF(&sql); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(table) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schema) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &table_param, &schema_param); if (UNEXPECTED(Z_TYPE_P(table_param) != IS_STRING && Z_TYPE_P(table_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'table' must be of the type string")); @@ -2370,8 +2242,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, tableOptions) } else { zephir_get_strval(&schema, schema_param); } - - ZEPHIR_INIT_VAR(&sql); ZVAL_STRING(&sql, "SELECT TABLES.TABLE_TYPE AS table_type,TABLES.AUTO_INCREMENT AS auto_increment,TABLES.ENGINE AS engine,TABLES.TABLE_COLLATION AS table_collation FROM INFORMATION_SCHEMA.TABLES WHERE "); if (!(ZEPHIR_IS_EMPTY(&schema))) { @@ -2390,21 +2260,16 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, truncateTable) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *tableName_param = NULL, *schemaName_param = NULL; zval tableName, schemaName, table; - zval *this_ptr = getThis(); ZVAL_UNDEF(&tableName); ZVAL_UNDEF(&schemaName); ZVAL_UNDEF(&table); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &tableName_param, &schemaName_param); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -2424,8 +2289,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, truncateTable) } else { ZEPHIR_INIT_VAR(&schemaName); } - - if (!(ZEPHIR_IS_EMPTY(&schemaName))) { ZEPHIR_INIT_VAR(&table); ZEPHIR_CONCAT_SVSVS(&table, "`", &schemaName, "`.`", &tableName, "`"); @@ -2445,21 +2308,17 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, viewExists) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *viewName_param = NULL, *schemaName_param = NULL; zval viewName, schemaName; - zval *this_ptr = getThis(); ZVAL_UNDEF(&viewName); ZVAL_UNDEF(&schemaName); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(viewName) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schemaName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &viewName_param, &schemaName_param); if (UNEXPECTED(Z_TYPE_P(viewName_param) != IS_STRING && Z_TYPE_P(viewName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'viewName' must be of the type string")); @@ -2475,8 +2334,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, viewExists) } else { zephir_get_strval(&schemaName, schemaName_param); } - - if (!(ZEPHIR_IS_EMPTY(&schemaName))) { ZEPHIR_CONCAT_SVSVS(return_value, "SELECT IF(COUNT(*) > 0, 1, 0) FROM `INFORMATION_SCHEMA`.`VIEWS` WHERE `TABLE_NAME`= '", &viewName, "' AND `TABLE_SCHEMA`='", &schemaName, "'"); RETURN_MM(); @@ -2493,7 +2350,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, getTableOptions) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *definition_param = NULL, options, engine, autoIncrement, tableCollation, collationParts, _0$$5, _1$$7, _2$$9, _3$$9, _4$$9; zval definition, tableOptions; - zval *this_ptr = getThis(); ZVAL_UNDEF(&definition); ZVAL_UNDEF(&tableOptions); @@ -2507,26 +2363,20 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, getTableOptions) ZVAL_UNDEF(&_2$$9); ZVAL_UNDEF(&_3$$9); ZVAL_UNDEF(&_4$$9); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(definition) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &definition_param); ZEPHIR_OBS_COPY_OR_DUP(&definition, definition_param); - - - ZEPHIR_OBS_VAR(&options); + zephir_memory_observe(&options); if (!(zephir_array_isset_string_fetch(&options, &definition, SL("options"), 0))) { RETURN_MM_STRING(""); } ZEPHIR_INIT_VAR(&tableOptions); array_init(&tableOptions); - ZEPHIR_OBS_VAR(&engine); + zephir_memory_observe(&engine); if (zephir_array_isset_string_fetch(&engine, &options, SL("ENGINE"), 0)) { if (zephir_is_true(&engine)) { ZEPHIR_INIT_VAR(&_0$$5); @@ -2534,7 +2384,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, getTableOptions) zephir_array_append(&tableOptions, &_0$$5, PH_SEPARATE, "phalcon/Db/Dialect/Mysql.zep", 857); } } - ZEPHIR_OBS_VAR(&autoIncrement); + zephir_memory_observe(&autoIncrement); if (zephir_array_isset_string_fetch(&autoIncrement, &options, SL("AUTO_INCREMENT"), 0)) { if (zephir_is_true(&autoIncrement)) { ZEPHIR_INIT_VAR(&_1$$7); @@ -2542,7 +2392,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, getTableOptions) zephir_array_append(&tableOptions, &_1$$7, PH_SEPARATE, "phalcon/Db/Dialect/Mysql.zep", 866); } } - ZEPHIR_OBS_VAR(&tableCollation); + zephir_memory_observe(&tableCollation); if (zephir_array_isset_string_fetch(&tableCollation, &options, SL("TABLE_COLLATION"), 0)) { if (zephir_is_true(&tableCollation)) { ZEPHIR_INIT_VAR(&collationParts); @@ -2570,7 +2420,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, checkColumnSizeAndScale) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *column, column_sub, _0, _1$$3, _2$$3, _3$$3, _4$$4, _5$$4; - zval *this_ptr = getThis(); ZVAL_UNDEF(&column_sub); ZVAL_UNDEF(&_0); @@ -2580,18 +2429,12 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, checkColumnSizeAndScale) ZVAL_UNDEF(&_4$$4); ZVAL_UNDEF(&_5$$4); ZVAL_UNDEF(&columnSql); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(column, phalcon_db_columninterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &column); - - ZEPHIR_CALL_METHOD(&_0, column, "getsize", NULL, 0); zephir_check_call_status(); if (zephir_is_true(&_0)) { @@ -2623,22 +2466,15 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, checkColumnUnsigned) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *column, column_sub, _0; - zval *this_ptr = getThis(); ZVAL_UNDEF(&column_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(column, phalcon_db_columninterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &column); - - ZEPHIR_CALL_METHOD(&_0, column, "isunsigned", NULL, 0); zephir_check_call_status(); if (zephir_is_true(&_0)) { diff --git a/ext/phalcon/db/dialect/postgresql.zep.c b/ext/phalcon/db/dialect/postgresql.zep.c index 3a1cf209e2c..10dfa2d83e5 100644 --- a/ext/phalcon/db/dialect/postgresql.zep.c +++ b/ext/phalcon/db/dialect/postgresql.zep.c @@ -69,17 +69,13 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, addColumn) ZVAL_UNDEF(&_7); ZVAL_UNDEF(&_5$$3); ZVAL_UNDEF(&_6$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) Z_PARAM_OBJECT_OF_CLASS(column, phalcon_db_columninterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &tableName_param, &schemaName_param, &column); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -99,8 +95,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, addColumn) } else { ZEPHIR_INIT_VAR(&schemaName); } - - ZEPHIR_CALL_METHOD(&columnDefinition, this_ptr, "getcolumndefinition", NULL, 0, column); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_0, this_ptr, "preparetable", NULL, 0, &tableName, &schemaName); @@ -162,17 +156,13 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, addForeignKey) ZVAL_UNDEF(&_4$$3); ZVAL_UNDEF(&_11$$4); ZVAL_UNDEF(&_12$$5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) Z_PARAM_OBJECT_OF_CLASS(reference, phalcon_db_referenceinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &tableName_param, &schemaName_param, &reference); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -192,8 +182,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, addForeignKey) } else { ZEPHIR_INIT_VAR(&schemaName); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "preparetable", NULL, 0, &tableName, &schemaName); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_1); @@ -210,13 +198,13 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, addForeignKey) } ZEPHIR_CALL_METHOD(&_6, reference, "getcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_5, this_ptr, "getcolumnlist", NULL, 57, &_6); + ZEPHIR_CALL_METHOD(&_5, this_ptr, "getcolumnlist", NULL, 58, &_6); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_7, reference, "getreferencedtable", NULL, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_9, reference, "getreferencedcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_8, this_ptr, "getcolumnlist", NULL, 57, &_9); + ZEPHIR_CALL_METHOD(&_8, this_ptr, "getcolumnlist", NULL, 58, &_9); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_10); ZEPHIR_CONCAT_SVSSVSVS(&_10, " FOREIGN KEY (", &_5, ")", " REFERENCES \"", &_7, "\" (", &_8, ")"); @@ -262,17 +250,13 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, addIndex) ZVAL_UNDEF(&_6); ZVAL_UNDEF(&_7); ZVAL_UNDEF(&_1$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) Z_PARAM_OBJECT_OF_CLASS(index, phalcon_db_indexinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &tableName_param, &schemaName_param, &index); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -292,8 +276,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, addIndex) } else { ZEPHIR_INIT_VAR(&schemaName); } - - ZEPHIR_CALL_METHOD(&_0, index, "getname", NULL, 0); zephir_check_call_status(); if (ZEPHIR_IS_STRING_IDENTICAL(&_0, "PRIMARY")) { @@ -319,7 +301,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, addIndex) zephir_concat_self(&sql, &_4); ZEPHIR_CALL_METHOD(&_6, index, "getcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_5, this_ptr, "getcolumnlist", NULL, 57, &_6); + ZEPHIR_CALL_METHOD(&_5, this_ptr, "getcolumnlist", NULL, 58, &_6); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_7); ZEPHIR_CONCAT_SVS(&_7, " (", &_5, ")"); @@ -344,17 +326,13 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, addPrimaryKey) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) Z_PARAM_OBJECT_OF_CLASS(index, phalcon_db_indexinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &tableName_param, &schemaName_param, &index); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -374,13 +352,11 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, addPrimaryKey) } else { ZEPHIR_INIT_VAR(&schemaName); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "preparetable", NULL, 0, &tableName, &schemaName); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_2, index, "getcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_1, this_ptr, "getcolumnlist", NULL, 57, &_2); + ZEPHIR_CALL_METHOD(&_1, this_ptr, "getcolumnlist", NULL, 58, &_2); zephir_check_call_status(); ZEPHIR_CONCAT_SVSVSVS(return_value, "ALTER TABLE ", &_0, " ADD CONSTRAINT \"", &tableName, "_PRIMARY\" PRIMARY KEY (", &_1, ")"); RETURN_MM(); @@ -505,17 +481,13 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, createTable) ZVAL_UNDEF(&definition); ZVAL_UNDEF(&createLines); ZVAL_UNDEF(&primaryColumns); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) Z_PARAM_ARRAY(definition) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &tableName_param, &schemaName_param, &definition_param); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -536,9 +508,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, createTable) ZEPHIR_INIT_VAR(&schemaName); } ZEPHIR_OBS_COPY_OR_DUP(&definition, definition_param); - - - ZEPHIR_OBS_VAR(&columns); + zephir_memory_observe(&columns); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&columns, &definition, SL("columns"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_db_exception_ce, "The index 'columns' is required in the definition array", "phalcon/Db/Dialect/Postgresql.zep", 134); return; @@ -547,7 +517,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, createTable) zephir_check_call_status(); ZEPHIR_INIT_VAR(&temporary); ZVAL_BOOL(&temporary, 0); - ZEPHIR_OBS_VAR(&options); + zephir_memory_observe(&options); if (zephir_array_isset_string_fetch(&options, &definition, SL("options"), 0)) { ZEPHIR_OBS_NVAR(&temporary); zephir_array_isset_string_fetch(&temporary, &options, SL("temporary"), 0); @@ -674,13 +644,13 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, createTable) } ZEPHIR_INIT_NVAR(&column); if (!(ZEPHIR_IS_EMPTY(&primaryColumns))) { - ZEPHIR_CALL_METHOD(&_30$$19, this_ptr, "getcolumnlist", NULL, 57, &primaryColumns); + ZEPHIR_CALL_METHOD(&_30$$19, this_ptr, "getcolumnlist", NULL, 58, &primaryColumns); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_31$$19); ZEPHIR_CONCAT_SVS(&_31$$19, "PRIMARY KEY (", &_30$$19, ")"); zephir_array_append(&createLines, &_31$$19, PH_SEPARATE, "phalcon/Db/Dialect/Postgresql.zep", 199); } - ZEPHIR_OBS_VAR(&indexes); + zephir_memory_observe(&indexes); if (zephir_array_isset_string_fetch(&indexes, &definition, SL("indexes"), 0)) { zephir_is_iterable(&indexes, 0, "phalcon/Db/Dialect/Postgresql.zep", 227); if (Z_TYPE_P(&indexes) == IS_ARRAY) { @@ -696,7 +666,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, createTable) if (ZEPHIR_IS_STRING(&indexName, "PRIMARY")) { ZEPHIR_CALL_METHOD(&_35$$22, &index, "getcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_34$$22, this_ptr, "getcolumnlist", NULL, 57, &_35$$22); + ZEPHIR_CALL_METHOD(&_34$$22, this_ptr, "getcolumnlist", NULL, 58, &_35$$22); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_36$$22); ZEPHIR_CONCAT_SVS(&_36$$22, "CONSTRAINT \"PRIMARY\" PRIMARY KEY (", &_34$$22, ")"); @@ -705,7 +675,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, createTable) if (!(ZEPHIR_IS_EMPTY(&indexType))) { ZEPHIR_CALL_METHOD(&_38$$24, &index, "getcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_37$$24, this_ptr, "getcolumnlist", NULL, 57, &_38$$24); + ZEPHIR_CALL_METHOD(&_37$$24, this_ptr, "getcolumnlist", NULL, 58, &_38$$24); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_39$$24); ZEPHIR_CONCAT_SVSVSVS(&_39$$24, "CONSTRAINT \"", &indexName, "\" ", &indexType, " (", &_37$$24, ")"); @@ -720,7 +690,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, createTable) zephir_concat_self(&indexSqlAfterCreate, &_42$$25); ZEPHIR_CALL_METHOD(&_44$$25, &index, "getcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_43$$25, this_ptr, "getcolumnlist", NULL, 57, &_44$$25); + ZEPHIR_CALL_METHOD(&_43$$25, this_ptr, "getcolumnlist", NULL, 58, &_44$$25); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_45$$25); ZEPHIR_CONCAT_SVS(&_45$$25, " (", &_43$$25, ");"); @@ -750,7 +720,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, createTable) if (ZEPHIR_IS_STRING(&indexName, "PRIMARY")) { ZEPHIR_CALL_METHOD(&_47$$28, &index, "getcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_46$$28, this_ptr, "getcolumnlist", NULL, 57, &_47$$28); + ZEPHIR_CALL_METHOD(&_46$$28, this_ptr, "getcolumnlist", NULL, 58, &_47$$28); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_48$$28); ZEPHIR_CONCAT_SVS(&_48$$28, "CONSTRAINT \"PRIMARY\" PRIMARY KEY (", &_46$$28, ")"); @@ -759,7 +729,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, createTable) if (!(ZEPHIR_IS_EMPTY(&indexType))) { ZEPHIR_CALL_METHOD(&_50$$30, &index, "getcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_49$$30, this_ptr, "getcolumnlist", NULL, 57, &_50$$30); + ZEPHIR_CALL_METHOD(&_49$$30, this_ptr, "getcolumnlist", NULL, 58, &_50$$30); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_51$$30); ZEPHIR_CONCAT_SVSVSVS(&_51$$30, "CONSTRAINT \"", &indexName, "\" ", &indexType, " (", &_49$$30, ")"); @@ -774,7 +744,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, createTable) zephir_concat_self(&indexSqlAfterCreate, &_54$$31); ZEPHIR_CALL_METHOD(&_56$$31, &index, "getcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_55$$31, this_ptr, "getcolumnlist", NULL, 57, &_56$$31); + ZEPHIR_CALL_METHOD(&_55$$31, this_ptr, "getcolumnlist", NULL, 58, &_56$$31); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_57$$31); ZEPHIR_CONCAT_SVS(&_57$$31, " (", &_55$$31, ");"); @@ -790,7 +760,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, createTable) } ZEPHIR_INIT_NVAR(&index); } - ZEPHIR_OBS_VAR(&references); + zephir_memory_observe(&references); if (zephir_array_isset_string_fetch(&references, &definition, SL("references"), 0)) { zephir_is_iterable(&references, 0, "phalcon/Db/Dialect/Postgresql.zep", 255); if (Z_TYPE_P(&references) == IS_ARRAY) { @@ -802,7 +772,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, createTable) zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_62$$34, &reference, "getcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_61$$34, this_ptr, "getcolumnlist", NULL, 57, &_62$$34); + ZEPHIR_CALL_METHOD(&_61$$34, this_ptr, "getcolumnlist", NULL, 58, &_62$$34); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_63$$34); ZEPHIR_CONCAT_SVSVS(&_63$$34, "CONSTRAINT \"", &_60$$34, "\" FOREIGN KEY (", &_61$$34, ") REFERENCES "); @@ -814,7 +784,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, createTable) zephir_concat_self(&referenceSql, &_64$$34); ZEPHIR_CALL_METHOD(&_67$$34, &reference, "getreferencedcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_66$$34, this_ptr, "getcolumnlist", NULL, 57, &_67$$34); + ZEPHIR_CALL_METHOD(&_66$$34, this_ptr, "getcolumnlist", NULL, 58, &_67$$34); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_68$$34); ZEPHIR_CONCAT_SVS(&_68$$34, " (", &_66$$34, ")"); @@ -850,7 +820,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, createTable) zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_73$$37, &reference, "getcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_72$$37, this_ptr, "getcolumnlist", NULL, 57, &_73$$37); + ZEPHIR_CALL_METHOD(&_72$$37, this_ptr, "getcolumnlist", NULL, 58, &_73$$37); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_74$$37); ZEPHIR_CONCAT_SVSVS(&_74$$37, "CONSTRAINT \"", &_71$$37, "\" FOREIGN KEY (", &_72$$37, ") REFERENCES "); @@ -862,7 +832,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, createTable) zephir_concat_self(&referenceSql, &_75$$37); ZEPHIR_CALL_METHOD(&_78$$37, &reference, "getreferencedcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_77$$37, this_ptr, "getcolumnlist", NULL, 57, &_78$$37); + ZEPHIR_CALL_METHOD(&_77$$37, this_ptr, "getcolumnlist", NULL, 58, &_78$$37); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_79$$37); ZEPHIR_CONCAT_SVS(&_79$$37, " (", &_77$$37, ")"); @@ -923,7 +893,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, createView) ZVAL_UNDEF(&viewSql); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&definition); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(viewName) @@ -931,10 +900,8 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, createView) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schemaName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &viewName_param, &definition_param, &schemaName_param); if (UNEXPECTED(Z_TYPE_P(viewName_param) != IS_STRING && Z_TYPE_P(viewName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'viewName' must be of the type string")); @@ -951,9 +918,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, createView) } else { zephir_get_strval(&schemaName, schemaName_param); } - - - ZEPHIR_OBS_VAR(&viewSql); + zephir_memory_observe(&viewSql); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&viewSql, &definition, SL("sql"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_db_exception_ce, "The index 'sql' is required in the definition array", "phalcon/Db/Dialect/Postgresql.zep", 276); return; @@ -978,21 +943,17 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, describeColumns) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *table_param = NULL, *schema_param = NULL; zval table, schema; - zval *this_ptr = getThis(); ZVAL_UNDEF(&table); ZVAL_UNDEF(&schema); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(table) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schema) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &table_param, &schema_param); if (UNEXPECTED(Z_TYPE_P(table_param) != IS_STRING && Z_TYPE_P(table_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'table' must be of the type string")); @@ -1008,8 +969,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, describeColumns) } else { zephir_get_strval(&schema, schema_param); } - - if (ZEPHIR_IS_NULL(&schema)) { ZEPHIR_INIT_NVAR(&schema); ZVAL_STRING(&schema, "public"); @@ -1026,21 +985,17 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, describeIndexes) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *table_param = NULL, *schema_param = NULL; zval table, schema; - zval *this_ptr = getThis(); ZVAL_UNDEF(&table); ZVAL_UNDEF(&schema); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(table) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schema) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &table_param, &schema_param); if (UNEXPECTED(Z_TYPE_P(table_param) != IS_STRING && Z_TYPE_P(table_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'table' must be of the type string")); @@ -1056,8 +1011,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, describeIndexes) } else { zephir_get_strval(&schema, schema_param); } - - ZEPHIR_CONCAT_SVS(return_value, "SELECT 0 as c0, t.relname as table_name, i.relname as key_name, 3 as c3, a.attname as column_name FROM pg_class t, pg_class i, pg_index ix, pg_attribute a WHERE t.oid = ix.indrelid AND i.oid = ix.indexrelid AND a.attrelid = t.oid AND a.attnum = ANY(ix.indkey) AND t.relkind = 'r' AND t.relname = '", &table, "' ORDER BY t.relname, i.relname;"); RETURN_MM(); } @@ -1070,21 +1023,17 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, describeReferences) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *table_param = NULL, *schema_param = NULL; zval table, schema; - zval *this_ptr = getThis(); ZVAL_UNDEF(&table); ZVAL_UNDEF(&schema); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(table) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schema) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &table_param, &schema_param); if (UNEXPECTED(Z_TYPE_P(table_param) != IS_STRING && Z_TYPE_P(table_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'table' must be of the type string")); @@ -1100,8 +1049,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, describeReferences) } else { zephir_get_strval(&schema, schema_param); } - - if (ZEPHIR_IS_NULL(&schema)) { ZEPHIR_INIT_NVAR(&schema); ZVAL_STRING(&schema, "public"); @@ -1125,17 +1072,13 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, dropColumn) ZVAL_UNDEF(&schemaName); ZVAL_UNDEF(&columnName); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) Z_PARAM_STR(columnName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &tableName_param, &schemaName_param, &columnName_param); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -1164,8 +1107,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, dropColumn) } else { ZEPHIR_INIT_VAR(&columnName); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "preparetable", NULL, 0, &tableName, &schemaName); zephir_check_call_status(); ZEPHIR_CONCAT_SVSVS(return_value, "ALTER TABLE ", &_0, " DROP COLUMN \"", &columnName, "\""); @@ -1187,17 +1128,13 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, dropForeignKey) ZVAL_UNDEF(&schemaName); ZVAL_UNDEF(&referenceName); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) Z_PARAM_STR(referenceName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &tableName_param, &schemaName_param, &referenceName_param); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -1226,8 +1163,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, dropForeignKey) } else { ZEPHIR_INIT_VAR(&referenceName); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "preparetable", NULL, 0, &tableName, &schemaName); zephir_check_call_status(); ZEPHIR_CONCAT_SVSVS(return_value, "ALTER TABLE ", &_0, " DROP CONSTRAINT \"", &referenceName, "\""); @@ -1242,22 +1177,17 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, dropIndex) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *tableName_param = NULL, *schemaName_param = NULL, *indexName_param = NULL; zval tableName, schemaName, indexName; - zval *this_ptr = getThis(); ZVAL_UNDEF(&tableName); ZVAL_UNDEF(&schemaName); ZVAL_UNDEF(&indexName); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) Z_PARAM_STR(indexName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &tableName_param, &schemaName_param, &indexName_param); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -1286,8 +1216,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, dropIndex) } else { ZEPHIR_INIT_VAR(&indexName); } - - ZEPHIR_CONCAT_SVS(return_value, "DROP INDEX \"", &indexName, "\""); RETURN_MM(); } @@ -1306,16 +1234,12 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, dropPrimaryKey) ZVAL_UNDEF(&tableName); ZVAL_UNDEF(&schemaName); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &tableName_param, &schemaName_param); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -1335,8 +1259,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, dropPrimaryKey) } else { ZEPHIR_INIT_VAR(&schemaName); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "preparetable", NULL, 0, &tableName, &schemaName); zephir_check_call_status(); ZEPHIR_CONCAT_SVSVS(return_value, "ALTER TABLE ", &_0, " DROP CONSTRAINT \"", &tableName, "_PRIMARY\""); @@ -1358,7 +1280,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, dropTable) ZVAL_UNDEF(&tableName); ZVAL_UNDEF(&schemaName); ZVAL_UNDEF(&table); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(tableName) @@ -1366,10 +1287,8 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, dropTable) Z_PARAM_STR_OR_NULL(schemaName) Z_PARAM_BOOL(ifExists) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &tableName_param, &schemaName_param, &ifExists_param); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -1394,8 +1313,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, dropTable) } ifExists = (Z_TYPE_P(ifExists_param) == IS_TRUE); } - - ZEPHIR_CALL_METHOD(&table, this_ptr, "preparetable", NULL, 0, &tableName, &schemaName); zephir_check_call_status(); if (ifExists) { @@ -1421,7 +1338,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, dropView) ZVAL_UNDEF(&viewName); ZVAL_UNDEF(&schemaName); ZVAL_UNDEF(&view); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(viewName) @@ -1429,10 +1345,8 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, dropView) Z_PARAM_STR_OR_NULL(schemaName) Z_PARAM_BOOL(ifExists) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &viewName_param, &schemaName_param, &ifExists_param); if (UNEXPECTED(Z_TYPE_P(viewName_param) != IS_STRING && Z_TYPE_P(viewName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'viewName' must be of the type string")); @@ -1457,8 +1371,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, dropView) } ifExists = (Z_TYPE_P(ifExists_param) == IS_TRUE); } - - ZEPHIR_CALL_METHOD(&view, this_ptr, "preparetable", NULL, 0, &viewName, &schemaName); zephir_check_call_status(); if (ifExists) { @@ -1509,18 +1421,12 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, getColumnDefinition) ZVAL_UNDEF(&_22$$41); ZVAL_UNDEF(&_23$$41); ZVAL_UNDEF(&valueSql$$38); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(column, phalcon_db_columninterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &column); - - ZEPHIR_CALL_METHOD(&columnSql, this_ptr, "checkcolumntypesql", NULL, 0, column); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&columnType, this_ptr, "checkcolumntype", NULL, 0, column); @@ -1638,7 +1544,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, getColumnDefinition) zephir_check_call_status(); ZEPHIR_INIT_VAR(&_7$$36); ZEPHIR_CONCAT_SV(&_7$$36, "Unrecognized PostgreSQL data type at column ", &_6$$36); - ZEPHIR_CALL_METHOD(NULL, &_5$$36, "__construct", NULL, 32, &_7$$36); + ZEPHIR_CALL_METHOD(NULL, &_5$$36, "__construct", NULL, 33, &_7$$36); zephir_check_call_status(); zephir_throw_exception_debug(&_5$$36, "phalcon/Db/Dialect/Postgresql.zep", 511); ZEPHIR_MM_RESTORE(); @@ -1657,7 +1563,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, getColumnDefinition) ZVAL_COPY(&value$$38, _8$$38); ZEPHIR_INIT_NVAR(&_10$$39); ZVAL_STRING(&_10$$39, "\'"); - ZEPHIR_CALL_FUNCTION(&_11$$39, "addcslashes", &_12, 214, &value$$38, &_10$$39); + ZEPHIR_CALL_FUNCTION(&_11$$39, "addcslashes", &_12, 215, &value$$38, &_10$$39); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_13$$39); ZEPHIR_CONCAT_SVS(&_13$$39, "'", &_11$$39, "', "); @@ -1676,7 +1582,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, getColumnDefinition) zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_14$$40); ZVAL_STRING(&_14$$40, "\'"); - ZEPHIR_CALL_FUNCTION(&_15$$40, "addcslashes", &_12, 214, &value$$38, &_14$$40); + ZEPHIR_CALL_FUNCTION(&_15$$40, "addcslashes", &_12, 215, &value$$38, &_14$$40); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_16$$40); ZEPHIR_CONCAT_SVS(&_16$$40, "'", &_15$$40, "', "); @@ -1696,7 +1602,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, getColumnDefinition) } else { ZEPHIR_INIT_VAR(&_21$$41); ZVAL_STRING(&_21$$41, "\'"); - ZEPHIR_CALL_FUNCTION(&_22$$41, "addcslashes", &_12, 214, &typeValues, &_21$$41); + ZEPHIR_CALL_FUNCTION(&_22$$41, "addcslashes", &_12, 215, &typeValues, &_21$$41); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_23$$41); ZEPHIR_CONCAT_SVS(&_23$$41, "('", &_22$$41, "')"); @@ -1722,27 +1628,21 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, listTables) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *schemaName_param = NULL; zval schemaName; - zval *this_ptr = getThis(); ZVAL_UNDEF(&schemaName); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schemaName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &schemaName_param); if (!schemaName_param) { ZEPHIR_INIT_VAR(&schemaName); } else { zephir_get_strval(&schemaName, schemaName_param); } - - if (ZEPHIR_IS_NULL(&schemaName)) { ZEPHIR_INIT_NVAR(&schemaName); ZVAL_STRING(&schemaName, "public"); @@ -1759,27 +1659,21 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, listViews) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *schemaName_param = NULL; zval schemaName; - zval *this_ptr = getThis(); ZVAL_UNDEF(&schemaName); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schemaName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &schemaName_param); if (!schemaName_param) { ZEPHIR_INIT_VAR(&schemaName); } else { zephir_get_strval(&schemaName, schemaName_param); } - - if (ZEPHIR_IS_NULL(&schemaName)) { ZEPHIR_INIT_NVAR(&schemaName); ZVAL_STRING(&schemaName, "public"); @@ -1844,7 +1738,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, modifyColumn) ZVAL_UNDEF(&_33$$13); ZVAL_UNDEF(&_34$$14); ZVAL_UNDEF(&_35$$14); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 4) Z_PARAM_STR(tableName) @@ -1853,10 +1746,8 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, modifyColumn) Z_PARAM_OPTIONAL Z_PARAM_OBJECT_OF_CLASS_OR_NULL(currentColumn, phalcon_db_columninterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 1, &tableName_param, &schemaName_param, &column, ¤tColumn); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -1882,8 +1773,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, modifyColumn) } else { ZEPHIR_SEPARATE_PARAM(currentColumn); } - - ZEPHIR_INIT_VAR(&sql); ZEPHIR_CALL_METHOD(&columnDefinition, this_ptr, "getcolumndefinition", NULL, 0, column); zephir_check_call_status(); @@ -2007,18 +1896,13 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, sharedLock) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *sqlQuery_param = NULL; zval sqlQuery; - zval *this_ptr = getThis(); ZVAL_UNDEF(&sqlQuery); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(sqlQuery) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &sqlQuery_param); if (UNEXPECTED(Z_TYPE_P(sqlQuery_param) != IS_STRING && Z_TYPE_P(sqlQuery_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'sqlQuery' must be of the type string")); @@ -2029,8 +1913,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, sharedLock) } else { ZEPHIR_INIT_VAR(&sqlQuery); } - - RETURN_CTOR(&sqlQuery); } @@ -2048,21 +1930,17 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, tableExists) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *tableName_param = NULL, *schemaName_param = NULL; zval tableName, schemaName; - zval *this_ptr = getThis(); ZVAL_UNDEF(&tableName); ZVAL_UNDEF(&schemaName); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(tableName) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schemaName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &tableName_param, &schemaName_param); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -2078,8 +1956,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, tableExists) } else { zephir_get_strval(&schemaName, schemaName_param); } - - if (ZEPHIR_IS_NULL(&schemaName)) { ZEPHIR_INIT_NVAR(&schemaName); ZVAL_STRING(&schemaName, "public"); @@ -2096,21 +1972,17 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, tableOptions) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *table_param = NULL, *schema_param = NULL; zval table, schema; - zval *this_ptr = getThis(); ZVAL_UNDEF(&table); ZVAL_UNDEF(&schema); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(table) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schema) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &table_param, &schema_param); if (UNEXPECTED(Z_TYPE_P(table_param) != IS_STRING && Z_TYPE_P(table_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'table' must be of the type string")); @@ -2126,8 +1998,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, tableOptions) } else { zephir_get_strval(&schema, schema_param); } - - RETURN_MM_STRING(""); } @@ -2145,16 +2015,12 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, truncateTable) ZVAL_UNDEF(&tableName); ZVAL_UNDEF(&schemaName); ZVAL_UNDEF(&table); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &tableName_param, &schemaName_param); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -2174,8 +2040,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, truncateTable) } else { ZEPHIR_INIT_VAR(&schemaName); } - - if (!(ZEPHIR_IS_EMPTY(&schemaName))) { ZEPHIR_CALL_METHOD(&table, this_ptr, "preparetable", NULL, 0, &tableName, &schemaName); zephir_check_call_status(); @@ -2195,21 +2059,17 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, viewExists) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *viewName_param = NULL, *schemaName_param = NULL; zval viewName, schemaName; - zval *this_ptr = getThis(); ZVAL_UNDEF(&viewName); ZVAL_UNDEF(&schemaName); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(viewName) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schemaName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &viewName_param, &schemaName_param); if (UNEXPECTED(Z_TYPE_P(viewName_param) != IS_STRING && Z_TYPE_P(viewName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'viewName' must be of the type string")); @@ -2225,8 +2085,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, viewExists) } else { zephir_get_strval(&schemaName, schemaName_param); } - - if (ZEPHIR_IS_NULL(&schemaName)) { ZEPHIR_INIT_NVAR(&schemaName); ZVAL_STRING(&schemaName, "public"); @@ -2255,18 +2113,12 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, castDefault) ZVAL_UNDEF(&_9$$6); ZVAL_UNDEF(&preparedValue); ZVAL_UNDEF(&_6$$5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(column, phalcon_db_columninterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &column); - - ZEPHIR_CALL_METHOD(&defaultValue, column, "getdefault", NULL, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&columnDefinition, this_ptr, "getcolumndefinition", NULL, 0, column); @@ -2305,7 +2157,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, castDefault) } else { ZEPHIR_INIT_VAR(&_7$$6); ZVAL_STRING(&_7$$6, "\'"); - ZEPHIR_CALL_FUNCTION(&_8$$6, "addcslashes", NULL, 214, &defaultValue, &_7$$6); + ZEPHIR_CALL_FUNCTION(&_8$$6, "addcslashes", NULL, 215, &defaultValue, &_7$$6); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_9$$6); ZEPHIR_CONCAT_SVS(&_9$$6, "'", &_8$$6, "'"); @@ -2319,22 +2171,15 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, getTableOptions) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *definition_param = NULL; zval definition; - zval *this_ptr = getThis(); ZVAL_UNDEF(&definition); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(definition) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &definition_param); ZEPHIR_OBS_COPY_OR_DUP(&definition, definition_param); - - RETURN_MM_STRING(""); } diff --git a/ext/phalcon/db/dialect/sqlite.zep.c b/ext/phalcon/db/dialect/sqlite.zep.c index 854d7298336..c6aa6aca702 100644 --- a/ext/phalcon/db/dialect/sqlite.zep.c +++ b/ext/phalcon/db/dialect/sqlite.zep.c @@ -73,17 +73,13 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, addColumn) ZVAL_UNDEF(&_7$$5); ZVAL_UNDEF(&_8$$5); ZVAL_UNDEF(&_9$$5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) Z_PARAM_OBJECT_OF_CLASS(column, phalcon_db_columninterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &tableName_param, &schemaName_param, &column); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -103,8 +99,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, addColumn) } else { ZEPHIR_INIT_VAR(&schemaName); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "preparetable", NULL, 0, &tableName, &schemaName); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_1); @@ -129,7 +123,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, addColumn) } else { ZEPHIR_INIT_VAR(&_7$$5); ZVAL_STRING(&_7$$5, "\""); - ZEPHIR_CALL_FUNCTION(&_8$$5, "addcslashes", NULL, 214, &defaultValue, &_7$$5); + ZEPHIR_CALL_FUNCTION(&_8$$5, "addcslashes", NULL, 215, &defaultValue, &_7$$5); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_9$$5); ZEPHIR_CONCAT_SVS(&_9$$5, " DEFAULT \"", &_8$$5, "\""); @@ -159,22 +153,17 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, addForeignKey) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *tableName_param = NULL, *schemaName_param = NULL, *reference, reference_sub; zval tableName, schemaName; - zval *this_ptr = getThis(); ZVAL_UNDEF(&tableName); ZVAL_UNDEF(&schemaName); ZVAL_UNDEF(&reference_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) Z_PARAM_OBJECT_OF_CLASS(reference, phalcon_db_referenceinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &tableName_param, &schemaName_param, &reference); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -194,8 +183,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, addForeignKey) } else { ZEPHIR_INIT_VAR(&schemaName); } - - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_db_exception_ce, "Adding a foreign key constraint to an existing table is not supported by SQLite", "phalcon/Db/Dialect/Sqlite.zep", 73); return; } @@ -224,17 +211,13 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, addIndex) ZVAL_UNDEF(&_2$$5); ZVAL_UNDEF(&_3$$6); ZVAL_UNDEF(&_4$$6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) Z_PARAM_OBJECT_OF_CLASS(index, phalcon_db_indexinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &tableName_param, &schemaName_param, &index); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -254,8 +237,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, addIndex) } else { ZEPHIR_INIT_VAR(&schemaName); } - - ZEPHIR_CALL_METHOD(&indexType, index, "gettype", NULL, 0); zephir_check_call_status(); if (!(ZEPHIR_IS_EMPTY(&indexType))) { @@ -281,7 +262,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, addIndex) } ZEPHIR_CALL_METHOD(&_6, index, "getcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_5, this_ptr, "getcolumnlist", NULL, 57, &_6); + ZEPHIR_CALL_METHOD(&_5, this_ptr, "getcolumnlist", NULL, 58, &_6); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_7); ZEPHIR_CONCAT_SVSVS(&_7, " ON \"", &tableName, "\" (", &_5, ")"); @@ -297,22 +278,17 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, addPrimaryKey) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *tableName_param = NULL, *schemaName_param = NULL, *index, index_sub; zval tableName, schemaName; - zval *this_ptr = getThis(); ZVAL_UNDEF(&tableName); ZVAL_UNDEF(&schemaName); ZVAL_UNDEF(&index_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) Z_PARAM_OBJECT_OF_CLASS(index, phalcon_db_indexinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &tableName_param, &schemaName_param, &index); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -332,8 +308,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, addPrimaryKey) } else { ZEPHIR_INIT_VAR(&schemaName); } - - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_db_exception_ce, "Adding a primary key after table has been created is not supported by SQLite", "phalcon/Db/Dialect/Sqlite.zep", 110); return; } @@ -430,17 +404,13 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, createTable) ZVAL_UNDEF(&_67$$35); ZVAL_UNDEF(&_68$$36); ZVAL_UNDEF(&definition); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) Z_PARAM_ARRAY(definition) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &tableName_param, &schemaName_param, &definition_param); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -461,18 +431,16 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, createTable) ZEPHIR_INIT_VAR(&schemaName); } ZEPHIR_OBS_COPY_OR_DUP(&definition, definition_param); - - ZEPHIR_CALL_METHOD(&table, this_ptr, "preparetable", NULL, 0, &tableName, &schemaName); zephir_check_call_status(); ZEPHIR_INIT_VAR(&temporary); ZVAL_BOOL(&temporary, 0); - ZEPHIR_OBS_VAR(&options); + zephir_memory_observe(&options); if (zephir_array_isset_string_fetch(&options, &definition, SL("options"), 0)) { ZEPHIR_OBS_NVAR(&temporary); zephir_array_isset_string_fetch(&temporary, &options, SL("temporary"), 0); } - ZEPHIR_OBS_VAR(&columns); + zephir_memory_observe(&columns); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&columns, &definition, SL("columns"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_db_exception_ce, "The index 'columns' is required in the definition array", "phalcon/Db/Dialect/Sqlite.zep", 134); return; @@ -533,7 +501,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, createTable) } else { ZEPHIR_INIT_NVAR(&_13$$12); ZVAL_STRING(&_13$$12, "\""); - ZEPHIR_CALL_FUNCTION(&_14$$12, "addcslashes", &_15, 214, &defaultValue, &_13$$12); + ZEPHIR_CALL_FUNCTION(&_14$$12, "addcslashes", &_15, 215, &defaultValue, &_13$$12); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_16$$12); ZEPHIR_CONCAT_SVS(&_16$$12, " DEFAULT \"", &_14$$12, "\""); @@ -597,7 +565,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, createTable) } else { ZEPHIR_INIT_NVAR(&_26$$20); ZVAL_STRING(&_26$$20, "\""); - ZEPHIR_CALL_FUNCTION(&_27$$20, "addcslashes", &_15, 214, &defaultValue, &_26$$20); + ZEPHIR_CALL_FUNCTION(&_27$$20, "addcslashes", &_15, 215, &defaultValue, &_26$$20); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_28$$20); ZEPHIR_CONCAT_SVS(&_28$$20, " DEFAULT \"", &_27$$20, "\""); @@ -617,7 +585,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, createTable) } } ZEPHIR_INIT_NVAR(&column); - ZEPHIR_OBS_VAR(&indexes); + zephir_memory_observe(&indexes); if (zephir_array_isset_string_fetch(&indexes, &definition, SL("indexes"), 0)) { zephir_is_iterable(&indexes, 0, "phalcon/Db/Dialect/Sqlite.zep", 211); if (Z_TYPE_P(&indexes) == IS_ARRAY) { @@ -642,7 +610,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, createTable) if (_32$$24) { ZEPHIR_CALL_METHOD(&_36$$25, &index, "getcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_35$$25, this_ptr, "getcolumnlist", &_37, 57, &_36$$25); + ZEPHIR_CALL_METHOD(&_35$$25, this_ptr, "getcolumnlist", &_37, 58, &_36$$25); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_38$$25); ZEPHIR_CONCAT_SVS(&_38$$25, "PRIMARY KEY (", &_35$$25, ")"); @@ -650,7 +618,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, createTable) } else if (_33$$24) { ZEPHIR_CALL_METHOD(&_40$$26, &index, "getcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_39$$26, this_ptr, "getcolumnlist", &_37, 57, &_40$$26); + ZEPHIR_CALL_METHOD(&_39$$26, this_ptr, "getcolumnlist", &_37, 58, &_40$$26); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_41$$26); ZEPHIR_CONCAT_SVS(&_41$$26, "UNIQUE (", &_39$$26, ")"); @@ -685,7 +653,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, createTable) if (_42$$27) { ZEPHIR_CALL_METHOD(&_46$$28, &index, "getcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_45$$28, this_ptr, "getcolumnlist", &_37, 57, &_46$$28); + ZEPHIR_CALL_METHOD(&_45$$28, this_ptr, "getcolumnlist", &_37, 58, &_46$$28); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_47$$28); ZEPHIR_CONCAT_SVS(&_47$$28, "PRIMARY KEY (", &_45$$28, ")"); @@ -693,7 +661,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, createTable) } else if (_43$$27) { ZEPHIR_CALL_METHOD(&_49$$29, &index, "getcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_48$$29, this_ptr, "getcolumnlist", &_37, 57, &_49$$29); + ZEPHIR_CALL_METHOD(&_48$$29, this_ptr, "getcolumnlist", &_37, 58, &_49$$29); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_50$$29); ZEPHIR_CONCAT_SVS(&_50$$29, "UNIQUE (", &_48$$29, ")"); @@ -705,7 +673,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, createTable) } ZEPHIR_INIT_NVAR(&index); } - ZEPHIR_OBS_VAR(&references); + zephir_memory_observe(&references); if (zephir_array_isset_string_fetch(&references, &definition, SL("references"), 0)) { zephir_is_iterable(&references, 0, "phalcon/Db/Dialect/Sqlite.zep", 233); if (Z_TYPE_P(&references) == IS_ARRAY) { @@ -717,13 +685,13 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, createTable) zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_55$$31, &reference, "getcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_54$$31, this_ptr, "getcolumnlist", &_37, 57, &_55$$31); + ZEPHIR_CALL_METHOD(&_54$$31, this_ptr, "getcolumnlist", &_37, 58, &_55$$31); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_56$$31, &reference, "getreferencedtable", NULL, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_58$$31, &reference, "getreferencedcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_57$$31, this_ptr, "getcolumnlist", &_37, 57, &_58$$31); + ZEPHIR_CALL_METHOD(&_57$$31, this_ptr, "getcolumnlist", &_37, 58, &_58$$31); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&referenceSql); ZEPHIR_CONCAT_SVSVSSVSVS(&referenceSql, "CONSTRAINT `", &_53$$31, "` FOREIGN KEY (", &_54$$31, ")", " REFERENCES `", &_56$$31, "`(", &_57$$31, ")"); @@ -758,13 +726,13 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, createTable) zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_63$$34, &reference, "getcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_62$$34, this_ptr, "getcolumnlist", &_37, 57, &_63$$34); + ZEPHIR_CALL_METHOD(&_62$$34, this_ptr, "getcolumnlist", &_37, 58, &_63$$34); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_64$$34, &reference, "getreferencedtable", NULL, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_66$$34, &reference, "getreferencedcolumns", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_65$$34, this_ptr, "getcolumnlist", &_37, 57, &_66$$34); + ZEPHIR_CALL_METHOD(&_65$$34, this_ptr, "getcolumnlist", &_37, 58, &_66$$34); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&referenceSql); ZEPHIR_CONCAT_SVSVSSVSVS(&referenceSql, "CONSTRAINT `", &_61$$34, "` FOREIGN KEY (", &_62$$34, ")", " REFERENCES `", &_64$$34, "`(", &_65$$34, ")"); @@ -814,7 +782,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, createView) ZVAL_UNDEF(&viewSql); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&definition); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(viewName) @@ -822,10 +789,8 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, createView) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schemaName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &viewName_param, &definition_param, &schemaName_param); if (UNEXPECTED(Z_TYPE_P(viewName_param) != IS_STRING && Z_TYPE_P(viewName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'viewName' must be of the type string")); @@ -842,9 +807,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, createView) } else { zephir_get_strval(&schemaName, schemaName_param); } - - - ZEPHIR_OBS_VAR(&viewSql); + zephir_memory_observe(&viewSql); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&viewSql, &definition, SL("sql"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_db_exception_ce, "The index 'sql' is required in the definition array", "phalcon/Db/Dialect/Sqlite.zep", 250); return; @@ -869,21 +832,17 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, describeColumns) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *table_param = NULL, *schema_param = NULL; zval table, schema; - zval *this_ptr = getThis(); ZVAL_UNDEF(&table); ZVAL_UNDEF(&schema); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(table) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schema) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &table_param, &schema_param); if (UNEXPECTED(Z_TYPE_P(table_param) != IS_STRING && Z_TYPE_P(table_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'table' must be of the type string")); @@ -899,8 +858,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, describeColumns) } else { zephir_get_strval(&schema, schema_param); } - - ZEPHIR_CONCAT_SVS(return_value, "PRAGMA table_info('", &table, "')"); RETURN_MM(); } @@ -913,18 +870,13 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, describeIndex) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *index_param = NULL; zval index; - zval *this_ptr = getThis(); ZVAL_UNDEF(&index); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(index) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &index_param); if (UNEXPECTED(Z_TYPE_P(index_param) != IS_STRING && Z_TYPE_P(index_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'index' must be of the type string")); @@ -935,8 +887,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, describeIndex) } else { ZEPHIR_INIT_VAR(&index); } - - ZEPHIR_CONCAT_SVS(return_value, "PRAGMA index_info('", &index, "')"); RETURN_MM(); } @@ -949,21 +899,17 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, describeIndexes) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *table_param = NULL, *schema_param = NULL; zval table, schema; - zval *this_ptr = getThis(); ZVAL_UNDEF(&table); ZVAL_UNDEF(&schema); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(table) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schema) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &table_param, &schema_param); if (UNEXPECTED(Z_TYPE_P(table_param) != IS_STRING && Z_TYPE_P(table_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'table' must be of the type string")); @@ -979,8 +925,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, describeIndexes) } else { zephir_get_strval(&schema, schema_param); } - - ZEPHIR_CONCAT_SVS(return_value, "PRAGMA index_list('", &table, "')"); RETURN_MM(); } @@ -993,21 +937,17 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, describeReferences) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *table_param = NULL, *schema_param = NULL; zval table, schema; - zval *this_ptr = getThis(); ZVAL_UNDEF(&table); ZVAL_UNDEF(&schema); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(table) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schema) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &table_param, &schema_param); if (UNEXPECTED(Z_TYPE_P(table_param) != IS_STRING && Z_TYPE_P(table_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'table' must be of the type string")); @@ -1023,8 +963,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, describeReferences) } else { zephir_get_strval(&schema, schema_param); } - - ZEPHIR_CONCAT_SVS(return_value, "PRAGMA foreign_key_list('", &table, "')"); RETURN_MM(); } @@ -1037,22 +975,17 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, dropColumn) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *tableName_param = NULL, *schemaName_param = NULL, *columnName_param = NULL; zval tableName, schemaName, columnName; - zval *this_ptr = getThis(); ZVAL_UNDEF(&tableName); ZVAL_UNDEF(&schemaName); ZVAL_UNDEF(&columnName); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) Z_PARAM_STR(columnName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &tableName_param, &schemaName_param, &columnName_param); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -1081,8 +1014,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, dropColumn) } else { ZEPHIR_INIT_VAR(&columnName); } - - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_db_exception_ce, "Dropping DB column is not supported by SQLite", "phalcon/Db/Dialect/Sqlite.zep", 299); return; } @@ -1095,22 +1026,17 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, dropForeignKey) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *tableName_param = NULL, *schemaName_param = NULL, *referenceName_param = NULL; zval tableName, schemaName, referenceName; - zval *this_ptr = getThis(); ZVAL_UNDEF(&tableName); ZVAL_UNDEF(&schemaName); ZVAL_UNDEF(&referenceName); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) Z_PARAM_STR(referenceName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &tableName_param, &schemaName_param, &referenceName_param); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -1139,8 +1065,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, dropForeignKey) } else { ZEPHIR_INIT_VAR(&referenceName); } - - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_db_exception_ce, "Dropping a foreign key constraint is not supported by SQLite", "phalcon/Db/Dialect/Sqlite.zep", 309); return; } @@ -1153,22 +1077,17 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, dropIndex) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *tableName_param = NULL, *schemaName_param = NULL, *indexName_param = NULL; zval tableName, schemaName, indexName; - zval *this_ptr = getThis(); ZVAL_UNDEF(&tableName); ZVAL_UNDEF(&schemaName); ZVAL_UNDEF(&indexName); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) Z_PARAM_STR(indexName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &tableName_param, &schemaName_param, &indexName_param); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -1197,8 +1116,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, dropIndex) } else { ZEPHIR_INIT_VAR(&indexName); } - - if (!(ZEPHIR_IS_EMPTY(&schemaName))) { ZEPHIR_CONCAT_SVSVS(return_value, "DROP INDEX \"", &schemaName, "\".\"", &indexName, "\""); RETURN_MM(); @@ -1215,20 +1132,15 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, dropPrimaryKey) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *tableName_param = NULL, *schemaName_param = NULL; zval tableName, schemaName; - zval *this_ptr = getThis(); ZVAL_UNDEF(&tableName); ZVAL_UNDEF(&schemaName); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &tableName_param, &schemaName_param); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -1248,8 +1160,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, dropPrimaryKey) } else { ZEPHIR_INIT_VAR(&schemaName); } - - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_db_exception_ce, "Removing a primary key after table has been created is not supported by SQLite", "phalcon/Db/Dialect/Sqlite.zep", 331); return; } @@ -1269,7 +1179,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, dropTable) ZVAL_UNDEF(&tableName); ZVAL_UNDEF(&schemaName); ZVAL_UNDEF(&table); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(tableName) @@ -1277,10 +1186,8 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, dropTable) Z_PARAM_STR_OR_NULL(schemaName) Z_PARAM_BOOL(ifExists) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &tableName_param, &schemaName_param, &ifExists_param); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -1305,8 +1212,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, dropTable) } ifExists = (Z_TYPE_P(ifExists_param) == IS_TRUE); } - - ZEPHIR_CALL_METHOD(&table, this_ptr, "preparetable", NULL, 0, &tableName, &schemaName); zephir_check_call_status(); if (ifExists) { @@ -1332,7 +1237,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, dropView) ZVAL_UNDEF(&viewName); ZVAL_UNDEF(&schemaName); ZVAL_UNDEF(&view); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(viewName) @@ -1340,10 +1244,8 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, dropView) Z_PARAM_STR_OR_NULL(schemaName) Z_PARAM_BOOL(ifExists) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &viewName_param, &schemaName_param, &ifExists_param); if (UNEXPECTED(Z_TYPE_P(viewName_param) != IS_STRING && Z_TYPE_P(viewName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'viewName' must be of the type string")); @@ -1368,8 +1270,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, dropView) } ifExists = (Z_TYPE_P(ifExists_param) == IS_TRUE); } - - ZEPHIR_CALL_METHOD(&view, this_ptr, "preparetable", NULL, 0, &viewName, &schemaName); zephir_check_call_status(); if (ifExists) { @@ -1389,18 +1289,13 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, forUpdate) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *sqlQuery_param = NULL; zval sqlQuery; - zval *this_ptr = getThis(); ZVAL_UNDEF(&sqlQuery); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(sqlQuery) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &sqlQuery_param); if (UNEXPECTED(Z_TYPE_P(sqlQuery_param) != IS_STRING && Z_TYPE_P(sqlQuery_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'sqlQuery' must be of the type string")); @@ -1411,8 +1306,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, forUpdate) } else { ZEPHIR_INIT_VAR(&sqlQuery); } - - RETURN_CTOR(&sqlQuery); } @@ -1455,18 +1348,12 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, getColumnDefinition) ZVAL_UNDEF(&_21$$43); ZVAL_UNDEF(&_22$$43); ZVAL_UNDEF(&_23$$43); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(column, phalcon_db_columninterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &column); - - ZEPHIR_CALL_METHOD(&columnSql, this_ptr, "checkcolumntypesql", NULL, 0, column); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&columnType, this_ptr, "checkcolumntype", NULL, 0, column); @@ -1594,7 +1481,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, getColumnDefinition) zephir_check_call_status(); ZEPHIR_INIT_VAR(&_7$$38); ZEPHIR_CONCAT_SV(&_7$$38, "Unrecognized SQLite data type at column ", &_6$$38); - ZEPHIR_CALL_METHOD(NULL, &_5$$38, "__construct", NULL, 32, &_7$$38); + ZEPHIR_CALL_METHOD(NULL, &_5$$38, "__construct", NULL, 33, &_7$$38); zephir_check_call_status(); zephir_throw_exception_debug(&_5$$38, "phalcon/Db/Dialect/Sqlite.zep", 520); ZEPHIR_MM_RESTORE(); @@ -1614,7 +1501,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, getColumnDefinition) ZVAL_COPY(&value$$40, _8$$40); ZEPHIR_INIT_NVAR(&_10$$41); ZVAL_STRING(&_10$$41, "\""); - ZEPHIR_CALL_FUNCTION(&_11$$41, "addcslashes", &_12, 214, &value$$40, &_10$$41); + ZEPHIR_CALL_FUNCTION(&_11$$41, "addcslashes", &_12, 215, &value$$40, &_10$$41); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_13$$41); ZEPHIR_CONCAT_SVS(&_13$$41, "\"", &_11$$41, "\", "); @@ -1633,7 +1520,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, getColumnDefinition) zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_14$$42); ZVAL_STRING(&_14$$42, "\""); - ZEPHIR_CALL_FUNCTION(&_15$$42, "addcslashes", &_12, 214, &value$$40, &_14$$42); + ZEPHIR_CALL_FUNCTION(&_15$$42, "addcslashes", &_12, 215, &value$$40, &_14$$42); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_16$$42); ZEPHIR_CONCAT_SVS(&_16$$42, "\"", &_15$$42, "\", "); @@ -1653,7 +1540,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, getColumnDefinition) } else { ZEPHIR_INIT_VAR(&_21$$43); ZVAL_STRING(&_21$$43, "\""); - ZEPHIR_CALL_FUNCTION(&_22$$43, "addcslashes", &_12, 214, &typeValues, &_21$$43); + ZEPHIR_CALL_FUNCTION(&_22$$43, "addcslashes", &_12, 215, &typeValues, &_21$$43); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_23$$43); ZEPHIR_CONCAT_SVS(&_23$$43, "(\"", &_22$$43, "\")"); @@ -1690,7 +1577,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, listIndexesSql) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(table) @@ -1698,10 +1584,8 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, listIndexesSql) Z_PARAM_STR_OR_NULL(schema) Z_PARAM_STR_OR_NULL(keyName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &table_param, &schema_param, &keyName_param); if (UNEXPECTED(Z_TYPE_P(table_param) != IS_STRING && Z_TYPE_P(table_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'table' must be of the type string")); @@ -1722,15 +1606,13 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, listIndexesSql) } else { zephir_get_strval(&keyName, keyName_param); } - - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "escape", NULL, 56, &table); + ZEPHIR_CALL_METHOD(&_0, this_ptr, "escape", NULL, 57, &table); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_1); ZEPHIR_CONCAT_SVS(&_1, "SELECT sql FROM sqlite_master WHERE type = 'index' AND tbl_name = ", &_0, " COLLATE NOCASE"); zephir_get_strval(&sql, &_1); if (!(ZEPHIR_IS_EMPTY(&keyName))) { - ZEPHIR_CALL_METHOD(&_2$$3, this_ptr, "escape", NULL, 56, &keyName); + ZEPHIR_CALL_METHOD(&_2$$3, this_ptr, "escape", NULL, 57, &keyName); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_3$$3); ZEPHIR_CONCAT_SVS(&_3$$3, " AND name = ", &_2$$3, " COLLATE NOCASE"); @@ -1753,27 +1635,21 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, listTables) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *schemaName_param = NULL; zval schemaName; - zval *this_ptr = getThis(); ZVAL_UNDEF(&schemaName); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schemaName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &schemaName_param); if (!schemaName_param) { ZEPHIR_INIT_VAR(&schemaName); } else { zephir_get_strval(&schemaName, schemaName_param); } - - RETURN_MM_STRING("SELECT tbl_name FROM sqlite_master WHERE type = 'table' ORDER BY tbl_name"); } @@ -1785,19 +1661,15 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, listViews) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *schemaName_param = NULL; zval schemaName; - zval *this_ptr = getThis(); ZVAL_UNDEF(&schemaName); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schemaName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &schemaName_param); if (!schemaName_param) { ZEPHIR_INIT_VAR(&schemaName); @@ -1812,8 +1684,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, listViews) ZEPHIR_INIT_VAR(&schemaName); } } - - RETURN_MM_STRING("SELECT tbl_name FROM sqlite_master WHERE type = 'view' ORDER BY tbl_name"); } @@ -1825,14 +1695,12 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, modifyColumn) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *tableName_param = NULL, *schemaName_param = NULL, *column, column_sub, *currentColumn = NULL, currentColumn_sub, __$null; zval tableName, schemaName; - zval *this_ptr = getThis(); ZVAL_UNDEF(&tableName); ZVAL_UNDEF(&schemaName); ZVAL_UNDEF(&column_sub); ZVAL_UNDEF(¤tColumn_sub); ZVAL_NULL(&__$null); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 4) Z_PARAM_STR(tableName) @@ -1841,10 +1709,8 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, modifyColumn) Z_PARAM_OPTIONAL Z_PARAM_OBJECT_OF_CLASS_OR_NULL(currentColumn, phalcon_db_columninterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 1, &tableName_param, &schemaName_param, &column, ¤tColumn); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -1868,8 +1734,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, modifyColumn) currentColumn = ¤tColumn_sub; currentColumn = &__$null; } - - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_db_exception_ce, "Altering a DB column is not supported by SQLite", "phalcon/Db/Dialect/Sqlite.zep", 593); return; } @@ -1883,18 +1747,13 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, sharedLock) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *sqlQuery_param = NULL; zval sqlQuery; - zval *this_ptr = getThis(); ZVAL_UNDEF(&sqlQuery); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(sqlQuery) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &sqlQuery_param); if (UNEXPECTED(Z_TYPE_P(sqlQuery_param) != IS_STRING && Z_TYPE_P(sqlQuery_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'sqlQuery' must be of the type string")); @@ -1905,8 +1764,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, sharedLock) } else { ZEPHIR_INIT_VAR(&sqlQuery); } - - RETURN_CTOR(&sqlQuery); } @@ -1924,21 +1781,17 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, tableExists) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *tableName_param = NULL, *schemaName_param = NULL; zval tableName, schemaName; - zval *this_ptr = getThis(); ZVAL_UNDEF(&tableName); ZVAL_UNDEF(&schemaName); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(tableName) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schemaName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &tableName_param, &schemaName_param); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -1954,8 +1807,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, tableExists) } else { zephir_get_strval(&schemaName, schemaName_param); } - - ZEPHIR_CONCAT_SVS(return_value, "SELECT CASE WHEN COUNT(*) > 0 THEN 1 ELSE 0 END FROM sqlite_master WHERE type='table' AND tbl_name='", &tableName, "'"); RETURN_MM(); } @@ -1968,21 +1819,17 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, tableOptions) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *table_param = NULL, *schema_param = NULL; zval table, schema; - zval *this_ptr = getThis(); ZVAL_UNDEF(&table); ZVAL_UNDEF(&schema); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(table) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schema) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &table_param, &schema_param); if (UNEXPECTED(Z_TYPE_P(table_param) != IS_STRING && Z_TYPE_P(table_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'table' must be of the type string")); @@ -1998,8 +1845,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, tableOptions) } else { zephir_get_strval(&schema, schema_param); } - - RETURN_MM_STRING(""); } @@ -2011,21 +1856,16 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, truncateTable) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *tableName_param = NULL, *schemaName_param = NULL; zval tableName, schemaName, table; - zval *this_ptr = getThis(); ZVAL_UNDEF(&tableName); ZVAL_UNDEF(&schemaName); ZVAL_UNDEF(&table); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(tableName) Z_PARAM_STR(schemaName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &tableName_param, &schemaName_param); if (UNEXPECTED(Z_TYPE_P(tableName_param) != IS_STRING && Z_TYPE_P(tableName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'tableName' must be of the type string")); @@ -2045,8 +1885,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, truncateTable) } else { ZEPHIR_INIT_VAR(&schemaName); } - - if (!(ZEPHIR_IS_EMPTY(&schemaName))) { ZEPHIR_INIT_VAR(&table); ZEPHIR_CONCAT_SVSVS(&table, "\"", &schemaName, "\".\"", &tableName, "\""); @@ -2066,21 +1904,17 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, viewExists) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *viewName_param = NULL, *schemaName_param = NULL; zval viewName, schemaName; - zval *this_ptr = getThis(); ZVAL_UNDEF(&viewName); ZVAL_UNDEF(&schemaName); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(viewName) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(schemaName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &viewName_param, &schemaName_param); if (UNEXPECTED(Z_TYPE_P(viewName_param) != IS_STRING && Z_TYPE_P(viewName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'viewName' must be of the type string")); @@ -2096,8 +1930,6 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, viewExists) } else { zephir_get_strval(&schemaName, schemaName_param); } - - ZEPHIR_CONCAT_SVS(return_value, "SELECT CASE WHEN COUNT(*) > 0 THEN 1 ELSE 0 END FROM sqlite_master WHERE type='view' AND tbl_name='", &viewName, "'"); RETURN_MM(); } diff --git a/ext/phalcon/db/dialectinterface.zep.h b/ext/phalcon/db/dialectinterface.zep.h index 021812473c3..748a4755807 100644 --- a/ext/phalcon/db/dialectinterface.zep.h +++ b/ext/phalcon/db/dialectinterface.zep.h @@ -111,11 +111,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_dialectinterface_getsqlexpression, 0, 1, IS_STRING, 0) ZEND_ARG_ARRAY_INFO(0, expression, 0) ZEND_ARG_TYPE_INFO(0, escapeChar, IS_STRING, 1) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindCounts, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindCounts, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_db_dialectinterface_limit, 0, 2, IS_STRING, 0) diff --git a/ext/phalcon/db/index.zep.c b/ext/phalcon/db/index.zep.c index d2b0dd73698..c4918cfeade 100644 --- a/ext/phalcon/db/index.zep.c +++ b/ext/phalcon/db/index.zep.c @@ -96,18 +96,14 @@ PHP_METHOD(Phalcon_Db_Index, __construct) ZVAL_UNDEF(&name); ZVAL_UNDEF(&type); ZVAL_UNDEF(&columns); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(name) Z_PARAM_ARRAY(columns) Z_PARAM_OPTIONAL Z_PARAM_STR(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &name_param, &columns_param, &type_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")); @@ -125,8 +121,6 @@ PHP_METHOD(Phalcon_Db_Index, __construct) } else { zephir_get_strval(&type, type_param); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("name"), &name); zephir_update_property_zval(this_ptr, ZEND_STRL("columns"), &columns); zephir_update_property_zval(this_ptr, ZEND_STRL("type"), &type); @@ -138,9 +132,6 @@ PHP_METHOD(Phalcon_Db_Index, __construct) */ PHP_METHOD(Phalcon_Db_Index, getColumns) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "columns"); } @@ -150,9 +141,6 @@ PHP_METHOD(Phalcon_Db_Index, getColumns) */ PHP_METHOD(Phalcon_Db_Index, getName) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "name"); } @@ -162,9 +150,6 @@ PHP_METHOD(Phalcon_Db_Index, getName) */ PHP_METHOD(Phalcon_Db_Index, getType) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "type"); } diff --git a/ext/phalcon/db/profiler.zep.c b/ext/phalcon/db/profiler.zep.c index 5ada31d421f..6893767a4fe 100644 --- a/ext/phalcon/db/profiler.zep.c +++ b/ext/phalcon/db/profiler.zep.c @@ -107,9 +107,6 @@ ZEPHIR_INIT_CLASS(Phalcon_Db_Profiler) */ PHP_METHOD(Phalcon_Db_Profiler, getLastProfile) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "activeProfile"); } @@ -123,9 +120,6 @@ PHP_METHOD(Phalcon_Db_Profiler, getNumberTotalStatements) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - zephir_read_property(&_0, this_ptr, ZEND_STRL("allProfiles"), PH_NOISY_CC | PH_READONLY); RETURN_LONG(zephir_fast_count_int(&_0)); } @@ -135,9 +129,6 @@ PHP_METHOD(Phalcon_Db_Profiler, getNumberTotalStatements) */ PHP_METHOD(Phalcon_Db_Profiler, getTotalElapsedNanoseconds) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "totalNanoseconds"); } @@ -153,9 +144,8 @@ PHP_METHOD(Phalcon_Db_Profiler, getTotalElapsedMilliseconds) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&_0, this_ptr, "gettotalelapsednanoseconds", NULL, 0); zephir_check_call_status(); @@ -173,9 +163,8 @@ PHP_METHOD(Phalcon_Db_Profiler, getTotalElapsedSeconds) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&_0, this_ptr, "gettotalelapsedmilliseconds", NULL, 0); zephir_check_call_status(); @@ -187,9 +176,6 @@ PHP_METHOD(Phalcon_Db_Profiler, getTotalElapsedSeconds) */ PHP_METHOD(Phalcon_Db_Profiler, getProfiles) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "allProfiles"); } @@ -204,9 +190,8 @@ PHP_METHOD(Phalcon_Db_Profiler, reset) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); array_init(&_0); @@ -232,18 +217,14 @@ PHP_METHOD(Phalcon_Db_Profiler, startProfile) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&sqlVariables); ZVAL_UNDEF(&sqlBindTypes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(sqlStatement) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(sqlVariables) Z_PARAM_ARRAY(sqlBindTypes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &sqlStatement_param, &sqlVariables_param, &sqlBindTypes_param); zephir_get_strval(&sqlStatement, sqlStatement_param); if (!sqlVariables_param) { @@ -258,8 +239,6 @@ PHP_METHOD(Phalcon_Db_Profiler, startProfile) } else { zephir_get_arrval(&sqlBindTypes, sqlBindTypes_param); } - - ZEPHIR_INIT_VAR(&activeProfile); object_init_ex(&activeProfile, phalcon_db_profiler_item_ce); if (zephir_has_constructor(&activeProfile)) { @@ -267,15 +246,15 @@ PHP_METHOD(Phalcon_Db_Profiler, startProfile) zephir_check_call_status(); } - ZEPHIR_CALL_METHOD(NULL, &activeProfile, "setsqlstatement", NULL, 217, &sqlStatement); + ZEPHIR_CALL_METHOD(NULL, &activeProfile, "setsqlstatement", NULL, 218, &sqlStatement); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &activeProfile, "setsqlvariables", NULL, 218, &sqlVariables); + ZEPHIR_CALL_METHOD(NULL, &activeProfile, "setsqlvariables", NULL, 219, &sqlVariables); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &activeProfile, "setsqlbindtypes", NULL, 219, &sqlBindTypes); + ZEPHIR_CALL_METHOD(NULL, &activeProfile, "setsqlbindtypes", NULL, 220, &sqlBindTypes); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&_0, "hrtime", NULL, 202, &__$true); + ZEPHIR_CALL_FUNCTION(&_0, "hrtime", NULL, 203, &__$true); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &activeProfile, "setinitialtime", NULL, 220, &_0); + ZEPHIR_CALL_METHOD(NULL, &activeProfile, "setinitialtime", NULL, 221, &_0); zephir_check_call_status(); if ((zephir_method_exists_ex(this_ptr, ZEND_STRL("beforestartprofile")) == SUCCESS)) { ZEPHIR_CALL_METHOD(NULL, this_ptr, "beforestartprofile", NULL, 0, &activeProfile); @@ -301,13 +280,12 @@ PHP_METHOD(Phalcon_Db_Profiler, stopProfile) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("activeProfile"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&activeProfile, &_0); - ZEPHIR_CALL_FUNCTION(&_1, "hrtime", NULL, 202, &__$true); + ZEPHIR_CALL_FUNCTION(&_1, "hrtime", NULL, 203, &__$true); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &activeProfile, "setfinaltime", NULL, 0, &_1); zephir_check_call_status(); diff --git a/ext/phalcon/db/profiler.zep.h b/ext/phalcon/db/profiler.zep.h index 7f22723108e..6686e449d1b 100644 --- a/ext/phalcon/db/profiler.zep.h +++ b/ext/phalcon/db/profiler.zep.h @@ -36,16 +36,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_db_profiler_startprofile, 0, 1, Phalcon\\Db\\Profiler, 0) ZEND_ARG_TYPE_INFO(0, sqlStatement, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sqlVariables, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, sqlVariables, 0) -#endif -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sqlBindTypes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, sqlBindTypes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sqlVariables, IS_ARRAY, 0, "[]") +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sqlBindTypes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_db_profiler_stopprofile, 0, 0, Phalcon\\Db\\Profiler, 0) diff --git a/ext/phalcon/db/profiler/item.zep.c b/ext/phalcon/db/profiler/item.zep.c index 7f37712252a..0fb9b6905a7 100644 --- a/ext/phalcon/db/profiler/item.zep.c +++ b/ext/phalcon/db/profiler/item.zep.c @@ -71,9 +71,6 @@ ZEPHIR_INIT_CLASS(Phalcon_Db_Profiler_Item) */ PHP_METHOD(Phalcon_Db_Profiler_Item, getFinalTime) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "finalTime"); } @@ -83,9 +80,6 @@ PHP_METHOD(Phalcon_Db_Profiler_Item, getFinalTime) */ PHP_METHOD(Phalcon_Db_Profiler_Item, getInitialTime) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "initialTime"); } @@ -95,9 +89,6 @@ PHP_METHOD(Phalcon_Db_Profiler_Item, getInitialTime) */ PHP_METHOD(Phalcon_Db_Profiler_Item, getSqlBindTypes) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "sqlBindTypes"); } @@ -107,9 +98,6 @@ PHP_METHOD(Phalcon_Db_Profiler_Item, getSqlBindTypes) */ PHP_METHOD(Phalcon_Db_Profiler_Item, getSqlStatement) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "sqlStatement"); } @@ -119,9 +107,6 @@ PHP_METHOD(Phalcon_Db_Profiler_Item, getSqlStatement) */ PHP_METHOD(Phalcon_Db_Profiler_Item, getSqlVariables) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "sqlVariables"); } @@ -136,9 +121,6 @@ PHP_METHOD(Phalcon_Db_Profiler_Item, getTotalElapsedNanoseconds) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - zephir_read_property(&_0, this_ptr, ZEND_STRL("finalTime"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_1, this_ptr, ZEND_STRL("initialTime"), PH_NOISY_CC | PH_READONLY); zephir_sub_function(return_value, &_0, &_1); @@ -156,9 +138,8 @@ PHP_METHOD(Phalcon_Db_Profiler_Item, getTotalElapsedMilliseconds) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&_0, this_ptr, "gettotalelapsednanoseconds", NULL, 0); zephir_check_call_status(); @@ -176,9 +157,8 @@ PHP_METHOD(Phalcon_Db_Profiler_Item, getTotalElapsedSeconds) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&_0, this_ptr, "gettotalelapsedmilliseconds", NULL, 0); zephir_check_call_status(); @@ -195,19 +175,12 @@ PHP_METHOD(Phalcon_Db_Profiler_Item, setFinalTime) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(finalTime) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &finalTime_param); finalTime = zephir_get_doubleval(finalTime_param); - - - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_DOUBLE(&_0, finalTime); zephir_update_property_zval(this_ptr, ZEND_STRL("finalTime"), &_0); RETURN_THISW(); @@ -223,19 +196,12 @@ PHP_METHOD(Phalcon_Db_Profiler_Item, setInitialTime) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(initialTime) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &initialTime_param); initialTime = zephir_get_doubleval(initialTime_param); - - - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_DOUBLE(&_0, initialTime); zephir_update_property_zval(this_ptr, ZEND_STRL("initialTime"), &_0); RETURN_THISW(); @@ -252,19 +218,13 @@ PHP_METHOD(Phalcon_Db_Profiler_Item, setSqlBindTypes) zval *this_ptr = getThis(); ZVAL_UNDEF(&sqlBindTypes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(sqlBindTypes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &sqlBindTypes_param); zephir_get_arrval(&sqlBindTypes, sqlBindTypes_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("sqlBindTypes"), &sqlBindTypes); RETURN_THIS(); } @@ -280,19 +240,13 @@ PHP_METHOD(Phalcon_Db_Profiler_Item, setSqlStatement) zval *this_ptr = getThis(); ZVAL_UNDEF(&sqlStatement); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(sqlStatement) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &sqlStatement_param); zephir_get_strval(&sqlStatement, sqlStatement_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("sqlStatement"), &sqlStatement); RETURN_THIS(); } @@ -308,19 +262,13 @@ PHP_METHOD(Phalcon_Db_Profiler_Item, setSqlVariables) zval *this_ptr = getThis(); ZVAL_UNDEF(&sqlVariables); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(sqlVariables) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &sqlVariables_param); zephir_get_arrval(&sqlVariables, sqlVariables_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("sqlVariables"), &sqlVariables); RETURN_THIS(); } diff --git a/ext/phalcon/db/rawvalue.zep.c b/ext/phalcon/db/rawvalue.zep.c index e7ffd0f33f1..b0c7d842d43 100644 --- a/ext/phalcon/db/rawvalue.zep.c +++ b/ext/phalcon/db/rawvalue.zep.c @@ -66,18 +66,12 @@ PHP_METHOD(Phalcon_Db_RawValue, __construct) ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_1$$4); ZVAL_UNDEF(&_2$$5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &value); - - if (ZEPHIR_IS_STRING_IDENTICAL(value, "")) { ZEPHIR_INIT_VAR(&_0$$3); ZEPHIR_INIT_NVAR(&_0$$3); @@ -97,18 +91,12 @@ PHP_METHOD(Phalcon_Db_RawValue, __construct) PHP_METHOD(Phalcon_Db_RawValue, __toString) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "value"); } PHP_METHOD(Phalcon_Db_RawValue, getValue) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "value"); } diff --git a/ext/phalcon/db/reference.zep.c b/ext/phalcon/db/reference.zep.c index e16597d7e4b..e8abc284d01 100644 --- a/ext/phalcon/db/reference.zep.c +++ b/ext/phalcon/db/reference.zep.c @@ -125,16 +125,12 @@ PHP_METHOD(Phalcon_Db_Reference, __construct) ZVAL_UNDEF(&onDelete); ZVAL_UNDEF(&onUpdate); ZVAL_UNDEF(&definition); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(name) Z_PARAM_ARRAY(definition) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &name_param, &definition_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")); @@ -146,40 +142,38 @@ PHP_METHOD(Phalcon_Db_Reference, __construct) ZEPHIR_INIT_VAR(&name); } ZEPHIR_OBS_COPY_OR_DUP(&definition, definition_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("name"), &name); - ZEPHIR_OBS_VAR(&referencedTable); + zephir_memory_observe(&referencedTable); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&referencedTable, &definition, SL("referencedTable"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_db_exception_ce, "Referenced table is required", "phalcon/Db/Reference.zep", 103); return; } zephir_update_property_zval(this_ptr, ZEND_STRL("referencedTable"), &referencedTable); - ZEPHIR_OBS_VAR(&columns); + zephir_memory_observe(&columns); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&columns, &definition, SL("columns"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_db_exception_ce, "Foreign key columns are required", "phalcon/Db/Reference.zep", 109); return; } zephir_update_property_zval(this_ptr, ZEND_STRL("columns"), &columns); - ZEPHIR_OBS_VAR(&referencedColumns); + zephir_memory_observe(&referencedColumns); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&referencedColumns, &definition, SL("referencedColumns"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_db_exception_ce, "Referenced columns of the foreign key are required", "phalcon/Db/Reference.zep", 117); return; } zephir_update_property_zval(this_ptr, ZEND_STRL("referencedColumns"), &referencedColumns); - ZEPHIR_OBS_VAR(&schema); + zephir_memory_observe(&schema); if (zephir_array_isset_string_fetch(&schema, &definition, SL("schema"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("schemaName"), &schema); } - ZEPHIR_OBS_VAR(&referencedSchema); + zephir_memory_observe(&referencedSchema); if (zephir_array_isset_string_fetch(&referencedSchema, &definition, SL("referencedSchema"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("referencedSchema"), &referencedSchema); } - ZEPHIR_OBS_VAR(&onDelete); + zephir_memory_observe(&onDelete); if (zephir_array_isset_string_fetch(&onDelete, &definition, SL("onDelete"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("onDelete"), &onDelete); } - ZEPHIR_OBS_VAR(&onUpdate); + zephir_memory_observe(&onUpdate); if (zephir_array_isset_string_fetch(&onUpdate, &definition, SL("onUpdate"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("onUpdate"), &onUpdate); } @@ -195,9 +189,6 @@ PHP_METHOD(Phalcon_Db_Reference, __construct) */ PHP_METHOD(Phalcon_Db_Reference, getColumns) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "columns"); } @@ -207,9 +198,6 @@ PHP_METHOD(Phalcon_Db_Reference, getColumns) */ PHP_METHOD(Phalcon_Db_Reference, getName) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "name"); } @@ -219,9 +207,6 @@ PHP_METHOD(Phalcon_Db_Reference, getName) */ PHP_METHOD(Phalcon_Db_Reference, getReferencedColumns) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "referencedColumns"); } @@ -231,9 +216,6 @@ PHP_METHOD(Phalcon_Db_Reference, getReferencedColumns) */ PHP_METHOD(Phalcon_Db_Reference, getReferencedSchema) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "referencedSchema"); } @@ -243,9 +225,6 @@ PHP_METHOD(Phalcon_Db_Reference, getReferencedSchema) */ PHP_METHOD(Phalcon_Db_Reference, getReferencedTable) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "referencedTable"); } @@ -255,9 +234,6 @@ PHP_METHOD(Phalcon_Db_Reference, getReferencedTable) */ PHP_METHOD(Phalcon_Db_Reference, getSchemaName) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "schemaName"); } @@ -267,9 +243,6 @@ PHP_METHOD(Phalcon_Db_Reference, getSchemaName) */ PHP_METHOD(Phalcon_Db_Reference, getOnDelete) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "onDelete"); } @@ -279,9 +252,6 @@ PHP_METHOD(Phalcon_Db_Reference, getOnDelete) */ PHP_METHOD(Phalcon_Db_Reference, getOnUpdate) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "onUpdate"); } diff --git a/ext/phalcon/db/result/pdoresult.zep.c b/ext/phalcon/db/result/pdoresult.zep.c index f39c5f0f34a..426f26cc4c5 100644 --- a/ext/phalcon/db/result/pdoresult.zep.c +++ b/ext/phalcon/db/result/pdoresult.zep.c @@ -109,7 +109,6 @@ PHP_METHOD(Phalcon_Db_Result_PdoResult, __construct) ZVAL_UNDEF(&bindParams_sub); ZVAL_UNDEF(&bindTypes_sub); ZVAL_NULL(&__$null); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 5) Z_PARAM_OBJECT_OF_CLASS(connection, phalcon_db_adapter_adapterinterface_ce) @@ -119,9 +118,6 @@ PHP_METHOD(Phalcon_Db_Result_PdoResult, __construct) Z_PARAM_ZVAL_OR_NULL(bindParams) Z_PARAM_ZVAL_OR_NULL(bindTypes) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(2, 3, &connection, &result, &sqlStatement, &bindParams, &bindTypes); if (!sqlStatement) { sqlStatement = &sqlStatement_sub; @@ -135,8 +131,6 @@ PHP_METHOD(Phalcon_Db_Result_PdoResult, __construct) bindTypes = &bindTypes_sub; bindTypes = &__$null; } - - zephir_update_property_zval(this_ptr, ZEND_STRL("connection"), connection); zephir_update_property_zval(this_ptr, ZEND_STRL("pdoStatement"), result); zephir_update_property_zval(this_ptr, ZEND_STRL("sqlStatement"), sqlStatement); @@ -182,19 +176,12 @@ PHP_METHOD(Phalcon_Db_Result_PdoResult, dataSeek) ZVAL_UNDEF(&_1$$4); ZVAL_UNDEF(&_2$$4); ZVAL_UNDEF(&_3$$6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(number) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &number_param); - number = zephir_get_intval(number_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("connection"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&connection, &_0); ZEPHIR_CALL_METHOD(&pdo, &connection, "getinternalhandler", NULL, 0); @@ -244,9 +231,8 @@ PHP_METHOD(Phalcon_Db_Result_PdoResult, execute) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("pdoStatement"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_METHOD(&_0, "execute", NULL, 0); @@ -282,7 +268,6 @@ PHP_METHOD(Phalcon_Db_Result_PdoResult, fetch) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 3) Z_PARAM_OPTIONAL @@ -290,28 +275,21 @@ PHP_METHOD(Phalcon_Db_Result_PdoResult, fetch) Z_PARAM_LONG(cursorOrientation) Z_PARAM_LONG(cursorOffset) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 3, &fetchStyle_param, &cursorOrientation_param, &cursorOffset_param); if (!fetchStyle_param) { fetchStyle = 0; } else { - fetchStyle = zephir_get_intval(fetchStyle_param); - } + } if (!cursorOrientation_param) { cursorOrientation = 0; } else { - cursorOrientation = zephir_get_intval(cursorOrientation_param); - } + } if (!cursorOffset_param) { cursorOffset = 0; } else { - cursorOffset = zephir_get_intval(cursorOffset_param); - } - - + } if (1 == 1) { ZEPHIR_INIT_VAR(&mode); ZVAL_LONG(&mode, fetchStyle); @@ -361,7 +339,6 @@ PHP_METHOD(Phalcon_Db_Result_PdoResult, fetchAll) ZVAL_UNDEF(&_6); ZVAL_UNDEF(&_3$$4); ZVAL_UNDEF(&_4$$4); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 3) Z_PARAM_OPTIONAL @@ -369,16 +346,13 @@ PHP_METHOD(Phalcon_Db_Result_PdoResult, fetchAll) Z_PARAM_ZVAL(fetchArgument) Z_PARAM_ZVAL_OR_NULL(constructorArgs) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 3, &mode_param, &fetchArgument, &constructorArgs); if (!mode_param) { mode = 0; } else { - mode = zephir_get_intval(mode_param); - } + } if (!fetchArgument) { fetchArgument = &fetchArgument_sub; ZEPHIR_INIT_VAR(fetchArgument); @@ -388,8 +362,6 @@ PHP_METHOD(Phalcon_Db_Result_PdoResult, fetchAll) constructorArgs = &constructorArgs_sub; constructorArgs = &__$null; } - - if (mode == 8) { zephir_read_property(&_0$$3, this_ptr, ZEND_STRL("pdoStatement"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_1$$3, mode); @@ -441,9 +413,8 @@ PHP_METHOD(Phalcon_Db_Result_PdoResult, fetchArray) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("pdoStatement"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_1, this_ptr, ZEND_STRL("fetchMode"), PH_NOISY_CC | PH_READONLY); @@ -457,9 +428,6 @@ PHP_METHOD(Phalcon_Db_Result_PdoResult, fetchArray) */ PHP_METHOD(Phalcon_Db_Result_PdoResult, getInternalResult) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "pdoStatement"); } @@ -502,9 +470,8 @@ PHP_METHOD(Phalcon_Db_Result_PdoResult, numRows) ZVAL_UNDEF(&_9$$7); ZVAL_UNDEF(&_10$$7); ZVAL_UNDEF(&_11$$7); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("rowCount"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&rowCount, &_0); @@ -602,7 +569,6 @@ PHP_METHOD(Phalcon_Db_Result_PdoResult, setFetchMode) ZVAL_UNDEF(&_5$$5); ZVAL_UNDEF(&_6$$7); ZVAL_UNDEF(&_7$$7); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_LONG(fetchMode) @@ -610,12 +576,9 @@ PHP_METHOD(Phalcon_Db_Result_PdoResult, setFetchMode) Z_PARAM_ZVAL_OR_NULL(colNoOrClassNameOrObject) Z_PARAM_ZVAL_OR_NULL(ctorargs) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &fetchMode_param, &colNoOrClassNameOrObject, &ctorargs); - fetchMode = zephir_get_intval(fetchMode_param); if (!colNoOrClassNameOrObject) { colNoOrClassNameOrObject = &colNoOrClassNameOrObject_sub; colNoOrClassNameOrObject = &__$null; @@ -624,8 +587,6 @@ PHP_METHOD(Phalcon_Db_Result_PdoResult, setFetchMode) ctorargs = &ctorargs_sub; ctorargs = &__$null; } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("pdoStatement"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&pdoStatement, &_0); _1 = fetchMode == 8; @@ -654,7 +615,7 @@ PHP_METHOD(Phalcon_Db_Result_PdoResult, setFetchMode) RETURN_MM_BOOL(0); } } - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, fetchMode); zephir_update_property_zval(this_ptr, ZEND_STRL("fetchMode"), &_0); RETURN_MM_BOOL(1); @@ -670,7 +631,8 @@ zend_object *zephir_init_properties_Phalcon_Db_Result_PdoResult(zend_class_entry ZVAL_UNDEF(&_3$$4); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/db/result/pdoresult.zep.h b/ext/phalcon/db/result/pdoresult.zep.h index cc8a1ddcd84..add0a9066a6 100644 --- a/ext/phalcon/db/result/pdoresult.zep.h +++ b/ext/phalcon/db/result/pdoresult.zep.h @@ -66,11 +66,7 @@ ZEPHIR_INIT_FUNCS(phalcon_db_result_pdoresult_method_entry) { PHP_ME(Phalcon_Db_Result_PdoResult, execute, arginfo_phalcon_db_result_pdoresult_execute, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Db_Result_PdoResult, fetch, arginfo_phalcon_db_result_pdoresult_fetch, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Db_Result_PdoResult, fetchAll, arginfo_phalcon_db_result_pdoresult_fetchall, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Db_Result_PdoResult, fetchArray, arginfo_phalcon_db_result_pdoresult_fetcharray, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Db_Result_PdoResult, fetchArray, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Db_Result_PdoResult, fetchArray, arginfo_phalcon_db_result_pdoresult_fetcharray, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Db_Result_PdoResult, getInternalResult, arginfo_phalcon_db_result_pdoresult_getinternalresult, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Db_Result_PdoResult, numRows, arginfo_phalcon_db_result_pdoresult_numrows, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Db_Result_PdoResult, setFetchMode, arginfo_phalcon_db_result_pdoresult_setfetchmode, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/di/abstractinjectionaware.zep.c b/ext/phalcon/di/abstractinjectionaware.zep.c index 50d6d32e6e3..32833eff69f 100644 --- a/ext/phalcon/di/abstractinjectionaware.zep.c +++ b/ext/phalcon/di/abstractinjectionaware.zep.c @@ -46,9 +46,6 @@ ZEPHIR_INIT_CLASS(Phalcon_Di_AbstractInjectionAware) */ PHP_METHOD(Phalcon_Di_AbstractInjectionAware, getDI) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "container"); } @@ -62,17 +59,10 @@ PHP_METHOD(Phalcon_Di_AbstractInjectionAware, setDI) zval *this_ptr = getThis(); ZVAL_UNDEF(&container_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(container, phalcon_di_diinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &container); - - zephir_update_property_zval(this_ptr, ZEND_STRL("container"), container); } diff --git a/ext/phalcon/di/di.zep.c b/ext/phalcon/di/di.zep.c index 40eac254bfc..aca1f34303c 100644 --- a/ext/phalcon/di/di.zep.c +++ b/ext/phalcon/di/di.zep.c @@ -112,9 +112,6 @@ PHP_METHOD(Phalcon_Di_Di, __construct) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - zephir_read_static_property_ce(&_0, phalcon_di_di_ce, SL("defaultDi"), PH_NOISY_CC | PH_READONLY); if (!(zephir_is_true(&_0))) { zephir_update_static_property_ce(phalcon_di_di_ce, ZEND_STRL("defaultDi"), this_ptr); @@ -146,17 +143,13 @@ PHP_METHOD(Phalcon_Di_Di, __call) ZVAL_UNDEF(&_4$$6); ZVAL_UNDEF(&_5$$6); ZVAL_UNDEF(&arguments); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(method) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(arguments) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &method_param, &arguments_param); if (UNEXPECTED(Z_TYPE_P(method_param) != IS_STRING && Z_TYPE_P(method_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'method' must be of the type string")); @@ -173,13 +166,11 @@ PHP_METHOD(Phalcon_Di_Di, __call) } else { zephir_get_arrval(&arguments, arguments_param); } - - if (zephir_start_with_str(&method, SL("get"))) { ZVAL_LONG(&_0$$3, 3); ZEPHIR_INIT_VAR(&_1$$3); zephir_substr(&_1$$3, &method, 3 , 0, ZEPHIR_SUBSTR_NO_LENGTH); - ZEPHIR_CALL_FUNCTION(&possibleService, "lcfirst", NULL, 76, &_1$$3); + ZEPHIR_CALL_FUNCTION(&possibleService, "lcfirst", NULL, 77, &_1$$3); zephir_check_call_status(); zephir_read_property(&_2$$3, this_ptr, ZEND_STRL("services"), PH_NOISY_CC | PH_READONLY); if (zephir_array_isset(&_2$$3, &possibleService)) { @@ -189,12 +180,12 @@ PHP_METHOD(Phalcon_Di_Di, __call) } } if (zephir_start_with_str(&method, SL("set"))) { - ZEPHIR_OBS_VAR(&definition); + zephir_memory_observe(&definition); if (zephir_array_isset_long_fetch(&definition, &arguments, 0, 0)) { ZVAL_LONG(&_3$$6, 3); ZEPHIR_INIT_VAR(&_4$$6); zephir_substr(&_4$$6, &method, 3 , 0, ZEPHIR_SUBSTR_NO_LENGTH); - ZEPHIR_CALL_FUNCTION(&_5$$6, "lcfirst", NULL, 76, &_4$$6); + ZEPHIR_CALL_FUNCTION(&_5$$6, "lcfirst", NULL, 77, &_4$$6); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, this_ptr, "set", NULL, 0, &_5$$6, &definition); zephir_check_call_status(); @@ -205,7 +196,7 @@ PHP_METHOD(Phalcon_Di_Di, __call) object_init_ex(&_6, phalcon_di_exception_ce); ZEPHIR_INIT_VAR(&_7); ZEPHIR_CONCAT_SVS(&_7, "Call to undefined method or service '", &method, "'"); - ZEPHIR_CALL_METHOD(NULL, &_6, "__construct", NULL, 32, &_7); + ZEPHIR_CALL_METHOD(NULL, &_6, "__construct", NULL, 33, &_7); zephir_check_call_status(); zephir_throw_exception_debug(&_6, "phalcon/Di/Di.zep", 147); ZEPHIR_MM_RESTORE(); @@ -233,18 +224,14 @@ PHP_METHOD(Phalcon_Di_Di, attempt) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(name) Z_PARAM_ZVAL(definition) Z_PARAM_OPTIONAL Z_PARAM_BOOL(shared) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &name_param, &definition, &shared_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")); @@ -258,10 +245,7 @@ PHP_METHOD(Phalcon_Di_Di, attempt) if (!shared_param) { shared = 0; } else { - shared = zephir_get_boolval(shared_param); - } - - + } zephir_read_property(&_0, this_ptr, ZEND_STRL("services"), PH_NOISY_CC | PH_READONLY); if (zephir_array_isset(&_0, &name)) { RETURN_MM_BOOL(0); @@ -273,7 +257,7 @@ PHP_METHOD(Phalcon_Di_Di, attempt) } else { ZVAL_BOOL(&_2, 0); } - ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 77, definition, &_2); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 78, definition, &_2); zephir_check_call_status(); zephir_update_property_array(this_ptr, SL("services"), &name, &_1); zephir_read_property(&_3, this_ptr, ZEND_STRL("services"), PH_NOISY_CC | PH_READONLY); @@ -318,17 +302,14 @@ PHP_METHOD(Phalcon_Di_Di, get) ZVAL_UNDEF(&_19$$18); ZVAL_UNDEF(&_7$$5); ZVAL_UNDEF(&_18$$18); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(name) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &name_param, ¶meters); 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")); @@ -343,11 +324,9 @@ PHP_METHOD(Phalcon_Di_Di, get) parameters = ¶meters_sub; parameters = &__$null; } - - ZEPHIR_INIT_VAR(&instance); ZVAL_NULL(&instance); - ZEPHIR_OBS_VAR(&service); + zephir_memory_observe(&service); zephir_read_property(&_0, this_ptr, ZEND_STRL("services"), PH_NOISY_CC | PH_READONLY); if (zephir_array_isset_fetch(&service, &_0, &name, 0)) { ZEPHIR_CALL_METHOD(&isShared, &service, "isshared", NULL, 0); @@ -397,7 +376,7 @@ PHP_METHOD(Phalcon_Di_Di, get) object_init_ex(&_11$$9, phalcon_di_exception_ce); ZEPHIR_INIT_VAR(&_12$$9); ZEPHIR_CONCAT_SVS(&_12$$9, "Service '", &name, "' cannot be resolved"); - ZEPHIR_CALL_METHOD(NULL, &_11$$9, "__construct", NULL, 32, &_12$$9); + ZEPHIR_CALL_METHOD(NULL, &_11$$9, "__construct", NULL, 33, &_12$$9); zephir_check_call_status(); zephir_throw_exception_debug(&_11$$9, "phalcon/Di/Di.zep", 208); ZEPHIR_MM_RESTORE(); @@ -413,7 +392,7 @@ PHP_METHOD(Phalcon_Di_Di, get) object_init_ex(&_13$$12, phalcon_di_exception_ce); ZEPHIR_INIT_VAR(&_14$$12); ZEPHIR_CONCAT_SVS(&_14$$12, "Service '", &name, "' was not found in the dependency injection container"); - ZEPHIR_CALL_METHOD(NULL, &_13$$12, "__construct", NULL, 32, &_14$$12); + ZEPHIR_CALL_METHOD(NULL, &_13$$12, "__construct", NULL, 33, &_14$$12); zephir_check_call_status(); zephir_throw_exception_debug(&_13$$12, "phalcon/Di/Di.zep", 223); ZEPHIR_MM_RESTORE(); @@ -466,12 +445,8 @@ PHP_METHOD(Phalcon_Di_Di, get) PHP_METHOD(Phalcon_Di_Di, getDefault) { zval _0; - zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - zephir_read_static_property_ce(&_0, phalcon_di_di_ce, SL("defaultDi"), PH_NOISY_CC | PH_READONLY); RETURN_CTORW(&_0); } @@ -481,9 +456,6 @@ PHP_METHOD(Phalcon_Di_Di, getDefault) */ PHP_METHOD(Phalcon_Di_Di, getInternalEventsManager) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "eventsManager"); } @@ -504,15 +476,11 @@ PHP_METHOD(Phalcon_Di_Di, getRaw) ZVAL_UNDEF(&service); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -523,16 +491,14 @@ PHP_METHOD(Phalcon_Di_Di, getRaw) } else { ZEPHIR_INIT_VAR(&name); } - - - ZEPHIR_OBS_VAR(&service); + zephir_memory_observe(&service); zephir_read_property(&_0, this_ptr, ZEND_STRL("services"), PH_NOISY_CC | PH_READONLY); if (UNEXPECTED(!(zephir_array_isset_fetch(&service, &_0, &name, 0)))) { ZEPHIR_INIT_VAR(&_1$$3); object_init_ex(&_1$$3, phalcon_di_exception_ce); ZEPHIR_INIT_VAR(&_2$$3); ZEPHIR_CONCAT_SVS(&_2$$3, "Service '", &name, "' was not found in the dependency injection container"); - ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 32, &_2$$3); + ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 33, &_2$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_1$$3, "phalcon/Di/Di.zep", 293); ZEPHIR_MM_RESTORE(); @@ -559,15 +525,11 @@ PHP_METHOD(Phalcon_Di_Di, getService) ZVAL_UNDEF(&service); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -578,16 +540,14 @@ PHP_METHOD(Phalcon_Di_Di, getService) } else { ZEPHIR_INIT_VAR(&name); } - - - ZEPHIR_OBS_VAR(&service); + zephir_memory_observe(&service); zephir_read_property(&_0, this_ptr, ZEND_STRL("services"), PH_NOISY_CC | PH_READONLY); if (UNEXPECTED(!(zephir_array_isset_fetch(&service, &_0, &name, 0)))) { ZEPHIR_INIT_VAR(&_1$$3); object_init_ex(&_1$$3, phalcon_di_exception_ce); ZEPHIR_INIT_VAR(&_2$$3); ZEPHIR_CONCAT_SVS(&_2$$3, "Service '", &name, "' was not found in the dependency injection container"); - ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 32, &_2$$3); + ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 33, &_2$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_1$$3, "phalcon/Di/Di.zep", 309); ZEPHIR_MM_RESTORE(); @@ -601,9 +561,6 @@ PHP_METHOD(Phalcon_Di_Di, getService) */ PHP_METHOD(Phalcon_Di_Di, getServices) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "services"); } @@ -625,17 +582,14 @@ PHP_METHOD(Phalcon_Di_Di, getShared) ZVAL_NULL(&__$null); ZVAL_UNDEF(&instance); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(name) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &name_param, ¶meters); 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")); @@ -650,9 +604,7 @@ PHP_METHOD(Phalcon_Di_Di, getShared) parameters = ¶meters_sub; parameters = &__$null; } - - - ZEPHIR_OBS_VAR(&instance); + zephir_memory_observe(&instance); zephir_read_property(&_0, this_ptr, ZEND_STRL("sharedInstances"), PH_NOISY_CC | PH_READONLY); if (!(zephir_array_isset_fetch(&instance, &_0, &name, 0))) { ZEPHIR_CALL_METHOD(&instance, this_ptr, "get", NULL, 0, &name, parameters); @@ -685,18 +637,12 @@ PHP_METHOD(Phalcon_Di_Di, loadFromConfig) ZVAL_UNDEF(&_6$$3); ZVAL_UNDEF(&_9$$4); ZVAL_UNDEF(&_10$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(config, phalcon_config_configinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &config); - - ZEPHIR_CALL_METHOD(&services, config, "toarray", NULL, 0); zephir_check_call_status(); zephir_is_iterable(&services, 0, "phalcon/Di/Di.zep", 359); @@ -794,15 +740,11 @@ PHP_METHOD(Phalcon_Di_Di, loadFromPhp) ZVAL_UNDEF(&filePath); ZVAL_UNDEF(&services); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(filePath) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &filePath_param); if (UNEXPECTED(Z_TYPE_P(filePath_param) != IS_STRING && Z_TYPE_P(filePath_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'filePath' must be of the type string")); @@ -813,11 +755,9 @@ PHP_METHOD(Phalcon_Di_Di, loadFromPhp) } else { ZEPHIR_INIT_VAR(&filePath); } - - ZEPHIR_INIT_VAR(&services); object_init_ex(&services, phalcon_config_adapter_php_ce); - ZEPHIR_CALL_METHOD(NULL, &services, "__construct", NULL, 78, &filePath); + ZEPHIR_CALL_METHOD(NULL, &services, "__construct", NULL, 79, &filePath); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, this_ptr, "loadfromconfig", NULL, 0, &services); zephir_check_call_status(); @@ -869,17 +809,14 @@ PHP_METHOD(Phalcon_Di_Di, loadFromYaml) ZVAL_UNDEF(&filePath); ZVAL_UNDEF(&services); ZVAL_UNDEF(&callbacks); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(filePath) Z_PARAM_OPTIONAL Z_PARAM_ARRAY_OR_NULL(callbacks) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &filePath_param, &callbacks_param); if (UNEXPECTED(Z_TYPE_P(filePath_param) != IS_STRING && Z_TYPE_P(filePath_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'filePath' must be of the type string")); @@ -895,11 +832,9 @@ PHP_METHOD(Phalcon_Di_Di, loadFromYaml) } else { ZEPHIR_OBS_COPY_OR_DUP(&callbacks, callbacks_param); } - - ZEPHIR_INIT_VAR(&services); object_init_ex(&services, phalcon_config_adapter_yaml_ce); - ZEPHIR_CALL_METHOD(NULL, &services, "__construct", NULL, 79, &filePath, &callbacks); + ZEPHIR_CALL_METHOD(NULL, &services, "__construct", NULL, 80, &filePath, &callbacks); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, this_ptr, "loadfromconfig", NULL, 0, &services); zephir_check_call_status(); @@ -918,15 +853,11 @@ PHP_METHOD(Phalcon_Di_Di, has) ZVAL_UNDEF(&name); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -937,8 +868,6 @@ PHP_METHOD(Phalcon_Di_Di, has) } else { ZEPHIR_INIT_VAR(&name); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("services"), PH_NOISY_CC | PH_READONLY); RETURN_MM_BOOL(zephir_array_isset(&_0, &name)); } @@ -959,18 +888,12 @@ PHP_METHOD(Phalcon_Di_Di, offsetGet) zval *this_ptr = getThis(); ZVAL_UNDEF(&name_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &name); - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getshared", NULL, 0, name); zephir_check_call_status(); RETURN_MM(); @@ -988,18 +911,12 @@ PHP_METHOD(Phalcon_Di_Di, offsetExists) zval *this_ptr = getThis(); ZVAL_UNDEF(&name_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &name); - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "has", NULL, 0, name); zephir_check_call_status(); RETURN_MM(); @@ -1016,26 +933,20 @@ PHP_METHOD(Phalcon_Di_Di, offsetSet) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval name_sub, definition_sub; - zval *name, *definition; + zval offset_sub, value_sub; + zval *offset, *value; zval *this_ptr = getThis(); - ZVAL_UNDEF(&name_sub); - ZVAL_UNDEF(&definition_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; + ZVAL_UNDEF(&offset_sub); + ZVAL_UNDEF(&value_sub); ZEND_PARSE_PARAMETERS_START(2, 2) - Z_PARAM_ZVAL(name) - Z_PARAM_ZVAL(definition) + Z_PARAM_ZVAL(offset) + Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); - zephir_fetch_params(1, 2, 0, &name, &definition); - - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "setshared", NULL, 0, name, definition); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); + zephir_fetch_params(1, 2, 0, &offset, &value); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "setshared", NULL, 0, offset, value); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -1052,18 +963,12 @@ PHP_METHOD(Phalcon_Di_Di, offsetUnset) zval *this_ptr = getThis(); ZVAL_UNDEF(&name_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &name); - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "remove", NULL, 0, name); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); @@ -1098,18 +1003,12 @@ PHP_METHOD(Phalcon_Di_Di, register) zval *this_ptr = getThis(); ZVAL_UNDEF(&provider_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(provider, phalcon_di_serviceproviderinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &provider); - - ZEPHIR_CALL_METHOD(NULL, provider, "register", NULL, 0, this_ptr); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); @@ -1130,15 +1029,11 @@ PHP_METHOD(Phalcon_Di_Di, remove) ZVAL_UNDEF(&services); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&sharedInstances); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -1149,8 +1044,6 @@ PHP_METHOD(Phalcon_Di_Di, remove) } else { ZEPHIR_INIT_VAR(&name); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("services"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&services, &_0); zephir_array_unset(&services, &name, PH_SEPARATE); @@ -1168,12 +1061,8 @@ PHP_METHOD(Phalcon_Di_Di, remove) PHP_METHOD(Phalcon_Di_Di, reset) { zval __$null; - zval *this_ptr = getThis(); ZVAL_NULL(&__$null); - - - zephir_update_static_property_ce(phalcon_di_di_ce, ZEND_STRL("defaultDi"), &__$null); } @@ -1195,18 +1084,14 @@ PHP_METHOD(Phalcon_Di_Di, set) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(name) Z_PARAM_ZVAL(definition) Z_PARAM_OPTIONAL Z_PARAM_BOOL(shared) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &name_param, &definition, &shared_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")); @@ -1220,10 +1105,7 @@ PHP_METHOD(Phalcon_Di_Di, set) if (!shared_param) { shared = 0; } else { - shared = zephir_get_boolval(shared_param); - } - - + } ZEPHIR_INIT_VAR(&_0); object_init_ex(&_0, phalcon_di_service_ce); if (shared) { @@ -1231,7 +1113,7 @@ PHP_METHOD(Phalcon_Di_Di, set) } else { ZVAL_BOOL(&_1, 0); } - ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 77, definition, &_1); + ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 78, definition, &_1); zephir_check_call_status(); zephir_update_property_array(this_ptr, SL("services"), &name, &_0); zephir_read_property(&_2, this_ptr, ZEND_STRL("services"), PH_NOISY_CC | PH_READONLY); @@ -1246,20 +1128,12 @@ PHP_METHOD(Phalcon_Di_Di, set) PHP_METHOD(Phalcon_Di_Di, setDefault) { zval *container, container_sub; - zval *this_ptr = getThis(); ZVAL_UNDEF(&container_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(container, phalcon_di_diinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &container); - - zephir_update_static_property_ce(phalcon_di_di_ce, ZEND_STRL("defaultDi"), container); } @@ -1272,17 +1146,10 @@ PHP_METHOD(Phalcon_Di_Di, setInternalEventsManager) zval *this_ptr = getThis(); ZVAL_UNDEF(&eventsManager_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(eventsManager, phalcon_events_managerinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &eventsManager); - - zephir_update_property_zval(this_ptr, ZEND_STRL("eventsManager"), eventsManager); } @@ -1298,16 +1165,12 @@ PHP_METHOD(Phalcon_Di_Di, setService) ZVAL_UNDEF(&name); ZVAL_UNDEF(&rawDefinition_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(name) Z_PARAM_OBJECT_OF_CLASS(rawDefinition, phalcon_di_serviceinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &name_param, &rawDefinition); 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")); @@ -1318,8 +1181,6 @@ PHP_METHOD(Phalcon_Di_Di, setService) } else { ZEPHIR_INIT_VAR(&name); } - - zephir_update_property_array(this_ptr, SL("services"), &name, rawDefinition); RETVAL_ZVAL(rawDefinition, 1, 0); RETURN_MM(); @@ -1339,16 +1200,12 @@ PHP_METHOD(Phalcon_Di_Di, setShared) ZVAL_UNDEF(&name); ZVAL_UNDEF(&definition_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(name) Z_PARAM_ZVAL(definition) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &name_param, &definition); 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")); @@ -1359,8 +1216,6 @@ PHP_METHOD(Phalcon_Di_Di, setShared) } else { ZEPHIR_INIT_VAR(&name); } - - ZVAL_BOOL(&_0, 1); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "set", NULL, 0, &name, definition, &_0); zephir_check_call_status(); @@ -1377,7 +1232,8 @@ zend_object *zephir_init_properties_Phalcon_Di_Di(zend_class_entry *class_type) ZVAL_UNDEF(&_3$$4); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/di/di.zep.h b/ext/phalcon/di/di.zep.h index 51faf51b452..679db5b29bd 100644 --- a/ext/phalcon/di/di.zep.h +++ b/ext/phalcon/di/di.zep.h @@ -36,11 +36,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_di_di___call, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, method, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, arguments, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, arguments, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, arguments, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_di_di_attempt, 0, 0, 2) @@ -89,22 +85,14 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_di_di_loadfromyaml, 0, 1, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, filePath, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, callbacks, IS_ARRAY, 1, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, callbacks, 1) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, callbacks, IS_ARRAY, 1, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_di_di_has, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_END_ARG_INFO() -#if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_di_di_offsetget, 0, 1, IS_MIXED, 0) -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_di_di_offsetget, 0, 0, 1) -#endif ZEND_ARG_INFO(0, name) ZEND_END_ARG_INFO() @@ -114,8 +102,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_di_di_offsetset, 0, 2, IS_VOID, 0) - ZEND_ARG_INFO(0, name) - ZEND_ARG_INFO(0, definition) + ZEND_ARG_INFO(0, offset) + ZEND_ARG_INFO(0, value) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_di_di_offsetunset, 0, 1, IS_VOID, 0) @@ -165,11 +153,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_di_di_zephir_init_properties_phalcon_di_d ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_di_di_method_entry) { -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Di_Di, __construct, arginfo_phalcon_di_di___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) -#else - PHP_ME(Phalcon_Di_Di, __construct, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) -#endif +PHP_ME(Phalcon_Di_Di, __construct, arginfo_phalcon_di_di___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) PHP_ME(Phalcon_Di_Di, __call, arginfo_phalcon_di_di___call, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Di_Di, attempt, arginfo_phalcon_di_di_attempt, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Di_Di, get, arginfo_phalcon_di_di_get, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/di/factorydefault.zep.c b/ext/phalcon/di/factorydefault.zep.c index d06fd4f61e6..c1ff5969f87 100644 --- a/ext/phalcon/di/factorydefault.zep.c +++ b/ext/phalcon/di/factorydefault.zep.c @@ -44,28 +44,26 @@ ZEPHIR_INIT_CLASS(Phalcon_Di_FactoryDefault) */ PHP_METHOD(Phalcon_Di_FactoryDefault, __construct) { - zval _1, _5, _6, _7, _9; - zval filter, _2, _3, _4, _8; + zval _0, _4, _5, _6, _8; + zval filter, _1, _2, _3, _7; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *this_ptr = getThis(); ZVAL_UNDEF(&filter); + ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); + ZVAL_UNDEF(&_7); + ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_4); - ZVAL_UNDEF(&_8); - ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_6); - ZVAL_UNDEF(&_7); - ZVAL_UNDEF(&_9); - - - ZEPHIR_MM_GROW(); + ZVAL_UNDEF(&_8); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - ZEPHIR_CALL_PARENT(NULL, phalcon_di_factorydefault_ce, getThis(), "__construct", &_0, 0); + ZEPHIR_CALL_PARENT(NULL, phalcon_di_factorydefault_ce, getThis(), "__construct", NULL, 0); zephir_check_call_status(); ZEPHIR_INIT_VAR(&filter); object_init_ex(&filter, phalcon_filter_filterfactory_ce); @@ -74,187 +72,187 @@ PHP_METHOD(Phalcon_Di_FactoryDefault, __construct) zephir_check_call_status(); } + ZEPHIR_INIT_VAR(&_0); + zephir_create_array(&_0, 20, 0); ZEPHIR_INIT_VAR(&_1); - zephir_create_array(&_1, 20, 0); + object_init_ex(&_1, phalcon_di_service_ce); ZEPHIR_INIT_VAR(&_2); - object_init_ex(&_2, phalcon_di_service_ce); - ZEPHIR_INIT_VAR(&_3); - ZVAL_STRING(&_3, "Phalcon\\Annotations\\Adapter\\Memory"); - ZVAL_BOOL(&_4, 1); - ZEPHIR_CALL_METHOD(NULL, &_2, "__construct", NULL, 77, &_3, &_4); + ZVAL_STRING(&_2, "Phalcon\\Annotations\\Adapter\\Memory"); + ZVAL_BOOL(&_3, 1); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 78, &_2, &_3); zephir_check_call_status(); - zephir_array_update_string(&_1, SL("annotations"), &_2, PH_COPY | PH_SEPARATE); - ZEPHIR_INIT_NVAR(&_2); - object_init_ex(&_2, phalcon_di_service_ce); + zephir_array_update_string(&_0, SL("annotations"), &_1, PH_COPY | PH_SEPARATE); + ZEPHIR_INIT_NVAR(&_1); + object_init_ex(&_1, phalcon_di_service_ce); + ZEPHIR_INIT_VAR(&_4); + zephir_create_array(&_4, 2, 0); + add_assoc_stringl_ex(&_4, SL("className"), SL("Phalcon\\Assets\\Manager")); ZEPHIR_INIT_VAR(&_5); - zephir_create_array(&_5, 2, 0); - add_assoc_stringl_ex(&_5, SL("className"), SL("Phalcon\\Assets\\Manager")); + zephir_create_array(&_5, 1, 0); ZEPHIR_INIT_VAR(&_6); - zephir_create_array(&_6, 1, 0); - ZEPHIR_INIT_VAR(&_7); - zephir_create_array(&_7, 2, 0); - add_assoc_stringl_ex(&_7, SL("type"), SL("service")); - add_assoc_stringl_ex(&_7, SL("name"), SL("tag")); - zephir_array_fast_append(&_6, &_7); - zephir_array_update_string(&_5, SL("arguments"), &_6, PH_COPY | PH_SEPARATE); - ZVAL_BOOL(&_4, 1); - ZEPHIR_CALL_METHOD(NULL, &_2, "__construct", NULL, 77, &_5, &_4); + zephir_create_array(&_6, 2, 0); + add_assoc_stringl_ex(&_6, SL("type"), SL("service")); + add_assoc_stringl_ex(&_6, SL("name"), SL("tag")); + zephir_array_fast_append(&_5, &_6); + zephir_array_update_string(&_4, SL("arguments"), &_5, PH_COPY | PH_SEPARATE); + ZVAL_BOOL(&_3, 1); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 78, &_4, &_3); zephir_check_call_status(); - zephir_array_update_string(&_1, SL("assets"), &_2, PH_COPY | PH_SEPARATE); + zephir_array_update_string(&_0, SL("assets"), &_1, PH_COPY | PH_SEPARATE); + ZEPHIR_INIT_NVAR(&_1); + object_init_ex(&_1, phalcon_di_service_ce); ZEPHIR_INIT_NVAR(&_2); - object_init_ex(&_2, phalcon_di_service_ce); - ZEPHIR_INIT_NVAR(&_3); - ZVAL_STRING(&_3, "Phalcon\\Encryption\\Crypt"); - ZVAL_BOOL(&_4, 1); - ZEPHIR_CALL_METHOD(NULL, &_2, "__construct", NULL, 77, &_3, &_4); + ZVAL_STRING(&_2, "Phalcon\\Encryption\\Crypt"); + ZVAL_BOOL(&_3, 1); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 78, &_2, &_3); zephir_check_call_status(); - zephir_array_update_string(&_1, SL("crypt"), &_2, PH_COPY | PH_SEPARATE); + zephir_array_update_string(&_0, SL("crypt"), &_1, PH_COPY | PH_SEPARATE); + ZEPHIR_INIT_NVAR(&_1); + object_init_ex(&_1, phalcon_di_service_ce); ZEPHIR_INIT_NVAR(&_2); - object_init_ex(&_2, phalcon_di_service_ce); - ZEPHIR_INIT_NVAR(&_3); - ZVAL_STRING(&_3, "Phalcon\\Http\\Response\\Cookies"); - ZVAL_BOOL(&_4, 1); - ZEPHIR_CALL_METHOD(NULL, &_2, "__construct", NULL, 77, &_3, &_4); + ZVAL_STRING(&_2, "Phalcon\\Http\\Response\\Cookies"); + ZVAL_BOOL(&_3, 1); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 78, &_2, &_3); zephir_check_call_status(); - zephir_array_update_string(&_1, SL("cookies"), &_2, PH_COPY | PH_SEPARATE); + zephir_array_update_string(&_0, SL("cookies"), &_1, PH_COPY | PH_SEPARATE); + ZEPHIR_INIT_NVAR(&_1); + object_init_ex(&_1, phalcon_di_service_ce); ZEPHIR_INIT_NVAR(&_2); - object_init_ex(&_2, phalcon_di_service_ce); - ZEPHIR_INIT_NVAR(&_3); - ZVAL_STRING(&_3, "Phalcon\\Mvc\\Dispatcher"); - ZVAL_BOOL(&_4, 1); - ZEPHIR_CALL_METHOD(NULL, &_2, "__construct", NULL, 77, &_3, &_4); + ZVAL_STRING(&_2, "Phalcon\\Mvc\\Dispatcher"); + ZVAL_BOOL(&_3, 1); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 78, &_2, &_3); zephir_check_call_status(); - zephir_array_update_string(&_1, SL("dispatcher"), &_2, PH_COPY | PH_SEPARATE); + zephir_array_update_string(&_0, SL("dispatcher"), &_1, PH_COPY | PH_SEPARATE); + ZEPHIR_INIT_NVAR(&_1); + object_init_ex(&_1, phalcon_di_service_ce); ZEPHIR_INIT_NVAR(&_2); - object_init_ex(&_2, phalcon_di_service_ce); - ZEPHIR_INIT_NVAR(&_3); - ZVAL_STRING(&_3, "Phalcon\\Html\\Escaper"); - ZVAL_BOOL(&_4, 1); - ZEPHIR_CALL_METHOD(NULL, &_2, "__construct", NULL, 77, &_3, &_4); + ZVAL_STRING(&_2, "Phalcon\\Html\\Escaper"); + ZVAL_BOOL(&_3, 1); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 78, &_2, &_3); zephir_check_call_status(); - zephir_array_update_string(&_1, SL("escaper"), &_2, PH_COPY | PH_SEPARATE); + zephir_array_update_string(&_0, SL("escaper"), &_1, PH_COPY | PH_SEPARATE); + ZEPHIR_INIT_NVAR(&_1); + object_init_ex(&_1, phalcon_di_service_ce); ZEPHIR_INIT_NVAR(&_2); - object_init_ex(&_2, phalcon_di_service_ce); - ZEPHIR_INIT_NVAR(&_3); - ZVAL_STRING(&_3, "Phalcon\\Events\\Manager"); - ZVAL_BOOL(&_4, 1); - ZEPHIR_CALL_METHOD(NULL, &_2, "__construct", NULL, 77, &_3, &_4); + ZVAL_STRING(&_2, "Phalcon\\Events\\Manager"); + ZVAL_BOOL(&_3, 1); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 78, &_2, &_3); zephir_check_call_status(); - zephir_array_update_string(&_1, SL("eventsManager"), &_2, PH_COPY | PH_SEPARATE); + zephir_array_update_string(&_0, SL("eventsManager"), &_1, PH_COPY | PH_SEPARATE); + ZEPHIR_INIT_NVAR(&_1); + object_init_ex(&_1, phalcon_di_service_ce); ZEPHIR_INIT_NVAR(&_2); - object_init_ex(&_2, phalcon_di_service_ce); - ZEPHIR_INIT_NVAR(&_3); - ZVAL_STRING(&_3, "Phalcon\\Flash\\Direct"); - ZVAL_BOOL(&_4, 1); - ZEPHIR_CALL_METHOD(NULL, &_2, "__construct", NULL, 77, &_3, &_4); + ZVAL_STRING(&_2, "Phalcon\\Flash\\Direct"); + ZVAL_BOOL(&_3, 1); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 78, &_2, &_3); zephir_check_call_status(); - zephir_array_update_string(&_1, SL("flash"), &_2, PH_COPY | PH_SEPARATE); + zephir_array_update_string(&_0, SL("flash"), &_1, PH_COPY | PH_SEPARATE); + ZEPHIR_INIT_NVAR(&_1); + object_init_ex(&_1, phalcon_di_service_ce); ZEPHIR_INIT_NVAR(&_2); - object_init_ex(&_2, phalcon_di_service_ce); - ZEPHIR_INIT_NVAR(&_3); - ZVAL_STRING(&_3, "Phalcon\\Flash\\Session"); - ZVAL_BOOL(&_4, 1); - ZEPHIR_CALL_METHOD(NULL, &_2, "__construct", NULL, 77, &_3, &_4); + ZVAL_STRING(&_2, "Phalcon\\Flash\\Session"); + ZVAL_BOOL(&_3, 1); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 78, &_2, &_3); zephir_check_call_status(); - zephir_array_update_string(&_1, SL("flashSession"), &_2, PH_COPY | PH_SEPARATE); - ZEPHIR_INIT_NVAR(&_2); - object_init_ex(&_2, phalcon_di_service_ce); - ZEPHIR_CALL_METHOD(&_8, &filter, "newinstance", NULL, 93); + zephir_array_update_string(&_0, SL("flashSession"), &_1, PH_COPY | PH_SEPARATE); + ZEPHIR_INIT_NVAR(&_1); + object_init_ex(&_1, phalcon_di_service_ce); + ZEPHIR_CALL_METHOD(&_7, &filter, "newinstance", NULL, 94); zephir_check_call_status(); - ZVAL_BOOL(&_4, 1); - ZEPHIR_CALL_METHOD(NULL, &_2, "__construct", NULL, 77, &_8, &_4); + ZVAL_BOOL(&_3, 1); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 78, &_7, &_3); zephir_check_call_status(); - zephir_array_update_string(&_1, SL("filter"), &_2, PH_COPY | PH_SEPARATE); + zephir_array_update_string(&_0, SL("filter"), &_1, PH_COPY | PH_SEPARATE); + ZEPHIR_INIT_NVAR(&_1); + object_init_ex(&_1, phalcon_di_service_ce); ZEPHIR_INIT_NVAR(&_2); - object_init_ex(&_2, phalcon_di_service_ce); - ZEPHIR_INIT_NVAR(&_3); - ZVAL_STRING(&_3, "Phalcon\\Support\\HelperFactory"); - ZVAL_BOOL(&_4, 1); - ZEPHIR_CALL_METHOD(NULL, &_2, "__construct", NULL, 77, &_3, &_4); + ZVAL_STRING(&_2, "Phalcon\\Support\\HelperFactory"); + ZVAL_BOOL(&_3, 1); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 78, &_2, &_3); zephir_check_call_status(); - zephir_array_update_string(&_1, SL("helper"), &_2, PH_COPY | PH_SEPARATE); + zephir_array_update_string(&_0, SL("helper"), &_1, PH_COPY | PH_SEPARATE); + ZEPHIR_INIT_NVAR(&_1); + object_init_ex(&_1, phalcon_di_service_ce); ZEPHIR_INIT_NVAR(&_2); - object_init_ex(&_2, phalcon_di_service_ce); - ZEPHIR_INIT_NVAR(&_3); - ZVAL_STRING(&_3, "Phalcon\\Mvc\\Model\\Manager"); - ZVAL_BOOL(&_4, 1); - ZEPHIR_CALL_METHOD(NULL, &_2, "__construct", NULL, 77, &_3, &_4); + ZVAL_STRING(&_2, "Phalcon\\Mvc\\Model\\Manager"); + ZVAL_BOOL(&_3, 1); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 78, &_2, &_3); zephir_check_call_status(); - zephir_array_update_string(&_1, SL("modelsManager"), &_2, PH_COPY | PH_SEPARATE); + zephir_array_update_string(&_0, SL("modelsManager"), &_1, PH_COPY | PH_SEPARATE); + ZEPHIR_INIT_NVAR(&_1); + object_init_ex(&_1, phalcon_di_service_ce); ZEPHIR_INIT_NVAR(&_2); - object_init_ex(&_2, phalcon_di_service_ce); - ZEPHIR_INIT_NVAR(&_3); - ZVAL_STRING(&_3, "Phalcon\\Mvc\\Model\\MetaData\\Memory"); - ZVAL_BOOL(&_4, 1); - ZEPHIR_CALL_METHOD(NULL, &_2, "__construct", NULL, 77, &_3, &_4); + ZVAL_STRING(&_2, "Phalcon\\Mvc\\Model\\MetaData\\Memory"); + ZVAL_BOOL(&_3, 1); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 78, &_2, &_3); zephir_check_call_status(); - zephir_array_update_string(&_1, SL("modelsMetadata"), &_2, PH_COPY | PH_SEPARATE); + zephir_array_update_string(&_0, SL("modelsMetadata"), &_1, PH_COPY | PH_SEPARATE); + ZEPHIR_INIT_NVAR(&_1); + object_init_ex(&_1, phalcon_di_service_ce); ZEPHIR_INIT_NVAR(&_2); - object_init_ex(&_2, phalcon_di_service_ce); - ZEPHIR_INIT_NVAR(&_3); - ZVAL_STRING(&_3, "Phalcon\\Http\\Request"); - ZVAL_BOOL(&_4, 1); - ZEPHIR_CALL_METHOD(NULL, &_2, "__construct", NULL, 77, &_3, &_4); + ZVAL_STRING(&_2, "Phalcon\\Http\\Request"); + ZVAL_BOOL(&_3, 1); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 78, &_2, &_3); zephir_check_call_status(); - zephir_array_update_string(&_1, SL("request"), &_2, PH_COPY | PH_SEPARATE); + zephir_array_update_string(&_0, SL("request"), &_1, PH_COPY | PH_SEPARATE); + ZEPHIR_INIT_NVAR(&_1); + object_init_ex(&_1, phalcon_di_service_ce); ZEPHIR_INIT_NVAR(&_2); - object_init_ex(&_2, phalcon_di_service_ce); - ZEPHIR_INIT_NVAR(&_3); - ZVAL_STRING(&_3, "Phalcon\\Http\\Response"); - ZVAL_BOOL(&_4, 1); - ZEPHIR_CALL_METHOD(NULL, &_2, "__construct", NULL, 77, &_3, &_4); + ZVAL_STRING(&_2, "Phalcon\\Http\\Response"); + ZVAL_BOOL(&_3, 1); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 78, &_2, &_3); zephir_check_call_status(); - zephir_array_update_string(&_1, SL("response"), &_2, PH_COPY | PH_SEPARATE); + zephir_array_update_string(&_0, SL("response"), &_1, PH_COPY | PH_SEPARATE); + ZEPHIR_INIT_NVAR(&_1); + object_init_ex(&_1, phalcon_di_service_ce); ZEPHIR_INIT_NVAR(&_2); - object_init_ex(&_2, phalcon_di_service_ce); - ZEPHIR_INIT_NVAR(&_3); - ZVAL_STRING(&_3, "Phalcon\\Mvc\\Router"); - ZVAL_BOOL(&_4, 1); - ZEPHIR_CALL_METHOD(NULL, &_2, "__construct", NULL, 77, &_3, &_4); + ZVAL_STRING(&_2, "Phalcon\\Mvc\\Router"); + ZVAL_BOOL(&_3, 1); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 78, &_2, &_3); zephir_check_call_status(); - zephir_array_update_string(&_1, SL("router"), &_2, PH_COPY | PH_SEPARATE); + zephir_array_update_string(&_0, SL("router"), &_1, PH_COPY | PH_SEPARATE); + ZEPHIR_INIT_NVAR(&_1); + object_init_ex(&_1, phalcon_di_service_ce); ZEPHIR_INIT_NVAR(&_2); - object_init_ex(&_2, phalcon_di_service_ce); - ZEPHIR_INIT_NVAR(&_3); - ZVAL_STRING(&_3, "Phalcon\\Encryption\\Security"); - ZVAL_BOOL(&_4, 1); - ZEPHIR_CALL_METHOD(NULL, &_2, "__construct", NULL, 77, &_3, &_4); + ZVAL_STRING(&_2, "Phalcon\\Encryption\\Security"); + ZVAL_BOOL(&_3, 1); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 78, &_2, &_3); zephir_check_call_status(); - zephir_array_update_string(&_1, SL("security"), &_2, PH_COPY | PH_SEPARATE); - ZEPHIR_INIT_NVAR(&_2); - object_init_ex(&_2, phalcon_di_service_ce); + zephir_array_update_string(&_0, SL("security"), &_1, PH_COPY | PH_SEPARATE); + ZEPHIR_INIT_NVAR(&_1); + object_init_ex(&_1, phalcon_di_service_ce); + ZEPHIR_INIT_NVAR(&_5); + zephir_create_array(&_5, 2, 0); + add_assoc_stringl_ex(&_5, SL("className"), SL("Phalcon\\Html\\TagFactory")); ZEPHIR_INIT_NVAR(&_6); - zephir_create_array(&_6, 2, 0); - add_assoc_stringl_ex(&_6, SL("className"), SL("Phalcon\\Html\\TagFactory")); - ZEPHIR_INIT_NVAR(&_7); - zephir_create_array(&_7, 1, 0); - ZEPHIR_INIT_VAR(&_9); - zephir_create_array(&_9, 2, 0); - add_assoc_stringl_ex(&_9, SL("type"), SL("service")); - add_assoc_stringl_ex(&_9, SL("name"), SL("escaper")); - zephir_array_fast_append(&_7, &_9); - zephir_array_update_string(&_6, SL("arguments"), &_7, PH_COPY | PH_SEPARATE); - ZVAL_BOOL(&_4, 1); - ZEPHIR_CALL_METHOD(NULL, &_2, "__construct", NULL, 77, &_6, &_4); + zephir_create_array(&_6, 1, 0); + ZEPHIR_INIT_VAR(&_8); + zephir_create_array(&_8, 2, 0); + add_assoc_stringl_ex(&_8, SL("type"), SL("service")); + add_assoc_stringl_ex(&_8, SL("name"), SL("escaper")); + zephir_array_fast_append(&_6, &_8); + zephir_array_update_string(&_5, SL("arguments"), &_6, PH_COPY | PH_SEPARATE); + ZVAL_BOOL(&_3, 1); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 78, &_5, &_3); zephir_check_call_status(); - zephir_array_update_string(&_1, SL("tag"), &_2, PH_COPY | PH_SEPARATE); + zephir_array_update_string(&_0, SL("tag"), &_1, PH_COPY | PH_SEPARATE); + ZEPHIR_INIT_NVAR(&_1); + object_init_ex(&_1, phalcon_di_service_ce); ZEPHIR_INIT_NVAR(&_2); - object_init_ex(&_2, phalcon_di_service_ce); - ZEPHIR_INIT_NVAR(&_3); - ZVAL_STRING(&_3, "Phalcon\\Mvc\\Model\\Transaction\\Manager"); - ZVAL_BOOL(&_4, 1); - ZEPHIR_CALL_METHOD(NULL, &_2, "__construct", NULL, 77, &_3, &_4); + ZVAL_STRING(&_2, "Phalcon\\Mvc\\Model\\Transaction\\Manager"); + ZVAL_BOOL(&_3, 1); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 78, &_2, &_3); zephir_check_call_status(); - zephir_array_update_string(&_1, SL("transactionManager"), &_2, PH_COPY | PH_SEPARATE); + zephir_array_update_string(&_0, SL("transactionManager"), &_1, PH_COPY | PH_SEPARATE); + ZEPHIR_INIT_NVAR(&_1); + object_init_ex(&_1, phalcon_di_service_ce); ZEPHIR_INIT_NVAR(&_2); - object_init_ex(&_2, phalcon_di_service_ce); - ZEPHIR_INIT_NVAR(&_3); - ZVAL_STRING(&_3, "Phalcon\\Mvc\\Url"); - ZVAL_BOOL(&_4, 1); - ZEPHIR_CALL_METHOD(NULL, &_2, "__construct", NULL, 77, &_3, &_4); + ZVAL_STRING(&_2, "Phalcon\\Mvc\\Url"); + ZVAL_BOOL(&_3, 1); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 78, &_2, &_3); zephir_check_call_status(); - zephir_array_update_string(&_1, SL("url"), &_2, PH_COPY | PH_SEPARATE); - zephir_update_property_zval(this_ptr, ZEND_STRL("services"), &_1); + zephir_array_update_string(&_0, SL("url"), &_1, PH_COPY | PH_SEPARATE); + zephir_update_property_zval(this_ptr, ZEND_STRL("services"), &_0); ZEPHIR_MM_RESTORE(); } diff --git a/ext/phalcon/di/factorydefault.zep.h b/ext/phalcon/di/factorydefault.zep.h index 653abe5971c..54bc90a75e6 100644 --- a/ext/phalcon/di/factorydefault.zep.h +++ b/ext/phalcon/di/factorydefault.zep.h @@ -9,10 +9,6 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_di_factorydefault___construct, 0, 0, 0) ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_di_factorydefault_method_entry) { -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Di_FactoryDefault, __construct, arginfo_phalcon_di_factorydefault___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) -#else - PHP_ME(Phalcon_Di_FactoryDefault, __construct, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) -#endif +PHP_ME(Phalcon_Di_FactoryDefault, __construct, arginfo_phalcon_di_factorydefault___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) PHP_FE_END }; diff --git a/ext/phalcon/di/factorydefault/cli.zep.c b/ext/phalcon/di/factorydefault/cli.zep.c index d951e82ce06..38d174b1af0 100644 --- a/ext/phalcon/di/factorydefault/cli.zep.c +++ b/ext/phalcon/di/factorydefault/cli.zep.c @@ -46,27 +46,25 @@ ZEPHIR_INIT_CLASS(Phalcon_Di_FactoryDefault_Cli) */ PHP_METHOD(Phalcon_Di_FactoryDefault_Cli, __construct) { - zval _1, _6, _7, _8; - zval filter, _2, _3, _4, _5; + zval _0, _5, _6, _7; + zval filter, _1, _2, _3, _4; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *this_ptr = getThis(); ZVAL_UNDEF(&filter); + ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); + ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_5); - ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_6); ZVAL_UNDEF(&_7); - ZVAL_UNDEF(&_8); - + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - ZEPHIR_MM_GROW(); - - ZEPHIR_CALL_PARENT(NULL, phalcon_di_factorydefault_cli_ce, getThis(), "__construct", &_0, 0); + ZEPHIR_CALL_PARENT(NULL, phalcon_di_factorydefault_cli_ce, getThis(), "__construct", NULL, 0); zephir_check_call_status(); ZEPHIR_INIT_VAR(&filter); object_init_ex(&filter, phalcon_filter_filterfactory_ce); @@ -75,114 +73,114 @@ PHP_METHOD(Phalcon_Di_FactoryDefault_Cli, __construct) zephir_check_call_status(); } + ZEPHIR_INIT_VAR(&_0); + zephir_create_array(&_0, 12, 0); ZEPHIR_INIT_VAR(&_1); - zephir_create_array(&_1, 12, 0); + object_init_ex(&_1, phalcon_di_service_ce); ZEPHIR_INIT_VAR(&_2); - object_init_ex(&_2, phalcon_di_service_ce); - ZEPHIR_INIT_VAR(&_3); - ZVAL_STRING(&_3, "Phalcon\\Annotations\\Adapter\\Memory"); - ZVAL_BOOL(&_4, 1); - ZEPHIR_CALL_METHOD(NULL, &_2, "__construct", NULL, 77, &_3, &_4); + ZVAL_STRING(&_2, "Phalcon\\Annotations\\Adapter\\Memory"); + ZVAL_BOOL(&_3, 1); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 78, &_2, &_3); zephir_check_call_status(); - zephir_array_update_string(&_1, SL("annotations"), &_2, PH_COPY | PH_SEPARATE); + zephir_array_update_string(&_0, SL("annotations"), &_1, PH_COPY | PH_SEPARATE); + ZEPHIR_INIT_NVAR(&_1); + object_init_ex(&_1, phalcon_di_service_ce); ZEPHIR_INIT_NVAR(&_2); - object_init_ex(&_2, phalcon_di_service_ce); - ZEPHIR_INIT_NVAR(&_3); - ZVAL_STRING(&_3, "Phalcon\\Cli\\Dispatcher"); - ZVAL_BOOL(&_4, 1); - ZEPHIR_CALL_METHOD(NULL, &_2, "__construct", NULL, 77, &_3, &_4); + ZVAL_STRING(&_2, "Phalcon\\Cli\\Dispatcher"); + ZVAL_BOOL(&_3, 1); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 78, &_2, &_3); zephir_check_call_status(); - zephir_array_update_string(&_1, SL("dispatcher"), &_2, PH_COPY | PH_SEPARATE); + zephir_array_update_string(&_0, SL("dispatcher"), &_1, PH_COPY | PH_SEPARATE); + ZEPHIR_INIT_NVAR(&_1); + object_init_ex(&_1, phalcon_di_service_ce); ZEPHIR_INIT_NVAR(&_2); - object_init_ex(&_2, phalcon_di_service_ce); - ZEPHIR_INIT_NVAR(&_3); - ZVAL_STRING(&_3, "Phalcon\\Html\\Escaper"); - ZVAL_BOOL(&_4, 1); - ZEPHIR_CALL_METHOD(NULL, &_2, "__construct", NULL, 77, &_3, &_4); + ZVAL_STRING(&_2, "Phalcon\\Html\\Escaper"); + ZVAL_BOOL(&_3, 1); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 78, &_2, &_3); zephir_check_call_status(); - zephir_array_update_string(&_1, SL("escaper"), &_2, PH_COPY | PH_SEPARATE); + zephir_array_update_string(&_0, SL("escaper"), &_1, PH_COPY | PH_SEPARATE); + ZEPHIR_INIT_NVAR(&_1); + object_init_ex(&_1, phalcon_di_service_ce); ZEPHIR_INIT_NVAR(&_2); - object_init_ex(&_2, phalcon_di_service_ce); - ZEPHIR_INIT_NVAR(&_3); - ZVAL_STRING(&_3, "Phalcon\\Events\\Manager"); - ZVAL_BOOL(&_4, 1); - ZEPHIR_CALL_METHOD(NULL, &_2, "__construct", NULL, 77, &_3, &_4); + ZVAL_STRING(&_2, "Phalcon\\Events\\Manager"); + ZVAL_BOOL(&_3, 1); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 78, &_2, &_3); zephir_check_call_status(); - zephir_array_update_string(&_1, SL("eventsManager"), &_2, PH_COPY | PH_SEPARATE); - ZEPHIR_INIT_NVAR(&_2); - object_init_ex(&_2, phalcon_di_service_ce); - ZEPHIR_CALL_METHOD(&_5, &filter, "newinstance", NULL, 93); + zephir_array_update_string(&_0, SL("eventsManager"), &_1, PH_COPY | PH_SEPARATE); + ZEPHIR_INIT_NVAR(&_1); + object_init_ex(&_1, phalcon_di_service_ce); + ZEPHIR_CALL_METHOD(&_4, &filter, "newinstance", NULL, 94); zephir_check_call_status(); - ZVAL_BOOL(&_4, 1); - ZEPHIR_CALL_METHOD(NULL, &_2, "__construct", NULL, 77, &_5, &_4); + ZVAL_BOOL(&_3, 1); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 78, &_4, &_3); zephir_check_call_status(); - zephir_array_update_string(&_1, SL("filter"), &_2, PH_COPY | PH_SEPARATE); + zephir_array_update_string(&_0, SL("filter"), &_1, PH_COPY | PH_SEPARATE); + ZEPHIR_INIT_NVAR(&_1); + object_init_ex(&_1, phalcon_di_service_ce); ZEPHIR_INIT_NVAR(&_2); - object_init_ex(&_2, phalcon_di_service_ce); - ZEPHIR_INIT_NVAR(&_3); - ZVAL_STRING(&_3, "Phalcon\\Support\\HelperFactory"); - ZVAL_BOOL(&_4, 1); - ZEPHIR_CALL_METHOD(NULL, &_2, "__construct", NULL, 77, &_3, &_4); + ZVAL_STRING(&_2, "Phalcon\\Support\\HelperFactory"); + ZVAL_BOOL(&_3, 1); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 78, &_2, &_3); zephir_check_call_status(); - zephir_array_update_string(&_1, SL("helper"), &_2, PH_COPY | PH_SEPARATE); + zephir_array_update_string(&_0, SL("helper"), &_1, PH_COPY | PH_SEPARATE); + ZEPHIR_INIT_NVAR(&_1); + object_init_ex(&_1, phalcon_di_service_ce); ZEPHIR_INIT_NVAR(&_2); - object_init_ex(&_2, phalcon_di_service_ce); - ZEPHIR_INIT_NVAR(&_3); - ZVAL_STRING(&_3, "Phalcon\\Mvc\\Model\\Manager"); - ZVAL_BOOL(&_4, 1); - ZEPHIR_CALL_METHOD(NULL, &_2, "__construct", NULL, 77, &_3, &_4); + ZVAL_STRING(&_2, "Phalcon\\Mvc\\Model\\Manager"); + ZVAL_BOOL(&_3, 1); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 78, &_2, &_3); zephir_check_call_status(); - zephir_array_update_string(&_1, SL("modelsManager"), &_2, PH_COPY | PH_SEPARATE); + zephir_array_update_string(&_0, SL("modelsManager"), &_1, PH_COPY | PH_SEPARATE); + ZEPHIR_INIT_NVAR(&_1); + object_init_ex(&_1, phalcon_di_service_ce); ZEPHIR_INIT_NVAR(&_2); - object_init_ex(&_2, phalcon_di_service_ce); - ZEPHIR_INIT_NVAR(&_3); - ZVAL_STRING(&_3, "Phalcon\\Mvc\\Model\\MetaData\\Memory"); - ZVAL_BOOL(&_4, 1); - ZEPHIR_CALL_METHOD(NULL, &_2, "__construct", NULL, 77, &_3, &_4); + ZVAL_STRING(&_2, "Phalcon\\Mvc\\Model\\MetaData\\Memory"); + ZVAL_BOOL(&_3, 1); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 78, &_2, &_3); zephir_check_call_status(); - zephir_array_update_string(&_1, SL("modelsMetadata"), &_2, PH_COPY | PH_SEPARATE); + zephir_array_update_string(&_0, SL("modelsMetadata"), &_1, PH_COPY | PH_SEPARATE); + ZEPHIR_INIT_NVAR(&_1); + object_init_ex(&_1, phalcon_di_service_ce); ZEPHIR_INIT_NVAR(&_2); - object_init_ex(&_2, phalcon_di_service_ce); - ZEPHIR_INIT_NVAR(&_3); - ZVAL_STRING(&_3, "Phalcon\\Cli\\Router"); - ZVAL_BOOL(&_4, 1); - ZEPHIR_CALL_METHOD(NULL, &_2, "__construct", NULL, 77, &_3, &_4); + ZVAL_STRING(&_2, "Phalcon\\Cli\\Router"); + ZVAL_BOOL(&_3, 1); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 78, &_2, &_3); zephir_check_call_status(); - zephir_array_update_string(&_1, SL("router"), &_2, PH_COPY | PH_SEPARATE); + zephir_array_update_string(&_0, SL("router"), &_1, PH_COPY | PH_SEPARATE); + ZEPHIR_INIT_NVAR(&_1); + object_init_ex(&_1, phalcon_di_service_ce); ZEPHIR_INIT_NVAR(&_2); - object_init_ex(&_2, phalcon_di_service_ce); - ZEPHIR_INIT_NVAR(&_3); - ZVAL_STRING(&_3, "Phalcon\\Encryption\\Security"); - ZVAL_BOOL(&_4, 1); - ZEPHIR_CALL_METHOD(NULL, &_2, "__construct", NULL, 77, &_3, &_4); + ZVAL_STRING(&_2, "Phalcon\\Encryption\\Security"); + ZVAL_BOOL(&_3, 1); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 78, &_2, &_3); zephir_check_call_status(); - zephir_array_update_string(&_1, SL("security"), &_2, PH_COPY | PH_SEPARATE); - ZEPHIR_INIT_NVAR(&_2); - object_init_ex(&_2, phalcon_di_service_ce); + zephir_array_update_string(&_0, SL("security"), &_1, PH_COPY | PH_SEPARATE); + ZEPHIR_INIT_NVAR(&_1); + object_init_ex(&_1, phalcon_di_service_ce); + ZEPHIR_INIT_VAR(&_5); + zephir_create_array(&_5, 2, 0); + add_assoc_stringl_ex(&_5, SL("className"), SL("Phalcon\\Html\\TagFactory")); ZEPHIR_INIT_VAR(&_6); - zephir_create_array(&_6, 2, 0); - add_assoc_stringl_ex(&_6, SL("className"), SL("Phalcon\\Html\\TagFactory")); + zephir_create_array(&_6, 1, 0); ZEPHIR_INIT_VAR(&_7); - zephir_create_array(&_7, 1, 0); - ZEPHIR_INIT_VAR(&_8); - zephir_create_array(&_8, 2, 0); - add_assoc_stringl_ex(&_8, SL("type"), SL("service")); - add_assoc_stringl_ex(&_8, SL("name"), SL("escaper")); - zephir_array_fast_append(&_7, &_8); - zephir_array_update_string(&_6, SL("arguments"), &_7, PH_COPY | PH_SEPARATE); - ZVAL_BOOL(&_4, 1); - ZEPHIR_CALL_METHOD(NULL, &_2, "__construct", NULL, 77, &_6, &_4); + zephir_create_array(&_7, 2, 0); + add_assoc_stringl_ex(&_7, SL("type"), SL("service")); + add_assoc_stringl_ex(&_7, SL("name"), SL("escaper")); + zephir_array_fast_append(&_6, &_7); + zephir_array_update_string(&_5, SL("arguments"), &_6, PH_COPY | PH_SEPARATE); + ZVAL_BOOL(&_3, 1); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 78, &_5, &_3); zephir_check_call_status(); - zephir_array_update_string(&_1, SL("tag"), &_2, PH_COPY | PH_SEPARATE); + zephir_array_update_string(&_0, SL("tag"), &_1, PH_COPY | PH_SEPARATE); + ZEPHIR_INIT_NVAR(&_1); + object_init_ex(&_1, phalcon_di_service_ce); ZEPHIR_INIT_NVAR(&_2); - object_init_ex(&_2, phalcon_di_service_ce); - ZEPHIR_INIT_NVAR(&_3); - ZVAL_STRING(&_3, "Phalcon\\Mvc\\Model\\Transaction\\Manager"); - ZVAL_BOOL(&_4, 1); - ZEPHIR_CALL_METHOD(NULL, &_2, "__construct", NULL, 77, &_3, &_4); + ZVAL_STRING(&_2, "Phalcon\\Mvc\\Model\\Transaction\\Manager"); + ZVAL_BOOL(&_3, 1); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 78, &_2, &_3); zephir_check_call_status(); - zephir_array_update_string(&_1, SL("transactionManager"), &_2, PH_COPY | PH_SEPARATE); - zephir_update_property_zval(this_ptr, ZEND_STRL("services"), &_1); + zephir_array_update_string(&_0, SL("transactionManager"), &_1, PH_COPY | PH_SEPARATE); + zephir_update_property_zval(this_ptr, ZEND_STRL("services"), &_0); ZEPHIR_MM_RESTORE(); } diff --git a/ext/phalcon/di/factorydefault/cli.zep.h b/ext/phalcon/di/factorydefault/cli.zep.h index d624fe30a3f..8ad94973d7f 100644 --- a/ext/phalcon/di/factorydefault/cli.zep.h +++ b/ext/phalcon/di/factorydefault/cli.zep.h @@ -9,10 +9,6 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_di_factorydefault_cli___construct, 0, 0, ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_di_factorydefault_cli_method_entry) { -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Di_FactoryDefault_Cli, __construct, arginfo_phalcon_di_factorydefault_cli___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) -#else - PHP_ME(Phalcon_Di_FactoryDefault_Cli, __construct, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) -#endif +PHP_ME(Phalcon_Di_FactoryDefault_Cli, __construct, arginfo_phalcon_di_factorydefault_cli___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) PHP_FE_END }; diff --git a/ext/phalcon/di/injectable.zep.c b/ext/phalcon/di/injectable.zep.c index 7b99f0ec20c..cc6b96d9965 100644 --- a/ext/phalcon/di/injectable.zep.c +++ b/ext/phalcon/di/injectable.zep.c @@ -94,15 +94,11 @@ PHP_METHOD(Phalcon_Di_Injectable, __get) ZVAL_UNDEF(&_3$$4); ZVAL_UNDEF(&_4$$4); ZVAL_UNDEF(&_2$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(propertyName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &propertyName_param); if (UNEXPECTED(Z_TYPE_P(propertyName_param) != IS_STRING && Z_TYPE_P(propertyName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'propertyName' must be of the type string")); @@ -113,8 +109,6 @@ PHP_METHOD(Phalcon_Di_Injectable, __get) } else { ZEPHIR_INIT_VAR(&propertyName); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "getdi", NULL, 0); zephir_check_call_status(); ZEPHIR_CPY_WRT(&container, &_0); @@ -134,7 +128,7 @@ PHP_METHOD(Phalcon_Di_Injectable, __get) ZEPHIR_CALL_METHOD(&_1$$4, &container, "get", NULL, 0, &_3$$4, &_2$$4); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("persistent"), &_1$$4); - ZEPHIR_OBS_VAR(&_4$$4); + zephir_memory_observe(&_4$$4); zephir_read_property(&_4$$4, this_ptr, ZEND_STRL("persistent"), PH_NOISY_CC); RETURN_CCTOR(&_4$$4); } @@ -166,15 +160,11 @@ PHP_METHOD(Phalcon_Di_Injectable, __isset) ZVAL_UNDEF(&name); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -185,8 +175,6 @@ PHP_METHOD(Phalcon_Di_Injectable, __isset) } else { ZEPHIR_INIT_VAR(&name); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "getdi", NULL, 0); zephir_check_call_status(); ZEPHIR_RETURN_CALL_METHOD(&_0, "has", NULL, 0, &name); @@ -202,19 +190,17 @@ PHP_METHOD(Phalcon_Di_Injectable, getDI) zval container, _0; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_1 = NULL; zval *this_ptr = getThis(); ZVAL_UNDEF(&container); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("container"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&container, &_0); if (Z_TYPE_P(&container) == IS_NULL) { - ZEPHIR_CALL_CE_STATIC(&container, phalcon_di_di_ce, "getdefault", &_1, 0); + ZEPHIR_CALL_CE_STATIC(&container, phalcon_di_di_ce, "getdefault", NULL, 0); zephir_check_call_status(); if (UNEXPECTED(Z_TYPE_P(&container) != IS_OBJECT)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_di_exception_ce, "A dependency injection container is required to access internal services", "phalcon/Di/Injectable.zep", 126); @@ -235,17 +221,10 @@ PHP_METHOD(Phalcon_Di_Injectable, setDI) zval *this_ptr = getThis(); ZVAL_UNDEF(&container_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(container, phalcon_di_diinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &container); - - zephir_update_property_zval(this_ptr, ZEND_STRL("container"), container); } diff --git a/ext/phalcon/di/service.zep.c b/ext/phalcon/di/service.zep.c index b86999c7614..14cee526376 100644 --- a/ext/phalcon/di/service.zep.c +++ b/ext/phalcon/di/service.zep.c @@ -78,24 +78,16 @@ PHP_METHOD(Phalcon_Di_Service, __construct) ZVAL_UNDEF(&definition_sub); ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ZVAL(definition) Z_PARAM_OPTIONAL Z_PARAM_BOOL(shared) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 1, &definition, &shared_param); if (!shared_param) { shared = 0; } else { - shared = zephir_get_boolval(shared_param); - } - - + } zephir_update_property_zval(this_ptr, ZEND_STRL("definition"), definition); if (shared) { zephir_update_property_zval(this_ptr, ZEND_STRL("shared"), &__$true); @@ -109,9 +101,6 @@ PHP_METHOD(Phalcon_Di_Service, __construct) */ PHP_METHOD(Phalcon_Di_Service, getDefinition) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "definition"); } @@ -132,20 +121,13 @@ PHP_METHOD(Phalcon_Di_Service, getParameter) ZVAL_UNDEF(¶meter); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(position) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &position_param); - position = zephir_get_intval(position_param); - - - ZEPHIR_OBS_VAR(&_0); + zephir_memory_observe(&_0); zephir_read_property(&_0, this_ptr, ZEND_STRL("definition"), PH_NOISY_CC); if (UNEXPECTED(Z_TYPE_P(&_0) != IS_ARRAY)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_di_exception_ce, "Definition must be an array to obtain its parameters", "phalcon/Di/Service.zep", 80); @@ -165,9 +147,6 @@ PHP_METHOD(Phalcon_Di_Service, getParameter) */ PHP_METHOD(Phalcon_Di_Service, isResolved) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "resolved"); } @@ -177,9 +156,6 @@ PHP_METHOD(Phalcon_Di_Service, isResolved) */ PHP_METHOD(Phalcon_Di_Service, isShared) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "shared"); } @@ -211,17 +187,14 @@ PHP_METHOD(Phalcon_Di_Service, resolve) ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_5$$12); ZVAL_UNDEF(&_7$$19); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(parameters) Z_PARAM_OBJECT_OF_CLASS_OR_NULL(container, phalcon_di_diinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 2, ¶meters, &container); if (!parameters) { parameters = ¶meters_sub; @@ -231,8 +204,6 @@ PHP_METHOD(Phalcon_Di_Service, resolve) container = &container_sub; container = &__$null; } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("shared"), PH_NOISY_CC | PH_READONLY); _1 = zephir_is_true(&_0); if (_1) { @@ -295,7 +266,7 @@ PHP_METHOD(Phalcon_Di_Service, resolve) zephir_check_call_status(); } - ZEPHIR_CALL_METHOD(&instance, &builder, "build", NULL, 221, container, &definition, parameters); + ZEPHIR_CALL_METHOD(&instance, &builder, "build", NULL, 222, container, &definition, parameters); zephir_check_call_status(); } else { found = 0; @@ -305,7 +276,7 @@ PHP_METHOD(Phalcon_Di_Service, resolve) if (UNEXPECTED(found == 0)) { ZEPHIR_INIT_VAR(&_7$$19); object_init_ex(&_7$$19, phalcon_di_exception_serviceresolutionexception_ce); - ZEPHIR_CALL_METHOD(NULL, &_7$$19, "__construct", NULL, 32); + ZEPHIR_CALL_METHOD(NULL, &_7$$19, "__construct", NULL, 33); zephir_check_call_status(); zephir_throw_exception_debug(&_7$$19, "phalcon/Di/Service.zep", 195); ZEPHIR_MM_RESTORE(); @@ -332,17 +303,10 @@ PHP_METHOD(Phalcon_Di_Service, setDefinition) zval *this_ptr = getThis(); ZVAL_UNDEF(&definition_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(definition) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &definition); - - zephir_update_property_zval(this_ptr, ZEND_STRL("definition"), definition); } @@ -363,28 +327,21 @@ PHP_METHOD(Phalcon_Di_Service, setParameter) ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_2$$5); ZVAL_UNDEF(¶meter); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_LONG(position) Z_PARAM_ARRAY(parameter) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &position_param, ¶meter_param); - position = zephir_get_intval(position_param); ZEPHIR_OBS_COPY_OR_DUP(¶meter, parameter_param); - - - ZEPHIR_OBS_VAR(&_0); + zephir_memory_observe(&_0); zephir_read_property(&_0, this_ptr, ZEND_STRL("definition"), PH_NOISY_CC); if (UNEXPECTED(Z_TYPE_P(&_0) != IS_ARRAY)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_di_exception_ce, "Definition must be an array to update its parameters", "phalcon/Di/Service.zep", 228); return; } - ZEPHIR_OBS_VAR(&arguments); + zephir_memory_observe(&arguments); zephir_read_property(&_1, this_ptr, ZEND_STRL("definition"), PH_NOISY_CC | PH_READONLY); if (zephir_array_isset_string_fetch(&arguments, &_1, SL("arguments"), 0)) { zephir_array_update_long(&arguments, position, ¶meter, PH_COPY | PH_SEPARATE ZEPHIR_DEBUG_PARAMS_DUMMY); @@ -411,18 +368,10 @@ PHP_METHOD(Phalcon_Di_Service, setShared) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(shared) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &shared_param); - shared = zephir_get_boolval(shared_param); - - if (shared) { zephir_update_property_zval(this_ptr, ZEND_STRL("shared"), &__$true); } else { @@ -439,17 +388,10 @@ PHP_METHOD(Phalcon_Di_Service, setSharedInstance) zval *this_ptr = getThis(); ZVAL_UNDEF(&sharedInstance_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(sharedInstance) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &sharedInstance); - - zephir_update_property_zval(this_ptr, ZEND_STRL("sharedInstance"), sharedInstance); } diff --git a/ext/phalcon/di/service.zep.h b/ext/phalcon/di/service.zep.h index 385cbbcd8c2..0793ce69694 100644 --- a/ext/phalcon/di/service.zep.h +++ b/ext/phalcon/di/service.zep.h @@ -59,11 +59,7 @@ ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_di_service_method_entry) { PHP_ME(Phalcon_Di_Service, __construct, arginfo_phalcon_di_service___construct, ZEND_ACC_FINAL|ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Di_Service, getDefinition, arginfo_phalcon_di_service_getdefinition, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Di_Service, getDefinition, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Di_Service, getDefinition, arginfo_phalcon_di_service_getdefinition, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Di_Service, getParameter, arginfo_phalcon_di_service_getparameter, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Di_Service, isResolved, arginfo_phalcon_di_service_isresolved, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Di_Service, isShared, arginfo_phalcon_di_service_isshared, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/di/service/builder.zep.c b/ext/phalcon/di/service/builder.zep.c index 1e0de1604ee..aa20a7ac1b8 100644 --- a/ext/phalcon/di/service/builder.zep.c +++ b/ext/phalcon/di/service/builder.zep.c @@ -114,7 +114,6 @@ PHP_METHOD(Phalcon_Di_Service_Builder, build) ZVAL_UNDEF(&_12$$17); ZVAL_UNDEF(&_22$$23); ZVAL_UNDEF(&_23$$23); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_OBJECT_OF_CLASS(container, phalcon_di_diinterface_ce) @@ -122,19 +121,15 @@ PHP_METHOD(Phalcon_Di_Service_Builder, build) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &container, &definition_param, ¶meters); ZEPHIR_OBS_COPY_OR_DUP(&definition, definition_param); if (!parameters) { parameters = ¶meters_sub; parameters = &__$null; } - - - ZEPHIR_OBS_VAR(&className); + zephir_memory_observe(&className); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&className, &definition, SL("className"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_di_exception_ce, "Invalid service definition. Missing 'className' parameter", "phalcon/Di/Service/Builder.zep", 41); return; @@ -150,9 +145,9 @@ PHP_METHOD(Phalcon_Di_Service_Builder, build) zephir_check_call_status(); } } else { - ZEPHIR_OBS_VAR(&arguments); + zephir_memory_observe(&arguments); if (zephir_array_isset_string_fetch(&arguments, &definition, SL("arguments"), 0)) { - ZEPHIR_CALL_METHOD(&_0$$8, this_ptr, "buildparameters", NULL, 222, container, &arguments); + ZEPHIR_CALL_METHOD(&_0$$8, this_ptr, "buildparameters", NULL, 223, container, &arguments); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&instance); ZEPHIR_LAST_CALL_STATUS = zephir_create_instance_params(&instance, &className, &_0$$8); @@ -163,7 +158,7 @@ PHP_METHOD(Phalcon_Di_Service_Builder, build) zephir_check_call_status(); } } - ZEPHIR_OBS_VAR(¶mCalls); + zephir_memory_observe(¶mCalls); if (zephir_array_isset_string_fetch(¶mCalls, &definition, SL("calls"), 0)) { if (UNEXPECTED(Z_TYPE_P(&instance) != IS_OBJECT)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_di_exception_ce, "The definition has setter injection parameters but the constructor didn't return an instance", "phalcon/Di/Service/Builder.zep", 78); @@ -190,7 +185,7 @@ PHP_METHOD(Phalcon_Di_Service_Builder, build) object_init_ex(&_5$$14, phalcon_di_exception_ce); ZEPHIR_INIT_NVAR(&_6$$14); ZEPHIR_CONCAT_SV(&_6$$14, "Method call must be an array on position ", &methodPosition); - ZEPHIR_CALL_METHOD(NULL, &_5$$14, "__construct", &_7, 32, &_6$$14); + ZEPHIR_CALL_METHOD(NULL, &_5$$14, "__construct", &_7, 33, &_6$$14); zephir_check_call_status(); zephir_throw_exception_debug(&_5$$14, "phalcon/Di/Service/Builder.zep", 97); ZEPHIR_MM_RESTORE(); @@ -202,7 +197,7 @@ PHP_METHOD(Phalcon_Di_Service_Builder, build) object_init_ex(&_8$$15, phalcon_di_exception_ce); ZEPHIR_INIT_NVAR(&_9$$15); ZEPHIR_CONCAT_SV(&_9$$15, "The method name is required on position ", &methodPosition); - ZEPHIR_CALL_METHOD(NULL, &_8$$15, "__construct", &_7, 32, &_9$$15); + ZEPHIR_CALL_METHOD(NULL, &_8$$15, "__construct", &_7, 33, &_9$$15); zephir_check_call_status(); zephir_throw_exception_debug(&_8$$15, "phalcon/Di/Service/Builder.zep", 106); ZEPHIR_MM_RESTORE(); @@ -220,7 +215,7 @@ PHP_METHOD(Phalcon_Di_Service_Builder, build) zephir_cast_to_string(&_11$$17, &methodPosition); ZEPHIR_INIT_NVAR(&_12$$17); ZEPHIR_CONCAT_SV(&_12$$17, "Call arguments must be an array on position ", &_11$$17); - ZEPHIR_CALL_METHOD(NULL, &_10$$17, "__construct", &_7, 32, &_12$$17); + ZEPHIR_CALL_METHOD(NULL, &_10$$17, "__construct", &_7, 33, &_12$$17); zephir_check_call_status(); zephir_throw_exception_debug(&_10$$17, "phalcon/Di/Service/Builder.zep", 119); ZEPHIR_MM_RESTORE(); @@ -228,7 +223,7 @@ PHP_METHOD(Phalcon_Di_Service_Builder, build) } if (zephir_fast_count_int(&arguments)) { ZEPHIR_INIT_NVAR(&_13$$18); - ZEPHIR_CALL_METHOD(&_14$$18, this_ptr, "buildparameters", NULL, 222, container, &arguments); + ZEPHIR_CALL_METHOD(&_14$$18, this_ptr, "buildparameters", NULL, 223, container, &arguments); zephir_check_call_status(); ZEPHIR_CALL_USER_FUNC_ARRAY(&_13$$18, &methodCall, &_14$$18); zephir_check_call_status(); @@ -257,7 +252,7 @@ PHP_METHOD(Phalcon_Di_Service_Builder, build) object_init_ex(&_16$$20, phalcon_di_exception_ce); ZEPHIR_INIT_NVAR(&_17$$20); ZEPHIR_CONCAT_SV(&_17$$20, "Method call must be an array on position ", &methodPosition); - ZEPHIR_CALL_METHOD(NULL, &_16$$20, "__construct", &_7, 32, &_17$$20); + ZEPHIR_CALL_METHOD(NULL, &_16$$20, "__construct", &_7, 33, &_17$$20); zephir_check_call_status(); zephir_throw_exception_debug(&_16$$20, "phalcon/Di/Service/Builder.zep", 97); ZEPHIR_MM_RESTORE(); @@ -269,7 +264,7 @@ PHP_METHOD(Phalcon_Di_Service_Builder, build) object_init_ex(&_18$$21, phalcon_di_exception_ce); ZEPHIR_INIT_NVAR(&_19$$21); ZEPHIR_CONCAT_SV(&_19$$21, "The method name is required on position ", &methodPosition); - ZEPHIR_CALL_METHOD(NULL, &_18$$21, "__construct", &_7, 32, &_19$$21); + ZEPHIR_CALL_METHOD(NULL, &_18$$21, "__construct", &_7, 33, &_19$$21); zephir_check_call_status(); zephir_throw_exception_debug(&_18$$21, "phalcon/Di/Service/Builder.zep", 106); ZEPHIR_MM_RESTORE(); @@ -288,7 +283,7 @@ PHP_METHOD(Phalcon_Di_Service_Builder, build) zephir_cast_to_string(&_22$$23, &methodPosition); ZEPHIR_INIT_NVAR(&_23$$23); ZEPHIR_CONCAT_SV(&_23$$23, "Call arguments must be an array on position ", &_22$$23); - ZEPHIR_CALL_METHOD(NULL, &_21$$23, "__construct", &_7, 32, &_23$$23); + ZEPHIR_CALL_METHOD(NULL, &_21$$23, "__construct", &_7, 33, &_23$$23); zephir_check_call_status(); zephir_throw_exception_debug(&_21$$23, "phalcon/Di/Service/Builder.zep", 119); ZEPHIR_MM_RESTORE(); @@ -296,7 +291,7 @@ PHP_METHOD(Phalcon_Di_Service_Builder, build) } if (zephir_fast_count_int(&arguments)) { ZEPHIR_INIT_NVAR(&_24$$24); - ZEPHIR_CALL_METHOD(&_25$$24, this_ptr, "buildparameters", NULL, 222, container, &arguments); + ZEPHIR_CALL_METHOD(&_25$$24, this_ptr, "buildparameters", NULL, 223, container, &arguments); zephir_check_call_status(); ZEPHIR_CALL_USER_FUNC_ARRAY(&_24$$24, &methodCall, &_25$$24); zephir_check_call_status(); @@ -340,7 +335,7 @@ PHP_METHOD(Phalcon_Di_Service_Builder, build) object_init_ex(&_31$$29, phalcon_di_exception_ce); ZEPHIR_INIT_NVAR(&_32$$29); ZEPHIR_CONCAT_SV(&_32$$29, "Property must be an array on position ", &propertyPosition); - ZEPHIR_CALL_METHOD(NULL, &_31$$29, "__construct", &_7, 32, &_32$$29); + ZEPHIR_CALL_METHOD(NULL, &_31$$29, "__construct", &_7, 33, &_32$$29); zephir_check_call_status(); zephir_throw_exception_debug(&_31$$29, "phalcon/Di/Service/Builder.zep", 171); ZEPHIR_MM_RESTORE(); @@ -352,7 +347,7 @@ PHP_METHOD(Phalcon_Di_Service_Builder, build) object_init_ex(&_33$$30, phalcon_di_exception_ce); ZEPHIR_INIT_NVAR(&_34$$30); ZEPHIR_CONCAT_SV(&_34$$30, "The property name is required on position ", &propertyPosition); - ZEPHIR_CALL_METHOD(NULL, &_33$$30, "__construct", &_7, 32, &_34$$30); + ZEPHIR_CALL_METHOD(NULL, &_33$$30, "__construct", &_7, 33, &_34$$30); zephir_check_call_status(); zephir_throw_exception_debug(&_33$$30, "phalcon/Di/Service/Builder.zep", 180); ZEPHIR_MM_RESTORE(); @@ -364,13 +359,13 @@ PHP_METHOD(Phalcon_Di_Service_Builder, build) object_init_ex(&_35$$31, phalcon_di_exception_ce); ZEPHIR_INIT_NVAR(&_36$$31); ZEPHIR_CONCAT_SV(&_36$$31, "The property value is required on position ", &propertyPosition); - ZEPHIR_CALL_METHOD(NULL, &_35$$31, "__construct", &_7, 32, &_36$$31); + ZEPHIR_CALL_METHOD(NULL, &_35$$31, "__construct", &_7, 33, &_36$$31); zephir_check_call_status(); zephir_throw_exception_debug(&_35$$31, "phalcon/Di/Service/Builder.zep", 189); ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_CALL_METHOD(&_37$$28, this_ptr, "buildparameter", &_38, 223, container, &propertyPosition, &propertyValue); + ZEPHIR_CALL_METHOD(&_37$$28, this_ptr, "buildparameter", &_38, 224, container, &propertyPosition, &propertyValue); zephir_check_call_status(); zephir_update_property_zval_zval(&instance, &propertyName, &_37$$28); } ZEND_HASH_FOREACH_END(); @@ -392,7 +387,7 @@ PHP_METHOD(Phalcon_Di_Service_Builder, build) object_init_ex(&_39$$33, phalcon_di_exception_ce); ZEPHIR_INIT_NVAR(&_40$$33); ZEPHIR_CONCAT_SV(&_40$$33, "Property must be an array on position ", &propertyPosition); - ZEPHIR_CALL_METHOD(NULL, &_39$$33, "__construct", &_7, 32, &_40$$33); + ZEPHIR_CALL_METHOD(NULL, &_39$$33, "__construct", &_7, 33, &_40$$33); zephir_check_call_status(); zephir_throw_exception_debug(&_39$$33, "phalcon/Di/Service/Builder.zep", 171); ZEPHIR_MM_RESTORE(); @@ -404,7 +399,7 @@ PHP_METHOD(Phalcon_Di_Service_Builder, build) object_init_ex(&_41$$34, phalcon_di_exception_ce); ZEPHIR_INIT_NVAR(&_42$$34); ZEPHIR_CONCAT_SV(&_42$$34, "The property name is required on position ", &propertyPosition); - ZEPHIR_CALL_METHOD(NULL, &_41$$34, "__construct", &_7, 32, &_42$$34); + ZEPHIR_CALL_METHOD(NULL, &_41$$34, "__construct", &_7, 33, &_42$$34); zephir_check_call_status(); zephir_throw_exception_debug(&_41$$34, "phalcon/Di/Service/Builder.zep", 180); ZEPHIR_MM_RESTORE(); @@ -416,13 +411,13 @@ PHP_METHOD(Phalcon_Di_Service_Builder, build) object_init_ex(&_43$$35, phalcon_di_exception_ce); ZEPHIR_INIT_NVAR(&_44$$35); ZEPHIR_CONCAT_SV(&_44$$35, "The property value is required on position ", &propertyPosition); - ZEPHIR_CALL_METHOD(NULL, &_43$$35, "__construct", &_7, 32, &_44$$35); + ZEPHIR_CALL_METHOD(NULL, &_43$$35, "__construct", &_7, 33, &_44$$35); zephir_check_call_status(); zephir_throw_exception_debug(&_43$$35, "phalcon/Di/Service/Builder.zep", 189); ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_CALL_METHOD(&_45$$32, this_ptr, "buildparameter", &_38, 223, container, &propertyPosition, &propertyValue); + ZEPHIR_CALL_METHOD(&_45$$32, this_ptr, "buildparameter", &_38, 224, container, &propertyPosition, &propertyValue); zephir_check_call_status(); zephir_update_property_zval_zval(&instance, &propertyName, &_45$$32); ZEPHIR_CALL_METHOD(NULL, ¶mCalls, "next", NULL, 0); @@ -447,7 +442,6 @@ PHP_METHOD(Phalcon_Di_Service_Builder, buildParameter) zval argument; zend_long position, ZEPHIR_LAST_CALL_STATUS; zval *container, container_sub, *position_param = NULL, *argument_param = NULL, type, name, value, instanceArguments, _0$$3, _1$$3, _3$$5, _4$$5, _6$$7, _7$$7, _9$$9, _10$$9, _12$$11, _13$$11; - zval *this_ptr = getThis(); ZVAL_UNDEF(&container_sub); ZVAL_UNDEF(&type); @@ -470,23 +464,16 @@ PHP_METHOD(Phalcon_Di_Service_Builder, buildParameter) ZVAL_UNDEF(&_8$$7); ZVAL_UNDEF(&_11$$9); ZVAL_UNDEF(&_14$$11); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_OBJECT_OF_CLASS(container, phalcon_di_diinterface_ce) Z_PARAM_LONG(position) Z_PARAM_ARRAY(argument) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &container, &position_param, &argument_param); - position = zephir_get_intval(position_param); ZEPHIR_OBS_COPY_OR_DUP(&argument, argument_param); - - - ZEPHIR_OBS_VAR(&type); + zephir_memory_observe(&type); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&type, &argument, SL("type"), 0)))) { ZEPHIR_INIT_VAR(&_0$$3); object_init_ex(&_0$$3, phalcon_di_exception_ce); @@ -494,7 +481,7 @@ PHP_METHOD(Phalcon_Di_Service_Builder, buildParameter) ZVAL_LONG(&_1$$3, position); ZEPHIR_INIT_VAR(&_2$$3); ZEPHIR_CONCAT_SVS(&_2$$3, "Argument at position ", &_1$$3, " must have a type"); - ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 32, &_2$$3); + ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 33, &_2$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_0$$3, "phalcon/Di/Service/Builder.zep", 221); ZEPHIR_MM_RESTORE(); @@ -502,7 +489,7 @@ PHP_METHOD(Phalcon_Di_Service_Builder, buildParameter) } do { if (ZEPHIR_IS_STRING(&type, "service")) { - ZEPHIR_OBS_VAR(&name); + zephir_memory_observe(&name); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&name, &argument, SL("name"), 0)))) { ZEPHIR_INIT_VAR(&_3$$5); object_init_ex(&_3$$5, phalcon_di_exception_ce); @@ -510,7 +497,7 @@ PHP_METHOD(Phalcon_Di_Service_Builder, buildParameter) ZVAL_LONG(&_4$$5, position); ZEPHIR_INIT_VAR(&_5$$5); ZEPHIR_CONCAT_SV(&_5$$5, "Service 'name' is required in parameter on position ", &_4$$5); - ZEPHIR_CALL_METHOD(NULL, &_3$$5, "__construct", NULL, 32, &_5$$5); + ZEPHIR_CALL_METHOD(NULL, &_3$$5, "__construct", NULL, 33, &_5$$5); zephir_check_call_status(); zephir_throw_exception_debug(&_3$$5, "phalcon/Di/Service/Builder.zep", 233); ZEPHIR_MM_RESTORE(); @@ -521,7 +508,7 @@ PHP_METHOD(Phalcon_Di_Service_Builder, buildParameter) RETURN_MM(); } if (ZEPHIR_IS_STRING(&type, "parameter")) { - ZEPHIR_OBS_VAR(&value); + zephir_memory_observe(&value); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&value, &argument, SL("value"), 0)))) { ZEPHIR_INIT_VAR(&_6$$7); object_init_ex(&_6$$7, phalcon_di_exception_ce); @@ -529,7 +516,7 @@ PHP_METHOD(Phalcon_Di_Service_Builder, buildParameter) ZVAL_LONG(&_7$$7, position); ZEPHIR_INIT_VAR(&_8$$7); ZEPHIR_CONCAT_SV(&_8$$7, "Service 'value' is required in parameter on position ", &_7$$7); - ZEPHIR_CALL_METHOD(NULL, &_6$$7, "__construct", NULL, 32, &_8$$7); + ZEPHIR_CALL_METHOD(NULL, &_6$$7, "__construct", NULL, 33, &_8$$7); zephir_check_call_status(); zephir_throw_exception_debug(&_6$$7, "phalcon/Di/Service/Builder.zep", 245); ZEPHIR_MM_RESTORE(); @@ -546,13 +533,13 @@ PHP_METHOD(Phalcon_Di_Service_Builder, buildParameter) ZVAL_LONG(&_10$$9, position); ZEPHIR_INIT_VAR(&_11$$9); ZEPHIR_CONCAT_SV(&_11$$9, "Service 'className' is required in parameter on position ", &_10$$9); - ZEPHIR_CALL_METHOD(NULL, &_9$$9, "__construct", NULL, 32, &_11$$9); + ZEPHIR_CALL_METHOD(NULL, &_9$$9, "__construct", NULL, 33, &_11$$9); zephir_check_call_status(); zephir_throw_exception_debug(&_9$$9, "phalcon/Di/Service/Builder.zep", 257); ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_OBS_VAR(&instanceArguments); + zephir_memory_observe(&instanceArguments); if (zephir_array_isset_string_fetch(&instanceArguments, &argument, SL("arguments"), 0)) { ZEPHIR_RETURN_CALL_METHOD(container, "get", NULL, 0, &name, &instanceArguments); zephir_check_call_status(); @@ -568,7 +555,7 @@ PHP_METHOD(Phalcon_Di_Service_Builder, buildParameter) ZVAL_LONG(&_13$$11, position); ZEPHIR_INIT_VAR(&_14$$11); ZEPHIR_CONCAT_SV(&_14$$11, "Unknown service type in parameter on position ", &_13$$11); - ZEPHIR_CALL_METHOD(NULL, &_12$$11, "__construct", NULL, 32, &_14$$11); + ZEPHIR_CALL_METHOD(NULL, &_12$$11, "__construct", NULL, 33, &_14$$11); zephir_check_call_status(); zephir_throw_exception_debug(&_12$$11, "phalcon/Di/Service/Builder.zep", 279); ZEPHIR_MM_RESTORE(); @@ -600,20 +587,14 @@ PHP_METHOD(Phalcon_Di_Service_Builder, buildParameters) ZVAL_UNDEF(&_6$$4); ZVAL_UNDEF(&arguments); ZVAL_UNDEF(&buildArguments); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(container, phalcon_di_diinterface_ce) Z_PARAM_ARRAY(arguments) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &container, &arguments_param); ZEPHIR_OBS_COPY_OR_DUP(&arguments, arguments_param); - - ZEPHIR_INIT_VAR(&buildArguments); array_init(&buildArguments); zephir_is_iterable(&arguments, 0, "phalcon/Di/Service/Builder.zep", 301); @@ -628,7 +609,7 @@ PHP_METHOD(Phalcon_Di_Service_Builder, buildParameters) } ZEPHIR_INIT_NVAR(&argument); ZVAL_COPY(&argument, _0); - ZEPHIR_CALL_METHOD(&_4$$3, this_ptr, "buildparameter", &_5, 223, container, &position, &argument); + ZEPHIR_CALL_METHOD(&_4$$3, this_ptr, "buildparameter", &_5, 224, container, &position, &argument); zephir_check_call_status(); zephir_array_append(&buildArguments, &_4$$3, PH_SEPARATE, "phalcon/Di/Service/Builder.zep", 298); } ZEND_HASH_FOREACH_END(); @@ -645,7 +626,7 @@ PHP_METHOD(Phalcon_Di_Service_Builder, buildParameters) zephir_check_call_status(); ZEPHIR_CALL_METHOD(&argument, &arguments, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_6$$4, this_ptr, "buildparameter", &_5, 223, container, &position, &argument); + ZEPHIR_CALL_METHOD(&_6$$4, this_ptr, "buildparameter", &_5, 224, container, &position, &argument); zephir_check_call_status(); zephir_array_append(&buildArguments, &_6$$4, PH_SEPARATE, "phalcon/Di/Service/Builder.zep", 298); ZEPHIR_CALL_METHOD(NULL, &arguments, "next", NULL, 0); diff --git a/ext/phalcon/dispatcher/abstractdispatcher.zep.c b/ext/phalcon/dispatcher/abstractdispatcher.zep.c index 0b3be11809e..1aac0f9fe7a 100644 --- a/ext/phalcon/dispatcher/abstractdispatcher.zep.c +++ b/ext/phalcon/dispatcher/abstractdispatcher.zep.c @@ -154,24 +154,19 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, callActionMethod) zval params, _0; zval actionMethod; zval *handler, handler_sub, *actionMethod_param = NULL, *params_param = NULL; - zval *this_ptr = getThis(); ZVAL_UNDEF(&handler_sub); ZVAL_UNDEF(&actionMethod); ZVAL_UNDEF(¶ms); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_ZVAL(handler) Z_PARAM_STR(actionMethod) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(params) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &handler, &actionMethod_param, ¶ms_param); zephir_get_strval(&actionMethod, actionMethod_param); if (!params_param) { @@ -180,8 +175,6 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, callActionMethod) } else { ZEPHIR_OBS_COPY_OR_DUP(¶ms, params_param); } - - ZEPHIR_INIT_VAR(&_0); zephir_create_array(&_0, 2, 0); zephir_array_fast_append(&_0, handler); @@ -310,9 +303,8 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, dispatch) ZVAL_UNDEF(&_133$$75); ZVAL_UNDEF(&_134$$77); ZVAL_UNDEF(&_44$$10); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("container"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&container, &_0); @@ -487,7 +479,7 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, dispatch) } break; } - ZEPHIR_CALL_FUNCTION(&handlerHash, "spl_object_hash", &_35, 80, &handler); + ZEPHIR_CALL_FUNCTION(&handlerHash, "spl_object_hash", &_35, 81, &handler); zephir_check_call_status(); zephir_read_property(&_36$$10, this_ptr, ZEND_STRL("handlerHashes"), PH_NOISY_CC | PH_READONLY); isNewHandler = !((zephir_array_isset(&_36$$10, &handlerHash))); @@ -989,19 +981,13 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, forward) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(forward) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &forward_param); zephir_get_arrval(&forward, forward_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("isControllerInitialize"), PH_NOISY_CC | PH_READONLY); if (UNEXPECTED(ZEPHIR_IS_TRUE_IDENTICAL(&_0))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_dispatcher_exception_ce, "Forwarding inside a controller's initialize() method is forbidden", "phalcon/Dispatcher/AbstractDispatcher.zep", 661); @@ -1016,7 +1002,7 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, forward) if (zephir_array_isset_string_fetch(&namespaceName, &forward, SL("namespace"), 1)) { zephir_update_property_zval(this_ptr, ZEND_STRL("namespaceName"), &namespaceName); } - ZEPHIR_OBS_VAR(&taskName); + zephir_memory_observe(&taskName); if (zephir_array_isset_string_fetch(&controllerName, &forward, SL("controller"), 1)) { zephir_update_property_zval(this_ptr, ZEND_STRL("handlerName"), &controllerName); } else if (zephir_array_isset_string_fetch(&taskName, &forward, SL("task"), 0)) { @@ -1046,9 +1032,6 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, forward) */ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getActionName) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "actionName"); } @@ -1058,9 +1041,6 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getActionName) */ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getActionSuffix) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "actionSuffix"); } @@ -1082,20 +1062,19 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getActiveMethod) ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$3); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_OBS_VAR(&activeMethodName); + zephir_memory_observe(&activeMethodName); zephir_read_property(&_0, this_ptr, ZEND_STRL("activeMethodMap"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_1, this_ptr, ZEND_STRL("actionName"), PH_NOISY_CC | PH_READONLY); if (!(zephir_array_isset_fetch(&activeMethodName, &_0, &_1, 0))) { zephir_read_property(&_3$$3, this_ptr, ZEND_STRL("actionName"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&_2$$3, this_ptr, "tocamelcase", NULL, 0, &_3$$3); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&activeMethodName, "lcfirst", NULL, 76, &_2$$3); + ZEPHIR_CALL_FUNCTION(&activeMethodName, "lcfirst", NULL, 77, &_2$$3); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&_4$$3); + zephir_memory_observe(&_4$$3); zephir_read_property(&_4$$3, this_ptr, ZEND_STRL("actionName"), PH_NOISY_CC); zephir_update_property_array(this_ptr, SL("activeMethodMap"), &_4$$3, &activeMethodName); } @@ -1127,9 +1106,8 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getBoundModels) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("modelBinder"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_0) == IS_NULL) { @@ -1147,9 +1125,6 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getBoundModels) */ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getDefaultNamespace) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "defaultNamespace"); } @@ -1159,9 +1134,6 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getDefaultNamespace) */ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getEventsManager) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "eventsManager"); } @@ -1171,9 +1143,6 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getEventsManager) */ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getHandlerSuffix) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "handlerSuffix"); } @@ -1183,9 +1152,6 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getHandlerSuffix) */ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getModelBinder) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "modelBinder"); } @@ -1195,9 +1161,6 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getModelBinder) */ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getModuleName) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "moduleName"); } @@ -1207,9 +1170,6 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getModuleName) */ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getNamespaceName) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "namespaceName"); } @@ -1235,7 +1195,6 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getParam) ZVAL_UNDEF(&filters_sub); ZVAL_UNDEF(&defaultValue_sub); ZVAL_NULL(&__$null); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_ZVAL(param) @@ -1243,10 +1202,8 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getParam) Z_PARAM_ZVAL_OR_NULL(filters) Z_PARAM_ZVAL_OR_NULL(defaultValue) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, ¶m, &filters, &defaultValue); if (!filters) { filters = &filters_sub; @@ -1256,8 +1213,6 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getParam) defaultValue = &defaultValue_sub; defaultValue = &__$null; } - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getparameter", NULL, 0, param, filters, defaultValue); zephir_check_call_status(); RETURN_MM(); @@ -1291,7 +1246,6 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getParameter) ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_1$$5); ZVAL_UNDEF(&_2$$5); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_ZVAL(param) @@ -1299,10 +1253,8 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getParameter) Z_PARAM_ZVAL_OR_NULL(filters) Z_PARAM_ZVAL_OR_NULL(defaultValue) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, ¶m, &filters, &defaultValue); if (!filters) { filters = &filters_sub; @@ -1312,11 +1264,9 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getParameter) defaultValue = &defaultValue_sub; defaultValue = &__$null; } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("params"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(¶ms, &_0); - ZEPHIR_OBS_VAR(¶mValue); + zephir_memory_observe(¶mValue); if (!(zephir_array_isset_fetch(¶mValue, ¶ms, param, 0))) { RETVAL_ZVAL(defaultValue, 1, 0); RETURN_MM(); @@ -1353,10 +1303,8 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getParams) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *this_ptr = getThis(); - - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getparameters", NULL, 0); zephir_check_call_status(); @@ -1368,9 +1316,6 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getParams) */ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getParameters) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "params"); } @@ -1387,18 +1332,12 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, hasParam) zval *this_ptr = getThis(); ZVAL_UNDEF(¶m_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(param) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, ¶m); - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "hasparameter", NULL, 0, param); zephir_check_call_status(); RETURN_MM(); @@ -1414,17 +1353,10 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, hasParameter) ZVAL_UNDEF(¶m_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(param) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, ¶m); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("params"), PH_NOISY_CC | PH_READONLY); RETURN_BOOL(zephir_array_isset(&_0, param)); } @@ -1435,9 +1367,6 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, hasParameter) */ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, isFinished) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "finished"); } @@ -1453,19 +1382,13 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, setActionName) zval *this_ptr = getThis(); ZVAL_UNDEF(&actionName); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(actionName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &actionName_param); zephir_get_strval(&actionName, actionName_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("actionName"), &actionName); ZEPHIR_MM_RESTORE(); } @@ -1481,19 +1404,13 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, setDefaultAction) zval *this_ptr = getThis(); ZVAL_UNDEF(&actionName); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(actionName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &actionName_param); zephir_get_strval(&actionName, actionName_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("defaultAction"), &actionName); ZEPHIR_MM_RESTORE(); } @@ -1509,19 +1426,13 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, setDefaultNamespace) zval *this_ptr = getThis(); ZVAL_UNDEF(&defaultNamespace); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(defaultNamespace) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &defaultNamespace_param); zephir_get_strval(&defaultNamespace, defaultNamespace_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("defaultNamespace"), &defaultNamespace); ZEPHIR_MM_RESTORE(); } @@ -1542,9 +1453,8 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getHandlerClass) ZVAL_UNDEF(&camelizedClass); ZVAL_UNDEF(&handlerClass); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(NULL, this_ptr, "resolveemptyproperties", NULL, 0); zephir_check_call_status(); @@ -1585,19 +1495,13 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, setParam) ZVAL_UNDEF(¶m_sub); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ZVAL(param) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, ¶m, &value); - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "setparameter", NULL, 0, param, value); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); @@ -1613,18 +1517,11 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, setParameter) ZVAL_UNDEF(¶m_sub); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ZVAL(param) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(2, 0, ¶m, &value); - - zephir_update_property_array(this_ptr, SL("params"), param, value); } @@ -1641,19 +1538,13 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, setParams) zval *this_ptr = getThis(); ZVAL_UNDEF(¶ms); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(params) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, ¶ms_param); zephir_get_arrval(¶ms, params_param); - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "setparameters", NULL, 0, ¶ms); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); @@ -1670,19 +1561,13 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, setParameters) zval *this_ptr = getThis(); ZVAL_UNDEF(¶ms); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(params) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, ¶ms_param); zephir_get_arrval(¶ms, params_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("params"), ¶ms); ZEPHIR_MM_RESTORE(); } @@ -1696,17 +1581,10 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, setReturnedValue) zval *this_ptr = getThis(); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &value); - - zephir_update_property_zval(this_ptr, ZEND_STRL("returnedValue"), value); } @@ -1721,19 +1599,13 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, setActionSuffix) zval *this_ptr = getThis(); ZVAL_UNDEF(&actionSuffix); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(actionSuffix) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &actionSuffix_param); zephir_get_strval(&actionSuffix, actionSuffix_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("actionSuffix"), &actionSuffix); ZEPHIR_MM_RESTORE(); } @@ -1747,17 +1619,10 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, setEventsManager) zval *this_ptr = getThis(); ZVAL_UNDEF(&eventsManager_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(eventsManager, phalcon_events_managerinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &eventsManager); - - zephir_update_property_zval(this_ptr, ZEND_STRL("eventsManager"), eventsManager); } @@ -1772,19 +1637,13 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, setHandlerSuffix) zval *this_ptr = getThis(); ZVAL_UNDEF(&handlerSuffix); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(handlerSuffix) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &handlerSuffix_param); zephir_get_strval(&handlerSuffix, handlerSuffix_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("handlerSuffix"), &handlerSuffix); ZEPHIR_MM_RESTORE(); } @@ -1823,17 +1682,14 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, setModelBinder) ZVAL_UNDEF(&container); ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_OBJECT_OF_CLASS(modelBinder, phalcon_mvc_model_binderinterface_ce) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(cache) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &modelBinder, &cache); if (!cache) { cache = &cache_sub; @@ -1841,8 +1697,6 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, setModelBinder) } else { ZEPHIR_SEPARATE_PARAM(cache); } - - if (Z_TYPE_P(cache) == IS_STRING) { zephir_read_property(&_0$$3, this_ptr, ZEND_STRL("container"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&container, &_0$$3); @@ -1874,24 +1728,19 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, setModuleName) zval *this_ptr = getThis(); ZVAL_UNDEF(&moduleName); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(moduleName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &moduleName_param); if (!moduleName_param) { ZEPHIR_INIT_VAR(&moduleName); } else { zephir_get_strval(&moduleName, moduleName_param); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("moduleName"), &moduleName); ZEPHIR_MM_RESTORE(); } @@ -1907,19 +1756,13 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, setNamespaceName) zval *this_ptr = getThis(); ZVAL_UNDEF(&namespaceName); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(namespaceName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &namespaceName_param); zephir_get_strval(&namespaceName, namespaceName_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("namespaceName"), &namespaceName); ZEPHIR_MM_RESTORE(); } @@ -1929,9 +1772,6 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, setNamespaceName) */ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getReturnedValue) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "returnedValue"); } @@ -1941,9 +1781,6 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, getReturnedValue) */ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, wasForwarded) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "forwarded"); } @@ -1962,9 +1799,6 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, resolveEmptyProperties) ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_3$$4); ZVAL_UNDEF(&_5$$5); - - - zephir_read_property(&_0, this_ptr, ZEND_STRL("namespaceName"), PH_NOISY_CC | PH_READONLY); if (!(zephir_is_true(&_0))) { zephir_read_property(&_1$$3, this_ptr, ZEND_STRL("defaultNamespace"), PH_NOISY_CC | PH_READONLY); @@ -1996,29 +1830,23 @@ PHP_METHOD(Phalcon_Dispatcher_AbstractDispatcher, toCamelCase) ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &input_param); zephir_get_strval(&input, input_param); - - - ZEPHIR_OBS_VAR(&camelCaseInput); + zephir_memory_observe(&camelCaseInput); zephir_read_property(&_0, this_ptr, ZEND_STRL("camelCaseMap"), PH_NOISY_CC | PH_READONLY); if (!(zephir_array_isset_fetch(&camelCaseInput, &_0, &input, 0))) { ZEPHIR_INIT_VAR(&_1$$3); ZVAL_STRING(&_1$$3, "/[_-]+/"); - ZEPHIR_CALL_FUNCTION(&_2$$3, "preg_split", NULL, 70, &_1$$3, &input); + ZEPHIR_CALL_FUNCTION(&_2$$3, "preg_split", NULL, 71, &_1$$3, &input); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_1$$3); ZVAL_STRING(&_1$$3, "ucfirst"); - ZEPHIR_CALL_FUNCTION(&_3$$3, "array_map", NULL, 69, &_1$$3, &_2$$3); + ZEPHIR_CALL_FUNCTION(&_3$$3, "array_map", NULL, 70, &_1$$3, &_2$$3); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&camelCaseInput); zephir_fast_join_str(&camelCaseInput, SL(""), &_3$$3); @@ -2041,7 +1869,8 @@ zend_object *zephir_init_properties_Phalcon_Dispatcher_AbstractDispatcher(zend_c ZVAL_UNDEF(&_7$$6); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/dispatcher/abstractdispatcher.zep.h b/ext/phalcon/dispatcher/abstractdispatcher.zep.h index 8ed3b13faa6..27f3770e378 100644 --- a/ext/phalcon/dispatcher/abstractdispatcher.zep.h +++ b/ext/phalcon/dispatcher/abstractdispatcher.zep.h @@ -47,11 +47,7 @@ zend_object *zephir_init_properties_Phalcon_Dispatcher_AbstractDispatcher(zend_c ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_dispatcher_abstractdispatcher_callactionmethod, 0, 0, 2) ZEND_ARG_INFO(0, handler) ZEND_ARG_TYPE_INFO(0, actionMethod, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, params, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, params, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, params, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_dispatcher_abstractdispatcher_dispatch, 0, 0, 0) @@ -214,11 +210,7 @@ ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_dispatcher_abstractdispatcher_method_entry) { PHP_ME(Phalcon_Dispatcher_AbstractDispatcher, callActionMethod, arginfo_phalcon_dispatcher_abstractdispatcher_callactionmethod, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Dispatcher_AbstractDispatcher, dispatch, arginfo_phalcon_dispatcher_abstractdispatcher_dispatch, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Dispatcher_AbstractDispatcher, dispatch, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Dispatcher_AbstractDispatcher, dispatch, arginfo_phalcon_dispatcher_abstractdispatcher_dispatch, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Dispatcher_AbstractDispatcher, forward, arginfo_phalcon_dispatcher_abstractdispatcher_forward, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Dispatcher_AbstractDispatcher, getActionName, arginfo_phalcon_dispatcher_abstractdispatcher_getactionname, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Dispatcher_AbstractDispatcher, getActionSuffix, arginfo_phalcon_dispatcher_abstractdispatcher_getactionsuffix, ZEND_ACC_PUBLIC) @@ -252,11 +244,7 @@ ZEPHIR_INIT_FUNCS(phalcon_dispatcher_abstractdispatcher_method_entry) { PHP_ME(Phalcon_Dispatcher_AbstractDispatcher, setModelBinder, arginfo_phalcon_dispatcher_abstractdispatcher_setmodelbinder, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Dispatcher_AbstractDispatcher, setModuleName, arginfo_phalcon_dispatcher_abstractdispatcher_setmodulename, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Dispatcher_AbstractDispatcher, setNamespaceName, arginfo_phalcon_dispatcher_abstractdispatcher_setnamespacename, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Dispatcher_AbstractDispatcher, getReturnedValue, arginfo_phalcon_dispatcher_abstractdispatcher_getreturnedvalue, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Dispatcher_AbstractDispatcher, getReturnedValue, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Dispatcher_AbstractDispatcher, getReturnedValue, arginfo_phalcon_dispatcher_abstractdispatcher_getreturnedvalue, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Dispatcher_AbstractDispatcher, wasForwarded, arginfo_phalcon_dispatcher_abstractdispatcher_wasforwarded, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Dispatcher_AbstractDispatcher, resolveEmptyProperties, arginfo_phalcon_dispatcher_abstractdispatcher_resolveemptyproperties, ZEND_ACC_PROTECTED) PHP_ME(Phalcon_Dispatcher_AbstractDispatcher, toCamelCase, arginfo_phalcon_dispatcher_abstractdispatcher_tocamelcase, ZEND_ACC_PROTECTED) diff --git a/ext/phalcon/domain/payload/payload.zep.c b/ext/phalcon/domain/payload/payload.zep.c index bd226e1bff3..06ba48f27aa 100644 --- a/ext/phalcon/domain/payload/payload.zep.c +++ b/ext/phalcon/domain/payload/payload.zep.c @@ -86,9 +86,6 @@ ZEPHIR_INIT_CLASS(Phalcon_Domain_Payload_Payload) */ PHP_METHOD(Phalcon_Domain_Payload_Payload, getException) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "exception"); } @@ -100,9 +97,6 @@ PHP_METHOD(Phalcon_Domain_Payload_Payload, getException) */ PHP_METHOD(Phalcon_Domain_Payload_Payload, getExtras) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "extras"); } @@ -114,9 +108,6 @@ PHP_METHOD(Phalcon_Domain_Payload_Payload, getExtras) */ PHP_METHOD(Phalcon_Domain_Payload_Payload, getInput) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "input"); } @@ -128,9 +119,6 @@ PHP_METHOD(Phalcon_Domain_Payload_Payload, getInput) */ PHP_METHOD(Phalcon_Domain_Payload_Payload, getMessages) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "messages"); } @@ -142,9 +130,6 @@ PHP_METHOD(Phalcon_Domain_Payload_Payload, getMessages) */ PHP_METHOD(Phalcon_Domain_Payload_Payload, getStatus) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "status"); } @@ -156,9 +141,6 @@ PHP_METHOD(Phalcon_Domain_Payload_Payload, getStatus) */ PHP_METHOD(Phalcon_Domain_Payload_Payload, getOutput) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "output"); } @@ -176,17 +158,10 @@ PHP_METHOD(Phalcon_Domain_Payload_Payload, setException) zval *this_ptr = getThis(); ZVAL_UNDEF(&exception_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(exception, zend_ce_throwable) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &exception); - - zephir_update_property_zval(this_ptr, ZEND_STRL("exception"), exception); RETURN_THISW(); } @@ -200,17 +175,10 @@ PHP_METHOD(Phalcon_Domain_Payload_Payload, setExtras) zval *this_ptr = getThis(); ZVAL_UNDEF(&extras_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(extras) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &extras); - - zephir_update_property_zval(this_ptr, ZEND_STRL("extras"), extras); RETURN_THISW(); } @@ -224,17 +192,10 @@ PHP_METHOD(Phalcon_Domain_Payload_Payload, setInput) zval *this_ptr = getThis(); ZVAL_UNDEF(&input_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &input); - - zephir_update_property_zval(this_ptr, ZEND_STRL("input"), input); RETURN_THISW(); } @@ -248,17 +209,10 @@ PHP_METHOD(Phalcon_Domain_Payload_Payload, setMessages) zval *this_ptr = getThis(); ZVAL_UNDEF(&messages_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(messages) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &messages); - - zephir_update_property_zval(this_ptr, ZEND_STRL("messages"), messages); RETURN_THISW(); } @@ -272,17 +226,10 @@ PHP_METHOD(Phalcon_Domain_Payload_Payload, setOutput) zval *this_ptr = getThis(); ZVAL_UNDEF(&output_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(output) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &output); - - zephir_update_property_zval(this_ptr, ZEND_STRL("output"), output); RETURN_THISW(); } @@ -296,17 +243,10 @@ PHP_METHOD(Phalcon_Domain_Payload_Payload, setStatus) zval *this_ptr = getThis(); ZVAL_UNDEF(&status_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(status) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &status); - - zephir_update_property_zval(this_ptr, ZEND_STRL("status"), status); RETURN_THISW(); } diff --git a/ext/phalcon/domain/payload/payload.zep.h b/ext/phalcon/domain/payload/payload.zep.h index 400c6ceed6c..62972d87a5e 100644 --- a/ext/phalcon/domain/payload/payload.zep.h +++ b/ext/phalcon/domain/payload/payload.zep.h @@ -60,31 +60,11 @@ ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_domain_payload_payload_method_entry) { PHP_ME(Phalcon_Domain_Payload_Payload, getException, arginfo_phalcon_domain_payload_payload_getexception, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Domain_Payload_Payload, getExtras, arginfo_phalcon_domain_payload_payload_getextras, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Domain_Payload_Payload, getExtras, NULL, ZEND_ACC_PUBLIC) -#endif -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Domain_Payload_Payload, getInput, arginfo_phalcon_domain_payload_payload_getinput, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Domain_Payload_Payload, getInput, NULL, ZEND_ACC_PUBLIC) -#endif -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Domain_Payload_Payload, getMessages, arginfo_phalcon_domain_payload_payload_getmessages, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Domain_Payload_Payload, getMessages, NULL, ZEND_ACC_PUBLIC) -#endif -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Domain_Payload_Payload, getStatus, arginfo_phalcon_domain_payload_payload_getstatus, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Domain_Payload_Payload, getStatus, NULL, ZEND_ACC_PUBLIC) -#endif -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Domain_Payload_Payload, getOutput, arginfo_phalcon_domain_payload_payload_getoutput, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Domain_Payload_Payload, getOutput, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Domain_Payload_Payload, getExtras, arginfo_phalcon_domain_payload_payload_getextras, ZEND_ACC_PUBLIC) +PHP_ME(Phalcon_Domain_Payload_Payload, getInput, arginfo_phalcon_domain_payload_payload_getinput, ZEND_ACC_PUBLIC) +PHP_ME(Phalcon_Domain_Payload_Payload, getMessages, arginfo_phalcon_domain_payload_payload_getmessages, ZEND_ACC_PUBLIC) +PHP_ME(Phalcon_Domain_Payload_Payload, getStatus, arginfo_phalcon_domain_payload_payload_getstatus, ZEND_ACC_PUBLIC) +PHP_ME(Phalcon_Domain_Payload_Payload, getOutput, arginfo_phalcon_domain_payload_payload_getoutput, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Domain_Payload_Payload, setException, arginfo_phalcon_domain_payload_payload_setexception, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Domain_Payload_Payload, setExtras, arginfo_phalcon_domain_payload_payload_setextras, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Domain_Payload_Payload, setInput, arginfo_phalcon_domain_payload_payload_setinput, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/domain/payload/payloadfactory.zep.c b/ext/phalcon/domain/payload/payloadfactory.zep.c index bf5428a955d..61138532e33 100644 --- a/ext/phalcon/domain/payload/payloadfactory.zep.c +++ b/ext/phalcon/domain/payload/payloadfactory.zep.c @@ -50,11 +50,8 @@ PHP_METHOD(Phalcon_Domain_Payload_PayloadFactory, newInstance) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *this_ptr = getThis(); - - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); object_init_ex(return_value, phalcon_domain_payload_payload_ce); if (zephir_has_constructor(return_value)) { diff --git a/ext/phalcon/domain/payload/status.zep.c b/ext/phalcon/domain/payload/status.zep.c index b42045d4f3f..eb40c363240 100644 --- a/ext/phalcon/domain/payload/status.zep.c +++ b/ext/phalcon/domain/payload/status.zep.c @@ -86,9 +86,6 @@ ZEPHIR_INIT_CLASS(Phalcon_Domain_Payload_Status) */ PHP_METHOD(Phalcon_Domain_Payload_Status, __construct) { - zval *this_ptr = getThis(); - - } diff --git a/ext/phalcon/domain/payload/status.zep.h b/ext/phalcon/domain/payload/status.zep.h index 6bb3d674e1b..79b6d30958e 100644 --- a/ext/phalcon/domain/payload/status.zep.h +++ b/ext/phalcon/domain/payload/status.zep.h @@ -9,10 +9,6 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_domain_payload_status___construct, 0, 0, ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_domain_payload_status_method_entry) { -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Domain_Payload_Status, __construct, arginfo_phalcon_domain_payload_status___construct, ZEND_ACC_FINAL|ZEND_ACC_PRIVATE|ZEND_ACC_CTOR) -#else - PHP_ME(Phalcon_Domain_Payload_Status, __construct, NULL, ZEND_ACC_FINAL|ZEND_ACC_PRIVATE|ZEND_ACC_CTOR) -#endif +PHP_ME(Phalcon_Domain_Payload_Status, __construct, arginfo_phalcon_domain_payload_status___construct, ZEND_ACC_FINAL|ZEND_ACC_PRIVATE|ZEND_ACC_CTOR) PHP_FE_END }; diff --git a/ext/phalcon/encryption/crypt.zep.c b/ext/phalcon/encryption/crypt.zep.c index ae94cc65a00..aa57e5de511 100644 --- a/ext/phalcon/encryption/crypt.zep.c +++ b/ext/phalcon/encryption/crypt.zep.c @@ -159,7 +159,6 @@ PHP_METHOD(Phalcon_Encryption_Crypt, __construct) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 3) Z_PARAM_OPTIONAL @@ -167,10 +166,8 @@ PHP_METHOD(Phalcon_Encryption_Crypt, __construct) Z_PARAM_BOOL(useSigning) Z_PARAM_OBJECT_OF_CLASS_OR_NULL(padFactory, phalcon_encryption_crypt_padfactory_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 3, &cipher_param, &useSigning_param, &padFactory); if (!cipher_param) { ZEPHIR_INIT_VAR(&cipher); @@ -181,20 +178,17 @@ PHP_METHOD(Phalcon_Encryption_Crypt, __construct) if (!useSigning_param) { useSigning = 1; } else { - useSigning = zephir_get_boolval(useSigning_param); - } + } if (!padFactory) { padFactory = &padFactory_sub; ZEPHIR_CPY_WRT(padFactory, &__$null); } else { ZEPHIR_SEPARATE_PARAM(padFactory); } - - if (Z_TYPE_P(padFactory) == IS_NULL) { ZEPHIR_INIT_NVAR(padFactory); object_init_ex(padFactory, phalcon_encryption_crypt_padfactory_ce); - ZEPHIR_CALL_METHOD(NULL, padFactory, "__construct", NULL, 224); + ZEPHIR_CALL_METHOD(NULL, padFactory, "__construct", NULL, 225); zephir_check_call_status(); } zephir_update_property_zval(this_ptr, ZEND_STRL("padFactory"), padFactory); @@ -266,17 +260,14 @@ PHP_METHOD(Phalcon_Encryption_Crypt, decrypt) ZVAL_UNDEF(&_4$$5); ZVAL_UNDEF(&_5$$6); ZVAL_UNDEF(&_8$$7); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(input) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &input_param, &key_param); zephir_get_strval(&input, input_param); if (!key_param) { @@ -284,9 +275,7 @@ PHP_METHOD(Phalcon_Encryption_Crypt, decrypt) } else { zephir_get_strval(&key, key_param); } - - - ZEPHIR_OBS_VAR(&decryptKey); + zephir_memory_observe(&decryptKey); zephir_read_property(&decryptKey, this_ptr, ZEND_STRL("key"), PH_NOISY_CC); if (1 != ZEPHIR_IS_EMPTY(&key)) { ZEPHIR_CPY_WRT(&decryptKey, &key); @@ -303,14 +292,14 @@ PHP_METHOD(Phalcon_Encryption_Crypt, decrypt) ZVAL_STRING(&_1, "cipher"); ZEPHIR_CALL_METHOD(NULL, this_ptr, "checkcipherhashisavailable", NULL, 0, &cipher, &_1); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&mode, this_ptr, "getmode", NULL, 225); + ZEPHIR_CALL_METHOD(&mode, this_ptr, "getmode", NULL, 226); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&blockSize, this_ptr, "getblocksize", NULL, 226, &mode); + ZEPHIR_CALL_METHOD(&blockSize, this_ptr, "getblocksize", NULL, 227, &mode); zephir_check_call_status(); ZVAL_LONG(&_0, 0); ZEPHIR_INIT_NVAR(&_1); ZVAL_STRING(&_1, "8bit"); - ZEPHIR_CALL_FUNCTION(&iv, "mb_substr", NULL, 227, &input, &_0, &ivLength, &_1); + ZEPHIR_CALL_FUNCTION(&iv, "mb_substr", NULL, 228, &input, &_0, &ivLength, &_1); zephir_check_call_status(); ZEPHIR_INIT_VAR(&digest); ZVAL_STRING(&digest, ""); @@ -320,24 +309,24 @@ PHP_METHOD(Phalcon_Encryption_Crypt, decrypt) if (ZEPHIR_IS_TRUE_IDENTICAL(&_0)) { ZEPHIR_INIT_VAR(&_2$$5); ZVAL_STRING(&_2$$5, ""); - ZEPHIR_CALL_FUNCTION(&_3$$5, "hash", NULL, 71, &hashAlgorithm, &_2$$5, &__$true); + ZEPHIR_CALL_FUNCTION(&_3$$5, "hash", NULL, 72, &hashAlgorithm, &_2$$5, &__$true); zephir_check_call_status(); ZEPHIR_INIT_VAR(&hashLength); ZVAL_LONG(&hashLength, zephir_fast_strlen_ev(&_3$$5)); ZEPHIR_INIT_NVAR(&_2$$5); ZVAL_STRING(&_2$$5, "8bit"); - ZEPHIR_CALL_FUNCTION(&digest, "mb_substr", NULL, 227, &input, &ivLength, &hashLength, &_2$$5); + ZEPHIR_CALL_FUNCTION(&digest, "mb_substr", NULL, 228, &input, &ivLength, &hashLength, &_2$$5); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_4$$5); zephir_add_function(&_4$$5, &ivLength, &hashLength); ZEPHIR_INIT_NVAR(&_2$$5); ZVAL_STRING(&_2$$5, "8bit"); - ZEPHIR_CALL_FUNCTION(&cipherText, "mb_substr", NULL, 227, &input, &_4$$5, &__$null, &_2$$5); + ZEPHIR_CALL_FUNCTION(&cipherText, "mb_substr", NULL, 228, &input, &_4$$5, &__$null, &_2$$5); zephir_check_call_status(); } else { ZEPHIR_INIT_VAR(&_5$$6); ZVAL_STRING(&_5$$6, "8bit"); - ZEPHIR_CALL_FUNCTION(&cipherText, "mb_substr", NULL, 227, &input, &ivLength, &__$null, &_5$$6); + ZEPHIR_CALL_FUNCTION(&cipherText, "mb_substr", NULL, 228, &input, &ivLength, &__$null, &_5$$6); zephir_check_call_status(); } ZEPHIR_CALL_METHOD(&decrypted, this_ptr, "decryptgcmccmauth", NULL, 0, &mode, &cipherText, &decryptKey, &iv); @@ -348,7 +337,7 @@ PHP_METHOD(Phalcon_Encryption_Crypt, decrypt) ZEPHIR_CPY_WRT(&decrypted, &_6); zephir_read_property(&_7, this_ptr, ZEND_STRL("useSigning"), PH_NOISY_CC | PH_READONLY); if (ZEPHIR_IS_TRUE_IDENTICAL(&_7)) { - ZEPHIR_CALL_FUNCTION(&_8$$7, "hash_hmac", NULL, 228, &hashAlgorithm, &padded, &decryptKey, &__$true); + ZEPHIR_CALL_FUNCTION(&_8$$7, "hash_hmac", NULL, 229, &hashAlgorithm, &padded, &decryptKey, &__$true); zephir_check_call_status(); if (!ZEPHIR_IS_IDENTICAL(&digest, &_8$$7)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_encryption_crypt_exception_mismatch_ce, "Hash does not match.", "phalcon/Encryption/Crypt.zep", 224); @@ -386,7 +375,6 @@ PHP_METHOD(Phalcon_Encryption_Crypt, decryptBase64) ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$3); ZVAL_UNDEF(&_5); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(input) @@ -394,10 +382,8 @@ PHP_METHOD(Phalcon_Encryption_Crypt, decryptBase64) Z_PARAM_STR_OR_NULL(key) Z_PARAM_BOOL(safe) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &input_param, &key_param, &safe_param); zephir_get_strval(&input, input_param); if (!key_param) { @@ -408,10 +394,7 @@ PHP_METHOD(Phalcon_Encryption_Crypt, decryptBase64) if (!safe_param) { safe = 0; } else { - safe = zephir_get_boolval(safe_param); - } - - + } if (safe) { ZEPHIR_INIT_VAR(&_0$$3); ZVAL_STRING(&_0$$3, "-_"); @@ -428,7 +411,7 @@ PHP_METHOD(Phalcon_Encryption_Crypt, decryptBase64) ZEPHIR_CONCAT_VV(&_4$$3, &_2$$3, &_1$$3); zephir_get_strval(&input, &_4$$3); } - ZEPHIR_CALL_FUNCTION(&_5, "base64_decode", NULL, 229, &input); + ZEPHIR_CALL_FUNCTION(&_5, "base64_decode", NULL, 230, &input); zephir_check_call_status(); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "decrypt", NULL, 0, &_5, &key); zephir_check_call_status(); @@ -474,17 +457,14 @@ PHP_METHOD(Phalcon_Encryption_Crypt, encrypt) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2$$6); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(input) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &input_param, &key_param); zephir_get_strval(&input, input_param); if (!key_param) { @@ -492,9 +472,7 @@ PHP_METHOD(Phalcon_Encryption_Crypt, encrypt) } else { zephir_get_strval(&key, key_param); } - - - ZEPHIR_OBS_VAR(&encryptKey); + zephir_memory_observe(&encryptKey); zephir_read_property(&encryptKey, this_ptr, ZEND_STRL("key"), PH_NOISY_CC); if (1 != ZEPHIR_IS_EMPTY(&key)) { ZEPHIR_CPY_WRT(&encryptKey, &key); @@ -511,9 +489,9 @@ PHP_METHOD(Phalcon_Encryption_Crypt, encrypt) ZVAL_STRING(&_1, "cipher"); ZEPHIR_CALL_METHOD(NULL, this_ptr, "checkcipherhashisavailable", NULL, 0, &cipher, &_1); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&mode, this_ptr, "getmode", NULL, 225); + ZEPHIR_CALL_METHOD(&mode, this_ptr, "getmode", NULL, 226); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&blockSize, this_ptr, "getblocksize", NULL, 226, &mode); + ZEPHIR_CALL_METHOD(&blockSize, this_ptr, "getblocksize", NULL, 227, &mode); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&iv, this_ptr, "phpopensslrandompseudobytes", NULL, 0, &ivLength); zephir_check_call_status(); @@ -529,7 +507,7 @@ PHP_METHOD(Phalcon_Encryption_Crypt, encrypt) if (ZEPHIR_IS_TRUE_IDENTICAL(&_0)) { ZEPHIR_CALL_METHOD(&_2$$6, this_ptr, "gethashalgorithm", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&digest, "hash_hmac", NULL, 228, &_2$$6, &padded, &encryptKey, &__$true); + ZEPHIR_CALL_FUNCTION(&digest, "hash_hmac", NULL, 229, &_2$$6, &padded, &encryptKey, &__$true); zephir_check_call_status(); ZEPHIR_CONCAT_VVV(return_value, &iv, &digest, &encrypted); RETURN_MM(); @@ -565,7 +543,6 @@ PHP_METHOD(Phalcon_Encryption_Crypt, encryptBase64) ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$3); ZVAL_UNDEF(&_5); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(input) @@ -573,10 +550,8 @@ PHP_METHOD(Phalcon_Encryption_Crypt, encryptBase64) Z_PARAM_STR_OR_NULL(key) Z_PARAM_BOOL(safe) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &input_param, &key_param, &safe_param); zephir_get_strval(&input, input_param); if (!key_param) { @@ -587,14 +562,11 @@ PHP_METHOD(Phalcon_Encryption_Crypt, encryptBase64) if (!safe_param) { safe = 0; } else { - safe = zephir_get_boolval(safe_param); - } - - + } if (safe) { ZEPHIR_CALL_METHOD(&_0$$3, this_ptr, "encrypt", NULL, 0, &input, &key); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&_1$$3, "base64_encode", NULL, 230, &_0$$3); + ZEPHIR_CALL_FUNCTION(&_1$$3, "base64_encode", NULL, 231, &_0$$3); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_2$$3); ZVAL_STRING(&_2$$3, "+/"); @@ -609,7 +581,7 @@ PHP_METHOD(Phalcon_Encryption_Crypt, encryptBase64) } ZEPHIR_CALL_METHOD(&_5, this_ptr, "encrypt", NULL, 0, &input, &key); zephir_check_call_status(); - ZEPHIR_RETURN_CALL_FUNCTION("base64_encode", NULL, 230, &_5); + ZEPHIR_RETURN_CALL_FUNCTION("base64_encode", NULL, 231, &_5); zephir_check_call_status(); RETURN_MM(); } @@ -621,9 +593,6 @@ PHP_METHOD(Phalcon_Encryption_Crypt, encryptBase64) */ PHP_METHOD(Phalcon_Encryption_Crypt, getAvailableCiphers) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "availableCiphers"); } @@ -635,9 +604,6 @@ PHP_METHOD(Phalcon_Encryption_Crypt, getAvailableCiphers) */ PHP_METHOD(Phalcon_Encryption_Crypt, getAuthData) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "authData"); } @@ -649,9 +615,6 @@ PHP_METHOD(Phalcon_Encryption_Crypt, getAuthData) */ PHP_METHOD(Phalcon_Encryption_Crypt, getAuthTag) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "authTag"); } @@ -663,9 +626,6 @@ PHP_METHOD(Phalcon_Encryption_Crypt, getAuthTag) */ PHP_METHOD(Phalcon_Encryption_Crypt, getAuthTagLength) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "authTagLength"); } @@ -684,20 +644,19 @@ PHP_METHOD(Phalcon_Encryption_Crypt, getAvailableHashAlgorithms) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "hash_hmac_algos"); ZEPHIR_CALL_METHOD(&_0, this_ptr, "phpfunctionexists", NULL, 0, &_1); zephir_check_call_status(); if (ZEPHIR_IS_TRUE_IDENTICAL(&_0)) { - ZEPHIR_RETURN_CALL_FUNCTION("hash_hmac_algos", NULL, 231); + ZEPHIR_RETURN_CALL_FUNCTION("hash_hmac_algos", NULL, 232); zephir_check_call_status(); RETURN_MM(); } - ZEPHIR_RETURN_CALL_FUNCTION("hash_algos", NULL, 232); + ZEPHIR_RETURN_CALL_FUNCTION("hash_algos", NULL, 233); zephir_check_call_status(); RETURN_MM(); } @@ -709,9 +668,6 @@ PHP_METHOD(Phalcon_Encryption_Crypt, getAvailableHashAlgorithms) */ PHP_METHOD(Phalcon_Encryption_Crypt, getHashAlgorithm) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "hashAlgorithm"); } @@ -723,9 +679,6 @@ PHP_METHOD(Phalcon_Encryption_Crypt, getHashAlgorithm) */ PHP_METHOD(Phalcon_Encryption_Crypt, getCipher) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "cipher"); } @@ -737,9 +690,6 @@ PHP_METHOD(Phalcon_Encryption_Crypt, getCipher) */ PHP_METHOD(Phalcon_Encryption_Crypt, getKey) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "key"); } @@ -764,26 +714,20 @@ PHP_METHOD(Phalcon_Encryption_Crypt, isValidDecryptLength) ZVAL_UNDEF(&length); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &input_param); zephir_get_strval(&input, input_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("cipher"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&length, this_ptr, "phpopensslcipherivlength", NULL, 0, &_0); zephir_check_call_status(); if (ZEPHIR_IS_FALSE_IDENTICAL(&length)) { RETURN_MM_BOOL(0); } - ZEPHIR_CALL_FUNCTION(&_1, "mb_strlen", NULL, 233, &input); + ZEPHIR_CALL_FUNCTION(&_1, "mb_strlen", NULL, 234, &input); zephir_check_call_status(); RETURN_MM_BOOL(ZEPHIR_LE(&length, &_1)); } @@ -801,19 +745,13 @@ PHP_METHOD(Phalcon_Encryption_Crypt, setAuthData) zval *this_ptr = getThis(); ZVAL_UNDEF(&data); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &data_param); zephir_get_strval(&data, data_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("authData"), &data); RETURN_THIS(); } @@ -831,19 +769,13 @@ PHP_METHOD(Phalcon_Encryption_Crypt, setAuthTag) zval *this_ptr = getThis(); ZVAL_UNDEF(&tag); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(tag) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &tag_param); zephir_get_strval(&tag, tag_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("authTag"), &tag); RETURN_THIS(); } @@ -860,19 +792,11 @@ PHP_METHOD(Phalcon_Encryption_Crypt, setAuthTagLength) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(length) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &length_param); - length = zephir_get_intval(length_param); - - - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, length); zephir_update_property_zval(this_ptr, ZEND_STRL("authTagLength"), &_0); RETURN_THISW(); @@ -897,24 +821,18 @@ PHP_METHOD(Phalcon_Encryption_Crypt, setCipher) ZVAL_UNDEF(&cipher); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(cipher) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &cipher_param); zephir_get_strval(&cipher, cipher_param); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "cipher"); ZEPHIR_CALL_METHOD(NULL, this_ptr, "checkcipherhashisavailable", NULL, 0, &cipher, &_0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_1, this_ptr, "getivlength", NULL, 234, &cipher); + ZEPHIR_CALL_METHOD(&_1, this_ptr, "getivlength", NULL, 235, &cipher); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("ivLength"), &_1); zephir_update_property_zval(this_ptr, ZEND_STRL("cipher"), &cipher); @@ -948,19 +866,13 @@ PHP_METHOD(Phalcon_Encryption_Crypt, setKey) zval *this_ptr = getThis(); ZVAL_UNDEF(&key); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); zephir_get_strval(&key, key_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("key"), &key); RETURN_THIS(); } @@ -983,19 +895,13 @@ PHP_METHOD(Phalcon_Encryption_Crypt, setHashAlgorithm) ZVAL_UNDEF(&hashAlgorithm); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(hashAlgorithm) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &hashAlgorithm_param); zephir_get_strval(&hashAlgorithm, hashAlgorithm_param); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "hash"); ZEPHIR_CALL_METHOD(NULL, this_ptr, "checkcipherhashisavailable", NULL, 0, &hashAlgorithm, &_0); @@ -1018,19 +924,11 @@ PHP_METHOD(Phalcon_Encryption_Crypt, setPadding) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(scheme) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &scheme_param); - scheme = zephir_get_intval(scheme_param); - - - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, scheme); zephir_update_property_zval(this_ptr, ZEND_STRL("padding"), &_0); RETURN_THISW(); @@ -1051,18 +949,10 @@ PHP_METHOD(Phalcon_Encryption_Crypt, useSigning) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(useSigning) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &useSigning_param); - useSigning = zephir_get_boolval(useSigning_param); - - if (useSigning) { zephir_update_property_zval(this_ptr, ZEND_STRL("useSigning"), &__$true); } else { @@ -1096,21 +986,15 @@ PHP_METHOD(Phalcon_Encryption_Crypt, checkCipherHashIsAvailable) ZVAL_UNDEF(&_1$$5); ZVAL_UNDEF(&_2$$5); ZVAL_UNDEF(&_3$$5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(cipher) Z_PARAM_STR(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &cipher_param, &type_param); zephir_get_strval(&cipher, cipher_param); zephir_get_strval(&type, type_param); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "hash"); ZEPHIR_INIT_VAR(&method); @@ -1128,9 +1012,9 @@ PHP_METHOD(Phalcon_Encryption_Crypt, checkCipherHashIsAvailable) object_init_ex(&_1$$5, phalcon_encryption_crypt_exception_exception_ce); ZEPHIR_INIT_VAR(&_2$$5); ZVAL_STRING(&_2$$5, "The %s algorithm '%s' is not supported on this system."); - ZEPHIR_CALL_FUNCTION(&_3$$5, "sprintf", NULL, 116, &_2$$5, &type, &cipher); + ZEPHIR_CALL_FUNCTION(&_3$$5, "sprintf", NULL, 117, &_2$$5, &type, &cipher); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &_1$$5, "__construct", NULL, 32, &_3$$5); + ZEPHIR_CALL_METHOD(NULL, &_1$$5, "__construct", NULL, 33, &_3$$5); zephir_check_call_status(); zephir_throw_exception_debug(&_1$$5, "phalcon/Encryption/Crypt.zep", 608); ZEPHIR_MM_RESTORE(); @@ -1175,25 +1059,17 @@ PHP_METHOD(Phalcon_Encryption_Crypt, cryptPadText) ZVAL_UNDEF(&_7$$3); ZVAL_UNDEF(&_8$$3); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(4, 4) Z_PARAM_STR(input) Z_PARAM_STR(mode) Z_PARAM_LONG(blockSize) Z_PARAM_LONG(paddingType) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 4, 0, &input_param, &mode_param, &blockSize_param, &paddingType_param); zephir_get_strval(&input, input_param); zephir_get_strval(&mode, mode_param); - blockSize = zephir_get_intval(blockSize_param); - paddingType = zephir_get_intval(paddingType_param); - - ZEPHIR_INIT_VAR(&padding); ZVAL_STRING(&padding, ""); paddingSize = 0; @@ -1205,10 +1081,10 @@ PHP_METHOD(Phalcon_Encryption_Crypt, cryptPadText) ZEPHIR_INIT_NVAR(&_2); ZVAL_STRING(&_2, "ecb"); zephir_array_fast_append(&_1, &_2); - ZEPHIR_CALL_METHOD(&_0, this_ptr, "checkismode", NULL, 235, &_1, &mode); + ZEPHIR_CALL_METHOD(&_0, this_ptr, "checkismode", NULL, 236, &_1, &mode); zephir_check_call_status(); if (ZEPHIR_IS_TRUE_IDENTICAL(&_0)) { - ZEPHIR_CALL_FUNCTION(&_3$$3, "mb_strlen", NULL, 233, &input); + ZEPHIR_CALL_FUNCTION(&_3$$3, "mb_strlen", NULL, 234, &input); zephir_check_call_status(); paddingSize = (blockSize - zephir_safe_mod_zval_long(&_3$$3, blockSize)); _4$$3 = paddingSize >= 256; @@ -1279,25 +1155,17 @@ PHP_METHOD(Phalcon_Encryption_Crypt, cryptUnpadText) ZVAL_UNDEF(&_9$$6); ZVAL_UNDEF(&_10$$6); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(4, 4) Z_PARAM_STR(input) Z_PARAM_STR(mode) Z_PARAM_LONG(blockSize) Z_PARAM_LONG(paddingType) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 4, 0, &input_param, &mode_param, &blockSize_param, &paddingType_param); zephir_get_strval(&input, input_param); zephir_get_strval(&mode, mode_param); - blockSize = zephir_get_intval(blockSize_param); - paddingType = zephir_get_intval(paddingType_param); - - ZEPHIR_INIT_VAR(&length); ZVAL_LONG(&length, zephir_fast_strlen_ev(&input)); ZEPHIR_INIT_VAR(&paddingSize); @@ -1316,7 +1184,7 @@ PHP_METHOD(Phalcon_Encryption_Crypt, cryptUnpadText) ZEPHIR_INIT_NVAR(&_4); ZVAL_STRING(&_4, "ecb"); zephir_array_fast_append(&_3, &_4); - ZEPHIR_CALL_METHOD(&_2, this_ptr, "checkismode", NULL, 235, &_3, &mode); + ZEPHIR_CALL_METHOD(&_2, this_ptr, "checkismode", NULL, 236, &_3, &mode); zephir_check_call_status(); _1 = ZEPHIR_IS_TRUE_IDENTICAL(&_2); } @@ -1376,23 +1244,16 @@ PHP_METHOD(Phalcon_Encryption_Crypt, decryptGetUnpadded) ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$3); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(mode) Z_PARAM_LONG(blockSize) Z_PARAM_STR(decrypted) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &mode_param, &blockSize_param, &decrypted_param); zephir_get_strval(&mode, mode_param); - blockSize = zephir_get_intval(blockSize_param); zephir_get_strval(&decrypted, decrypted_param); - - ZEPHIR_INIT_VAR(&_1); zephir_create_array(&_1, 2, 0); ZEPHIR_INIT_VAR(&_2); @@ -1401,7 +1262,7 @@ PHP_METHOD(Phalcon_Encryption_Crypt, decryptGetUnpadded) ZEPHIR_INIT_NVAR(&_2); ZVAL_STRING(&_2, "ecb"); zephir_array_fast_append(&_1, &_2); - ZEPHIR_CALL_METHOD(&_0, this_ptr, "checkismode", NULL, 235, &_1, &mode); + ZEPHIR_CALL_METHOD(&_0, this_ptr, "checkismode", NULL, 236, &_1, &mode); zephir_check_call_status(); if (ZEPHIR_IS_TRUE_IDENTICAL(&_0)) { zephir_read_property(&_3$$3, this_ptr, ZEND_STRL("padding"), PH_NOISY_CC | PH_READONLY); @@ -1449,25 +1310,19 @@ PHP_METHOD(Phalcon_Encryption_Crypt, decryptGcmCcmAuth) ZVAL_UNDEF(&_5$$3); ZVAL_UNDEF(&_6$$4); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(4, 4) Z_PARAM_STR(mode) Z_PARAM_STR(cipherText) Z_PARAM_STR(decryptKey) Z_PARAM_STR(iv) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 4, 0, &mode_param, &cipherText_param, &decryptKey_param, &iv_param); zephir_get_strval(&mode, mode_param); zephir_get_strval(&cipherText, cipherText_param); zephir_get_strval(&decryptKey, decryptKey_param); zephir_get_strval(&iv, iv_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("cipher"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&cipher, &_0); ZEPHIR_INIT_VAR(&_2); @@ -1478,7 +1333,7 @@ PHP_METHOD(Phalcon_Encryption_Crypt, decryptGcmCcmAuth) ZEPHIR_INIT_NVAR(&_3); ZVAL_STRING(&_3, "gcm"); zephir_array_fast_append(&_2, &_3); - ZEPHIR_CALL_METHOD(&_1, this_ptr, "checkismode", NULL, 235, &_2, &mode); + ZEPHIR_CALL_METHOD(&_1, this_ptr, "checkismode", NULL, 236, &_2, &mode); zephir_check_call_status(); if (ZEPHIR_IS_TRUE_IDENTICAL(&_1)) { zephir_read_property(&_4$$3, this_ptr, ZEND_STRL("authData"), PH_NOISY_CC | PH_READONLY); @@ -1493,11 +1348,11 @@ PHP_METHOD(Phalcon_Encryption_Crypt, decryptGcmCcmAuth) ZEPHIR_INIT_VAR(&encrypted); zephir_fast_str_replace(&encrypted, &authTag, &_5$$3, &cipherText); ZVAL_LONG(&_4$$3, 1); - ZEPHIR_CALL_FUNCTION(&decrypted, "openssl_decrypt", NULL, 236, &encrypted, &cipher, &decryptKey, &_4$$3, &iv, &authTag, &authData); + ZEPHIR_CALL_FUNCTION(&decrypted, "openssl_decrypt", NULL, 237, &encrypted, &cipher, &decryptKey, &_4$$3, &iv, &authTag, &authData); zephir_check_call_status(); } else { ZVAL_LONG(&_6$$4, 1); - ZEPHIR_CALL_FUNCTION(&decrypted, "openssl_decrypt", NULL, 236, &cipherText, &cipher, &decryptKey, &_6$$4, &iv); + ZEPHIR_CALL_FUNCTION(&decrypted, "openssl_decrypt", NULL, 237, &cipherText, &cipher, &decryptKey, &_6$$4, &iv); zephir_check_call_status(); } if (ZEPHIR_IS_FALSE_IDENTICAL(&decrypted)) { @@ -1533,23 +1388,16 @@ PHP_METHOD(Phalcon_Encryption_Crypt, encryptGetPadded) ZVAL_UNDEF(&_5$$3); ZVAL_UNDEF(&_6$$3); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(mode) Z_PARAM_STR(input) Z_PARAM_LONG(blockSize) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &mode_param, &input_param, &blockSize_param); zephir_get_strval(&mode, mode_param); zephir_get_strval(&input, input_param); - blockSize = zephir_get_intval(blockSize_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("padding"), PH_NOISY_CC | PH_READONLY); _1 = !ZEPHIR_IS_LONG_IDENTICAL(&_0, 0); if (_1) { @@ -1561,7 +1409,7 @@ PHP_METHOD(Phalcon_Encryption_Crypt, encryptGetPadded) ZEPHIR_INIT_NVAR(&_4); ZVAL_STRING(&_4, "ecb"); zephir_array_fast_append(&_3, &_4); - ZEPHIR_CALL_METHOD(&_2, this_ptr, "checkismode", NULL, 235, &_3, &mode); + ZEPHIR_CALL_METHOD(&_2, this_ptr, "checkismode", NULL, 236, &_3, &mode); zephir_check_call_status(); _1 = ZEPHIR_IS_TRUE_IDENTICAL(&_2); } @@ -1608,25 +1456,19 @@ PHP_METHOD(Phalcon_Encryption_Crypt, encryptGcmCcm) ZVAL_UNDEF(&_4$$3); ZVAL_UNDEF(&_5$$5); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(4, 4) Z_PARAM_STR(mode) Z_PARAM_STR(padded) Z_PARAM_STR(encryptKey) Z_PARAM_STR(iv) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 4, 0, &mode_param, &padded_param, &encryptKey_param, &iv_param); zephir_get_strval(&mode, mode_param); zephir_get_strval(&padded, padded_param); zephir_get_strval(&encryptKey, encryptKey_param); zephir_get_strval(&iv, iv_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("cipher"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&cipher, &_0); ZEPHIR_INIT_VAR(&authTag); @@ -1639,7 +1481,7 @@ PHP_METHOD(Phalcon_Encryption_Crypt, encryptGcmCcm) ZEPHIR_INIT_NVAR(&_3); ZVAL_STRING(&_3, "gcm"); zephir_array_fast_append(&_2, &_3); - ZEPHIR_CALL_METHOD(&_1, this_ptr, "checkismode", NULL, 235, &_2, &mode); + ZEPHIR_CALL_METHOD(&_1, this_ptr, "checkismode", NULL, 236, &_2, &mode); zephir_check_call_status(); if (ZEPHIR_IS_TRUE_IDENTICAL(&_1)) { zephir_read_property(&_4$$3, this_ptr, ZEND_STRL("authData"), PH_NOISY_CC | PH_READONLY); @@ -1654,13 +1496,13 @@ PHP_METHOD(Phalcon_Encryption_Crypt, encryptGcmCcm) ZEPHIR_CPY_WRT(&authTagLength, &_4$$3); ZVAL_LONG(&_4$$3, 1); ZEPHIR_MAKE_REF(&authTag); - ZEPHIR_CALL_FUNCTION(&encrypted, "openssl_encrypt", NULL, 237, &padded, &cipher, &encryptKey, &_4$$3, &iv, &authTag, &authData, &authTagLength); + ZEPHIR_CALL_FUNCTION(&encrypted, "openssl_encrypt", NULL, 238, &padded, &cipher, &encryptKey, &_4$$3, &iv, &authTag, &authData, &authTagLength); ZEPHIR_UNREF(&authTag); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("authTag"), &authTag); } else { ZVAL_LONG(&_5$$5, 1); - ZEPHIR_CALL_FUNCTION(&encrypted, "openssl_encrypt", NULL, 237, &padded, &cipher, &encryptKey, &_5$$5, &iv); + ZEPHIR_CALL_FUNCTION(&encrypted, "openssl_encrypt", NULL, 238, &padded, &cipher, &encryptKey, &_5$$5, &iv); zephir_check_call_status(); } if (ZEPHIR_IS_FALSE_IDENTICAL(&encrypted)) { @@ -1693,9 +1535,8 @@ PHP_METHOD(Phalcon_Encryption_Crypt, initializeAvailableCiphers) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&allowed); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "openssl_get_cipher_methods"); @@ -1705,7 +1546,7 @@ PHP_METHOD(Phalcon_Encryption_Crypt, initializeAvailableCiphers) ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_encryption_crypt_exception_exception_ce, "This class requires the openssl extension for PHP", "phalcon/Encryption/Crypt.zep", 892); return; } - ZEPHIR_CALL_FUNCTION(&available, "openssl_get_cipher_methods", NULL, 238, &__$true); + ZEPHIR_CALL_FUNCTION(&available, "openssl_get_cipher_methods", NULL, 239, &__$true); zephir_check_call_status(); ZEPHIR_INIT_VAR(&allowed); array_init(&allowed); @@ -1780,25 +1621,18 @@ PHP_METHOD(Phalcon_Encryption_Crypt, checkIsMode) zval mode; zval *modes_param = NULL, *mode_param = NULL; zval modes; - zval *this_ptr = getThis(); ZVAL_UNDEF(&modes); ZVAL_UNDEF(&mode); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ARRAY(modes) Z_PARAM_STR(mode) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &modes_param, &mode_param); zephir_get_arrval(&modes, modes_param); zephir_get_strval(&mode, mode_param); - - RETURN_MM_BOOL(zephir_fast_in_array(&mode, &modes)); } @@ -1824,19 +1658,13 @@ PHP_METHOD(Phalcon_Encryption_Crypt, getBlockSize) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(mode) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &mode_param); zephir_get_strval(&mode, mode_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("ivLength"), PH_NOISY_CC | PH_READONLY); if (ZEPHIR_GT_LONG(&_0, 0)) { RETURN_MM_MEMBER(getThis(), "ivLength"); @@ -1846,9 +1674,9 @@ PHP_METHOD(Phalcon_Encryption_Crypt, getBlockSize) zephir_read_property(&_2, this_ptr, ZEND_STRL("cipher"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_3); ZVAL_STRING(&_3, ""); - ZEPHIR_CALL_FUNCTION(&_4, "str_ireplace", NULL, 239, &_1, &_3, &_2); + ZEPHIR_CALL_FUNCTION(&_4, "str_ireplace", NULL, 240, &_1, &_3, &_2); zephir_check_call_status(); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getivlength", NULL, 234, &_4); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getivlength", NULL, 235, &_4); zephir_check_call_status(); RETURN_MM(); } @@ -1867,24 +1695,17 @@ PHP_METHOD(Phalcon_Encryption_Crypt, getIvLength) zend_long ZEPHIR_LAST_CALL_STATUS; zval *cipher_param = NULL, length; zval cipher; - zval *this_ptr = getThis(); ZVAL_UNDEF(&cipher); ZVAL_UNDEF(&length); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(cipher) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &cipher_param); zephir_get_strval(&cipher, cipher_param); - - - ZEPHIR_CALL_FUNCTION(&length, "openssl_cipher_iv_length", NULL, 240, &cipher); + ZEPHIR_CALL_FUNCTION(&length, "openssl_cipher_iv_length", NULL, 241, &cipher); zephir_check_call_status(); if (ZEPHIR_IS_FALSE_IDENTICAL(&length)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_encryption_crypt_exception_exception_ce, "Cannot calculate the initialization vector (IV) length of the cipher", "phalcon/Encryption/Crypt.zep", 962); @@ -1912,14 +1733,13 @@ PHP_METHOD(Phalcon_Encryption_Crypt, getMode) ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_5); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("cipher"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "-"); - ZEPHIR_CALL_FUNCTION(&_2, "strrpos", NULL, 241, &_0, &_1); + ZEPHIR_CALL_FUNCTION(&_2, "strrpos", NULL, 242, &_0, &_1); zephir_check_call_status(); ZEPHIR_INIT_VAR(&position); ZVAL_LONG(&position, zephir_get_intval(&_2)); @@ -1941,22 +1761,15 @@ PHP_METHOD(Phalcon_Encryption_Crypt, phpFunctionExists) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *name_param = NULL; zval name; - zval *this_ptr = getThis(); ZVAL_UNDEF(&name); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &name_param); zephir_get_strval(&name, name_param); - - RETURN_MM_BOOL((zephir_function_exists(&name) == SUCCESS)); } @@ -1966,23 +1779,16 @@ PHP_METHOD(Phalcon_Encryption_Crypt, phpOpensslCipherIvLength) zend_long ZEPHIR_LAST_CALL_STATUS; zval *cipher_param = NULL; zval cipher; - zval *this_ptr = getThis(); ZVAL_UNDEF(&cipher); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(cipher) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &cipher_param); zephir_get_strval(&cipher, cipher_param); - - - ZEPHIR_RETURN_CALL_FUNCTION("openssl_cipher_iv_length", NULL, 240, &cipher); + ZEPHIR_RETURN_CALL_FUNCTION("openssl_cipher_iv_length", NULL, 241, &cipher); zephir_check_call_status(); RETURN_MM(); } @@ -1992,24 +1798,16 @@ PHP_METHOD(Phalcon_Encryption_Crypt, phpOpensslRandomPseudoBytes) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *length_param = NULL, _0; zend_long length, ZEPHIR_LAST_CALL_STATUS; - zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(length) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &length_param); - length = zephir_get_intval(length_param); - - ZVAL_LONG(&_0, length); - ZEPHIR_RETURN_CALL_FUNCTION("openssl_random_pseudo_bytes", NULL, 242, &_0); + ZEPHIR_RETURN_CALL_FUNCTION("openssl_random_pseudo_bytes", NULL, 243, &_0); zephir_check_call_status(); RETURN_MM(); } @@ -2022,7 +1820,8 @@ zend_object *zephir_init_properties_Phalcon_Encryption_Crypt(zend_class_entry *c ZVAL_UNDEF(&_1$$3); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/encryption/crypt/padding/ansi.zep.c b/ext/phalcon/encryption/crypt/padding/ansi.zep.c index ae5b2e81d77..d6f3723e1bb 100644 --- a/ext/phalcon/encryption/crypt/padding/ansi.zep.c +++ b/ext/phalcon/encryption/crypt/padding/ansi.zep.c @@ -51,33 +51,25 @@ PHP_METHOD(Phalcon_Encryption_Crypt_Padding_Ansi, pad) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *paddingSize_param = NULL, _0, _1, _2, _3; zend_long paddingSize, ZEPHIR_LAST_CALL_STATUS; - zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(paddingSize) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &paddingSize_param); - paddingSize = zephir_get_intval(paddingSize_param); - - ZVAL_LONG(&_0, 0); - ZEPHIR_CALL_FUNCTION(&_1, "chr", NULL, 243, &_0); + ZEPHIR_CALL_FUNCTION(&_1, "chr", NULL, 244, &_0); zephir_check_call_status(); ZVAL_LONG(&_0, (paddingSize - 1)); ZEPHIR_CALL_FUNCTION(&_2, "str_repeat", NULL, 1, &_1, &_0); zephir_check_call_status(); ZVAL_LONG(&_0, paddingSize); - ZEPHIR_CALL_FUNCTION(&_3, "chr", NULL, 243, &_0); + ZEPHIR_CALL_FUNCTION(&_3, "chr", NULL, 244, &_0); zephir_check_call_status(); ZEPHIR_CONCAT_VV(return_value, &_2, &_3); RETURN_MM(); @@ -95,7 +87,6 @@ PHP_METHOD(Phalcon_Encryption_Crypt_Padding_Ansi, unpad) zend_long blockSize, ZEPHIR_LAST_CALL_STATUS; zval *input_param = NULL, *blockSize_param = NULL, last, length, ord, padding, paddingSize, repeat, _0, _1, _2$$4, _3$$4, _4$$3, _5$$3; zval input; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input); ZVAL_UNDEF(&last); @@ -110,21 +101,14 @@ PHP_METHOD(Phalcon_Encryption_Crypt_Padding_Ansi, unpad) ZVAL_UNDEF(&_3$$4); ZVAL_UNDEF(&_4$$3); ZVAL_UNDEF(&_5$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(input) Z_PARAM_LONG(blockSize) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &input_param, &blockSize_param); zephir_get_strval(&input, input_param); - blockSize = zephir_get_intval(blockSize_param); - - ZEPHIR_INIT_VAR(&paddingSize); ZVAL_LONG(&paddingSize, 0); ZEPHIR_INIT_VAR(&length); @@ -133,7 +117,7 @@ PHP_METHOD(Phalcon_Encryption_Crypt_Padding_Ansi, unpad) ZVAL_LONG(&_1, 1); ZEPHIR_INIT_VAR(&last); zephir_substr(&last, &input, zephir_get_intval(&_0), 1 , 0); - ZEPHIR_CALL_FUNCTION(&ord, "ord", NULL, 244, &last); + ZEPHIR_CALL_FUNCTION(&ord, "ord", NULL, 245, &last); zephir_check_call_status(); if (ZEPHIR_LE_LONG(&ord, blockSize)) { ZEPHIR_CPY_WRT(&paddingSize, &ord); @@ -141,7 +125,7 @@ PHP_METHOD(Phalcon_Encryption_Crypt_Padding_Ansi, unpad) ZVAL_STRING(&repeat, ""); if (ZEPHIR_GT_LONG(&paddingSize, 1)) { ZVAL_LONG(&_2$$4, 0); - ZEPHIR_CALL_FUNCTION(&_3$$4, "chr", NULL, 243, &_2$$4); + ZEPHIR_CALL_FUNCTION(&_3$$4, "chr", NULL, 244, &_2$$4); zephir_check_call_status(); ZVAL_LONG(&_2$$4, (zephir_get_numberval(&paddingSize) - 1)); ZEPHIR_CALL_FUNCTION(&repeat, "str_repeat", NULL, 1, &_3$$4, &_2$$4); diff --git a/ext/phalcon/encryption/crypt/padding/iso10126.zep.c b/ext/phalcon/encryption/crypt/padding/iso10126.zep.c index 62daf661d68..fa9cc91c3aa 100644 --- a/ext/phalcon/encryption/crypt/padding/iso10126.zep.c +++ b/ext/phalcon/encryption/crypt/padding/iso10126.zep.c @@ -53,7 +53,6 @@ PHP_METHOD(Phalcon_Encryption_Crypt_Padding_Iso10126, pad) zephir_fcall_cache_entry *_4 = NULL, *_6 = NULL; zval *paddingSize_param = NULL, counter, padding, _7, _8, _3$$3, _5$$3; zend_long paddingSize, ZEPHIR_LAST_CALL_STATUS, _1, _2; - zval *this_ptr = getThis(); ZVAL_UNDEF(&counter); ZVAL_UNDEF(&padding); @@ -61,19 +60,12 @@ PHP_METHOD(Phalcon_Encryption_Crypt_Padding_Iso10126, pad) ZVAL_UNDEF(&_8); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_5$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(paddingSize) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &paddingSize_param); - paddingSize = zephir_get_intval(paddingSize_param); - - ZEPHIR_INIT_VAR(&padding); ZVAL_STRING(&padding, ""); _2 = (paddingSize - 2); @@ -91,15 +83,15 @@ PHP_METHOD(Phalcon_Encryption_Crypt_Padding_Iso10126, pad) } ZEPHIR_INIT_NVAR(&counter); ZVAL_LONG(&counter, _1); - ZEPHIR_CALL_FUNCTION(&_3$$3, "rand", &_4, 245); + ZEPHIR_CALL_FUNCTION(&_3$$3, "rand", &_4, 246); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&_5$$3, "chr", &_6, 243, &_3$$3); + ZEPHIR_CALL_FUNCTION(&_5$$3, "chr", &_6, 244, &_3$$3); zephir_check_call_status(); zephir_concat_self(&padding, &_5$$3); } } ZVAL_LONG(&_7, paddingSize); - ZEPHIR_CALL_FUNCTION(&_8, "chr", &_6, 243, &_7); + ZEPHIR_CALL_FUNCTION(&_8, "chr", &_6, 244, &_7); zephir_check_call_status(); zephir_concat_self(&padding, &_8); RETURN_CCTOR(&padding); @@ -117,35 +109,27 @@ PHP_METHOD(Phalcon_Encryption_Crypt_Padding_Iso10126, unpad) zend_long blockSize, ZEPHIR_LAST_CALL_STATUS; zval *input_param = NULL, *blockSize_param = NULL, last, length, _0, _1; zval input; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input); ZVAL_UNDEF(&last); ZVAL_UNDEF(&length); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(input) Z_PARAM_LONG(blockSize) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &input_param, &blockSize_param); zephir_get_strval(&input, input_param); - blockSize = zephir_get_intval(blockSize_param); - - ZEPHIR_INIT_VAR(&length); ZVAL_LONG(&length, zephir_fast_strlen_ev(&input)); ZVAL_LONG(&_0, (zephir_get_numberval(&length) - 1)); ZVAL_LONG(&_1, 1); ZEPHIR_INIT_VAR(&last); zephir_substr(&last, &input, zephir_get_intval(&_0), 1 , 0); - ZEPHIR_RETURN_CALL_FUNCTION("ord", NULL, 244, &last); + ZEPHIR_RETURN_CALL_FUNCTION("ord", NULL, 245, &last); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/encryption/crypt/padding/isoiek.zep.c b/ext/phalcon/encryption/crypt/padding/isoiek.zep.c index 607d35ac97e..153e6e623c3 100644 --- a/ext/phalcon/encryption/crypt/padding/isoiek.zep.c +++ b/ext/phalcon/encryption/crypt/padding/isoiek.zep.c @@ -51,30 +51,22 @@ PHP_METHOD(Phalcon_Encryption_Crypt_Padding_IsoIek, pad) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *paddingSize_param = NULL, _0, _1, _2, _3; zend_long paddingSize, ZEPHIR_LAST_CALL_STATUS; - zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(paddingSize) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &paddingSize_param); - paddingSize = zephir_get_intval(paddingSize_param); - - ZVAL_LONG(&_0, 0x80); - ZEPHIR_CALL_FUNCTION(&_1, "chr", NULL, 243, &_0); + ZEPHIR_CALL_FUNCTION(&_1, "chr", NULL, 244, &_0); zephir_check_call_status(); ZVAL_LONG(&_0, 0); - ZEPHIR_CALL_FUNCTION(&_2, "chr", NULL, 243, &_0); + ZEPHIR_CALL_FUNCTION(&_2, "chr", NULL, 244, &_0); zephir_check_call_status(); ZVAL_LONG(&_0, (paddingSize - 1)); ZEPHIR_CALL_FUNCTION(&_3, "str_repeat", NULL, 1, &_2, &_0); @@ -97,7 +89,6 @@ PHP_METHOD(Phalcon_Encryption_Crypt_Padding_IsoIek, unpad) zend_long blockSize, ZEPHIR_LAST_CALL_STATUS, counter = 0, paddingSize = 0; zval *input_param = NULL, *blockSize_param = NULL, length, inputArray, _1, _2, _3, _6, _7; zval input; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input); ZVAL_UNDEF(&length); @@ -107,25 +98,18 @@ PHP_METHOD(Phalcon_Encryption_Crypt_Padding_IsoIek, unpad) ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_6); ZVAL_UNDEF(&_7); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(input) Z_PARAM_LONG(blockSize) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &input_param, &blockSize_param); zephir_get_strval(&input, input_param); - blockSize = zephir_get_intval(blockSize_param); - - paddingSize = 0; - ZEPHIR_CALL_FUNCTION(&length, "mb_strlen", NULL, 233, &input); + ZEPHIR_CALL_FUNCTION(&length, "mb_strlen", NULL, 234, &input); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&inputArray, "str_split", NULL, 87, &input); + ZEPHIR_CALL_FUNCTION(&inputArray, "str_split", NULL, 88, &input); zephir_check_call_status(); counter = (zephir_get_numberval(&length) - 1); while (1) { @@ -133,7 +117,7 @@ PHP_METHOD(Phalcon_Encryption_Crypt_Padding_IsoIek, unpad) if (_0) { zephir_array_fetch_long(&_1, &inputArray, counter, PH_NOISY | PH_READONLY, "phalcon/Encryption/Crypt/Padding/IsoIek.zep", 48); ZVAL_LONG(&_2, 0); - ZEPHIR_CALL_FUNCTION(&_3, "chr", &_4, 243, &_2); + ZEPHIR_CALL_FUNCTION(&_3, "chr", &_4, 244, &_2); zephir_check_call_status(); _0 = ZEPHIR_IS_IDENTICAL(&_1, &_3); } @@ -149,7 +133,7 @@ PHP_METHOD(Phalcon_Encryption_Crypt_Padding_IsoIek, unpad) } zephir_array_fetch_long(&_6, &inputArray, counter, PH_NOISY | PH_READONLY, "phalcon/Encryption/Crypt/Padding/IsoIek.zep", 55); ZVAL_LONG(&_2, 0x80); - ZEPHIR_CALL_FUNCTION(&_7, "chr", &_4, 243, &_2); + ZEPHIR_CALL_FUNCTION(&_7, "chr", &_4, 244, &_2); zephir_check_call_status(); if (ZEPHIR_IS_EQUAL(&_6, &_7)) { paddingSize++; diff --git a/ext/phalcon/encryption/crypt/padding/noop.zep.c b/ext/phalcon/encryption/crypt/padding/noop.zep.c index 3ee2ea2426e..1e7b1116880 100644 --- a/ext/phalcon/encryption/crypt/padding/noop.zep.c +++ b/ext/phalcon/encryption/crypt/padding/noop.zep.c @@ -47,20 +47,11 @@ PHP_METHOD(Phalcon_Encryption_Crypt_Padding_Noop, pad) { zval *paddingSize_param = NULL; zend_long paddingSize; - zval *this_ptr = getThis(); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(paddingSize) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &paddingSize_param); - paddingSize = zephir_get_intval(paddingSize_param); - - RETURN_STRING(""); } @@ -76,24 +67,16 @@ PHP_METHOD(Phalcon_Encryption_Crypt_Padding_Noop, unpad) zend_long blockSize; zval *input_param = NULL, *blockSize_param = NULL; zval input; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(input) Z_PARAM_LONG(blockSize) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &input_param, &blockSize_param); zephir_get_strval(&input, input_param); - blockSize = zephir_get_intval(blockSize_param); - - RETURN_MM_LONG(0); } diff --git a/ext/phalcon/encryption/crypt/padding/pkcs7.zep.c b/ext/phalcon/encryption/crypt/padding/pkcs7.zep.c index d48e3355eb9..a42db0f02e6 100644 --- a/ext/phalcon/encryption/crypt/padding/pkcs7.zep.c +++ b/ext/phalcon/encryption/crypt/padding/pkcs7.zep.c @@ -50,25 +50,17 @@ PHP_METHOD(Phalcon_Encryption_Crypt_Padding_Pkcs7, pad) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *paddingSize_param = NULL, _0, _1; zend_long paddingSize, ZEPHIR_LAST_CALL_STATUS; - zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(paddingSize) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &paddingSize_param); - paddingSize = zephir_get_intval(paddingSize_param); - - ZVAL_LONG(&_0, paddingSize); - ZEPHIR_CALL_FUNCTION(&_1, "chr", NULL, 243, &_0); + ZEPHIR_CALL_FUNCTION(&_1, "chr", NULL, 244, &_0); zephir_check_call_status(); ZVAL_LONG(&_0, paddingSize); ZEPHIR_RETURN_CALL_FUNCTION("str_repeat", NULL, 1, &_1, &_0); @@ -88,7 +80,6 @@ PHP_METHOD(Phalcon_Encryption_Crypt_Padding_Pkcs7, unpad) zend_long blockSize, ZEPHIR_LAST_CALL_STATUS; zval *input_param = NULL, *blockSize_param = NULL, last, length, ord, padding, paddingSize, _0, _1, _2$$3, _3$$3, _4$$3; zval input; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input); ZVAL_UNDEF(&last); @@ -101,32 +92,25 @@ PHP_METHOD(Phalcon_Encryption_Crypt_Padding_Pkcs7, unpad) ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(input) Z_PARAM_LONG(blockSize) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &input_param, &blockSize_param); zephir_get_strval(&input, input_param); - blockSize = zephir_get_intval(blockSize_param); - - - ZEPHIR_CALL_FUNCTION(&length, "mb_strlen", NULL, 233, &input); + ZEPHIR_CALL_FUNCTION(&length, "mb_strlen", NULL, 234, &input); zephir_check_call_status(); ZVAL_LONG(&_0, (zephir_get_numberval(&length) - 1)); ZVAL_LONG(&_1, 1); ZEPHIR_INIT_VAR(&last); zephir_substr(&last, &input, zephir_get_intval(&_0), 1 , 0); - ZEPHIR_CALL_FUNCTION(&ord, "ord", NULL, 244, &last); + ZEPHIR_CALL_FUNCTION(&ord, "ord", NULL, 245, &last); zephir_check_call_status(); if (ZEPHIR_LE_LONG(&ord, blockSize)) { ZEPHIR_CPY_WRT(&paddingSize, &ord); - ZEPHIR_CALL_FUNCTION(&_2$$3, "chr", NULL, 243, &paddingSize); + ZEPHIR_CALL_FUNCTION(&_2$$3, "chr", NULL, 244, &paddingSize); zephir_check_call_status(); ZEPHIR_CALL_FUNCTION(&padding, "str_repeat", NULL, 1, &_2$$3, &paddingSize); zephir_check_call_status(); diff --git a/ext/phalcon/encryption/crypt/padding/space.zep.c b/ext/phalcon/encryption/crypt/padding/space.zep.c index 151bcc756ab..14a7c95a7aa 100644 --- a/ext/phalcon/encryption/crypt/padding/space.zep.c +++ b/ext/phalcon/encryption/crypt/padding/space.zep.c @@ -50,23 +50,15 @@ PHP_METHOD(Phalcon_Encryption_Crypt_Padding_Space, pad) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *paddingSize_param = NULL, _0, _1; zend_long paddingSize, ZEPHIR_LAST_CALL_STATUS; - zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(paddingSize) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &paddingSize_param); - paddingSize = zephir_get_intval(paddingSize_param); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, " "); ZVAL_LONG(&_1, paddingSize); @@ -89,7 +81,6 @@ PHP_METHOD(Phalcon_Encryption_Crypt_Padding_Space, unpad) zend_long blockSize, ZEPHIR_LAST_CALL_STATUS, counter = 0, paddingSize = 0; zval *input_param = NULL, *blockSize_param = NULL, length, inputArray, _1, _2, _3; zval input; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input); ZVAL_UNDEF(&length); @@ -97,24 +88,17 @@ PHP_METHOD(Phalcon_Encryption_Crypt_Padding_Space, unpad) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(input) Z_PARAM_LONG(blockSize) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &input_param, &blockSize_param); zephir_get_strval(&input, input_param); - blockSize = zephir_get_intval(blockSize_param); - - - ZEPHIR_CALL_FUNCTION(&length, "mb_strlen", NULL, 233, &input); + ZEPHIR_CALL_FUNCTION(&length, "mb_strlen", NULL, 234, &input); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&inputArray, "str_split", NULL, 87, &input); + ZEPHIR_CALL_FUNCTION(&inputArray, "str_split", NULL, 88, &input); zephir_check_call_status(); counter = (zephir_get_numberval(&length) - 1); paddingSize = 0; @@ -123,7 +107,7 @@ PHP_METHOD(Phalcon_Encryption_Crypt_Padding_Space, unpad) if (_0) { zephir_array_fetch_long(&_1, &inputArray, counter, PH_NOISY | PH_READONLY, "phalcon/Encryption/Crypt/Padding/Space.zep", 48); ZVAL_LONG(&_2, 32); - ZEPHIR_CALL_FUNCTION(&_3, "chr", &_4, 243, &_2); + ZEPHIR_CALL_FUNCTION(&_3, "chr", &_4, 244, &_2); zephir_check_call_status(); _0 = ZEPHIR_IS_EQUAL(&_1, &_3); } diff --git a/ext/phalcon/encryption/crypt/padding/zero.zep.c b/ext/phalcon/encryption/crypt/padding/zero.zep.c index 7b7605d9435..d818d4d887a 100644 --- a/ext/phalcon/encryption/crypt/padding/zero.zep.c +++ b/ext/phalcon/encryption/crypt/padding/zero.zep.c @@ -50,25 +50,17 @@ PHP_METHOD(Phalcon_Encryption_Crypt_Padding_Zero, pad) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *paddingSize_param = NULL, _0, _1; zend_long paddingSize, ZEPHIR_LAST_CALL_STATUS; - zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(paddingSize) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &paddingSize_param); - paddingSize = zephir_get_intval(paddingSize_param); - - ZVAL_LONG(&_0, 0); - ZEPHIR_CALL_FUNCTION(&_1, "chr", NULL, 243, &_0); + ZEPHIR_CALL_FUNCTION(&_1, "chr", NULL, 244, &_0); zephir_check_call_status(); ZVAL_LONG(&_0, paddingSize); ZEPHIR_RETURN_CALL_FUNCTION("str_repeat", NULL, 1, &_1, &_0); @@ -90,7 +82,6 @@ PHP_METHOD(Phalcon_Encryption_Crypt_Padding_Zero, unpad) zend_long blockSize, ZEPHIR_LAST_CALL_STATUS, counter = 0, paddingSize = 0; zval *input_param = NULL, *blockSize_param = NULL, length, inputArray, _1, _2, _3; zval input; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input); ZVAL_UNDEF(&length); @@ -98,24 +89,17 @@ PHP_METHOD(Phalcon_Encryption_Crypt_Padding_Zero, unpad) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(input) Z_PARAM_LONG(blockSize) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &input_param, &blockSize_param); zephir_get_strval(&input, input_param); - blockSize = zephir_get_intval(blockSize_param); - - - ZEPHIR_CALL_FUNCTION(&length, "mb_strlen", NULL, 233, &input); + ZEPHIR_CALL_FUNCTION(&length, "mb_strlen", NULL, 234, &input); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&inputArray, "str_split", NULL, 87, &input); + ZEPHIR_CALL_FUNCTION(&inputArray, "str_split", NULL, 88, &input); zephir_check_call_status(); counter = (zephir_get_numberval(&length) - 1); paddingSize = 0; @@ -124,7 +108,7 @@ PHP_METHOD(Phalcon_Encryption_Crypt_Padding_Zero, unpad) if (_0) { zephir_array_fetch_long(&_1, &inputArray, counter, PH_NOISY | PH_READONLY, "phalcon/Encryption/Crypt/Padding/Zero.zep", 48); ZVAL_LONG(&_2, 0); - ZEPHIR_CALL_FUNCTION(&_3, "chr", &_4, 243, &_2); + ZEPHIR_CALL_FUNCTION(&_3, "chr", &_4, 244, &_2); zephir_check_call_status(); _0 = ZEPHIR_IS_EQUAL(&_1, &_3); } diff --git a/ext/phalcon/encryption/crypt/padfactory.zep.c b/ext/phalcon/encryption/crypt/padfactory.zep.c index 576287b4ac7..a611f593644 100644 --- a/ext/phalcon/encryption/crypt/padfactory.zep.c +++ b/ext/phalcon/encryption/crypt/padfactory.zep.c @@ -57,16 +57,12 @@ PHP_METHOD(Phalcon_Encryption_Crypt_PadFactory, __construct) zval *this_ptr = getThis(); ZVAL_UNDEF(&services); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(services) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &services_param); if (!services_param) { ZEPHIR_INIT_VAR(&services); @@ -74,8 +70,6 @@ PHP_METHOD(Phalcon_Encryption_Crypt_PadFactory, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&services, services_param); } - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "init", NULL, 0, &services); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); @@ -94,15 +88,11 @@ PHP_METHOD(Phalcon_Encryption_Crypt_PadFactory, newInstance) ZVAL_UNDEF(&name); ZVAL_UNDEF(&definition); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -113,8 +103,6 @@ PHP_METHOD(Phalcon_Encryption_Crypt_PadFactory, newInstance) } else { ZEPHIR_INIT_VAR(&name); } - - ZEPHIR_CALL_METHOD(&definition, this_ptr, "getservice", NULL, 0, &name); zephir_check_call_status(); ZEPHIR_LAST_CALL_STATUS = zephir_create_instance(return_value, &definition); @@ -136,25 +124,17 @@ PHP_METHOD(Phalcon_Encryption_Crypt_PadFactory, padNumberToService) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *number_param = NULL, _0, _1, _2; zend_long number, ZEPHIR_LAST_CALL_STATUS; - zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&map); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(number) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &number_param); - number = zephir_get_intval(number_param); - - ZEPHIR_INIT_VAR(&map); zephir_create_array(&map, 6, 0); add_index_stringl(&map, 1, SL("ansi")); @@ -173,7 +153,7 @@ PHP_METHOD(Phalcon_Encryption_Crypt_PadFactory, padNumberToService) ZVAL_LONG(&_1, number); ZEPHIR_INIT_VAR(&_2); ZVAL_STRING(&_2, "noop"); - ZEPHIR_RETURN_CALL_METHOD(&_0, "__invoke", NULL, 158, &map, &_1, &_2); + ZEPHIR_RETURN_CALL_METHOD(&_0, "__invoke", NULL, 159, &map, &_1, &_2); zephir_check_call_status(); RETURN_MM(); } @@ -183,9 +163,6 @@ PHP_METHOD(Phalcon_Encryption_Crypt_PadFactory, padNumberToService) */ PHP_METHOD(Phalcon_Encryption_Crypt_PadFactory, getServices) { - zval *this_ptr = getThis(); - - zephir_create_array(return_value, 7, 0); add_assoc_stringl_ex(return_value, SL("ansi"), SL("Phalcon\\Encryption\\Crypt\\Padding\\Ansi")); diff --git a/ext/phalcon/encryption/crypt/padfactory.zep.h b/ext/phalcon/encryption/crypt/padfactory.zep.h index 72791327bac..92bc7d82fbf 100644 --- a/ext/phalcon/encryption/crypt/padfactory.zep.h +++ b/ext/phalcon/encryption/crypt/padfactory.zep.h @@ -9,11 +9,7 @@ PHP_METHOD(Phalcon_Encryption_Crypt_PadFactory, padNumberToService); PHP_METHOD(Phalcon_Encryption_Crypt_PadFactory, getServices); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_encryption_crypt_padfactory___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, services, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, services, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, services, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_encryption_crypt_padfactory_newinstance, 0, 1, Phalcon\\Encryption\\Crypt\\Padding\\PadInterface, 0) diff --git a/ext/phalcon/encryption/security.zep.c b/ext/phalcon/encryption/security.zep.c index 98637080cf0..620f3f57158 100644 --- a/ext/phalcon/encryption/security.zep.c +++ b/ext/phalcon/encryption/security.zep.c @@ -142,17 +142,14 @@ PHP_METHOD(Phalcon_Encryption_Security, __construct) ZVAL_UNDEF(&request_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_OBJECT_OF_CLASS_OR_NULL(session, phalcon_session_managerinterface_ce) Z_PARAM_OBJECT_OF_CLASS_OR_NULL(request, phalcon_http_requestinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 2, &session, &request); if (!session) { session = &session_sub; @@ -162,8 +159,6 @@ PHP_METHOD(Phalcon_Encryption_Security, __construct) request = &request_sub; request = &__$null; } - - ZEPHIR_INIT_VAR(&_0); object_init_ex(&_0, phalcon_encryption_security_random_ce); if (zephir_has_constructor(&_0)) { @@ -194,32 +189,24 @@ PHP_METHOD(Phalcon_Encryption_Security, checkHash) zend_long maxPassLength, ZEPHIR_LAST_CALL_STATUS; zval *password_param = NULL, *passwordHash_param = NULL, *maxPassLength_param = NULL; zval password, passwordHash; - zval *this_ptr = getThis(); ZVAL_UNDEF(&password); ZVAL_UNDEF(&passwordHash); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(password) Z_PARAM_STR(passwordHash) Z_PARAM_OPTIONAL Z_PARAM_LONG(maxPassLength) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &password_param, &passwordHash_param, &maxPassLength_param); zephir_get_strval(&password, password_param); zephir_get_strval(&passwordHash, passwordHash_param); if (!maxPassLength_param) { maxPassLength = 0; } else { - maxPassLength = zephir_get_intval(maxPassLength_param); - } - - + } _0 = maxPassLength > 0; if (_0) { _0 = zephir_fast_strlen_ev(&password) > maxPassLength; @@ -227,7 +214,7 @@ PHP_METHOD(Phalcon_Encryption_Security, checkHash) if (_0) { RETURN_MM_BOOL(0); } - ZEPHIR_RETURN_CALL_FUNCTION("password_verify", NULL, 246, &password, &passwordHash); + ZEPHIR_RETURN_CALL_FUNCTION("password_verify", NULL, 247, &password, &passwordHash); zephir_check_call_status(); RETURN_MM(); } @@ -258,7 +245,6 @@ PHP_METHOD(Phalcon_Encryption_Security, checkToken) ZVAL_UNDEF(&knownToken); ZVAL_UNDEF(&userToken); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 3) Z_PARAM_OPTIONAL @@ -266,10 +252,8 @@ PHP_METHOD(Phalcon_Encryption_Security, checkToken) Z_PARAM_ZVAL_OR_NULL(tokenValue) Z_PARAM_BOOL(destroyIfValid) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 3, &tokenKey_param, &tokenValue, &destroyIfValid_param); if (!tokenKey_param) { ZEPHIR_INIT_VAR(&tokenKey); @@ -283,17 +267,14 @@ PHP_METHOD(Phalcon_Encryption_Security, checkToken) if (!destroyIfValid_param) { destroyIfValid = 1; } else { - destroyIfValid = zephir_get_boolval(destroyIfValid_param); - } - - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "processtokenkey", NULL, 247, &tokenKey); + } + ZEPHIR_CALL_METHOD(&_0, this_ptr, "processtokenkey", NULL, 248, &tokenKey); zephir_check_call_status(); zephir_get_strval(&tokenKey, &_0); if (!(!(ZEPHIR_IS_EMPTY(&tokenKey)))) { RETURN_MM_BOOL(0); } - ZEPHIR_CALL_METHOD(&userToken, this_ptr, "processusertoken", NULL, 248, &tokenKey, tokenValue); + ZEPHIR_CALL_METHOD(&userToken, this_ptr, "processusertoken", NULL, 249, &tokenKey, tokenValue); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&knownToken, this_ptr, "getrequesttoken", NULL, 0); zephir_check_call_status(); @@ -336,7 +317,6 @@ PHP_METHOD(Phalcon_Encryption_Security, computeHmac) zend_bool raw; zval *data_param = NULL, *key_param = NULL, *algo_param = NULL, *raw_param = NULL, hmac, _0, _1$$3, _2$$3, _3$$3; zval data, key, algo; - zval *this_ptr = getThis(); ZVAL_UNDEF(&data); ZVAL_UNDEF(&key); @@ -346,8 +326,6 @@ PHP_METHOD(Phalcon_Encryption_Security, computeHmac) ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 4) Z_PARAM_STR(data) Z_PARAM_STR(key) @@ -355,10 +333,8 @@ PHP_METHOD(Phalcon_Encryption_Security, computeHmac) Z_PARAM_OPTIONAL Z_PARAM_BOOL(raw) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 1, &data_param, &key_param, &algo_param, &raw_param); zephir_get_strval(&data, data_param); zephir_get_strval(&key, key_param); @@ -366,21 +342,18 @@ PHP_METHOD(Phalcon_Encryption_Security, computeHmac) if (!raw_param) { raw = 0; } else { - raw = zephir_get_boolval(raw_param); - } - - + } ZVAL_BOOL(&_0, (raw ? 1 : 0)); - ZEPHIR_CALL_FUNCTION(&hmac, "hash_hmac", NULL, 228, &algo, &data, &key, &_0); + ZEPHIR_CALL_FUNCTION(&hmac, "hash_hmac", NULL, 229, &algo, &data, &key, &_0); zephir_check_call_status(); if (UNEXPECTED(!zephir_is_true(&hmac))) { ZEPHIR_INIT_VAR(&_1$$3); object_init_ex(&_1$$3, phalcon_encryption_security_exception_ce); ZEPHIR_INIT_VAR(&_2$$3); ZVAL_STRING(&_2$$3, "Unknown hashing algorithm: %s"); - ZEPHIR_CALL_FUNCTION(&_3$$3, "sprintf", NULL, 116, &_2$$3, &algo); + ZEPHIR_CALL_FUNCTION(&_3$$3, "sprintf", NULL, 117, &_2$$3, &algo); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 32, &_3$$3); + ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 33, &_3$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_1$$3, "phalcon/Encryption/Security.zep", 219); ZEPHIR_MM_RESTORE(); @@ -405,9 +378,8 @@ PHP_METHOD(Phalcon_Encryption_Security, destroyToken) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "session"); @@ -436,9 +408,6 @@ PHP_METHOD(Phalcon_Encryption_Security, destroyToken) */ PHP_METHOD(Phalcon_Encryption_Security, getDefaultHash) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "defaultHash"); } @@ -456,23 +425,16 @@ PHP_METHOD(Phalcon_Encryption_Security, getHashInformation) zend_long ZEPHIR_LAST_CALL_STATUS; zval *hash_param = NULL; zval hash; - zval *this_ptr = getThis(); ZVAL_UNDEF(&hash); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(hash) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &hash_param); zephir_get_strval(&hash, hash_param); - - - ZEPHIR_RETURN_CALL_FUNCTION("password_get_info", NULL, 249, &hash); + ZEPHIR_RETURN_CALL_FUNCTION("password_get_info", NULL, 250, &hash); zephir_check_call_status(); RETURN_MM(); } @@ -482,9 +444,6 @@ PHP_METHOD(Phalcon_Encryption_Security, getHashInformation) */ PHP_METHOD(Phalcon_Encryption_Security, getRandom) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "random"); } @@ -495,9 +454,6 @@ PHP_METHOD(Phalcon_Encryption_Security, getRandom) */ PHP_METHOD(Phalcon_Encryption_Security, getRandomBytes) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "numberBytes"); } @@ -513,9 +469,8 @@ PHP_METHOD(Phalcon_Encryption_Security, getRequestToken) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("requestToken"), PH_NOISY_CC | PH_READONLY); if (ZEPHIR_IS_EMPTY(&_0)) { @@ -542,9 +497,8 @@ PHP_METHOD(Phalcon_Encryption_Security, getSessionToken) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2$$3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "session"); @@ -582,24 +536,17 @@ PHP_METHOD(Phalcon_Encryption_Security, getSaltBytes) ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_1$$4); ZVAL_UNDEF(&_2$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_LONG(numberBytes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &numberBytes_param); if (!numberBytes_param) { numberBytes = 0; } else { - numberBytes = zephir_get_intval(numberBytes_param); - } - - + } if (!(numberBytes)) { zephir_read_property(&_0$$3, this_ptr, ZEND_STRL("numberBytes"), PH_NOISY_CC | PH_READONLY); numberBytes = zephir_get_numberval(&_0$$3); @@ -644,9 +591,8 @@ PHP_METHOD(Phalcon_Encryption_Security, getToken) ZVAL_UNDEF(&_6$$3); ZVAL_UNDEF(&_7$$4); ZVAL_UNDEF(&_8$$4); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("token"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_0) == IS_NULL) { @@ -697,9 +643,8 @@ PHP_METHOD(Phalcon_Encryption_Security, getTokenKey) ZVAL_UNDEF(&_5$$4); ZVAL_UNDEF(&_6$$4); ZVAL_UNDEF(&_7$$4); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("tokenKey"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_0) == IS_NULL) { @@ -729,9 +674,6 @@ PHP_METHOD(Phalcon_Encryption_Security, getTokenKey) */ PHP_METHOD(Phalcon_Encryption_Security, getWorkFactor) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "workFactor"); } @@ -769,17 +711,13 @@ PHP_METHOD(Phalcon_Encryption_Security, hash) ZVAL_UNDEF(&_4$$9); ZVAL_UNDEF(&_5$$9); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(password) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &password_param, &options_param); zephir_get_strval(&password, password_param); if (!options_param) { @@ -788,19 +726,17 @@ PHP_METHOD(Phalcon_Encryption_Security, hash) } else { zephir_get_arrval(&options, options_param); } - - - ZEPHIR_CALL_METHOD(&cost, this_ptr, "processcost", NULL, 250, &options); + ZEPHIR_CALL_METHOD(&cost, this_ptr, "processcost", NULL, 251, &options); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "%02s"); - ZEPHIR_CALL_FUNCTION(&formatted, "sprintf", NULL, 116, &_0, &cost); + ZEPHIR_CALL_FUNCTION(&formatted, "sprintf", NULL, 117, &_0, &cost); zephir_check_call_status(); ZEPHIR_INIT_VAR(&prefix); ZVAL_STRING(&prefix, ""); bytes = 22; legacy = 1; - ZEPHIR_OBS_VAR(&_1); + zephir_memory_observe(&_1); zephir_read_property(&_1, this_ptr, ZEND_STRL("defaultHash"), PH_NOISY_CC); do { if (ZEPHIR_IS_LONG(&_1, 3)) { @@ -824,14 +760,14 @@ PHP_METHOD(Phalcon_Encryption_Security, hash) if (ZEPHIR_IS_LONG(&_1, 5)) { ZEPHIR_INIT_VAR(&_2$$6); ZVAL_STRING(&_2$$6, "$2a$%s$"); - ZEPHIR_CALL_FUNCTION(&prefix, "sprintf", NULL, 116, &_2$$6, &formatted); + ZEPHIR_CALL_FUNCTION(&prefix, "sprintf", NULL, 117, &_2$$6, &formatted); zephir_check_call_status(); break; } if (ZEPHIR_IS_LONG(&_1, 6)) { ZEPHIR_INIT_VAR(&_3$$7); ZVAL_STRING(&_3$$7, "$2x$%s$"); - ZEPHIR_CALL_FUNCTION(&prefix, "sprintf", NULL, 116, &_3$$7, &formatted); + ZEPHIR_CALL_FUNCTION(&prefix, "sprintf", NULL, 117, &_3$$7, &formatted); zephir_check_call_status(); break; } @@ -845,7 +781,7 @@ PHP_METHOD(Phalcon_Encryption_Security, hash) zephir_check_call_status(); ZEPHIR_INIT_VAR(&salt); ZEPHIR_CONCAT_VVS(&salt, &prefix, &_4$$9, "$"); - ZEPHIR_RETURN_CALL_FUNCTION("crypt", NULL, 251, &password, &salt); + ZEPHIR_RETURN_CALL_FUNCTION("crypt", NULL, 252, &password, &salt); zephir_check_call_status(); RETURN_MM(); } @@ -853,11 +789,11 @@ PHP_METHOD(Phalcon_Encryption_Security, hash) zephir_create_array(&_6, 1, 0); zephir_array_update_string(&_6, SL("cost"), &cost, PH_COPY | PH_SEPARATE); ZEPHIR_CPY_WRT(&options, &_6); - ZEPHIR_CALL_METHOD(&algorithm, this_ptr, "processalgorithm", NULL, 252); + ZEPHIR_CALL_METHOD(&algorithm, this_ptr, "processalgorithm", NULL, 253); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&arguments, this_ptr, "processargonoptions", NULL, 253, &options); + ZEPHIR_CALL_METHOD(&arguments, this_ptr, "processargonoptions", NULL, 254, &options); zephir_check_call_status(); - ZEPHIR_RETURN_CALL_FUNCTION("password_hash", NULL, 254, &password, &algorithm, &arguments); + ZEPHIR_RETURN_CALL_FUNCTION("password_hash", NULL, 255, &password, &algorithm, &arguments); zephir_check_call_status(); RETURN_MM(); } @@ -874,22 +810,15 @@ PHP_METHOD(Phalcon_Encryption_Security, isLegacyHash) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *passwordHash_param = NULL; zval passwordHash; - zval *this_ptr = getThis(); ZVAL_UNDEF(&passwordHash); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(passwordHash) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &passwordHash_param); zephir_get_strval(&passwordHash, passwordHash_param); - - RETURN_MM_BOOL(zephir_start_with_str(&passwordHash, SL("$2a$"))); } @@ -907,19 +836,11 @@ PHP_METHOD(Phalcon_Encryption_Security, setDefaultHash) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(defaultHash) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &defaultHash_param); - defaultHash = zephir_get_intval(defaultHash_param); - - - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, defaultHash); zephir_update_property_zval(this_ptr, ZEND_STRL("defaultHash"), &_0); RETURN_THISW(); @@ -940,23 +861,16 @@ PHP_METHOD(Phalcon_Encryption_Security, setRandomBytes) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(randomBytes) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &randomBytes_param); if (UNEXPECTED(Z_TYPE_P(randomBytes_param) != IS_LONG)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'randomBytes' must be of the type int")); RETURN_NULL(); } randomBytes = Z_LVAL_P(randomBytes_param); - - - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, randomBytes); zephir_update_property_zval(this_ptr, ZEND_STRL("numberBytes"), &_0); RETURN_THISW(); @@ -976,19 +890,11 @@ PHP_METHOD(Phalcon_Encryption_Security, setWorkFactor) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(workFactor) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &workFactor_param); - workFactor = zephir_get_intval(workFactor_param); - - - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, workFactor); zephir_update_property_zval(this_ptr, ZEND_STRL("workFactor"), &_0); RETURN_THISW(); @@ -1018,22 +924,16 @@ PHP_METHOD(Phalcon_Encryption_Security, getLocalService) ZVAL_UNDEF(&_8); ZVAL_UNDEF(&_6$$3); ZVAL_UNDEF(&_7$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(name) Z_PARAM_STR(property) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &name_param, &property_param); zephir_get_strval(&name, name_param); zephir_get_strval(&property, property_param); - - - ZEPHIR_OBS_VAR(&_0); + zephir_memory_observe(&_0); zephir_read_property_zval(&_0, this_ptr, &property, PH_NOISY_CC); _1 = Z_TYPE_P(&_0) == IS_NULL; if (_1) { @@ -1053,7 +953,7 @@ PHP_METHOD(Phalcon_Encryption_Security, getLocalService) zephir_check_call_status(); zephir_update_property_zval_zval(this_ptr, &property, &_7$$3); } - ZEPHIR_OBS_VAR(&_8); + zephir_memory_observe(&_8); zephir_read_property_zval(&_8, this_ptr, &property, PH_NOISY_CC); RETURN_CCTOR(&_8); } @@ -1073,9 +973,8 @@ PHP_METHOD(Phalcon_Encryption_Security, processAlgorithm) ZVAL_UNDEF(&algorithm); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&algorithm); ZVAL_STRING(&algorithm, "2y"); @@ -1111,19 +1010,13 @@ PHP_METHOD(Phalcon_Encryption_Security, processArgonOptions) ZVAL_UNDEF(&value); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &options_param); zephir_get_arrval(&options, options_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("defaultHash"), PH_NOISY_CC | PH_READONLY); _1 = ZEPHIR_IS_LONG_IDENTICAL(&_0, 10); if (!(_1)) { @@ -1131,7 +1024,7 @@ PHP_METHOD(Phalcon_Encryption_Security, processArgonOptions) _1 = ZEPHIR_IS_LONG_IDENTICAL(&_2, 11); } if (_1) { - ZEPHIR_OBS_VAR(&value); + zephir_memory_observe(&value); if (!(zephir_array_isset_string_fetch(&value, &options, SL("memory_cost"), 0))) { ZEPHIR_INIT_NVAR(&value); ZVAL_LONG(&value, 65536); @@ -1170,16 +1063,12 @@ PHP_METHOD(Phalcon_Encryption_Security, processCost) ZVAL_UNDEF(&options); ZVAL_UNDEF(&cost); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -1187,9 +1076,7 @@ PHP_METHOD(Phalcon_Encryption_Security, processCost) } else { zephir_get_arrval(&options, options_param); } - - - ZEPHIR_OBS_VAR(&cost); + zephir_memory_observe(&cost); if (!(zephir_array_isset_string_fetch(&cost, &options, SL("cost"), 0))) { ZEPHIR_OBS_NVAR(&cost); zephir_read_property(&cost, this_ptr, ZEND_STRL("workFactor"), PH_NOISY_CC); @@ -1225,24 +1112,19 @@ PHP_METHOD(Phalcon_Encryption_Security, processTokenKey) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_3$$3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(tokenKey) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &tokenKey_param); if (!tokenKey_param) { ZEPHIR_INIT_VAR(&tokenKey); } else { zephir_get_strval(&tokenKey, tokenKey_param); } - - ZEPHIR_CPY_WRT(&key, &tokenKey); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "session"); @@ -1283,17 +1165,14 @@ PHP_METHOD(Phalcon_Encryption_Security, processUserToken) ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$4); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(tokenKey) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(tokenValue) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &tokenKey_param, &tokenValue_param); zephir_get_strval(&tokenKey, tokenKey_param); if (!tokenValue_param) { @@ -1301,8 +1180,6 @@ PHP_METHOD(Phalcon_Encryption_Security, processUserToken) } else { zephir_get_strval(&tokenValue, tokenValue_param); } - - ZEPHIR_CPY_WRT(&userToken, &tokenValue); if (!(!(ZEPHIR_IS_EMPTY(&tokenValue)))) { ZEPHIR_INIT_VAR(&_0$$3); diff --git a/ext/phalcon/encryption/security.zep.h b/ext/phalcon/encryption/security.zep.h index 456c42c9ec5..face356b310 100644 --- a/ext/phalcon/encryption/security.zep.h +++ b/ext/phalcon/encryption/security.zep.h @@ -91,11 +91,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_encryption_security_hash, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_encryption_security_islegacyhash, 0, 1, _IS_BOOL, 0) @@ -127,11 +123,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_encryption_security_proc ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_encryption_security_processcost, 0, 0, IS_LONG, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_encryption_security_processtokenkey, 0, 0, IS_STRING, 1) diff --git a/ext/phalcon/encryption/security/jwt/builder.zep.c b/ext/phalcon/encryption/security/jwt/builder.zep.c index 970fe5564fc..3c8fe06a9da 100644 --- a/ext/phalcon/encryption/security/jwt/builder.zep.c +++ b/ext/phalcon/encryption/security/jwt/builder.zep.c @@ -89,18 +89,12 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, __construct) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(signer, phalcon_encryption_security_jwt_signer_signerinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &signer); - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "init", NULL, 0); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("signer"), signer); @@ -137,9 +131,8 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, init) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); ZEPHIR_INIT_NVAR(&_0); @@ -147,7 +140,7 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, init) zephir_update_property_zval(this_ptr, ZEND_STRL("passphrase"), &_0); ZEPHIR_INIT_NVAR(&_0); object_init_ex(&_0, phalcon_support_collection_ce); - ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 22); + ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 23); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("claims"), &_0); ZEPHIR_INIT_VAR(&_1); @@ -156,7 +149,7 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, init) zephir_create_array(&_2, 2, 0); add_assoc_stringl_ex(&_2, SL("typ"), SL("JWT")); add_assoc_stringl_ex(&_2, SL("alg"), SL("none")); - ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 22, &_2); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 23, &_2); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("jose"), &_1); RETURN_THIS(); @@ -181,16 +174,12 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, addClaim) ZVAL_UNDEF(&name); ZVAL_UNDEF(&value_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(name) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &name_param, &value); 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")); @@ -201,8 +190,6 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, addClaim) } else { ZEPHIR_INIT_VAR(&name); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("claims"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(NULL, &_0, "set", NULL, 0, &name, value); zephir_check_call_status(); @@ -228,16 +215,12 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, addHeader) ZVAL_UNDEF(&name); ZVAL_UNDEF(&value_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(name) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &name_param, &value); 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")); @@ -248,8 +231,6 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, addHeader) } else { ZEPHIR_INIT_VAR(&name); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("jose"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(NULL, &_0, "set", NULL, 0, &name, value); zephir_check_call_status(); @@ -268,9 +249,8 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, getAudience) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("claims"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_1); @@ -291,9 +271,8 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, getClaims) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("claims"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_METHOD(&_0, "toarray", NULL, 0); @@ -315,9 +294,8 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, getContentType) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("jose"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_1); @@ -344,9 +322,8 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, getExpirationTime) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("claims"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_1); @@ -370,9 +347,8 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, getHeaders) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("jose"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_METHOD(&_0, "toarray", NULL, 0); @@ -394,9 +370,8 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, getId) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("claims"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_1); @@ -423,9 +398,8 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, getIssuedAt) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("claims"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_1); @@ -452,9 +426,8 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, getIssuer) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("claims"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_1); @@ -481,9 +454,8 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, getNotBefore) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("claims"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_1); @@ -510,9 +482,8 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, getSubject) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("claims"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_1); @@ -555,9 +526,8 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, getToken) ZVAL_UNDEF(&_9); ZVAL_UNDEF(&_10); ZVAL_UNDEF(&_11); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("passphrase"), PH_NOISY_CC | PH_READONLY); if (ZEPHIR_IS_EMPTY(&_0)) { @@ -569,26 +539,26 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, getToken) zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_2, &_1, "__invoke", NULL, 0, &_3); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&encodedClaims, this_ptr, "encodeurl", NULL, 255, &_2); + ZEPHIR_CALL_METHOD(&encodedClaims, this_ptr, "encodeurl", NULL, 256, &_2); zephir_check_call_status(); ZEPHIR_INIT_VAR(&claims); object_init_ex(&claims, phalcon_encryption_security_jwt_token_item_ce); ZEPHIR_CALL_METHOD(&_4, this_ptr, "getclaims", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &claims, "__construct", NULL, 256, &_4, &encodedClaims); + ZEPHIR_CALL_METHOD(NULL, &claims, "__construct", NULL, 257, &_4, &encodedClaims); zephir_check_call_status(); zephir_read_property(&_5, this_ptr, ZEND_STRL("encode"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&_7, this_ptr, "getheaders", NULL, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_6, &_5, "__invoke", NULL, 0, &_7); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&encodedHeaders, this_ptr, "encodeurl", NULL, 255, &_6); + ZEPHIR_CALL_METHOD(&encodedHeaders, this_ptr, "encodeurl", NULL, 256, &_6); zephir_check_call_status(); ZEPHIR_INIT_VAR(&headers); object_init_ex(&headers, phalcon_encryption_security_jwt_token_item_ce); ZEPHIR_CALL_METHOD(&_8, this_ptr, "getheaders", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &headers, "__construct", NULL, 256, &_8, &encodedHeaders); + ZEPHIR_CALL_METHOD(NULL, &headers, "__construct", NULL, 257, &_8, &encodedHeaders); zephir_check_call_status(); zephir_read_property(&_9, this_ptr, ZEND_STRL("signer"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_10); @@ -596,14 +566,14 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, getToken) zephir_read_property(&_11, this_ptr, ZEND_STRL("passphrase"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&signatureHash, &_9, "sign", NULL, 0, &_10, &_11); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&encodedSignature, this_ptr, "encodeurl", NULL, 255, &signatureHash); + ZEPHIR_CALL_METHOD(&encodedSignature, this_ptr, "encodeurl", NULL, 256, &signatureHash); zephir_check_call_status(); ZEPHIR_INIT_VAR(&signature); object_init_ex(&signature, phalcon_encryption_security_jwt_token_signature_ce); - ZEPHIR_CALL_METHOD(NULL, &signature, "__construct", NULL, 257, &signatureHash, &encodedSignature); + ZEPHIR_CALL_METHOD(NULL, &signature, "__construct", NULL, 258, &signatureHash, &encodedSignature); zephir_check_call_status(); object_init_ex(return_value, phalcon_encryption_security_jwt_token_token_ce); - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 258, &headers, &claims, &signature); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 259, &headers, &claims, &signature); zephir_check_call_status(); RETURN_MM(); } @@ -613,9 +583,6 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, getToken) */ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, getPassphrase) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "passphrase"); } @@ -649,18 +616,12 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, setAudience) ZVAL_UNDEF(&audience_sub); ZVAL_UNDEF(&aud); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(audience) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &audience); - - _0 = Z_TYPE_P(audience) != IS_STRING; if (_0) { _0 = Z_TYPE_P(audience) != IS_ARRAY; @@ -701,19 +662,13 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, setContentType) ZVAL_UNDEF(&contentType); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(contentType) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &contentType_param); zephir_get_strval(&contentType, contentType_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("jose"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "cty"); @@ -746,19 +701,12 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, setExpirationTime) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(timestamp) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, ×tamp_param); - timestamp = zephir_get_intval(timestamp_param); - - ZEPHIR_INIT_VAR(&_0); zephir_time(&_0); if (ZEPHIR_GT_LONG(&_0, timestamp)) { @@ -797,15 +745,11 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, setId) ZVAL_UNDEF(&id); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(id) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &id_param); if (UNEXPECTED(Z_TYPE_P(id_param) != IS_STRING && Z_TYPE_P(id_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'id' must be of the type string")); @@ -816,8 +760,6 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, setId) } else { ZEPHIR_INIT_VAR(&id); } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "jti"); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "setclaim", NULL, 0, &_0, &id); @@ -844,23 +786,17 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, setIssuedAt) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(timestamp) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, ×tamp_param); if (UNEXPECTED(Z_TYPE_P(timestamp_param) != IS_LONG)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'timestamp' must be of the type int")); RETURN_MM_NULL(); } timestamp = Z_LVAL_P(timestamp_param); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "iat"); ZVAL_LONG(&_1, timestamp); @@ -889,15 +825,11 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, setIssuer) ZVAL_UNDEF(&issuer); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(issuer) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &issuer_param); if (UNEXPECTED(Z_TYPE_P(issuer_param) != IS_STRING && Z_TYPE_P(issuer_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'issuer' must be of the type string")); @@ -908,8 +840,6 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, setIssuer) } else { ZEPHIR_INIT_VAR(&issuer); } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "iss"); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "setclaim", NULL, 0, &_0, &issuer); @@ -941,23 +871,17 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, setNotBefore) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(timestamp) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, ×tamp_param); if (UNEXPECTED(Z_TYPE_P(timestamp_param) != IS_LONG)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'timestamp' must be of the type int")); RETURN_MM_NULL(); } timestamp = Z_LVAL_P(timestamp_param); - - ZEPHIR_INIT_VAR(&_0); zephir_time(&_0); if (ZEPHIR_LT_LONG(&_0, timestamp)) { @@ -995,15 +919,11 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, setSubject) ZVAL_UNDEF(&subject); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(subject) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &subject_param); if (UNEXPECTED(Z_TYPE_P(subject_param) != IS_STRING && Z_TYPE_P(subject_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'subject' must be of the type string")); @@ -1014,8 +934,6 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, setSubject) } else { ZEPHIR_INIT_VAR(&subject); } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "sub"); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "setclaim", NULL, 0, &_0, &subject); @@ -1041,15 +959,11 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, setPassphrase) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(passphrase) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &passphrase_param); if (UNEXPECTED(Z_TYPE_P(passphrase_param) != IS_STRING && Z_TYPE_P(passphrase_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'passphrase' must be of the type string")); @@ -1060,8 +974,6 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, setPassphrase) } else { ZEPHIR_INIT_VAR(&passphrase); } - - ZEPHIR_INIT_VAR(&_0); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "/(?=^.{16,}$)((?=.*\\d)|(?=.*\\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/"); @@ -1096,16 +1008,12 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, setClaim) ZVAL_UNDEF(&name); ZVAL_UNDEF(&value_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(name) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &name_param, &value); 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")); @@ -1116,8 +1024,6 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, setClaim) } else { ZEPHIR_INIT_VAR(&name); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("claims"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(NULL, &_0, "set", NULL, 0, &name, value); zephir_check_call_status(); @@ -1133,7 +1039,6 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, encodeUrl) zend_long ZEPHIR_LAST_CALL_STATUS; zval *input_param = NULL, _0, _1, _2, _3, _4; zval input; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input); ZVAL_UNDEF(&_0); @@ -1141,15 +1046,11 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, encodeUrl) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &input_param); if (UNEXPECTED(Z_TYPE_P(input_param) != IS_STRING && Z_TYPE_P(input_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'input' must be of the type string")); @@ -1160,9 +1061,7 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Builder, encodeUrl) } else { ZEPHIR_INIT_VAR(&input); } - - - ZEPHIR_CALL_FUNCTION(&_0, "base64_encode", NULL, 230, &input); + ZEPHIR_CALL_FUNCTION(&_0, "base64_encode", NULL, 231, &input); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "+/"); diff --git a/ext/phalcon/encryption/security/jwt/builder.zep.h b/ext/phalcon/encryption/security/jwt/builder.zep.h index e605310cc29..c1c3efc6757 100644 --- a/ext/phalcon/encryption/security/jwt/builder.zep.h +++ b/ext/phalcon/encryption/security/jwt/builder.zep.h @@ -134,11 +134,7 @@ ZEPHIR_INIT_FUNCS(phalcon_encryption_security_jwt_builder_method_entry) { PHP_ME(Phalcon_Encryption_Security_JWT_Builder, init, arginfo_phalcon_encryption_security_jwt_builder_init, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Encryption_Security_JWT_Builder, addClaim, arginfo_phalcon_encryption_security_jwt_builder_addclaim, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Encryption_Security_JWT_Builder, addHeader, arginfo_phalcon_encryption_security_jwt_builder_addheader, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Encryption_Security_JWT_Builder, getAudience, arginfo_phalcon_encryption_security_jwt_builder_getaudience, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Encryption_Security_JWT_Builder, getAudience, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Encryption_Security_JWT_Builder, getAudience, arginfo_phalcon_encryption_security_jwt_builder_getaudience, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Encryption_Security_JWT_Builder, getClaims, arginfo_phalcon_encryption_security_jwt_builder_getclaims, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Encryption_Security_JWT_Builder, getContentType, arginfo_phalcon_encryption_security_jwt_builder_getcontenttype, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Encryption_Security_JWT_Builder, getExpirationTime, arginfo_phalcon_encryption_security_jwt_builder_getexpirationtime, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/encryption/security/jwt/signer/abstractsigner.zep.c b/ext/phalcon/encryption/security/jwt/signer/abstractsigner.zep.c index b894fc7c14d..d76c710618c 100644 --- a/ext/phalcon/encryption/security/jwt/signer/abstractsigner.zep.c +++ b/ext/phalcon/encryption/security/jwt/signer/abstractsigner.zep.c @@ -40,9 +40,6 @@ ZEPHIR_INIT_CLASS(Phalcon_Encryption_Security_JWT_Signer_AbstractSigner) PHP_METHOD(Phalcon_Encryption_Security_JWT_Signer_AbstractSigner, getAlgorithm) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "algorithm"); } diff --git a/ext/phalcon/encryption/security/jwt/signer/hmac.zep.c b/ext/phalcon/encryption/security/jwt/signer/hmac.zep.c index 626d1c7b77a..6d73c200702 100644 --- a/ext/phalcon/encryption/security/jwt/signer/hmac.zep.c +++ b/ext/phalcon/encryption/security/jwt/signer/hmac.zep.c @@ -58,16 +58,12 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Signer_Hmac, __construct) ZVAL_UNDEF(&algo); ZVAL_UNDEF(&supported); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR(algo) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &algo_param); if (!algo_param) { ZEPHIR_INIT_VAR(&algo); @@ -83,8 +79,6 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Signer_Hmac, __construct) ZEPHIR_INIT_VAR(&algo); } } - - ZEPHIR_INIT_VAR(&supported); zephir_create_array(&supported, 3, 0); add_assoc_long_ex(&supported, SL("sha512"), 1); @@ -113,9 +107,8 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Signer_Hmac, getAlgHeader) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); zephir_read_property(&_1, this_ptr, ZEND_STRL("algorithm"), PH_NOISY_CC | PH_READONLY); @@ -146,16 +139,12 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Signer_Hmac, sign) ZVAL_UNDEF(&payload); ZVAL_UNDEF(&passphrase); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(payload) Z_PARAM_STR(passphrase) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &payload_param, &passphrase_param); if (UNEXPECTED(Z_TYPE_P(payload_param) != IS_STRING && Z_TYPE_P(payload_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'payload' must be of the type string")); @@ -175,9 +164,7 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Signer_Hmac, sign) } else { ZEPHIR_INIT_VAR(&passphrase); } - - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "gethash", NULL, 259, &payload, &passphrase); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "gethash", NULL, 260, &payload, &passphrase); zephir_check_call_status(); RETURN_MM(); } @@ -203,24 +190,18 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Signer_Hmac, verify) ZVAL_UNDEF(&payload); ZVAL_UNDEF(&passphrase); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(source) Z_PARAM_STR(payload) Z_PARAM_STR(passphrase) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &source_param, &payload_param, &passphrase_param); zephir_get_strval(&source, source_param); zephir_get_strval(&payload, payload_param); zephir_get_strval(&passphrase, passphrase_param); - - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "gethash", NULL, 259, &payload, &passphrase); + ZEPHIR_CALL_METHOD(&_0, this_ptr, "gethash", NULL, 260, &payload, &passphrase); zephir_check_call_status(); RETURN_MM_BOOL(zephir_hash_equals(&source, &_0)); } @@ -245,24 +226,18 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Signer_Hmac, getHash) ZVAL_UNDEF(&passphrase); ZVAL_BOOL(&__$true, 1); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(payload) Z_PARAM_STR(passphrase) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &payload_param, &passphrase_param); zephir_get_strval(&payload, payload_param); zephir_get_strval(&passphrase, passphrase_param); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "getalgorithm", NULL, 0); zephir_check_call_status(); - ZEPHIR_RETURN_CALL_FUNCTION("hash_hmac", NULL, 228, &_0, &payload, &passphrase, &__$true); + ZEPHIR_RETURN_CALL_FUNCTION("hash_hmac", NULL, 229, &_0, &payload, &passphrase, &__$true); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/encryption/security/jwt/signer/none.zep.c b/ext/phalcon/encryption/security/jwt/signer/none.zep.c index 65290468e09..902c383dfbd 100644 --- a/ext/phalcon/encryption/security/jwt/signer/none.zep.c +++ b/ext/phalcon/encryption/security/jwt/signer/none.zep.c @@ -45,9 +45,6 @@ ZEPHIR_INIT_CLASS(Phalcon_Encryption_Security_JWT_Signer_None) */ PHP_METHOD(Phalcon_Encryption_Security_JWT_Signer_None, getAlgHeader) { - zval *this_ptr = getThis(); - - RETURN_STRING("none"); } @@ -59,9 +56,6 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Signer_None, getAlgHeader) */ PHP_METHOD(Phalcon_Encryption_Security_JWT_Signer_None, getAlgorithm) { - zval *this_ptr = getThis(); - - RETURN_STRING("None"); } @@ -79,20 +73,15 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Signer_None, sign) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *payload_param = NULL, *passphrase_param = NULL; zval payload, passphrase; - zval *this_ptr = getThis(); ZVAL_UNDEF(&payload); ZVAL_UNDEF(&passphrase); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(payload) Z_PARAM_STR(passphrase) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &payload_param, &passphrase_param); if (UNEXPECTED(Z_TYPE_P(payload_param) != IS_STRING && Z_TYPE_P(payload_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'payload' must be of the type string")); @@ -104,8 +93,6 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Signer_None, sign) ZEPHIR_INIT_VAR(&payload); } zephir_get_strval(&passphrase, passphrase_param); - - RETURN_MM_STRING(""); } @@ -123,29 +110,22 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Signer_None, verify) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *source_param = NULL, *payload_param = NULL, *passphrase_param = NULL, _0; zval source, payload, passphrase; - zval *this_ptr = getThis(); ZVAL_UNDEF(&source); ZVAL_UNDEF(&payload); ZVAL_UNDEF(&passphrase); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(source) Z_PARAM_STR(payload) Z_PARAM_STR(passphrase) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &source_param, &payload_param, &passphrase_param); zephir_get_strval(&source, source_param); zephir_get_strval(&payload, payload_param); zephir_get_strval(&passphrase, passphrase_param); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, ""); RETURN_MM_BOOL(ZEPHIR_IS_IDENTICAL(&_0, &source)); diff --git a/ext/phalcon/encryption/security/jwt/token/abstractitem.zep.c b/ext/phalcon/encryption/security/jwt/token/abstractitem.zep.c index f172fd56dcf..bd96a63be16 100644 --- a/ext/phalcon/encryption/security/jwt/token/abstractitem.zep.c +++ b/ext/phalcon/encryption/security/jwt/token/abstractitem.zep.c @@ -52,9 +52,6 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_AbstractItem, getEncoded) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - zephir_read_property(&_0, this_ptr, ZEND_STRL("data"), PH_NOISY_CC | PH_READONLY); zephir_array_fetch_string(&_1, &_0, SL("encoded"), PH_NOISY | PH_READONLY, "phalcon/Encryption/Security/JWT/Token/AbstractItem.zep", 28); RETURN_CTORW(&_1); @@ -68,7 +65,8 @@ zend_object *zephir_init_properties_Phalcon_Encryption_Security_JWT_Token_Abstra ZVAL_UNDEF(&_1$$3); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/encryption/security/jwt/token/item.zep.c b/ext/phalcon/encryption/security/jwt/token/item.zep.c index 19fbd78e568..bd6e4c635ab 100644 --- a/ext/phalcon/encryption/security/jwt/token/item.zep.c +++ b/ext/phalcon/encryption/security/jwt/token/item.zep.c @@ -57,16 +57,12 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Item, __construct) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&encoded); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ARRAY(payload) Z_PARAM_STR(encoded) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &payload_param, &encoded_param); ZEPHIR_OBS_COPY_OR_DUP(&payload, payload_param); if (UNEXPECTED(Z_TYPE_P(encoded_param) != IS_STRING && Z_TYPE_P(encoded_param) != IS_NULL)) { @@ -78,8 +74,6 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Item, __construct) } else { ZEPHIR_INIT_VAR(&encoded); } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "encoded"); zephir_update_property_array(this_ptr, SL("data"), &_0, &encoded); @@ -110,17 +104,14 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Item, get) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(name) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(defaultValue) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &name_param, &defaultValue); 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")); @@ -135,8 +126,6 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Item, get) defaultValue = &defaultValue_sub; defaultValue = &__$null; } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "has", NULL, 0, &name); zephir_check_call_status(); if (!(zephir_is_true(&_0))) { @@ -159,9 +148,6 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Item, getPayload) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - zephir_read_property(&_0, this_ptr, ZEND_STRL("data"), PH_NOISY_CC | PH_READONLY); zephir_array_fetch_string(&_1, &_0, SL("payload"), PH_NOISY | PH_READONLY, "phalcon/Encryption/Security/JWT/Token/Item.zep", 50); RETURN_CTORW(&_1); @@ -182,15 +168,11 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Item, has) ZVAL_UNDEF(&name); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -201,8 +183,6 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Item, has) } else { ZEPHIR_INIT_VAR(&name); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("data"), PH_NOISY_CC | PH_READONLY); zephir_array_fetch_string(&_1, &_0, SL("payload"), PH_READONLY, "phalcon/Encryption/Security/JWT/Token/Item.zep", 60); RETURN_MM_BOOL(zephir_array_isset(&_1, &name)); diff --git a/ext/phalcon/encryption/security/jwt/token/parser.zep.c b/ext/phalcon/encryption/security/jwt/token/parser.zep.c index 7cc41b63dd8..ec6c05e36f5 100644 --- a/ext/phalcon/encryption/security/jwt/token/parser.zep.c +++ b/ext/phalcon/encryption/security/jwt/token/parser.zep.c @@ -58,23 +58,18 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Parser, __construct) ZVAL_UNDEF(&decode_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&service); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_OBJECT_OF_CLASS_OR_NULL(decode, phalcon_support_helper_json_decode_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &decode); if (!decode) { decode = &decode_sub; decode = &__$null; } - - ZEPHIR_CPY_WRT(&service, decode); if (Z_TYPE_P(&service) == IS_NULL) { ZEPHIR_INIT_NVAR(&service); @@ -112,15 +107,11 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Parser, parse) ZVAL_UNDEF(&headers); ZVAL_UNDEF(&results); ZVAL_UNDEF(&signature); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(token) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &token_param); if (UNEXPECTED(Z_TYPE_P(token_param) != IS_STRING && Z_TYPE_P(token_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'token' must be of the type string")); @@ -131,24 +122,22 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Parser, parse) } else { ZEPHIR_INIT_VAR(&token); } - - - ZEPHIR_CALL_METHOD(&results, this_ptr, "parsetoken", NULL, 260, &token); + ZEPHIR_CALL_METHOD(&results, this_ptr, "parsetoken", NULL, 261, &token); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&encodedHeaders); + zephir_memory_observe(&encodedHeaders); zephir_array_fetch_long(&encodedHeaders, &results, 0, PH_NOISY, "phalcon/Encryption/Security/JWT/Token/Parser.zep", 55); - ZEPHIR_OBS_VAR(&encodedClaims); + zephir_memory_observe(&encodedClaims); zephir_array_fetch_long(&encodedClaims, &results, 1, PH_NOISY, "phalcon/Encryption/Security/JWT/Token/Parser.zep", 56); - ZEPHIR_OBS_VAR(&encodedSignature); + zephir_memory_observe(&encodedSignature); zephir_array_fetch_long(&encodedSignature, &results, 2, PH_NOISY, "phalcon/Encryption/Security/JWT/Token/Parser.zep", 57); - ZEPHIR_CALL_METHOD(&headers, this_ptr, "decodeheaders", NULL, 261, &encodedHeaders); + ZEPHIR_CALL_METHOD(&headers, this_ptr, "decodeheaders", NULL, 262, &encodedHeaders); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&claims, this_ptr, "decodeclaims", NULL, 262, &encodedClaims); + ZEPHIR_CALL_METHOD(&claims, this_ptr, "decodeclaims", NULL, 263, &encodedClaims); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&signature, this_ptr, "decodesignature", NULL, 263, &headers, &encodedSignature); + ZEPHIR_CALL_METHOD(&signature, this_ptr, "decodesignature", NULL, 264, &headers, &encodedSignature); zephir_check_call_status(); object_init_ex(return_value, phalcon_encryption_security_jwt_token_token_ce); - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 258, &headers, &claims, &signature); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 259, &headers, &claims, &signature); zephir_check_call_status(); RETURN_MM(); } @@ -178,21 +167,15 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Parser, decodeClaims) ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_6$$4); ZVAL_UNDEF(&_5$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(claims) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &claims_param); zephir_get_strval(&claims, claims_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("decode"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_METHOD(&_1, this_ptr, "decodeurl", NULL, 264, &claims); + ZEPHIR_CALL_METHOD(&_1, this_ptr, "decodeurl", NULL, 265, &claims); zephir_check_call_status(); ZVAL_BOOL(&_2, 1); ZEPHIR_CALL_METHOD(&decoded, &_0, "__invoke", NULL, 0, &_1, &_2); @@ -203,20 +186,20 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Parser, decodeClaims) } _3 = zephir_array_isset_string(&decoded, SL("aud")); if (_3) { - ZEPHIR_OBS_VAR(&_4); + zephir_memory_observe(&_4); zephir_array_fetch_string(&_4, &decoded, SL("aud"), PH_NOISY, "phalcon/Encryption/Security/JWT/Token/Parser.zep", 87); _3 = Z_TYPE_P(&_4) != IS_ARRAY; } if (_3) { ZEPHIR_INIT_VAR(&_5$$4); zephir_create_array(&_5$$4, 1, 0); - ZEPHIR_OBS_VAR(&_6$$4); + zephir_memory_observe(&_6$$4); zephir_array_fetch_string(&_6$$4, &decoded, SL("aud"), PH_NOISY, "phalcon/Encryption/Security/JWT/Token/Parser.zep", 88); zephir_array_fast_append(&_5$$4, &_6$$4); zephir_array_update_string(&decoded, SL("aud"), &_5$$4, PH_COPY | PH_SEPARATE); } object_init_ex(return_value, phalcon_encryption_security_jwt_token_item_ce); - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 256, &decoded, &claims); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 257, &decoded, &claims); zephir_check_call_status(); RETURN_MM(); } @@ -241,21 +224,15 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Parser, decodeHeaders) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(headers) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &headers_param); zephir_get_strval(&headers, headers_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("decode"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_METHOD(&_1, this_ptr, "decodeurl", NULL, 264, &headers); + ZEPHIR_CALL_METHOD(&_1, this_ptr, "decodeurl", NULL, 265, &headers); zephir_check_call_status(); ZVAL_BOOL(&_2, 1); ZEPHIR_CALL_METHOD(&decoded, &_0, "__invoke", NULL, 0, &_1, &_2); @@ -269,7 +246,7 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Parser, decodeHeaders) return; } object_init_ex(return_value, phalcon_encryption_security_jwt_token_item_ce); - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 256, &decoded, &headers); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 257, &decoded, &headers); zephir_check_call_status(); RETURN_MM(); } @@ -297,20 +274,14 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Parser, decodeSignature) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&signature); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(headers, phalcon_encryption_security_jwt_token_item_ce) Z_PARAM_STR(signature) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &headers, &signature_param); zephir_get_strval(&signature, signature_param); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "alg"); ZEPHIR_INIT_VAR(&_1); @@ -324,11 +295,11 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Parser, decodeSignature) ZVAL_STRING(&decoded, ""); ZEPHIR_INIT_NVAR(&signature); } else { - ZEPHIR_CALL_METHOD(&decoded, this_ptr, "decodeurl", NULL, 264, &signature); + ZEPHIR_CALL_METHOD(&decoded, this_ptr, "decodeurl", NULL, 265, &signature); zephir_check_call_status(); } object_init_ex(return_value, phalcon_encryption_security_jwt_token_signature_ce); - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 257, &decoded, &signature); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 258, &decoded, &signature); zephir_check_call_status(); RETURN_MM(); } @@ -345,19 +316,14 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Parser, parseToken) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *token_param = NULL, parts; zval token; - zval *this_ptr = getThis(); ZVAL_UNDEF(&token); ZVAL_UNDEF(&parts); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(token) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &token_param); if (UNEXPECTED(Z_TYPE_P(token_param) != IS_STRING && Z_TYPE_P(token_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'token' must be of the type string")); @@ -368,8 +334,6 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Parser, parseToken) } else { ZEPHIR_INIT_VAR(&token); } - - ZEPHIR_INIT_VAR(&parts); zephir_fast_explode_str(&parts, SL("."), &token, LONG_MAX); if (zephir_fast_count_int(&parts) != 3) { @@ -388,7 +352,6 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Parser, decodeUrl) zend_long ZEPHIR_LAST_CALL_STATUS, remainder = 0; zval *input_param = NULL, data, _3, _4, _5, _0$$3, _1$$3, _2$$3; zval input; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input); ZVAL_UNDEF(&data); @@ -398,15 +361,11 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Parser, decodeUrl) ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &input_param); if (UNEXPECTED(Z_TYPE_P(input_param) != IS_STRING && Z_TYPE_P(input_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'input' must be of the type string")); @@ -417,8 +376,6 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Parser, decodeUrl) } else { ZEPHIR_INIT_VAR(&input); } - - remainder = (long) (zephir_safe_mod_long_long(zephir_fast_strlen_ev(&input), 4)); if (remainder) { ZEPHIR_INIT_VAR(&_0$$3); @@ -434,7 +391,7 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Parser, decodeUrl) ZVAL_STRING(&_4, "+/"); ZEPHIR_CALL_FUNCTION(&_5, "strtr", NULL, 5, &input, &_3, &_4); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&data, "base64_decode", NULL, 229, &_5); + ZEPHIR_CALL_FUNCTION(&data, "base64_decode", NULL, 230, &_5); zephir_check_call_status(); if (ZEPHIR_IS_FALSE_IDENTICAL(&data)) { ZEPHIR_INIT_NVAR(&data); diff --git a/ext/phalcon/encryption/security/jwt/token/signature.zep.c b/ext/phalcon/encryption/security/jwt/token/signature.zep.c index a595eab0c8b..9adba8200fb 100644 --- a/ext/phalcon/encryption/security/jwt/token/signature.zep.c +++ b/ext/phalcon/encryption/security/jwt/token/signature.zep.c @@ -55,17 +55,13 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Signature, __construct) ZVAL_UNDEF(&encoded); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_STR(hash) Z_PARAM_STR(encoded) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 2, &hash_param, &encoded_param); if (!hash_param) { ZEPHIR_INIT_VAR(&hash); @@ -95,8 +91,6 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Signature, __construct) ZEPHIR_INIT_VAR(&encoded); } } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "encoded"); zephir_update_property_array(this_ptr, SL("data"), &_0, &encoded); @@ -116,9 +110,6 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Signature, getHash) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - zephir_read_property(&_0, this_ptr, ZEND_STRL("data"), PH_NOISY_CC | PH_READONLY); zephir_array_fetch_string(&_1, &_0, SL("hash"), PH_NOISY | PH_READONLY, "phalcon/Encryption/Security/JWT/Token/Signature.zep", 35); RETURN_CTORW(&_1); diff --git a/ext/phalcon/encryption/security/jwt/token/token.zep.c b/ext/phalcon/encryption/security/jwt/token/token.zep.c index 424245a002f..92125c3d5fc 100644 --- a/ext/phalcon/encryption/security/jwt/token/token.zep.c +++ b/ext/phalcon/encryption/security/jwt/token/token.zep.c @@ -70,19 +70,12 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Token, __construct) ZVAL_UNDEF(&headers_sub); ZVAL_UNDEF(&claims_sub); ZVAL_UNDEF(&signature_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_OBJECT_OF_CLASS(headers, phalcon_encryption_security_jwt_token_item_ce) Z_PARAM_OBJECT_OF_CLASS(claims, phalcon_encryption_security_jwt_token_item_ce) Z_PARAM_OBJECT_OF_CLASS(signature, phalcon_encryption_security_jwt_token_signature_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(3, 0, &headers, &claims, &signature); - - zephir_update_property_zval(this_ptr, ZEND_STRL("headers"), headers); zephir_update_property_zval(this_ptr, ZEND_STRL("claims"), claims); zephir_update_property_zval(this_ptr, ZEND_STRL("signature"), signature); @@ -95,9 +88,6 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Token, __construct) */ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Token, getClaims) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "claims"); } @@ -109,9 +99,6 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Token, getClaims) */ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Token, getHeaders) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "headers"); } @@ -132,9 +119,8 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Token, getPayload) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("headers"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&_1, &_0, "getencoded", NULL, 0); @@ -153,9 +139,6 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Token, getPayload) */ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Token, getSignature) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "signature"); } @@ -175,9 +158,8 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Token, getToken) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&_0, this_ptr, "getpayload", NULL, 0); zephir_check_call_status(); @@ -202,7 +184,6 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Token, validate) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *validator, validator_sub, claimId, method, _0, _1, *_2, _3; - zval *this_ptr = getThis(); ZVAL_UNDEF(&validator_sub); ZVAL_UNDEF(&claimId); @@ -211,18 +192,12 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Token, validate) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&methods); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(validator, phalcon_encryption_security_jwt_validator_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &validator); - - ZEPHIR_INIT_VAR(&methods); zephir_create_array(&methods, 6, 0); ZEPHIR_INIT_VAR(&_1); @@ -321,20 +296,14 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Token_Token, verify) ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_6); ZVAL_UNDEF(&key); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(signer, phalcon_encryption_security_jwt_signer_signerinterface_ce) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &signer, &key_param); zephir_get_strval(&key, key_param); - - ZEPHIR_CALL_METHOD(&_0, signer, "getalgheader", NULL, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_1, this_ptr, "getheaders", NULL, 0); diff --git a/ext/phalcon/encryption/security/jwt/validator.zep.c b/ext/phalcon/encryption/security/jwt/validator.zep.c index d8e58d65c43..85863c757b7 100644 --- a/ext/phalcon/encryption/security/jwt/validator.zep.c +++ b/ext/phalcon/encryption/security/jwt/validator.zep.c @@ -77,29 +77,22 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Validator, __construct) ZVAL_UNDEF(&now); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_OBJECT_OF_CLASS(token, phalcon_encryption_security_jwt_token_token_ce) Z_PARAM_OPTIONAL Z_PARAM_LONG(timeShift) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &token, &timeShift_param); if (!timeShift_param) { timeShift = 0; } else { - timeShift = zephir_get_intval(timeShift_param); - } - - + } ZEPHIR_INIT_VAR(&now); zephir_time(&now); zephir_update_property_zval(this_ptr, ZEND_STRL("token"), token); - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, timeShift); zephir_update_property_zval(this_ptr, ZEND_STRL("timeShift"), &_0); ZEPHIR_INIT_VAR(&_1); @@ -122,9 +115,6 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Validator, __construct) */ PHP_METHOD(Phalcon_Encryption_Security_JWT_Validator, getErrors) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "errors"); } @@ -147,19 +137,13 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Validator, get) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(claim) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &claim_param); zephir_get_strval(&claim, claim_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("claims"), PH_NOISY_CC | PH_READONLY); if (zephir_array_isset(&_0, &claim)) { zephir_read_property(&_1$$3, this_ptr, ZEND_STRL("claims"), PH_NOISY_CC | PH_READONLY); @@ -186,20 +170,14 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Validator, set) ZVAL_UNDEF(&claim); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(claim) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &claim_param, &value); zephir_get_strval(&claim, claim_param); - - zephir_update_property_array(this_ptr, SL("claims"), &claim, value); RETURN_THIS(); } @@ -217,17 +195,10 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Validator, setToken) zval *this_ptr = getThis(); ZVAL_UNDEF(&token_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(token, phalcon_encryption_security_jwt_token_token_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &token); - - zephir_update_property_zval(this_ptr, ZEND_STRL("token"), token); RETURN_THISW(); } @@ -259,19 +230,13 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Validator, validateAudience) ZVAL_UNDEF(&_1$$4); ZVAL_UNDEF(&_8$$6); ZVAL_UNDEF(&_9$$8); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(audience) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &audience); ZEPHIR_SEPARATE_PARAM(audience); - - _0 = Z_TYPE_P(audience) != IS_STRING; if (_0) { _0 = Z_TYPE_P(audience) != IS_ARRAY; @@ -302,7 +267,7 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Validator, validateAudience) ZEPHIR_INIT_NVAR(&item); ZVAL_COPY(&item, _6); if (1 != zephir_fast_in_array(&item, &tokenAudience)) { - ZEPHIR_INIT_ZVAL_NREF(_8$$6); + ZVAL_UNDEF(&_8$$6); ZEPHIR_INIT_NVAR(&_8$$6); ZVAL_STRING(&_8$$6, "Validation: audience not allowed"); zephir_update_property_array_append(this_ptr, SL("errors"), &_8$$6); @@ -320,7 +285,7 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Validator, validateAudience) ZEPHIR_CALL_METHOD(&item, audience, "current", NULL, 0); zephir_check_call_status(); if (1 != zephir_fast_in_array(&item, &tokenAudience)) { - ZEPHIR_INIT_ZVAL_NREF(_9$$8); + ZVAL_UNDEF(&_9$$8); ZEPHIR_INIT_NVAR(&_9$$8); ZVAL_STRING(&_9$$8, "Validation: audience not allowed"); zephir_update_property_array_append(this_ptr, SL("errors"), &_9$$8); @@ -359,19 +324,12 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Validator, validateExpiration) ZVAL_UNDEF(&_8); ZVAL_UNDEF(&_9); ZVAL_UNDEF(&_10$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(timestamp) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, ×tamp_param); - timestamp = zephir_get_intval(timestamp_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("token"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&_1, &_0, "getclaims", NULL, 0); zephir_check_call_status(); @@ -390,12 +348,12 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Validator, validateExpiration) _7 = zephir_is_true(&_6); if (_7) { ZVAL_LONG(&_9, timestamp); - ZEPHIR_CALL_METHOD(&_8, this_ptr, "gettimestamp", NULL, 265, &_9); + ZEPHIR_CALL_METHOD(&_8, this_ptr, "gettimestamp", NULL, 266, &_9); zephir_check_call_status(); _7 = ZEPHIR_GT_LONG(&_8, tokenExpirationTime); } if (_7) { - ZEPHIR_INIT_ZVAL_NREF(_10$$3); + ZVAL_UNDEF(&_10$$3); ZEPHIR_INIT_VAR(&_10$$3); ZVAL_STRING(&_10$$3, "Validation: the token has expired"); zephir_update_property_array_append(this_ptr, SL("errors"), &_10$$3); @@ -427,19 +385,13 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Validator, validateId) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_5$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(id) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &id_param); zephir_get_strval(&id, id_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("token"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&_1, &_0, "getclaims", NULL, 0); zephir_check_call_status(); @@ -450,7 +402,7 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Validator, validateId) zephir_cast_to_string(&_4, &_2); ZEPHIR_CPY_WRT(&tokenId, &_4); if (!ZEPHIR_IS_IDENTICAL(&id, &tokenId)) { - ZEPHIR_INIT_ZVAL_NREF(_5$$3); + ZVAL_UNDEF(&_5$$3); ZEPHIR_INIT_VAR(&_5$$3); ZVAL_STRING(&_5$$3, "Validation: incorrect Id"); zephir_update_property_array_append(this_ptr, SL("errors"), &_5$$3); @@ -480,19 +432,12 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Validator, validateIssuedAt) ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_6$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(timestamp) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, ×tamp_param); - timestamp = zephir_get_intval(timestamp_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("token"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&_1, &_0, "getclaims", NULL, 0); zephir_check_call_status(); @@ -502,10 +447,10 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Validator, validateIssuedAt) zephir_check_call_status(); tokenIssuedAt = zephir_get_intval(&_2); ZVAL_LONG(&_5, timestamp); - ZEPHIR_CALL_METHOD(&_4, this_ptr, "gettimestamp", NULL, 265, &_5); + ZEPHIR_CALL_METHOD(&_4, this_ptr, "gettimestamp", NULL, 266, &_5); zephir_check_call_status(); if (ZEPHIR_LE_LONG(&_4, tokenIssuedAt)) { - ZEPHIR_INIT_ZVAL_NREF(_6$$3); + ZVAL_UNDEF(&_6$$3); ZEPHIR_INIT_VAR(&_6$$3); ZVAL_STRING(&_6$$3, "Validation: the token cannot be used yet (future)"); zephir_update_property_array_append(this_ptr, SL("errors"), &_6$$3); @@ -537,15 +482,11 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Validator, validateIssuer) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_5$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(issuer) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &issuer_param); if (UNEXPECTED(Z_TYPE_P(issuer_param) != IS_STRING && Z_TYPE_P(issuer_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'issuer' must be of the type string")); @@ -556,8 +497,6 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Validator, validateIssuer) } else { ZEPHIR_INIT_VAR(&issuer); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("token"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&_1, &_0, "getclaims", NULL, 0); zephir_check_call_status(); @@ -568,7 +507,7 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Validator, validateIssuer) zephir_cast_to_string(&_4, &_2); ZEPHIR_CPY_WRT(&tokenIssuer, &_4); if (!ZEPHIR_IS_IDENTICAL(&issuer, &tokenIssuer)) { - ZEPHIR_INIT_ZVAL_NREF(_5$$3); + ZVAL_UNDEF(&_5$$3); ZEPHIR_INIT_VAR(&_5$$3); ZVAL_STRING(&_5$$3, "Validation: incorrect issuer"); zephir_update_property_array_append(this_ptr, SL("errors"), &_5$$3); @@ -598,19 +537,12 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Validator, validateNotBefore) ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_6$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(timestamp) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, ×tamp_param); - timestamp = zephir_get_intval(timestamp_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("token"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&_1, &_0, "getclaims", NULL, 0); zephir_check_call_status(); @@ -620,10 +552,10 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Validator, validateNotBefore) zephir_check_call_status(); tokenNotBefore = zephir_get_intval(&_2); ZVAL_LONG(&_5, timestamp); - ZEPHIR_CALL_METHOD(&_4, this_ptr, "gettimestamp", NULL, 265, &_5); + ZEPHIR_CALL_METHOD(&_4, this_ptr, "gettimestamp", NULL, 266, &_5); zephir_check_call_status(); if (ZEPHIR_LE_LONG(&_4, tokenNotBefore)) { - ZEPHIR_INIT_ZVAL_NREF(_6$$3); + ZVAL_UNDEF(&_6$$3); ZEPHIR_INIT_VAR(&_6$$3); ZVAL_STRING(&_6$$3, "Validation: the token cannot be used yet (not before)"); zephir_update_property_array_append(this_ptr, SL("errors"), &_6$$3); @@ -657,20 +589,14 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Validator, validateSignature) ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_6$$3); ZVAL_UNDEF(&passphrase); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(signer, phalcon_encryption_security_jwt_signer_signerinterface_ce) Z_PARAM_STR(passphrase) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &signer, &passphrase_param); zephir_get_strval(&passphrase, passphrase_param); - - zephir_read_property(&_1, this_ptr, ZEND_STRL("token"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&_2, &_1, "getsignature", NULL, 0); zephir_check_call_status(); @@ -682,7 +608,7 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Validator, validateSignature) ZEPHIR_CALL_METHOD(&_0, signer, "verify", NULL, 0, &_3, &_5, &passphrase); zephir_check_call_status(); if (!ZEPHIR_IS_TRUE_IDENTICAL(&_0)) { - ZEPHIR_INIT_ZVAL_NREF(_6$$3); + ZVAL_UNDEF(&_6$$3); ZEPHIR_INIT_VAR(&_6$$3); ZVAL_STRING(&_6$$3, "Validation: the signature does not match"); zephir_update_property_array_append(this_ptr, SL("errors"), &_6$$3); @@ -702,18 +628,10 @@ PHP_METHOD(Phalcon_Encryption_Security_JWT_Validator, getTimestamp) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(timestamp) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, ×tamp_param); - timestamp = zephir_get_intval(timestamp_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("timeShift"), PH_NOISY_CC | PH_READONLY); RETURN_LONG((timestamp + zephir_get_numberval(&_0))); } @@ -728,7 +646,8 @@ zend_object *zephir_init_properties_Phalcon_Encryption_Security_JWT_Validator(ze ZVAL_UNDEF(&_3$$4); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/encryption/security/jwt/validator.zep.h b/ext/phalcon/encryption/security/jwt/validator.zep.h index f0bd8440f84..51d7b253ff6 100644 --- a/ext/phalcon/encryption/security/jwt/validator.zep.h +++ b/ext/phalcon/encryption/security/jwt/validator.zep.h @@ -26,11 +26,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_encryption_security_jwt_validator_geterrors, 0, 0, IS_ARRAY, 0) ZEND_END_ARG_INFO() -#if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_encryption_security_jwt_validator_get, 0, 1, IS_MIXED, 1) -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_encryption_security_jwt_validator_get, 0, 0, 1) -#endif ZEND_ARG_TYPE_INFO(0, claim, IS_STRING, 0) ZEND_END_ARG_INFO() diff --git a/ext/phalcon/encryption/security/random.zep.c b/ext/phalcon/encryption/security/random.zep.c index 5fa0ddebb69..0df3c9a27b1 100644 --- a/ext/phalcon/encryption/security/random.zep.c +++ b/ext/phalcon/encryption/security/random.zep.c @@ -131,24 +131,18 @@ PHP_METHOD(Phalcon_Encryption_Security_Random, base58) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_LONG_OR_NULL(len, is_null_true) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &len_param); if (!len_param) { len = 0; } else { - len = zephir_get_intval(len_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"); ZVAL_LONG(&_1, 58); @@ -187,24 +181,18 @@ PHP_METHOD(Phalcon_Encryption_Security_Random, base62) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_LONG_OR_NULL(len, is_null_true) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &len_param); if (!len_param) { len = 0; } else { - len = zephir_get_intval(len_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"); ZVAL_LONG(&_1, 62); @@ -238,28 +226,22 @@ PHP_METHOD(Phalcon_Encryption_Security_Random, base64) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_LONG_OR_NULL(len, is_null_true) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &len_param); if (!len_param) { len = 0; } else { - len = zephir_get_intval(len_param); - } - - + } ZVAL_LONG(&_1, len); ZEPHIR_CALL_METHOD(&_0, this_ptr, "bytes", NULL, 0, &_1); zephir_check_call_status(); - ZEPHIR_RETURN_CALL_FUNCTION("base64_encode", NULL, 230, &_0); + ZEPHIR_RETURN_CALL_FUNCTION("base64_encode", NULL, 231, &_0); zephir_check_call_status(); RETURN_MM(); } @@ -300,34 +282,27 @@ PHP_METHOD(Phalcon_Encryption_Security_Random, base64Safe) ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_6$$3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_LONG_OR_NULL(len, is_null_true) Z_PARAM_BOOL(padding) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 2, &len_param, &padding_param); if (!len_param) { len = 0; } else { - len = zephir_get_intval(len_param); - } + } if (!padding_param) { padding = 0; } else { - padding = zephir_get_boolval(padding_param); - } - - + } ZVAL_LONG(&_1, len); ZEPHIR_CALL_METHOD(&_0, this_ptr, "base64", NULL, 0, &_1); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&_2, "base64_encode", NULL, 230, &_0); + ZEPHIR_CALL_FUNCTION(&_2, "base64_encode", NULL, 231, &_0); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_3); ZVAL_STRING(&_3, "+/"); @@ -339,7 +314,7 @@ PHP_METHOD(Phalcon_Encryption_Security_Random, base64Safe) ZVAL_STRING(&_3, "#[^a-z0-9_=-]+#i"); ZEPHIR_INIT_NVAR(&_4); ZVAL_STRING(&_4, ""); - ZEPHIR_CALL_FUNCTION(&_5, "preg_replace", NULL, 40, &_3, &_4, &s); + ZEPHIR_CALL_FUNCTION(&_5, "preg_replace", NULL, 41, &_3, &_4, &s); zephir_check_call_status(); ZEPHIR_CPY_WRT(&s, &_5); if (!(padding)) { @@ -375,32 +350,24 @@ PHP_METHOD(Phalcon_Encryption_Security_Random, bytes) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *len_param = NULL, _0; zend_long len, ZEPHIR_LAST_CALL_STATUS; - zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_LONG(len) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &len_param); if (!len_param) { len = 16; } else { - len = zephir_get_intval(len_param); - } - - + } if (len <= 0) { len = 16; } ZVAL_LONG(&_0, len); - ZEPHIR_RETURN_CALL_FUNCTION("random_bytes", NULL, 266, &_0); + ZEPHIR_RETURN_CALL_FUNCTION("random_bytes", NULL, 267, &_0); zephir_check_call_status(); RETURN_MM(); } @@ -430,33 +397,27 @@ PHP_METHOD(Phalcon_Encryption_Security_Random, hex) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_LONG_OR_NULL(len, is_null_true) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &len_param); if (!len_param) { len = 0; } else { - len = zephir_get_intval(len_param); - } - - + } ZVAL_LONG(&_1, len); ZEPHIR_CALL_METHOD(&_0, this_ptr, "bytes", NULL, 0, &_1); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_2); ZVAL_STRING(&_2, "H*"); - ZEPHIR_CALL_FUNCTION(&_3, "unpack", NULL, 267, &_2, &_0); + ZEPHIR_CALL_FUNCTION(&_3, "unpack", NULL, 268, &_2, &_0); zephir_check_call_status(); ZEPHIR_MAKE_REF(&_3); - ZEPHIR_RETURN_CALL_FUNCTION("array_shift", NULL, 21, &_3); + ZEPHIR_RETURN_CALL_FUNCTION("array_shift", NULL, 22, &_3); ZEPHIR_UNREF(&_3); zephir_check_call_status(); RETURN_MM(); @@ -480,30 +441,22 @@ PHP_METHOD(Phalcon_Encryption_Security_Random, number) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *len_param = NULL, _0, _1; zend_long len, ZEPHIR_LAST_CALL_STATUS; - zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(len) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &len_param); - len = zephir_get_intval(len_param); - - if (UNEXPECTED(len <= 0)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_encryption_security_exception_ce, "Input number must be a positive integer", "phalcon/Encryption/Security/Random.zep", 272); return; } ZVAL_LONG(&_0, 0); ZVAL_LONG(&_1, len); - ZEPHIR_RETURN_CALL_FUNCTION("random_int", NULL, 268, &_0, &_1); + ZEPHIR_RETURN_CALL_FUNCTION("random_int", NULL, 269, &_0, &_1); zephir_check_call_status(); RETURN_MM(); } @@ -546,16 +499,15 @@ PHP_METHOD(Phalcon_Encryption_Security_Random, uuid) ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_6); ZVAL_UNDEF(&_7); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZVAL_LONG(&_1, 16); ZEPHIR_CALL_METHOD(&_0, this_ptr, "bytes", NULL, 0, &_1); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_2); ZVAL_STRING(&_2, "N1a/n1b/n1c/n1d/n1e/N1f"); - ZEPHIR_CALL_FUNCTION(&_3, "unpack", NULL, 267, &_2, &_0); + ZEPHIR_CALL_FUNCTION(&_3, "unpack", NULL, 268, &_2, &_0); zephir_check_call_status(); ZEPHIR_CALL_FUNCTION(&ary, "array_values", NULL, 14, &_3); zephir_check_call_status(); @@ -570,7 +522,7 @@ PHP_METHOD(Phalcon_Encryption_Security_Random, uuid) ZEPHIR_INIT_VAR(&_7); ZVAL_STRING(&_7, "%08x-%04x-%04x-%04x-%04x%08x"); ZEPHIR_MAKE_REF(&ary); - ZEPHIR_CALL_FUNCTION(NULL, "array_unshift", NULL, 269, &ary, &_7); + ZEPHIR_CALL_FUNCTION(NULL, "array_unshift", NULL, 270, &ary, &_7); ZEPHIR_UNREF(&ary); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_7); @@ -610,7 +562,6 @@ PHP_METHOD(Phalcon_Encryption_Security_Random, base) ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_5$$4); ZVAL_UNDEF(&_9$$6); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(alphabet) @@ -618,25 +569,20 @@ PHP_METHOD(Phalcon_Encryption_Security_Random, base) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(n) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &alphabet_param, &base_param, &n); zephir_get_strval(&alphabet, alphabet_param); - base = zephir_get_intval(base_param); if (!n) { n = &n_sub; n = &__$null; } - - ZEPHIR_INIT_VAR(&byteString); ZEPHIR_CALL_METHOD(&_0, this_ptr, "bytes", NULL, 0, n); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "C*"); - ZEPHIR_CALL_FUNCTION(&bytes, "unpack", NULL, 267, &_1, &_0); + ZEPHIR_CALL_FUNCTION(&bytes, "unpack", NULL, 268, &_1, &_0); zephir_check_call_status(); zephir_is_iterable(&bytes, 0, "phalcon/Encryption/Security/Random.zep", 351); if (Z_TYPE_P(&bytes) == IS_ARRAY) { diff --git a/ext/phalcon/events/abstracteventsaware.zep.c b/ext/phalcon/events/abstracteventsaware.zep.c index bab4ff9f05d..4c07b679fda 100644 --- a/ext/phalcon/events/abstracteventsaware.zep.c +++ b/ext/phalcon/events/abstracteventsaware.zep.c @@ -47,9 +47,6 @@ ZEPHIR_INIT_CLASS(Phalcon_Events_AbstractEventsAware) */ PHP_METHOD(Phalcon_Events_AbstractEventsAware, getEventsManager) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "eventsManager"); } @@ -65,17 +62,10 @@ PHP_METHOD(Phalcon_Events_AbstractEventsAware, setEventsManager) zval *this_ptr = getThis(); ZVAL_UNDEF(&eventsManager_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(eventsManager, phalcon_events_managerinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &eventsManager); - - zephir_update_property_zval(this_ptr, ZEND_STRL("eventsManager"), eventsManager); } @@ -103,7 +93,6 @@ PHP_METHOD(Phalcon_Events_AbstractEventsAware, fireManagerEvent) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(eventName) @@ -111,10 +100,8 @@ PHP_METHOD(Phalcon_Events_AbstractEventsAware, fireManagerEvent) Z_PARAM_ZVAL_OR_NULL(data) Z_PARAM_BOOL(cancellable) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &eventName_param, &data, &cancellable_param); zephir_get_strval(&eventName, eventName_param); if (!data) { @@ -124,10 +111,7 @@ PHP_METHOD(Phalcon_Events_AbstractEventsAware, fireManagerEvent) if (!cancellable_param) { cancellable = 1; } else { - cancellable = zephir_get_boolval(cancellable_param); - } - - + } zephir_read_property(&_0, this_ptr, ZEND_STRL("eventsManager"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_0) != IS_NULL) { zephir_read_property(&_1$$3, this_ptr, ZEND_STRL("eventsManager"), PH_NOISY_CC | PH_READONLY); diff --git a/ext/phalcon/events/event.zep.c b/ext/phalcon/events/event.zep.c index ba41a866f5b..aaa2fcadc45 100644 --- a/ext/phalcon/events/event.zep.c +++ b/ext/phalcon/events/event.zep.c @@ -103,7 +103,6 @@ PHP_METHOD(Phalcon_Events_Event, __construct) ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 4) Z_PARAM_STR(type) @@ -112,10 +111,8 @@ PHP_METHOD(Phalcon_Events_Event, __construct) Z_PARAM_ZVAL_OR_NULL(data) Z_PARAM_BOOL(cancelable) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 3, &type_param, &source, &data, &cancelable_param); if (UNEXPECTED(Z_TYPE_P(type_param) != IS_STRING && Z_TYPE_P(type_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'type' must be of the type string")); @@ -137,10 +134,7 @@ PHP_METHOD(Phalcon_Events_Event, __construct) if (!cancelable_param) { cancelable = 1; } else { - cancelable = zephir_get_boolval(cancelable_param); - } - - + } _0 = Z_TYPE_P(source) != IS_NULL; if (_0) { _0 = Z_TYPE_P(source) != IS_OBJECT; @@ -152,7 +146,7 @@ PHP_METHOD(Phalcon_Events_Event, __construct) zephir_gettype(&_2$$3, source); ZEPHIR_INIT_VAR(&_3$$3); ZEPHIR_CONCAT_SVSV(&_3$$3, "The source of ", &type, " event must be an object, got ", &_2$$3); - ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 32, &_3$$3); + ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 33, &_3$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_1$$3, "phalcon/Events/Event.zep", 73); ZEPHIR_MM_RESTORE(); @@ -171,27 +165,18 @@ PHP_METHOD(Phalcon_Events_Event, __construct) PHP_METHOD(Phalcon_Events_Event, getData) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "data"); } PHP_METHOD(Phalcon_Events_Event, getSource) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "source"); } PHP_METHOD(Phalcon_Events_Event, getType) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "type"); } @@ -207,9 +192,6 @@ PHP_METHOD(Phalcon_Events_Event, getType) */ PHP_METHOD(Phalcon_Events_Event, isCancelable) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "cancelable"); } @@ -219,9 +201,6 @@ PHP_METHOD(Phalcon_Events_Event, isCancelable) */ PHP_METHOD(Phalcon_Events_Event, isStopped) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "stopped"); } @@ -236,22 +215,16 @@ PHP_METHOD(Phalcon_Events_Event, setData) ZVAL_UNDEF(&data_sub); ZVAL_NULL(&__$null); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(0, 1, &data); if (!data) { data = &data_sub; data = &__$null; } - - zephir_update_property_zval(this_ptr, ZEND_STRL("data"), data); RETURN_THISW(); } @@ -267,15 +240,11 @@ PHP_METHOD(Phalcon_Events_Event, setType) zval *this_ptr = getThis(); ZVAL_UNDEF(&type); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &type_param); if (UNEXPECTED(Z_TYPE_P(type_param) != IS_STRING && Z_TYPE_P(type_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'type' must be of the type string")); @@ -286,8 +255,6 @@ PHP_METHOD(Phalcon_Events_Event, setType) } else { ZEPHIR_INIT_VAR(&type); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("type"), &type); RETURN_THIS(); } @@ -309,9 +276,6 @@ PHP_METHOD(Phalcon_Events_Event, stop) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); ZVAL_UNDEF(&_0); - - - zephir_read_property(&_0, this_ptr, ZEND_STRL("cancelable"), PH_NOISY_CC | PH_READONLY); if (UNEXPECTED(!zephir_is_true(&_0))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STRW(phalcon_events_exception_ce, "Trying to cancel a non-cancelable event", "phalcon/Events/Event.zep", 150); diff --git a/ext/phalcon/events/event.zep.h b/ext/phalcon/events/event.zep.h index 7d243dc257b..73ef57e98a1 100644 --- a/ext/phalcon/events/event.zep.h +++ b/ext/phalcon/events/event.zep.h @@ -23,11 +23,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_events_event_getdata, 0, 0, 0) ZEND_END_ARG_INFO() -#if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_phalcon_events_event_getsource, 0, 0, MAY_BE_NULL|MAY_BE_OBJECT) -#else -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_events_event_getsource, 0, 0, IS_OBJECT, 1) -#endif ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_events_event_gettype, 0, 0, IS_STRING, 0) @@ -52,11 +48,7 @@ ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_events_event_method_entry) { PHP_ME(Phalcon_Events_Event, __construct, arginfo_phalcon_events_event___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Events_Event, getData, arginfo_phalcon_events_event_getdata, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Events_Event, getData, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Events_Event, getData, arginfo_phalcon_events_event_getdata, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Events_Event, getSource, arginfo_phalcon_events_event_getsource, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Events_Event, getType, arginfo_phalcon_events_event_gettype, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Events_Event, isCancelable, arginfo_phalcon_events_event_iscancelable, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/events/manager.zep.c b/ext/phalcon/events/manager.zep.c index bba26bf033f..717f39b2776 100644 --- a/ext/phalcon/events/manager.zep.c +++ b/ext/phalcon/events/manager.zep.c @@ -87,18 +87,14 @@ PHP_METHOD(Phalcon_Events_Manager, attach) ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_2$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(eventType) Z_PARAM_ZVAL(handler) Z_PARAM_OPTIONAL Z_PARAM_LONG(priority) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &eventType_param, &handler, &priority_param); if (UNEXPECTED(Z_TYPE_P(eventType_param) != IS_STRING && Z_TYPE_P(eventType_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'eventType' must be of the type string")); @@ -118,15 +114,13 @@ PHP_METHOD(Phalcon_Events_Manager, attach) } priority = Z_LVAL_P(priority_param); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "isvalidhandler", NULL, 0, handler); zephir_check_call_status(); if (UNEXPECTED(ZEPHIR_IS_FALSE_IDENTICAL(&_0))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_events_exception_ce, "Event handler must be an Object or Callable", "phalcon/Events/Manager.zep", 56); return; } - ZEPHIR_OBS_VAR(&priorityQueue); + zephir_memory_observe(&priorityQueue); zephir_read_property(&_1, this_ptr, ZEND_STRL("events"), PH_NOISY_CC | PH_READONLY); if (!(zephir_array_isset_fetch(&priorityQueue, &_1, &eventType, 0))) { ZEPHIR_INIT_NVAR(&priorityQueue); @@ -137,7 +131,7 @@ PHP_METHOD(Phalcon_Events_Manager, attach) } ZVAL_LONG(&_2$$4, 1); - ZEPHIR_CALL_METHOD(NULL, &priorityQueue, "setextractflags", NULL, 270, &_2$$4); + ZEPHIR_CALL_METHOD(NULL, &priorityQueue, "setextractflags", NULL, 271, &_2$$4); zephir_check_call_status(); zephir_update_property_array(this_ptr, SL("events"), &eventType, &priorityQueue); } @@ -146,7 +140,7 @@ PHP_METHOD(Phalcon_Events_Manager, attach) priority = 100; } ZVAL_LONG(&_4, priority); - ZEPHIR_CALL_METHOD(NULL, &priorityQueue, "insert", NULL, 271, handler, &_4); + ZEPHIR_CALL_METHOD(NULL, &priorityQueue, "insert", NULL, 272, handler, &_4); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -156,9 +150,6 @@ PHP_METHOD(Phalcon_Events_Manager, attach) */ PHP_METHOD(Phalcon_Events_Manager, arePrioritiesEnabled) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "enablePriorities"); } @@ -175,18 +166,10 @@ PHP_METHOD(Phalcon_Events_Manager, collectResponses) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(collect) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &collect_param); - collect = zephir_get_boolval(collect_param); - - if (collect) { zephir_update_property_zval(this_ptr, ZEND_STRL("collect"), &__$true); } else { @@ -220,16 +203,12 @@ PHP_METHOD(Phalcon_Events_Manager, detach) ZVAL_UNDEF(&_6$$5); ZVAL_UNDEF(&_7$$6); ZVAL_UNDEF(&_8$$6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(eventType) Z_PARAM_ZVAL(handler) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &eventType_param, &handler); if (UNEXPECTED(Z_TYPE_P(eventType_param) != IS_STRING && Z_TYPE_P(eventType_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'eventType' must be of the type string")); @@ -240,15 +219,13 @@ PHP_METHOD(Phalcon_Events_Manager, detach) } else { ZEPHIR_INIT_VAR(&eventType); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "isvalidhandler", NULL, 0, handler); zephir_check_call_status(); if (UNEXPECTED(ZEPHIR_IS_FALSE_IDENTICAL(&_0))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_events_exception_ce, "Event handler must be an Object or Callable", "phalcon/Events/Manager.zep", 107); return; } - ZEPHIR_OBS_VAR(&priorityQueue); + zephir_memory_observe(&priorityQueue); zephir_read_property(&_1, this_ptr, ZEND_STRL("events"), PH_NOISY_CC | PH_READONLY); if (zephir_array_isset_fetch(&priorityQueue, &_1, &eventType, 0)) { ZEPHIR_INIT_VAR(&newPriorityQueue); @@ -259,7 +236,7 @@ PHP_METHOD(Phalcon_Events_Manager, detach) } ZVAL_LONG(&_2$$4, 1); - ZEPHIR_CALL_METHOD(NULL, &newPriorityQueue, "setextractflags", NULL, 270, &_2$$4); + ZEPHIR_CALL_METHOD(NULL, &newPriorityQueue, "setextractflags", NULL, 271, &_2$$4); zephir_check_call_status(); ZVAL_LONG(&_2$$4, 3); ZEPHIR_CALL_METHOD(NULL, &priorityQueue, "setextractflags", NULL, 0, &_2$$4); @@ -280,7 +257,7 @@ PHP_METHOD(Phalcon_Events_Manager, detach) if (!ZEPHIR_IS_IDENTICAL(&_6$$5, handler)) { zephir_array_fetch_string(&_7$$6, &data, SL("data"), PH_NOISY | PH_READONLY, "phalcon/Events/Manager.zep", 134); zephir_array_fetch_string(&_8$$6, &data, SL("priority"), PH_NOISY | PH_READONLY, "phalcon/Events/Manager.zep", 136); - ZEPHIR_CALL_METHOD(NULL, &newPriorityQueue, "insert", &_9, 271, &_7$$6, &_8$$6); + ZEPHIR_CALL_METHOD(NULL, &newPriorityQueue, "insert", &_9, 272, &_7$$6, &_8$$6); zephir_check_call_status(); } } @@ -303,16 +280,13 @@ PHP_METHOD(Phalcon_Events_Manager, detachAll) ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0$$4); ZVAL_UNDEF(&_1$$5); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &type_param); if (!type_param) { ZEPHIR_INIT_VAR(&type); @@ -327,8 +301,6 @@ PHP_METHOD(Phalcon_Events_Manager, detachAll) ZEPHIR_INIT_VAR(&type); } } - - if (ZEPHIR_IS_NULL(&type)) { zephir_update_property_zval(this_ptr, ZEND_STRL("events"), &__$null); } else { @@ -361,18 +333,10 @@ PHP_METHOD(Phalcon_Events_Manager, enablePriorities) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(enablePriorities) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &enablePriorities_param); - enablePriorities = zephir_get_boolval(enablePriorities_param); - - if (enablePriorities) { zephir_update_property_zval(this_ptr, ZEND_STRL("enablePriorities"), &__$true); } else { @@ -417,7 +381,6 @@ PHP_METHOD(Phalcon_Events_Manager, fire) ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_1$$4); ZVAL_UNDEF(&_3$$5); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 4) Z_PARAM_STR(eventType) @@ -426,10 +389,8 @@ PHP_METHOD(Phalcon_Events_Manager, fire) Z_PARAM_ZVAL_OR_NULL(data) Z_PARAM_BOOL(cancelable) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 2, &eventType_param, &source, &data, &cancelable_param); if (UNEXPECTED(Z_TYPE_P(eventType_param) != IS_STRING && Z_TYPE_P(eventType_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'eventType' must be of the type string")); @@ -447,10 +408,7 @@ PHP_METHOD(Phalcon_Events_Manager, fire) if (!cancelable_param) { cancelable = 1; } else { - cancelable = zephir_get_boolval(cancelable_param); - } - - + } zephir_read_property(&_0, this_ptr, ZEND_STRL("events"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&events, &_0); if (ZEPHIR_IS_EMPTY(&events)) { @@ -461,7 +419,7 @@ PHP_METHOD(Phalcon_Events_Manager, fire) object_init_ex(&_1$$4, phalcon_events_exception_ce); ZEPHIR_INIT_VAR(&_2$$4); ZEPHIR_CONCAT_SV(&_2$$4, "Invalid event type ", &eventType); - ZEPHIR_CALL_METHOD(NULL, &_1$$4, "__construct", NULL, 32, &_2$$4); + ZEPHIR_CALL_METHOD(NULL, &_1$$4, "__construct", NULL, 33, &_2$$4); zephir_check_call_status(); zephir_throw_exception_debug(&_1$$4, "phalcon/Events/Manager.zep", 198); ZEPHIR_MM_RESTORE(); @@ -469,9 +427,9 @@ PHP_METHOD(Phalcon_Events_Manager, fire) } ZEPHIR_INIT_VAR(&eventParts); zephir_fast_explode_str(&eventParts, SL(":"), &eventType, LONG_MAX); - ZEPHIR_OBS_VAR(&type); + zephir_memory_observe(&type); zephir_array_fetch_long(&type, &eventParts, 0, PH_NOISY, "phalcon/Events/Manager.zep", 202); - ZEPHIR_OBS_VAR(&eventName); + zephir_memory_observe(&eventName); zephir_array_fetch_long(&eventName, &eventParts, 1, PH_NOISY, "phalcon/Events/Manager.zep", 203); ZEPHIR_INIT_VAR(&status); ZVAL_NULL(&status); @@ -488,19 +446,19 @@ PHP_METHOD(Phalcon_Events_Manager, fire) } else { ZVAL_BOOL(&_4, 0); } - ZEPHIR_CALL_METHOD(NULL, &event, "__construct", NULL, 272, &eventName, source, data, &_4); + ZEPHIR_CALL_METHOD(NULL, &event, "__construct", NULL, 273, &eventName, source, data, &_4); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&fireEvents); + zephir_memory_observe(&fireEvents); if (zephir_array_isset_fetch(&fireEvents, &events, &type, 0)) { if (Z_TYPE_P(&fireEvents) == IS_OBJECT) { - ZEPHIR_CALL_METHOD(&status, this_ptr, "firequeue", NULL, 273, &fireEvents, &event); + ZEPHIR_CALL_METHOD(&status, this_ptr, "firequeue", NULL, 274, &fireEvents, &event); zephir_check_call_status(); } } ZEPHIR_OBS_NVAR(&fireEvents); if (zephir_array_isset_fetch(&fireEvents, &events, &eventType, 0)) { if (Z_TYPE_P(&fireEvents) == IS_OBJECT) { - ZEPHIR_CALL_METHOD(&status, this_ptr, "firequeue", NULL, 273, &fireEvents, &event); + ZEPHIR_CALL_METHOD(&status, this_ptr, "firequeue", NULL, 274, &fireEvents, &event); zephir_check_call_status(); } } @@ -535,19 +493,13 @@ PHP_METHOD(Phalcon_Events_Manager, fireQueue) ZVAL_UNDEF(&_5$$4); ZVAL_UNDEF(&_9$$10); ZVAL_UNDEF(&_8$$6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(queue, spl_ce_SplPriorityQueue) Z_PARAM_OBJECT_OF_CLASS(event, phalcon_events_eventinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &queue, &event); - - ZEPHIR_INIT_VAR(&status); ZVAL_NULL(&status); ZEPHIR_CALL_METHOD(&eventName, event, "gettype", NULL, 0); @@ -563,7 +515,7 @@ PHP_METHOD(Phalcon_Events_Manager, fireQueue) ZEPHIR_CALL_METHOD(&_0, event, "iscancelable", NULL, 0); zephir_check_call_status(); cancelable = zephir_get_boolval(&_0); - ZEPHIR_OBS_VAR(&_1); + zephir_memory_observe(&_1); zephir_read_property(&_1, this_ptr, ZEND_STRL("collect"), PH_NOISY_CC); collect = zephir_get_boolval(&_1); ZEPHIR_INIT_VAR(&iterator); @@ -641,15 +593,11 @@ PHP_METHOD(Phalcon_Events_Manager, getListeners) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2$$4); ZVAL_UNDEF(&listeners); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &type_param); if (UNEXPECTED(Z_TYPE_P(type_param) != IS_STRING && Z_TYPE_P(type_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'type' must be of the type string")); @@ -660,9 +608,7 @@ PHP_METHOD(Phalcon_Events_Manager, getListeners) } else { ZEPHIR_INIT_VAR(&type); } - - - ZEPHIR_OBS_VAR(&fireEvents); + zephir_memory_observe(&fireEvents); zephir_read_property(&_0, this_ptr, ZEND_STRL("events"), PH_NOISY_CC | PH_READONLY); if (!(zephir_array_isset_fetch(&fireEvents, &_0, &type, 0))) { array_init(return_value); @@ -697,9 +643,6 @@ PHP_METHOD(Phalcon_Events_Manager, getListeners) */ PHP_METHOD(Phalcon_Events_Manager, getResponses) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "responses"); } @@ -716,15 +659,11 @@ PHP_METHOD(Phalcon_Events_Manager, hasListeners) ZVAL_UNDEF(&type); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &type_param); if (UNEXPECTED(Z_TYPE_P(type_param) != IS_STRING && Z_TYPE_P(type_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'type' must be of the type string")); @@ -735,8 +674,6 @@ PHP_METHOD(Phalcon_Events_Manager, hasListeners) } else { ZEPHIR_INIT_VAR(&type); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("events"), PH_NOISY_CC | PH_READONLY); RETURN_MM_BOOL(zephir_array_isset(&_0, &type)); } @@ -747,9 +684,6 @@ PHP_METHOD(Phalcon_Events_Manager, hasListeners) */ PHP_METHOD(Phalcon_Events_Manager, isCollecting) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "collect"); } @@ -758,20 +692,12 @@ PHP_METHOD(Phalcon_Events_Manager, isValidHandler) { zend_bool _0; zval *handler, handler_sub; - zval *this_ptr = getThis(); ZVAL_UNDEF(&handler_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(handler) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &handler); - - _0 = Z_TYPE_P(handler) != IS_OBJECT; if (_0) { _0 = !(zephir_is_callable(handler)); @@ -792,7 +718,8 @@ zend_object *zephir_init_properties_Phalcon_Events_Manager(zend_class_entry *cla ZVAL_UNDEF(&_3$$4); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/factory/abstractconfigfactory.zep.c b/ext/phalcon/factory/abstractconfigfactory.zep.c index 3c5fdd6af90..aa657bbc458 100644 --- a/ext/phalcon/factory/abstractconfigfactory.zep.c +++ b/ext/phalcon/factory/abstractconfigfactory.zep.c @@ -51,19 +51,13 @@ PHP_METHOD(Phalcon_Factory_AbstractConfigFactory, checkConfig) ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$4); ZVAL_UNDEF(&_3$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(config) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &config); ZEPHIR_SEPARATE_PARAM(config); - - _0 = Z_TYPE_P(config) == IS_OBJECT; if (_0) { _0 = zephir_instance_of_ev(config, phalcon_config_configinterface_ce); @@ -102,21 +96,15 @@ PHP_METHOD(Phalcon_Factory_AbstractConfigFactory, checkConfigElement) ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&element); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ARRAY(config) Z_PARAM_STR(element) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &config_param, &element_param); zephir_get_arrval(&config, config_param); zephir_get_strval(&element, element_param); - - if (UNEXPECTED(!(zephir_array_isset(&config, &element)))) { ZEPHIR_INIT_VAR(&_1$$3); ZEPHIR_CONCAT_SVS(&_1$$3, "You must provide '", &element, "' option in factory config parameter."); @@ -144,19 +132,13 @@ PHP_METHOD(Phalcon_Factory_AbstractConfigFactory, getException) ZVAL_UNDEF(&message); ZVAL_UNDEF(&exception); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(message) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &message_param); zephir_get_strval(&message, message_param); - - ZEPHIR_CALL_METHOD(&exception, this_ptr, "getexceptionclass", NULL, 0); zephir_check_call_status(); zephir_fetch_safe_class(&_0, &exception); @@ -175,9 +157,6 @@ PHP_METHOD(Phalcon_Factory_AbstractConfigFactory, getException) */ PHP_METHOD(Phalcon_Factory_AbstractConfigFactory, getExceptionClass) { - zval *this_ptr = getThis(); - - RETURN_STRING("Exception"); } diff --git a/ext/phalcon/factory/abstractfactory.zep.c b/ext/phalcon/factory/abstractfactory.zep.c index de3005e5b16..06aa4270b29 100644 --- a/ext/phalcon/factory/abstractfactory.zep.c +++ b/ext/phalcon/factory/abstractfactory.zep.c @@ -73,15 +73,11 @@ PHP_METHOD(Phalcon_Factory_AbstractFactory, getService) ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -92,8 +88,6 @@ PHP_METHOD(Phalcon_Factory_AbstractFactory, getService) } else { ZEPHIR_INIT_VAR(&name); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("mapper"), PH_NOISY_CC | PH_READONLY); if (UNEXPECTED(!(zephir_array_isset(&_0, &name)))) { ZEPHIR_INIT_VAR(&_2$$3); @@ -130,16 +124,12 @@ PHP_METHOD(Phalcon_Factory_AbstractFactory, init) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_5$$3); ZVAL_UNDEF(&_6$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(services) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &services_param); if (!services_param) { ZEPHIR_INIT_VAR(&services); @@ -147,8 +137,6 @@ PHP_METHOD(Phalcon_Factory_AbstractFactory, init) } else { ZEPHIR_OBS_COPY_OR_DUP(&services, services_param); } - - ZEPHIR_CALL_METHOD(&adapters, this_ptr, "getservices", NULL, 0); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_0); @@ -207,7 +195,8 @@ zend_object *zephir_init_properties_Phalcon_Factory_AbstractFactory(zend_class_e ZVAL_UNDEF(&_3$$4); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/factory/abstractfactory.zep.h b/ext/phalcon/factory/abstractfactory.zep.h index eb1d367fe9b..0b0f074c9d8 100644 --- a/ext/phalcon/factory/abstractfactory.zep.h +++ b/ext/phalcon/factory/abstractfactory.zep.h @@ -17,11 +17,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_factory_abstractfactory_init, 0, 0, IS_VOID, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, services, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, services, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, services, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_factory_abstractfactory_zephir_init_properties_phalcon_factory_abstractfactory, 0, 0, 0) diff --git a/ext/phalcon/filter/filter.zep.c b/ext/phalcon/filter/filter.zep.c index f3c6bf02148..8a44a8a0d44 100644 --- a/ext/phalcon/filter/filter.zep.c +++ b/ext/phalcon/filter/filter.zep.c @@ -133,16 +133,12 @@ PHP_METHOD(Phalcon_Filter_Filter, __construct) zval *this_ptr = getThis(); ZVAL_UNDEF(&mapper); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(mapper) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &mapper_param); if (!mapper_param) { ZEPHIR_INIT_VAR(&mapper); @@ -150,8 +146,6 @@ PHP_METHOD(Phalcon_Filter_Filter, __construct) } else { zephir_get_arrval(&mapper, mapper_param); } - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "init", NULL, 0, &mapper); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); @@ -180,21 +174,15 @@ PHP_METHOD(Phalcon_Filter_Filter, __call) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&args); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(name) Z_PARAM_ARRAY(args) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &name_param, &args_param); zephir_get_strval(&name, name_param); zephir_get_arrval(&args, args_param); - - ZEPHIR_CALL_METHOD(&sanitizer, this_ptr, "get", NULL, 0, &name); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_0); @@ -235,26 +223,20 @@ PHP_METHOD(Phalcon_Filter_Filter, get) ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_4$$4); ZVAL_UNDEF(&_5$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &name_param); zephir_get_strval(&name, name_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("mapper"), PH_NOISY_CC | PH_READONLY); if (1 != zephir_array_isset(&_0, &name)) { ZEPHIR_INIT_VAR(&_1$$3); object_init_ex(&_1$$3, phalcon_filter_exception_ce); ZEPHIR_INIT_VAR(&_2$$3); ZEPHIR_CONCAT_SVS(&_2$$3, "Filter ", &name, " is not registered"); - ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 32, &_2$$3); + ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 33, &_2$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_1$$3, "phalcon/Filter/Filter.zep", 121); ZEPHIR_MM_RESTORE(); @@ -263,9 +245,9 @@ PHP_METHOD(Phalcon_Filter_Filter, get) zephir_read_property(&_3, this_ptr, ZEND_STRL("services"), PH_NOISY_CC | PH_READONLY); if (1 != zephir_array_isset(&_3, &name)) { zephir_read_property(&_4$$4, this_ptr, ZEND_STRL("mapper"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_OBS_VAR(&definition); + zephir_memory_observe(&definition); zephir_array_fetch(&definition, &_4$$4, &name, PH_NOISY, "phalcon/Filter/Filter.zep", 125); - ZEPHIR_CALL_METHOD(&_5$$4, this_ptr, "createinstance", NULL, 274, &definition); + ZEPHIR_CALL_METHOD(&_5$$4, this_ptr, "createinstance", NULL, 275, &definition); zephir_check_call_status(); zephir_update_property_array(this_ptr, SL("services"), &name, &_5$$4); } @@ -290,19 +272,13 @@ PHP_METHOD(Phalcon_Filter_Filter, has) ZVAL_UNDEF(&name); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &name_param); zephir_get_strval(&name, name_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("mapper"), PH_NOISY_CC | PH_READONLY); RETURN_MM_BOOL(zephir_array_isset(&_0, &name)); } @@ -328,33 +304,26 @@ PHP_METHOD(Phalcon_Filter_Filter, sanitize) ZVAL_UNDEF(&value_sub); ZVAL_UNDEF(&sanitizers_sub); ZVAL_UNDEF(&_0$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_ZVAL(value) Z_PARAM_ZVAL(sanitizers) Z_PARAM_OPTIONAL Z_PARAM_BOOL(noRecursive) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &value, &sanitizers, &noRecursive_param); if (!noRecursive_param) { noRecursive = 0; } else { - noRecursive = zephir_get_boolval(noRecursive_param); - } - - + } if (Z_TYPE_P(sanitizers) == IS_ARRAY) { if (noRecursive) { ZVAL_BOOL(&_0$$3, 1); } else { ZVAL_BOOL(&_0$$3, 0); } - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "processarraysanitizers", NULL, 275, sanitizers, value, &_0$$3); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "processarraysanitizers", NULL, 276, sanitizers, value, &_0$$3); zephir_check_call_status(); RETURN_MM(); } @@ -363,11 +332,11 @@ PHP_METHOD(Phalcon_Filter_Filter, sanitize) _1 = !noRecursive; } if (_1) { - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "processarrayvalues", NULL, 276, value, sanitizers); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "processarrayvalues", NULL, 277, value, sanitizers); zephir_check_call_status(); RETURN_MM(); } - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "sanitizer", NULL, 277, value, sanitizers); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "sanitizer", NULL, 278, value, sanitizers); zephir_check_call_status(); RETURN_MM(); } @@ -388,20 +357,14 @@ PHP_METHOD(Phalcon_Filter_Filter, set) ZVAL_UNDEF(&name); ZVAL_UNDEF(&service_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(name) Z_PARAM_ZVAL(service) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &name_param, &service); zephir_get_strval(&name, name_param); - - zephir_update_property_array(this_ptr, SL("mapper"), &name, service); zephir_unset_property_array(this_ptr, ZEND_STRL("services"), &name); zephir_read_property(&_0, this_ptr, ZEND_STRL("services"), PH_NOISY_CC | PH_READONLY); @@ -429,19 +392,13 @@ PHP_METHOD(Phalcon_Filter_Filter, init) ZVAL_UNDEF(&name); ZVAL_UNDEF(&service); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(mapper) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &mapper_param); zephir_get_arrval(&mapper, mapper_param); - - zephir_is_iterable(&mapper, 0, "phalcon/Filter/Filter.zep", 231); if (Z_TYPE_P(&mapper) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&mapper), _2, _3, _0) @@ -491,22 +448,15 @@ PHP_METHOD(Phalcon_Filter_Filter, createInstance) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *definition, definition_sub, instance; - zval *this_ptr = getThis(); ZVAL_UNDEF(&definition_sub); ZVAL_UNDEF(&instance); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(definition) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &definition); - - ZEPHIR_CPY_WRT(&instance, definition); if (Z_TYPE_P(&instance) == IS_STRING) { ZEPHIR_LAST_CALL_STATUS = zephir_create_instance(return_value, &instance); @@ -550,23 +500,16 @@ PHP_METHOD(Phalcon_Filter_Filter, processArraySanitizers) ZVAL_UNDEF(&_10$$8); ZVAL_UNDEF(&_11$$8); ZVAL_UNDEF(&_12$$9); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_ARRAY(sanitizers) Z_PARAM_ZVAL(value) Z_PARAM_BOOL(noRecursive) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &sanitizers_param, &value, &noRecursive_param); zephir_get_arrval(&sanitizers, sanitizers_param); ZEPHIR_SEPARATE_PARAM(value); - noRecursive = zephir_get_boolval(noRecursive_param); - - if (Z_TYPE_P(value) == IS_NULL) { RETVAL_ZVAL(value, 1, 0); RETURN_MM(); @@ -583,7 +526,7 @@ PHP_METHOD(Phalcon_Filter_Filter, processArraySanitizers) } ZEPHIR_INIT_NVAR(&sanitizer); ZVAL_COPY(&sanitizer, _0); - ZEPHIR_CALL_METHOD(&split, this_ptr, "splitsanitizerparameters", &_4, 278, &sanitizerKey, &sanitizer); + ZEPHIR_CALL_METHOD(&split, this_ptr, "splitsanitizerparameters", &_4, 279, &sanitizerKey, &sanitizer); zephir_check_call_status(); ZEPHIR_OBS_NVAR(&sanitizerName); zephir_array_fetch_long(&sanitizerName, &split, 0, PH_NOISY, "phalcon/Filter/Filter.zep", 281); @@ -595,11 +538,11 @@ PHP_METHOD(Phalcon_Filter_Filter, processArraySanitizers) } else { ZVAL_BOOL(&_6$$5, 0); } - ZEPHIR_CALL_METHOD(&_5$$5, this_ptr, "processvalueisarray", &_7, 279, value, &sanitizerName, &sanitizerParams, &_6$$5); + ZEPHIR_CALL_METHOD(&_5$$5, this_ptr, "processvalueisarray", &_7, 280, value, &sanitizerName, &sanitizerParams, &_6$$5); zephir_check_call_status(); ZEPHIR_CPY_WRT(value, &_5$$5); } else { - ZEPHIR_CALL_METHOD(&_8$$6, this_ptr, "processvalueisnotarray", &_9, 280, value, &sanitizerName, &sanitizerParams); + ZEPHIR_CALL_METHOD(&_8$$6, this_ptr, "processvalueisnotarray", &_9, 281, value, &sanitizerName, &sanitizerParams); zephir_check_call_status(); ZEPHIR_CPY_WRT(value, &_8$$6); } @@ -617,7 +560,7 @@ PHP_METHOD(Phalcon_Filter_Filter, processArraySanitizers) zephir_check_call_status(); ZEPHIR_CALL_METHOD(&sanitizer, &sanitizers, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&split, this_ptr, "splitsanitizerparameters", &_4, 278, &sanitizerKey, &sanitizer); + ZEPHIR_CALL_METHOD(&split, this_ptr, "splitsanitizerparameters", &_4, 279, &sanitizerKey, &sanitizer); zephir_check_call_status(); ZEPHIR_OBS_NVAR(&sanitizerName); zephir_array_fetch_long(&sanitizerName, &split, 0, PH_NOISY, "phalcon/Filter/Filter.zep", 281); @@ -629,11 +572,11 @@ PHP_METHOD(Phalcon_Filter_Filter, processArraySanitizers) } else { ZVAL_BOOL(&_11$$8, 0); } - ZEPHIR_CALL_METHOD(&_10$$8, this_ptr, "processvalueisarray", &_7, 279, value, &sanitizerName, &sanitizerParams, &_11$$8); + ZEPHIR_CALL_METHOD(&_10$$8, this_ptr, "processvalueisarray", &_7, 280, value, &sanitizerName, &sanitizerParams, &_11$$8); zephir_check_call_status(); ZEPHIR_CPY_WRT(value, &_10$$8); } else { - ZEPHIR_CALL_METHOD(&_12$$9, this_ptr, "processvalueisnotarray", &_9, 280, value, &sanitizerName, &sanitizerParams); + ZEPHIR_CALL_METHOD(&_12$$9, this_ptr, "processvalueisnotarray", &_9, 281, value, &sanitizerName, &sanitizerParams); zephir_check_call_status(); ZEPHIR_CPY_WRT(value, &_12$$9); } @@ -678,18 +621,14 @@ PHP_METHOD(Phalcon_Filter_Filter, processArrayValues) ZVAL_UNDEF(&_4$$3); ZVAL_UNDEF(&_6$$4); ZVAL_UNDEF(&sanitizerName); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_ARRAY(values) Z_PARAM_STR(sanitizerName) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(sanitizerParams) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &values_param, &sanitizerName_param, &sanitizerParams_param); zephir_get_arrval(&values, values_param); zephir_get_strval(&sanitizerName, sanitizerName_param); @@ -699,8 +638,6 @@ PHP_METHOD(Phalcon_Filter_Filter, processArrayValues) } else { zephir_get_arrval(&sanitizerParams, sanitizerParams_param); } - - ZEPHIR_INIT_VAR(&arrayValues); array_init(&arrayValues); zephir_is_iterable(&values, 0, "phalcon/Filter/Filter.zep", 334); @@ -715,7 +652,7 @@ PHP_METHOD(Phalcon_Filter_Filter, processArrayValues) } ZEPHIR_INIT_NVAR(&itemValue); ZVAL_COPY(&itemValue, _0); - ZEPHIR_CALL_METHOD(&_4$$3, this_ptr, "sanitizer", &_5, 277, &itemValue, &sanitizerName, &sanitizerParams); + ZEPHIR_CALL_METHOD(&_4$$3, this_ptr, "sanitizer", &_5, 278, &itemValue, &sanitizerName, &sanitizerParams); zephir_check_call_status(); zephir_array_update_zval(&arrayValues, &itemKey, &_4$$3, PH_COPY | PH_SEPARATE); } ZEND_HASH_FOREACH_END(); @@ -732,7 +669,7 @@ PHP_METHOD(Phalcon_Filter_Filter, processArrayValues) zephir_check_call_status(); ZEPHIR_CALL_METHOD(&itemValue, &values, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_6$$4, this_ptr, "sanitizer", &_5, 277, &itemValue, &sanitizerName, &sanitizerParams); + ZEPHIR_CALL_METHOD(&_6$$4, this_ptr, "sanitizer", &_5, 278, &itemValue, &sanitizerName, &sanitizerParams); zephir_check_call_status(); zephir_array_update_zval(&arrayValues, &itemKey, &_6$$4, PH_COPY | PH_SEPARATE); ZEPHIR_CALL_METHOD(NULL, &values, "next", NULL, 0); @@ -772,18 +709,14 @@ PHP_METHOD(Phalcon_Filter_Filter, sanitizer) ZVAL_UNDEF(&_1$$4); ZVAL_UNDEF(&sanitizerParams); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_ZVAL(value) Z_PARAM_STR(sanitizerName) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(sanitizerParams) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &value, &sanitizerName_param, &sanitizerParams_param); zephir_get_strval(&sanitizerName, sanitizerName_param); if (!sanitizerParams_param) { @@ -792,8 +725,6 @@ PHP_METHOD(Phalcon_Filter_Filter, sanitizer) } else { zephir_get_arrval(&sanitizerParams, sanitizerParams_param); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "has", NULL, 0, &sanitizerName); zephir_check_call_status(); if (!ZEPHIR_IS_TRUE_IDENTICAL(&_0)) { @@ -843,31 +774,24 @@ PHP_METHOD(Phalcon_Filter_Filter, processValueIsArray) ZVAL_UNDEF(&_1$$4); ZVAL_UNDEF(&sanitizerName); ZVAL_UNDEF(&sanitizerParams); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(4, 4) Z_PARAM_ZVAL(value) Z_PARAM_STR(sanitizerName) Z_PARAM_ARRAY(sanitizerParams) Z_PARAM_BOOL(noRecursive) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 4, 0, &value, &sanitizerName_param, &sanitizerParams_param, &noRecursive_param); ZEPHIR_SEPARATE_PARAM(value); zephir_get_strval(&sanitizerName, sanitizerName_param); zephir_get_arrval(&sanitizerParams, sanitizerParams_param); - noRecursive = zephir_get_boolval(noRecursive_param); - - if (noRecursive) { - ZEPHIR_CALL_METHOD(&_0$$3, this_ptr, "sanitizer", NULL, 277, value, &sanitizerName, &sanitizerParams); + ZEPHIR_CALL_METHOD(&_0$$3, this_ptr, "sanitizer", NULL, 278, value, &sanitizerName, &sanitizerParams); zephir_check_call_status(); ZEPHIR_CPY_WRT(value, &_0$$3); } else { - ZEPHIR_CALL_METHOD(&_1$$4, this_ptr, "processarrayvalues", NULL, 276, value, &sanitizerName, &sanitizerParams); + ZEPHIR_CALL_METHOD(&_1$$4, this_ptr, "processarrayvalues", NULL, 277, value, &sanitizerName, &sanitizerParams); zephir_check_call_status(); ZEPHIR_CPY_WRT(value, &_1$$4); } @@ -896,25 +820,19 @@ PHP_METHOD(Phalcon_Filter_Filter, processValueIsNotArray) ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&sanitizerName); ZVAL_UNDEF(&sanitizerParams); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_ZVAL(value) Z_PARAM_STR(sanitizerName) Z_PARAM_ARRAY(sanitizerParams) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &value, &sanitizerName_param, &sanitizerParams_param); ZEPHIR_SEPARATE_PARAM(value); zephir_get_strval(&sanitizerName, sanitizerName_param); zephir_get_arrval(&sanitizerParams, sanitizerParams_param); - - if (Z_TYPE_P(value) != IS_ARRAY) { - ZEPHIR_CALL_METHOD(&_0$$3, this_ptr, "sanitizer", NULL, 277, value, &sanitizerName, &sanitizerParams); + ZEPHIR_CALL_METHOD(&_0$$3, this_ptr, "sanitizer", NULL, 278, value, &sanitizerName, &sanitizerParams); zephir_check_call_status(); ZEPHIR_CPY_WRT(value, &_0$$3); } @@ -932,24 +850,17 @@ PHP_METHOD(Phalcon_Filter_Filter, splitSanitizerParameters) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *sanitizerKey, sanitizerKey_sub, *sanitizer, sanitizer_sub, _0; - zval *this_ptr = getThis(); ZVAL_UNDEF(&sanitizerKey_sub); ZVAL_UNDEF(&sanitizer_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ZVAL(sanitizerKey) Z_PARAM_ZVAL(sanitizer) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &sanitizerKey, &sanitizer); - - if (Z_TYPE_P(sanitizer) == IS_ARRAY) { zephir_create_array(return_value, 2, 0); zephir_array_fast_append(return_value, sanitizerKey); @@ -974,7 +885,8 @@ zend_object *zephir_init_properties_Phalcon_Filter_Filter(zend_class_entry *clas ZVAL_UNDEF(&_3$$4); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/filter/filter.zep.h b/ext/phalcon/filter/filter.zep.h index a0805910a89..910017c6c49 100644 --- a/ext/phalcon/filter/filter.zep.h +++ b/ext/phalcon/filter/filter.zep.h @@ -20,11 +20,7 @@ PHP_METHOD(Phalcon_Filter_Filter, splitSanitizerParameters); zend_object *zephir_init_properties_Phalcon_Filter_Filter(zend_class_entry *class_type); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_filter_filter___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mapper, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, mapper, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mapper, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_filter_filter___call, 0, 0, 2) @@ -70,21 +66,13 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_filter_filter_processarrayvalues, 0, 2, IS_ARRAY, 0) ZEND_ARG_ARRAY_INFO(0, values, 0) ZEND_ARG_TYPE_INFO(0, sanitizerName, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sanitizerParams, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, sanitizerParams, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sanitizerParams, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_filter_filter_sanitizer, 0, 0, 2) ZEND_ARG_INFO(0, value) ZEND_ARG_TYPE_INFO(0, sanitizerName, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sanitizerParams, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, sanitizerParams, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sanitizerParams, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_filter_filter_processvalueisarray, 0, 0, 4) diff --git a/ext/phalcon/filter/filterfactory.zep.c b/ext/phalcon/filter/filterfactory.zep.c index 5b30dc3c1ee..984e3cd9c05 100644 --- a/ext/phalcon/filter/filterfactory.zep.c +++ b/ext/phalcon/filter/filterfactory.zep.c @@ -52,14 +52,13 @@ PHP_METHOD(Phalcon_Filter_FilterFactory, newInstance) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); object_init_ex(return_value, phalcon_filter_filter_ce); ZEPHIR_CALL_METHOD(&_0, this_ptr, "getservices", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 281, &_0); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 282, &_0); zephir_check_call_status(); RETURN_MM(); } @@ -71,9 +70,6 @@ PHP_METHOD(Phalcon_Filter_FilterFactory, newInstance) */ PHP_METHOD(Phalcon_Filter_FilterFactory, getServices) { - zval *this_ptr = getThis(); - - zephir_create_array(return_value, 22, 0); add_assoc_stringl_ex(return_value, SL("absint"), SL("Phalcon\\Filter\\Sanitize\\AbsInt")); diff --git a/ext/phalcon/filter/sanitize/absint.zep.c b/ext/phalcon/filter/sanitize/absint.zep.c index d332cb207ec..2f3dec16523 100644 --- a/ext/phalcon/filter/sanitize/absint.zep.c +++ b/ext/phalcon/filter/sanitize/absint.zep.c @@ -48,28 +48,21 @@ PHP_METHOD(Phalcon_Filter_Sanitize_AbsInt, __invoke) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *input, input_sub, _0, _1; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &input); - - ZVAL_LONG(&_0, 519); - ZEPHIR_CALL_FUNCTION(&_1, "filter_var", NULL, 282, input, &_0); + ZEPHIR_CALL_FUNCTION(&_1, "filter_var", NULL, 283, input, &_0); zephir_check_call_status(); ZVAL_LONG(&_0, zephir_get_intval(&_1)); - ZEPHIR_RETURN_CALL_FUNCTION("abs", NULL, 283, &_0); + ZEPHIR_RETURN_CALL_FUNCTION("abs", NULL, 284, &_0); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/filter/sanitize/alnum.zep.c b/ext/phalcon/filter/sanitize/alnum.zep.c index 526ad8d823e..a85b0089136 100644 --- a/ext/phalcon/filter/sanitize/alnum.zep.c +++ b/ext/phalcon/filter/sanitize/alnum.zep.c @@ -47,28 +47,21 @@ PHP_METHOD(Phalcon_Filter_Sanitize_Alnum, __invoke) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *input, input_sub, _0, _1; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &input); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "/[^A-Za-z0-9]/"); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, ""); - ZEPHIR_RETURN_CALL_FUNCTION("preg_replace", NULL, 40, &_0, &_1, input); + ZEPHIR_RETURN_CALL_FUNCTION("preg_replace", NULL, 41, &_0, &_1, input); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/filter/sanitize/alpha.zep.c b/ext/phalcon/filter/sanitize/alpha.zep.c index 3e8059ae93c..0e1ccbe8715 100644 --- a/ext/phalcon/filter/sanitize/alpha.zep.c +++ b/ext/phalcon/filter/sanitize/alpha.zep.c @@ -47,28 +47,21 @@ PHP_METHOD(Phalcon_Filter_Sanitize_Alpha, __invoke) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *input, input_sub, _0, _1; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &input); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "/[^A-Za-z]/"); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, ""); - ZEPHIR_RETURN_CALL_FUNCTION("preg_replace", NULL, 40, &_0, &_1, input); + ZEPHIR_RETURN_CALL_FUNCTION("preg_replace", NULL, 41, &_0, &_1, input); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/filter/sanitize/boolval.zep.c b/ext/phalcon/filter/sanitize/boolval.zep.c index d840fba0be7..74ac8051308 100644 --- a/ext/phalcon/filter/sanitize/boolval.zep.c +++ b/ext/phalcon/filter/sanitize/boolval.zep.c @@ -47,24 +47,17 @@ PHP_METHOD(Phalcon_Filter_Sanitize_BoolVal, __invoke) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *input, input_sub, falseArray, trueArray, _0; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input_sub); ZVAL_UNDEF(&falseArray); ZVAL_UNDEF(&trueArray); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &input); - - ZEPHIR_INIT_VAR(&trueArray); zephir_create_array(&trueArray, 5, 0); ZEPHIR_INIT_VAR(&_0); diff --git a/ext/phalcon/filter/sanitize/email.zep.c b/ext/phalcon/filter/sanitize/email.zep.c index 3c000ca7e7d..2c3bc317996 100644 --- a/ext/phalcon/filter/sanitize/email.zep.c +++ b/ext/phalcon/filter/sanitize/email.zep.c @@ -47,26 +47,19 @@ PHP_METHOD(Phalcon_Filter_Sanitize_Email, __invoke) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *input, input_sub, _0, _1; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &input); - - ZVAL_LONG(&_0, 517); ZVAL_LONG(&_1, 1048576); - ZEPHIR_RETURN_CALL_FUNCTION("filter_var", NULL, 282, input, &_0, &_1); + ZEPHIR_RETURN_CALL_FUNCTION("filter_var", NULL, 283, input, &_0, &_1); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/filter/sanitize/floatval.zep.c b/ext/phalcon/filter/sanitize/floatval.zep.c index 62f9e26ca4e..9657be336a5 100644 --- a/ext/phalcon/filter/sanitize/floatval.zep.c +++ b/ext/phalcon/filter/sanitize/floatval.zep.c @@ -50,29 +50,22 @@ PHP_METHOD(Phalcon_Filter_Sanitize_FloatVal, __invoke) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *input, input_sub, _1, _2; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input_sub); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &input); - - ZEPHIR_INIT_VAR(&_0); zephir_create_array(&_0, 1, 0); add_assoc_long_ex(&_0, SL("flags"), 4096); ZVAL_LONG(&_1, 520); - ZEPHIR_CALL_FUNCTION(&_2, "filter_var", NULL, 282, input, &_1, &_0); + ZEPHIR_CALL_FUNCTION(&_2, "filter_var", NULL, 283, input, &_1, &_0); zephir_check_call_status(); RETURN_MM_DOUBLE(zephir_get_doubleval(&_2)); } diff --git a/ext/phalcon/filter/sanitize/intval.zep.c b/ext/phalcon/filter/sanitize/intval.zep.c index 43649fcd7a2..39802cf91c9 100644 --- a/ext/phalcon/filter/sanitize/intval.zep.c +++ b/ext/phalcon/filter/sanitize/intval.zep.c @@ -48,25 +48,18 @@ PHP_METHOD(Phalcon_Filter_Sanitize_IntVal, __invoke) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *input, input_sub, _0, _1; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &input); - - ZVAL_LONG(&_0, 519); - ZEPHIR_CALL_FUNCTION(&_1, "filter_var", NULL, 282, input, &_0); + ZEPHIR_CALL_FUNCTION(&_1, "filter_var", NULL, 283, input, &_0); zephir_check_call_status(); RETURN_MM_LONG(zephir_get_intval(&_1)); } diff --git a/ext/phalcon/filter/sanitize/lower.zep.c b/ext/phalcon/filter/sanitize/lower.zep.c index 953b4196cf7..ac6bbf086b0 100644 --- a/ext/phalcon/filter/sanitize/lower.zep.c +++ b/ext/phalcon/filter/sanitize/lower.zep.c @@ -52,21 +52,16 @@ PHP_METHOD(Phalcon_Filter_Sanitize_Lower, __invoke) zend_long ZEPHIR_LAST_CALL_STATUS; zval *input_param = NULL, _0$$3, _1$$3, _2; zval input; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input); ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &input_param); if (UNEXPECTED(Z_TYPE_P(input_param) != IS_STRING && Z_TYPE_P(input_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'input' must be of the type string")); @@ -77,8 +72,6 @@ PHP_METHOD(Phalcon_Filter_Sanitize_Lower, __invoke) } else { ZEPHIR_INIT_VAR(&input); } - - if (1 == (zephir_function_exists_ex(ZEND_STRL("mb_convert_case")) == SUCCESS)) { ZVAL_LONG(&_0$$3, 1); ZEPHIR_INIT_VAR(&_1$$3); @@ -87,7 +80,7 @@ PHP_METHOD(Phalcon_Filter_Sanitize_Lower, __invoke) zephir_check_call_status(); RETURN_MM(); } - ZEPHIR_CALL_FUNCTION(&_2, "utf8_decode", NULL, 284, &input); + ZEPHIR_CALL_FUNCTION(&_2, "utf8_decode", NULL, 285, &input); zephir_check_call_status(); zephir_fast_strtolower(return_value, &_2); RETURN_MM(); diff --git a/ext/phalcon/filter/sanitize/lowerfirst.zep.c b/ext/phalcon/filter/sanitize/lowerfirst.zep.c index 48e63fcaa72..c2474b40fda 100644 --- a/ext/phalcon/filter/sanitize/lowerfirst.zep.c +++ b/ext/phalcon/filter/sanitize/lowerfirst.zep.c @@ -51,18 +51,13 @@ PHP_METHOD(Phalcon_Filter_Sanitize_LowerFirst, __invoke) zend_long ZEPHIR_LAST_CALL_STATUS; zval *input_param = NULL; zval input; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &input_param); if (UNEXPECTED(Z_TYPE_P(input_param) != IS_STRING && Z_TYPE_P(input_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'input' must be of the type string")); @@ -73,9 +68,7 @@ PHP_METHOD(Phalcon_Filter_Sanitize_LowerFirst, __invoke) } else { ZEPHIR_INIT_VAR(&input); } - - - ZEPHIR_RETURN_CALL_FUNCTION("lcfirst", NULL, 76, &input); + ZEPHIR_RETURN_CALL_FUNCTION("lcfirst", NULL, 77, &input); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/filter/sanitize/regex.zep.c b/ext/phalcon/filter/sanitize/regex.zep.c index cd99840574f..c416c6e72b0 100644 --- a/ext/phalcon/filter/sanitize/regex.zep.c +++ b/ext/phalcon/filter/sanitize/regex.zep.c @@ -49,26 +49,19 @@ PHP_METHOD(Phalcon_Filter_Sanitize_Regex, __invoke) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *input, input_sub, *pattern, pattern_sub, *replace, replace_sub; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input_sub); ZVAL_UNDEF(&pattern_sub); ZVAL_UNDEF(&replace_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_ZVAL(input) Z_PARAM_ZVAL(pattern) Z_PARAM_ZVAL(replace) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &input, &pattern, &replace); - - - ZEPHIR_RETURN_CALL_FUNCTION("preg_replace", NULL, 40, pattern, replace, input); + ZEPHIR_RETURN_CALL_FUNCTION("preg_replace", NULL, 41, pattern, replace, input); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/filter/sanitize/remove.zep.c b/ext/phalcon/filter/sanitize/remove.zep.c index dd1ac4c2e45..24f674b7bfb 100644 --- a/ext/phalcon/filter/sanitize/remove.zep.c +++ b/ext/phalcon/filter/sanitize/remove.zep.c @@ -47,25 +47,18 @@ PHP_METHOD(Phalcon_Filter_Sanitize_Remove, __invoke) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *input, input_sub, *replace, replace_sub, _0, _1; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input_sub); ZVAL_UNDEF(&replace_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ZVAL(input) Z_PARAM_ZVAL(replace) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &input, &replace); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, ""); ZEPHIR_INIT_VAR(&_1); diff --git a/ext/phalcon/filter/sanitize/replace.zep.c b/ext/phalcon/filter/sanitize/replace.zep.c index e065ebafa4b..083ff409298 100644 --- a/ext/phalcon/filter/sanitize/replace.zep.c +++ b/ext/phalcon/filter/sanitize/replace.zep.c @@ -48,26 +48,19 @@ PHP_METHOD(Phalcon_Filter_Sanitize_Replace, __invoke) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *input, input_sub, *from, from_sub, *to, to_sub, _0; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input_sub); ZVAL_UNDEF(&from_sub); ZVAL_UNDEF(&to_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_ZVAL(input) Z_PARAM_ZVAL(from) Z_PARAM_ZVAL(to) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &input, &from, &to); - - ZEPHIR_INIT_VAR(&_0); zephir_fast_str_replace(&_0, from, to, input); RETURN_CCTOR(&_0); diff --git a/ext/phalcon/filter/sanitize/special.zep.c b/ext/phalcon/filter/sanitize/special.zep.c index 90856af992d..9619ebe74c8 100644 --- a/ext/phalcon/filter/sanitize/special.zep.c +++ b/ext/phalcon/filter/sanitize/special.zep.c @@ -47,24 +47,17 @@ PHP_METHOD(Phalcon_Filter_Sanitize_Special, __invoke) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *input, input_sub, _0; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &input); - - ZVAL_LONG(&_0, 515); - ZEPHIR_RETURN_CALL_FUNCTION("filter_var", NULL, 282, input, &_0); + ZEPHIR_RETURN_CALL_FUNCTION("filter_var", NULL, 283, input, &_0); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/filter/sanitize/specialfull.zep.c b/ext/phalcon/filter/sanitize/specialfull.zep.c index cd506142e56..52e6ff3c8aa 100644 --- a/ext/phalcon/filter/sanitize/specialfull.zep.c +++ b/ext/phalcon/filter/sanitize/specialfull.zep.c @@ -47,24 +47,17 @@ PHP_METHOD(Phalcon_Filter_Sanitize_SpecialFull, __invoke) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *input, input_sub, _0; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &input); - - ZVAL_LONG(&_0, 522); - ZEPHIR_RETURN_CALL_FUNCTION("filter_var", NULL, 282, input, &_0); + ZEPHIR_RETURN_CALL_FUNCTION("filter_var", NULL, 283, input, &_0); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/filter/sanitize/stringval.zep.c b/ext/phalcon/filter/sanitize/stringval.zep.c index 6bad4674f7f..63513a7be1f 100644 --- a/ext/phalcon/filter/sanitize/stringval.zep.c +++ b/ext/phalcon/filter/sanitize/stringval.zep.c @@ -48,32 +48,24 @@ PHP_METHOD(Phalcon_Filter_Sanitize_StringVal, __invoke) zend_long flags, ZEPHIR_LAST_CALL_STATUS; zval *input_param = NULL, *flags_param = NULL, _0; zval input; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(input) Z_PARAM_OPTIONAL Z_PARAM_LONG(flags) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &input_param, &flags_param); zephir_get_strval(&input, input_param); if (!flags_param) { flags = 11; } else { - flags = zephir_get_intval(flags_param); - } - - + } ZVAL_LONG(&_0, flags); - ZEPHIR_RETURN_CALL_FUNCTION("htmlspecialchars", NULL, 285, &input, &_0); + ZEPHIR_RETURN_CALL_FUNCTION("htmlspecialchars", NULL, 286, &input, &_0); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/filter/sanitize/stringvallegacy.zep.c b/ext/phalcon/filter/sanitize/stringvallegacy.zep.c index 94e64724308..c8465f4f953 100644 --- a/ext/phalcon/filter/sanitize/stringvallegacy.zep.c +++ b/ext/phalcon/filter/sanitize/stringvallegacy.zep.c @@ -51,24 +51,17 @@ PHP_METHOD(Phalcon_Filter_Sanitize_StringValLegacy, __invoke) zend_long ZEPHIR_LAST_CALL_STATUS; zval input_sub, major, minor, _2$$3; zval *input; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input_sub); ZVAL_UNDEF(&major); ZVAL_UNDEF(&minor); ZVAL_UNDEF(&_2$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &input); - - ZEPHIR_INIT_VAR(&major); ZEPHIR_GET_CONSTANT(&major, "PHP_MAJOR_VERSION"); ZEPHIR_INIT_VAR(&minor); @@ -83,7 +76,7 @@ PHP_METHOD(Phalcon_Filter_Sanitize_StringValLegacy, __invoke) } if (_0) { ZVAL_LONG(&_2$$3, 513); - ZEPHIR_RETURN_CALL_FUNCTION("filter_var", NULL, 282, input, &_2$$3); + ZEPHIR_RETURN_CALL_FUNCTION("filter_var", NULL, 283, input, &_2$$3); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/filter/sanitize/striptags.zep.c b/ext/phalcon/filter/sanitize/striptags.zep.c index 365dad2cce2..4cbf3982115 100644 --- a/ext/phalcon/filter/sanitize/striptags.zep.c +++ b/ext/phalcon/filter/sanitize/striptags.zep.c @@ -51,18 +51,13 @@ PHP_METHOD(Phalcon_Filter_Sanitize_Striptags, __invoke) zend_long ZEPHIR_LAST_CALL_STATUS; zval *input_param = NULL; zval input; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &input_param); if (UNEXPECTED(Z_TYPE_P(input_param) != IS_STRING && Z_TYPE_P(input_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'input' must be of the type string")); @@ -73,9 +68,7 @@ PHP_METHOD(Phalcon_Filter_Sanitize_Striptags, __invoke) } else { ZEPHIR_INIT_VAR(&input); } - - - ZEPHIR_RETURN_CALL_FUNCTION("strip_tags", NULL, 286, &input); + ZEPHIR_RETURN_CALL_FUNCTION("strip_tags", NULL, 287, &input); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/filter/sanitize/trim.zep.c b/ext/phalcon/filter/sanitize/trim.zep.c index 2ac32e138f0..168e481ce72 100644 --- a/ext/phalcon/filter/sanitize/trim.zep.c +++ b/ext/phalcon/filter/sanitize/trim.zep.c @@ -50,18 +50,13 @@ PHP_METHOD(Phalcon_Filter_Sanitize_Trim, __invoke) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *input_param = NULL; zval input; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &input_param); if (UNEXPECTED(Z_TYPE_P(input_param) != IS_STRING && Z_TYPE_P(input_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'input' must be of the type string")); @@ -72,8 +67,6 @@ PHP_METHOD(Phalcon_Filter_Sanitize_Trim, __invoke) } else { ZEPHIR_INIT_VAR(&input); } - - zephir_fast_trim(return_value, &input, NULL , ZEPHIR_TRIM_BOTH); RETURN_MM(); } diff --git a/ext/phalcon/filter/sanitize/upper.zep.c b/ext/phalcon/filter/sanitize/upper.zep.c index f788aeaad08..6b7270ee518 100644 --- a/ext/phalcon/filter/sanitize/upper.zep.c +++ b/ext/phalcon/filter/sanitize/upper.zep.c @@ -52,21 +52,16 @@ PHP_METHOD(Phalcon_Filter_Sanitize_Upper, __invoke) zend_long ZEPHIR_LAST_CALL_STATUS; zval *input_param = NULL, _0$$3, _1$$3, _2; zval input; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input); ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &input_param); if (UNEXPECTED(Z_TYPE_P(input_param) != IS_STRING && Z_TYPE_P(input_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'input' must be of the type string")); @@ -77,8 +72,6 @@ PHP_METHOD(Phalcon_Filter_Sanitize_Upper, __invoke) } else { ZEPHIR_INIT_VAR(&input); } - - if (1 == (zephir_function_exists_ex(ZEND_STRL("mb_convert_case")) == SUCCESS)) { ZVAL_LONG(&_0$$3, 0); ZEPHIR_INIT_VAR(&_1$$3); @@ -87,7 +80,7 @@ PHP_METHOD(Phalcon_Filter_Sanitize_Upper, __invoke) zephir_check_call_status(); RETURN_MM(); } - ZEPHIR_CALL_FUNCTION(&_2, "utf8_decode", NULL, 284, &input); + ZEPHIR_CALL_FUNCTION(&_2, "utf8_decode", NULL, 285, &input); zephir_check_call_status(); zephir_fast_strtoupper(return_value, &_2); RETURN_MM(); diff --git a/ext/phalcon/filter/sanitize/upperfirst.zep.c b/ext/phalcon/filter/sanitize/upperfirst.zep.c index 7207ccc00e0..75a910e27a7 100644 --- a/ext/phalcon/filter/sanitize/upperfirst.zep.c +++ b/ext/phalcon/filter/sanitize/upperfirst.zep.c @@ -50,18 +50,13 @@ PHP_METHOD(Phalcon_Filter_Sanitize_UpperFirst, __invoke) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *input_param = NULL; zval input; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &input_param); if (UNEXPECTED(Z_TYPE_P(input_param) != IS_STRING && Z_TYPE_P(input_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'input' must be of the type string")); @@ -72,8 +67,6 @@ PHP_METHOD(Phalcon_Filter_Sanitize_UpperFirst, __invoke) } else { ZEPHIR_INIT_VAR(&input); } - - zephir_ucfirst(return_value, &input); RETURN_MM(); } diff --git a/ext/phalcon/filter/sanitize/upperwords.zep.c b/ext/phalcon/filter/sanitize/upperwords.zep.c index 9aec8cecfd8..041a9623689 100644 --- a/ext/phalcon/filter/sanitize/upperwords.zep.c +++ b/ext/phalcon/filter/sanitize/upperwords.zep.c @@ -51,21 +51,16 @@ PHP_METHOD(Phalcon_Filter_Sanitize_UpperWords, __invoke) zend_long ZEPHIR_LAST_CALL_STATUS; zval *input_param = NULL, _0$$3, _1$$3, _2; zval input; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input); ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &input_param); if (UNEXPECTED(Z_TYPE_P(input_param) != IS_STRING && Z_TYPE_P(input_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'input' must be of the type string")); @@ -76,8 +71,6 @@ PHP_METHOD(Phalcon_Filter_Sanitize_UpperWords, __invoke) } else { ZEPHIR_INIT_VAR(&input); } - - if (1 == (zephir_function_exists_ex(ZEND_STRL("mb_convert_case")) == SUCCESS)) { ZVAL_LONG(&_0$$3, 2); ZEPHIR_INIT_VAR(&_1$$3); @@ -86,9 +79,9 @@ PHP_METHOD(Phalcon_Filter_Sanitize_UpperWords, __invoke) zephir_check_call_status(); RETURN_MM(); } - ZEPHIR_CALL_FUNCTION(&_2, "utf8_decode", NULL, 284, &input); + ZEPHIR_CALL_FUNCTION(&_2, "utf8_decode", NULL, 285, &input); zephir_check_call_status(); - ZEPHIR_RETURN_CALL_FUNCTION("ucwords", NULL, 287, &_2); + ZEPHIR_RETURN_CALL_FUNCTION("ucwords", NULL, 288, &_2); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/filter/sanitize/url.zep.c b/ext/phalcon/filter/sanitize/url.zep.c index ad2398ac9fa..83c075483ed 100644 --- a/ext/phalcon/filter/sanitize/url.zep.c +++ b/ext/phalcon/filter/sanitize/url.zep.c @@ -47,24 +47,17 @@ PHP_METHOD(Phalcon_Filter_Sanitize_Url, __invoke) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *input, input_sub, _0; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &input); - - ZVAL_LONG(&_0, 518); - ZEPHIR_RETURN_CALL_FUNCTION("filter_var", NULL, 282, input, &_0); + ZEPHIR_RETURN_CALL_FUNCTION("filter_var", NULL, 283, input, &_0); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/filter/validation.zep.c b/ext/phalcon/filter/validation.zep.c index a9c6746932e..7a9f7ecba58 100644 --- a/ext/phalcon/filter/validation.zep.c +++ b/ext/phalcon/filter/validation.zep.c @@ -96,16 +96,12 @@ PHP_METHOD(Phalcon_Filter_Validation, __construct) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(validators) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &validators_param); if (!validators_param) { ZEPHIR_INIT_VAR(&validators); @@ -113,8 +109,6 @@ PHP_METHOD(Phalcon_Filter_Validation, __construct) } else { zephir_get_arrval(&validators, validators_param); } - - ZEPHIR_INIT_VAR(&_0); ZEPHIR_INIT_NVAR(&_0); zephir_create_closure_ex(&_0, NULL, phalcon_8__closure_ce, SL("__invoke")); @@ -155,19 +149,13 @@ PHP_METHOD(Phalcon_Filter_Validation, add) ZVAL_UNDEF(&singleField); ZVAL_UNDEF(&_2$$5); ZVAL_UNDEF(&_0$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ZVAL(field) Z_PARAM_OBJECT_OF_CLASS(validator, phalcon_filter_validation_validatorinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &field, &validator); - - if (Z_TYPE_P(field) == IS_ARRAY) { if (zephir_instance_of_ev(validator, phalcon_filter_validation_abstractcombinedfieldsvalidator_ce)) { ZEPHIR_INIT_VAR(&_0$$4); @@ -226,18 +214,12 @@ PHP_METHOD(Phalcon_Filter_Validation, appendMessage) ZVAL_UNDEF(&message_sub); ZVAL_UNDEF(&messages); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(message, phalcon_messages_messageinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &message); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("messages"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&messages, &_0); if (Z_TYPE_P(&messages) != IS_OBJECT) { @@ -246,7 +228,7 @@ PHP_METHOD(Phalcon_Filter_Validation, appendMessage) ZEPHIR_CALL_METHOD(NULL, &messages, "__construct", NULL, 8); zephir_check_call_status(); } - ZEPHIR_CALL_METHOD(NULL, &messages, "appendmessage", NULL, 288, message); + ZEPHIR_CALL_METHOD(NULL, &messages, "appendmessage", NULL, 289, message); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("messages"), &messages); RETURN_THIS(); @@ -269,19 +251,13 @@ PHP_METHOD(Phalcon_Filter_Validation, bind) ZVAL_UNDEF(&entity_sub); ZVAL_UNDEF(&data_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ZVAL(entity) Z_PARAM_ZVAL(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &entity, &data); - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "setentity", NULL, 0, entity); zephir_check_call_status(); _0 = Z_TYPE_P(data) != IS_ARRAY; @@ -301,9 +277,6 @@ PHP_METHOD(Phalcon_Filter_Validation, bind) */ PHP_METHOD(Phalcon_Filter_Validation, getData) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "data"); } @@ -315,9 +288,6 @@ PHP_METHOD(Phalcon_Filter_Validation, getData) */ PHP_METHOD(Phalcon_Filter_Validation, getEntity) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "entity"); } @@ -336,33 +306,29 @@ PHP_METHOD(Phalcon_Filter_Validation, getFilters) ZVAL_UNDEF(&filters); ZVAL_UNDEF(&fieldFilters); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &field_param); if (!field_param) { ZEPHIR_INIT_VAR(&field); } else { zephir_get_strval(&field, field_param); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("filters"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&filters, &_0); if (!(!(ZEPHIR_IS_EMPTY(&field)))) { RETURN_CCTOR(&filters); } - if (!(zephir_array_isset_fetch(&fieldFilters, &filters, &field, 1))) { + zephir_memory_observe(&fieldFilters); + if (!(zephir_array_isset_fetch(&fieldFilters, &filters, &field, 0))) { RETURN_MM_NULL(); } - RETURN_CTOR(&fieldFilters); + RETURN_CCTOR(&fieldFilters); } /** @@ -380,18 +346,12 @@ PHP_METHOD(Phalcon_Filter_Validation, getLabel) ZVAL_UNDEF(&labels); ZVAL_UNDEF(&value); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &field); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("labels"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&labels, &_0); if (Z_TYPE_P(field) == IS_ARRAY) { @@ -410,9 +370,6 @@ PHP_METHOD(Phalcon_Filter_Validation, getLabel) */ PHP_METHOD(Phalcon_Filter_Validation, getMessages) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "messages"); } @@ -422,9 +379,6 @@ PHP_METHOD(Phalcon_Filter_Validation, getMessages) */ PHP_METHOD(Phalcon_Filter_Validation, getValidators) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "validators"); } @@ -441,7 +395,6 @@ PHP_METHOD(Phalcon_Filter_Validation, getValueByEntity) zend_long ZEPHIR_LAST_CALL_STATUS; zval field, method; zval *entity, entity_sub, *field_param = NULL, _0, _1, _2$$5; - zval *this_ptr = getThis(); ZVAL_UNDEF(&entity_sub); ZVAL_UNDEF(&_0); @@ -449,22 +402,16 @@ PHP_METHOD(Phalcon_Filter_Validation, getValueByEntity) ZVAL_UNDEF(&_2$$5); ZVAL_UNDEF(&field); ZVAL_UNDEF(&method); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ZVAL(entity) Z_PARAM_STR(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &entity, &field_param); zephir_get_strval(&field, field_param); - - ZEPHIR_INIT_VAR(&_0); - zephir_camelize(&_0, &field, NULL ); + zephir_camelize(&_0, &field, NULL ); ZEPHIR_INIT_VAR(&_1); ZEPHIR_CONCAT_SV(&_1, "get", &_0); zephir_get_strval(&method, &_1); @@ -479,7 +426,7 @@ PHP_METHOD(Phalcon_Filter_Validation, getValueByEntity) RETURN_MM(); } if (zephir_isset_property_zval(entity, &field)) { - ZEPHIR_OBS_VAR(&_2$$5); + zephir_memory_observe(&_2$$5); zephir_read_property_zval(&_2$$5, entity, &field, PH_NOISY_CC); RETURN_CCTOR(&_2$$5); } @@ -506,24 +453,19 @@ PHP_METHOD(Phalcon_Filter_Validation, getValueByData) ZVAL_UNDEF(&_1$$5); ZVAL_UNDEF(&_2$$7); ZVAL_UNDEF(&field); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ZVAL(data) Z_PARAM_STR(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &data, &field_param); zephir_get_strval(&field, field_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("values"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&values, &_0); - if (zephir_array_isset_fetch(&value, &values, &field, 1)) { - RETURN_CTOR(&value); + zephir_memory_observe(&value); + if (zephir_array_isset_fetch(&value, &values, &field, 0)) { + RETURN_CCTOR(&value); } if (Z_TYPE_P(data) == IS_ARRAY) { if (zephir_array_isset(data, &field)) { @@ -533,7 +475,7 @@ PHP_METHOD(Phalcon_Filter_Validation, getValueByData) } if (Z_TYPE_P(data) == IS_OBJECT) { if (zephir_isset_property_zval(data, &field)) { - ZEPHIR_OBS_VAR(&_2$$7); + zephir_memory_observe(&_2$$7); zephir_read_property_zval(&_2$$7, data, &field, PH_NOISY_CC); RETURN_CCTOR(&_2$$7); } @@ -548,11 +490,10 @@ PHP_METHOD(Phalcon_Filter_Validation, getValueByData) */ PHP_METHOD(Phalcon_Filter_Validation, getValue) { - zend_bool isRawFetched = 0, _1$$5, _5$$9; + zend_bool isRawFetched = 0, _1$$5, _4$$9; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zephir_fcall_cache_entry *_2 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *field_param = NULL, entity, method, value, data, filters, fieldFilters, container, filterService, _0, _3$$9, _4$$9, _6$$13, _7$$13; + zval *field_param = NULL, entity, method, value, data, filters, fieldFilters, container, filterService, _0, _2$$9, _3$$9, _5$$13, _6$$13; zval field; zval *this_ptr = getThis(); @@ -566,23 +507,17 @@ PHP_METHOD(Phalcon_Filter_Validation, getValue) ZVAL_UNDEF(&container); ZVAL_UNDEF(&filterService); ZVAL_UNDEF(&_0); + ZVAL_UNDEF(&_2$$9); ZVAL_UNDEF(&_3$$9); - ZVAL_UNDEF(&_4$$9); + ZVAL_UNDEF(&_5$$13); ZVAL_UNDEF(&_6$$13); - ZVAL_UNDEF(&_7$$13); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &field_param); zephir_get_strval(&field, field_param); - - isRawFetched = 0; zephir_read_property(&_0, this_ptr, ZEND_STRL("entity"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&entity, &_0); @@ -613,41 +548,41 @@ PHP_METHOD(Phalcon_Filter_Validation, getValue) } zephir_read_property(&_0, this_ptr, ZEND_STRL("filters"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&filters, &_0); - ZEPHIR_OBS_VAR(&fieldFilters); + zephir_memory_observe(&fieldFilters); if (zephir_array_isset_fetch(&fieldFilters, &filters, &field, 0)) { if (zephir_is_true(&fieldFilters)) { ZEPHIR_CALL_METHOD(&container, this_ptr, "getdi", NULL, 0); zephir_check_call_status(); if (Z_TYPE_P(&container) == IS_NULL) { - ZEPHIR_CALL_CE_STATIC(&container, phalcon_di_di_ce, "getdefault", &_2, 0); + ZEPHIR_CALL_CE_STATIC(&container, phalcon_di_di_ce, "getdefault", NULL, 0); zephir_check_call_status(); if (Z_TYPE_P(&container) == IS_NULL) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_filter_validation_exception_ce, "A dependency injection container is required to access the 'filter' service", "phalcon/Filter/Validation.zep", 354); return; } } - ZEPHIR_INIT_VAR(&_4$$9); - ZVAL_STRING(&_4$$9, "filter"); - ZEPHIR_CALL_METHOD(&_3$$9, &container, "getshared", NULL, 0, &_4$$9); + ZEPHIR_INIT_VAR(&_3$$9); + ZVAL_STRING(&_3$$9, "filter"); + ZEPHIR_CALL_METHOD(&_2$$9, &container, "getshared", NULL, 0, &_3$$9); zephir_check_call_status(); - ZEPHIR_CPY_WRT(&filterService, &_3$$9); + ZEPHIR_CPY_WRT(&filterService, &_2$$9); if (UNEXPECTED(Z_TYPE_P(&filterService) != IS_OBJECT)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_filter_validation_exception_ce, "Returned 'filter' service is invalid", "phalcon/Filter/Validation.zep", 361); return; } - ZEPHIR_CALL_METHOD(&_3$$9, &filterService, "sanitize", NULL, 0, &value, &fieldFilters); + ZEPHIR_CALL_METHOD(&_2$$9, &filterService, "sanitize", NULL, 0, &value, &fieldFilters); zephir_check_call_status(); - ZEPHIR_CPY_WRT(&value, &_3$$9); - _5$$9 = Z_TYPE_P(&entity) == IS_OBJECT; - if (_5$$9) { - _5$$9 = isRawFetched == 0; + ZEPHIR_CPY_WRT(&value, &_2$$9); + _4$$9 = Z_TYPE_P(&entity) == IS_OBJECT; + if (_4$$9) { + _4$$9 = isRawFetched == 0; } - if (_5$$9) { - ZEPHIR_INIT_VAR(&_6$$13); - zephir_camelize(&_6$$13, &field, NULL ); + if (_4$$9) { + ZEPHIR_INIT_VAR(&_5$$13); + zephir_camelize(&_5$$13, &field, NULL ); ZEPHIR_INIT_VAR(&method); - ZEPHIR_CONCAT_SV(&method, "set", &_6$$13); - ZEPHIR_CALL_FUNCTION(&_7$$13, "property_exists", NULL, 289, &entity, &field); + ZEPHIR_CONCAT_SV(&method, "set", &_5$$13); + ZEPHIR_CALL_FUNCTION(&_6$$13, "property_exists", NULL, 290, &entity, &field); zephir_check_call_status(); if ((zephir_method_exists(&entity, &method) == SUCCESS)) { ZEPHIR_CALL_METHOD_ZVAL(NULL, &entity, &method, NULL, 0, &value); @@ -655,7 +590,7 @@ PHP_METHOD(Phalcon_Filter_Validation, getValue) } else if ((zephir_method_exists_ex(&entity, ZEND_STRL("writeattribute")) == SUCCESS)) { ZEPHIR_CALL_METHOD(NULL, &entity, "writeattribute", NULL, 0, &field, &value); zephir_check_call_status(); - } else if (zephir_is_true(&_7$$13)) { + } else if (zephir_is_true(&_6$$13)) { zephir_update_property_zval_zval(&entity, &field, &value); } } @@ -685,19 +620,13 @@ PHP_METHOD(Phalcon_Filter_Validation, rule) ZVAL_UNDEF(&field_sub); ZVAL_UNDEF(&validator_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ZVAL(field) Z_PARAM_OBJECT_OF_CLASS(validator, phalcon_filter_validation_validatorinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &field, &validator); - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "add", NULL, 0, field, validator); zephir_check_call_status(); RETURN_MM(); @@ -719,20 +648,14 @@ PHP_METHOD(Phalcon_Filter_Validation, rules) ZVAL_UNDEF(&validator); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&validators); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ZVAL(field) Z_PARAM_ARRAY(validators) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &field, &validators_param); ZEPHIR_OBS_COPY_OR_DUP(&validators, validators_param); - - zephir_is_iterable(&validators, 0, "phalcon/Filter/Validation.zep", 419); if (Z_TYPE_P(&validators) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&validators), _0) @@ -778,17 +701,10 @@ PHP_METHOD(Phalcon_Filter_Validation, setEntity) zval *this_ptr = getThis(); ZVAL_UNDEF(&entity_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(entity) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &entity); - - if (UNEXPECTED(Z_TYPE_P(entity) != IS_OBJECT)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STRW(phalcon_filter_validation_exception_ce, "Entity must be an object", "phalcon/Filter/Validation.zep", 430); return; @@ -813,19 +729,13 @@ PHP_METHOD(Phalcon_Filter_Validation, setFilters) ZVAL_UNDEF(&filters_sub); ZVAL_UNDEF(&singleField); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ZVAL(field) Z_PARAM_ZVAL(filters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &field, &filters); - - if (Z_TYPE_P(field) == IS_ARRAY) { zephir_is_iterable(field, 0, "phalcon/Filter/Validation.zep", 450); if (Z_TYPE_P(field) == IS_ARRAY) { @@ -872,19 +782,13 @@ PHP_METHOD(Phalcon_Filter_Validation, setLabels) zval *this_ptr = getThis(); ZVAL_UNDEF(&labels); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(labels) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &labels_param); ZEPHIR_OBS_COPY_OR_DUP(&labels, labels_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("labels"), &labels); ZEPHIR_MM_RESTORE(); } @@ -897,19 +801,13 @@ PHP_METHOD(Phalcon_Filter_Validation, setValidators) zval *this_ptr = getThis(); ZVAL_UNDEF(&validators); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(validators) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &validators_param); zephir_get_arrval(&validators, validators_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("validators"), &validators); RETURN_THIS(); } @@ -973,17 +871,14 @@ PHP_METHOD(Phalcon_Filter_Validation, validate) ZVAL_UNDEF(&_36$$41); ZVAL_UNDEF(&_37$$41); ZVAL_UNDEF(&_38$$43); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(data) Z_PARAM_ZVAL_OR_NULL(entity) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 2, &data, &entity); if (!data) { data = &data_sub; @@ -993,9 +888,7 @@ PHP_METHOD(Phalcon_Filter_Validation, validate) entity = &entity_sub; entity = &__$null; } - - - ZEPHIR_OBS_VAR(&validatorData); + zephir_memory_observe(&validatorData); zephir_read_property(&validatorData, this_ptr, ZEND_STRL("validators"), PH_NOISY_CC); zephir_read_property(&_0, this_ptr, ZEND_STRL("combinedFieldsValidators"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&combinedFieldsValidators, &_0); @@ -1307,19 +1200,13 @@ PHP_METHOD(Phalcon_Filter_Validation, preChecking) ZVAL_UNDEF(&_6$$8); ZVAL_UNDEF(&_8$$11); ZVAL_UNDEF(&results); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ZVAL(field) Z_PARAM_OBJECT_OF_CLASS(validator, phalcon_filter_validation_validatorinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &field, &validator); - - ZEPHIR_INIT_VAR(&results); array_init(&results); if (Z_TYPE_P(field) == IS_ARRAY) { @@ -1329,7 +1216,7 @@ PHP_METHOD(Phalcon_Filter_Validation, preChecking) { ZEPHIR_INIT_NVAR(&singleField); ZVAL_COPY(&singleField, _0$$3); - ZEPHIR_CALL_METHOD(&_2$$4, this_ptr, "prechecking", &_3, 290, &singleField, validator); + ZEPHIR_CALL_METHOD(&_2$$4, this_ptr, "prechecking", &_3, 291, &singleField, validator); zephir_check_call_status(); zephir_array_append(&results, &_2$$4, PH_SEPARATE, "phalcon/Filter/Validation.zep", 607); if (zephir_fast_in_array(&__$false, &results)) { @@ -1348,7 +1235,7 @@ PHP_METHOD(Phalcon_Filter_Validation, preChecking) } ZEPHIR_CALL_METHOD(&singleField, field, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_4$$6, this_ptr, "prechecking", &_3, 290, &singleField, validator); + ZEPHIR_CALL_METHOD(&_4$$6, this_ptr, "prechecking", &_3, 291, &singleField, validator); zephir_check_call_status(); zephir_array_append(&results, &_4$$6, PH_SEPARATE, "phalcon/Filter/Validation.zep", 607); if (zephir_fast_in_array(&__$false, &results)) { @@ -1428,7 +1315,8 @@ zend_object *zephir_init_properties_Phalcon_Filter_Validation(zend_class_entry * ZVAL_UNDEF(&_9$$7); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/filter/validation.zep.h b/ext/phalcon/filter/validation.zep.h index 0a9cecfc840..f13616033fd 100644 --- a/ext/phalcon/filter/validation.zep.h +++ b/ext/phalcon/filter/validation.zep.h @@ -27,11 +27,7 @@ PHP_METHOD(Phalcon_Filter_Validation, preChecking); zend_object *zephir_init_properties_Phalcon_Filter_Validation(zend_class_entry *class_type); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_filter_validation___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, validators, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, validators, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, validators, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_filter_validation_add, 0, 2, Phalcon\\Filter\\Validation\\ValidationInterface, 0) @@ -129,16 +125,8 @@ ZEPHIR_INIT_FUNCS(phalcon_filter_validation_method_entry) { PHP_ME(Phalcon_Filter_Validation, add, arginfo_phalcon_filter_validation_add, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Filter_Validation, appendMessage, arginfo_phalcon_filter_validation_appendmessage, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Filter_Validation, bind, arginfo_phalcon_filter_validation_bind, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Filter_Validation, getData, arginfo_phalcon_filter_validation_getdata, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Filter_Validation, getData, NULL, ZEND_ACC_PUBLIC) -#endif -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Filter_Validation, getEntity, arginfo_phalcon_filter_validation_getentity, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Filter_Validation, getEntity, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Filter_Validation, getData, arginfo_phalcon_filter_validation_getdata, ZEND_ACC_PUBLIC) +PHP_ME(Phalcon_Filter_Validation, getEntity, arginfo_phalcon_filter_validation_getentity, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Filter_Validation, getFilters, arginfo_phalcon_filter_validation_getfilters, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Filter_Validation, getLabel, arginfo_phalcon_filter_validation_getlabel, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Filter_Validation, getMessages, arginfo_phalcon_filter_validation_getmessages, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/filter/validation/abstractvalidator.zep.c b/ext/phalcon/filter/validation/abstractvalidator.zep.c index d316c790e22..b195d7f9553 100644 --- a/ext/phalcon/filter/validation/abstractvalidator.zep.c +++ b/ext/phalcon/filter/validation/abstractvalidator.zep.c @@ -78,16 +78,12 @@ PHP_METHOD(Phalcon_Filter_Validation_AbstractValidator, __construct) ZVAL_UNDEF(&whitelist); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -95,8 +91,6 @@ PHP_METHOD(Phalcon_Filter_Validation_AbstractValidator, __construct) } else { zephir_get_arrval(&options, options_param); } - - ZEPHIR_INIT_VAR(&whitelist); object_init_ex(&whitelist, phalcon_support_helper_arr_whitelist_ce); if (zephir_has_constructor(&whitelist)) { @@ -158,27 +152,23 @@ PHP_METHOD(Phalcon_Filter_Validation_AbstractValidator, getOption) ZVAL_UNDEF(&value); ZVAL_UNDEF(&fieldValue); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(key) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(defaultValue) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &key_param, &defaultValue); zephir_get_strval(&key, key_param); if (!defaultValue) { defaultValue = &defaultValue_sub; defaultValue = &__$null; } - - + zephir_memory_observe(&value); zephir_read_property(&_0, this_ptr, ZEND_STRL("options"), PH_NOISY_CC | PH_READONLY); - if (!(zephir_array_isset_fetch(&value, &_0, &key, 1))) { + if (!(zephir_array_isset_fetch(&value, &_0, &key, 0))) { RETVAL_ZVAL(defaultValue, 1, 0); RETURN_MM(); } @@ -187,11 +177,12 @@ PHP_METHOD(Phalcon_Filter_Validation_AbstractValidator, getOption) _1 = Z_TYPE_P(&value) == IS_ARRAY; } if (_1) { - if (zephir_array_isset_fetch(&fieldValue, &value, &key, 1)) { - RETURN_CTOR(&fieldValue); + zephir_memory_observe(&fieldValue); + if (zephir_array_isset_fetch(&fieldValue, &value, &key, 0)) { + RETURN_CCTOR(&fieldValue); } } - RETURN_CTOR(&value); + RETURN_CCTOR(&value); } /** @@ -215,24 +206,19 @@ PHP_METHOD(Phalcon_Filter_Validation_AbstractValidator, getTemplate) ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &field_param); if (!field_param) { ZEPHIR_INIT_VAR(&field); } else { zephir_get_strval(&field, field_param); } - - _0 = !ZEPHIR_IS_NULL(&field); if (_0) { zephir_read_property(&_1, this_ptr, ZEND_STRL("templates"), PH_NOISY_CC | PH_READONLY); @@ -260,9 +246,6 @@ PHP_METHOD(Phalcon_Filter_Validation_AbstractValidator, getTemplate) */ PHP_METHOD(Phalcon_Filter_Validation_AbstractValidator, getTemplates) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "templates"); } @@ -283,19 +266,13 @@ PHP_METHOD(Phalcon_Filter_Validation_AbstractValidator, hasOption) ZVAL_UNDEF(&key); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); zephir_get_strval(&key, key_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("options"), PH_NOISY_CC | PH_READONLY); RETURN_MM_BOOL(zephir_array_isset(&_0, &key)); } @@ -327,18 +304,14 @@ PHP_METHOD(Phalcon_Filter_Validation_AbstractValidator, messageFactory) ZVAL_UNDEF(&_5); ZVAL_UNDEF(&replacements); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_OBJECT_OF_CLASS(validation, phalcon_filter_validation_ce) Z_PARAM_ZVAL(field) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(replacements) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &validation, &field, &replacements_param); if (!replacements_param) { ZEPHIR_INIT_VAR(&replacements); @@ -346,8 +319,6 @@ PHP_METHOD(Phalcon_Filter_Validation_AbstractValidator, messageFactory) } else { zephir_get_arrval(&replacements, replacements_param); } - - if (Z_TYPE_P(field) == IS_ARRAY) { ZEPHIR_INIT_VAR(&singleField); zephir_fast_join_str(&singleField, SL(", "), field); @@ -396,20 +367,14 @@ PHP_METHOD(Phalcon_Filter_Validation_AbstractValidator, setOption) ZVAL_UNDEF(&key); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(key) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &key_param, &value); zephir_get_strval(&key, key_param); - - zephir_update_property_array(this_ptr, SL("options"), &key, value); ZEPHIR_MM_RESTORE(); } @@ -427,19 +392,13 @@ PHP_METHOD(Phalcon_Filter_Validation_AbstractValidator, setTemplate) zval *this_ptr = getThis(); ZVAL_UNDEF(&template); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(template) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &template_param); zephir_get_strval(&template, template_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("template"), &template); RETURN_THIS(); } @@ -469,19 +428,13 @@ PHP_METHOD(Phalcon_Filter_Validation_AbstractValidator, setTemplates) ZVAL_UNDEF(&_6$$3); ZVAL_UNDEF(&_7$$4); ZVAL_UNDEF(&_8$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(templates) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &templates_param); zephir_get_arrval(&templates, templates_param); - - ZEPHIR_INIT_VAR(&_0); array_init(&_0); zephir_update_property_zval(this_ptr, ZEND_STRL("templates"), &_0); @@ -564,19 +517,13 @@ PHP_METHOD(Phalcon_Filter_Validation_AbstractValidator, allowEmpty) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ZVAL(field) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &field, &value); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "allowEmpty"); ZVAL_BOOL(&_1, 0); @@ -615,26 +562,19 @@ PHP_METHOD(Phalcon_Filter_Validation_AbstractValidator, checkArray) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval field; zval *value = NULL, value_sub, *field_param = NULL, _1$$3; - zval *this_ptr = getThis(); ZVAL_UNDEF(&value_sub); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&field); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ZVAL(value) Z_PARAM_STR(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &value, &field_param); ZEPHIR_SEPARATE_PARAM(value); zephir_get_strval(&field, field_param); - - _0 = Z_TYPE_P(value) == IS_ARRAY; if (_0) { _0 = zephir_array_isset(value, &field); @@ -667,19 +607,13 @@ PHP_METHOD(Phalcon_Filter_Validation_AbstractValidator, prepareCode) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &field_param); zephir_get_strval(&field, field_param); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "code"); ZVAL_LONG(&_1, 0); @@ -713,20 +647,14 @@ PHP_METHOD(Phalcon_Filter_Validation_AbstractValidator, prepareLabel) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&field); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(validation, phalcon_filter_validation_ce) Z_PARAM_STR(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &validation, &field_param); zephir_get_strval(&field, field_param); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "label"); ZEPHIR_CALL_METHOD(&label, this_ptr, "getoption", NULL, 0, &_0); @@ -752,7 +680,8 @@ zend_object *zephir_init_properties_Phalcon_Filter_Validation_AbstractValidator( ZVAL_UNDEF(&_3$$4); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/filter/validation/abstractvalidator.zep.h b/ext/phalcon/filter/validation/abstractvalidator.zep.h index 1e89c4ba661..4aac92bebb1 100644 --- a/ext/phalcon/filter/validation/abstractvalidator.zep.h +++ b/ext/phalcon/filter/validation/abstractvalidator.zep.h @@ -20,11 +20,7 @@ PHP_METHOD(Phalcon_Filter_Validation_AbstractValidator, prepareLabel); zend_object *zephir_init_properties_Phalcon_Filter_Validation_AbstractValidator(zend_class_entry *class_type); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_filter_validation_abstractvalidator___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_filter_validation_abstractvalidator_getoption, 0, 0, 1) @@ -46,11 +42,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_filter_validation_abstractvalidator_messagefactory, 0, 2, Phalcon\\Messages\\Message, 0) ZEND_ARG_OBJ_INFO(0, validation, Phalcon\\Filter\\Validation, 0) ZEND_ARG_INFO(0, field) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, replacements, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, replacements, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, replacements, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_filter_validation_abstractvalidator_setoption, 0, 2, IS_VOID, 0) diff --git a/ext/phalcon/filter/validation/abstractvalidatorcomposite.zep.c b/ext/phalcon/filter/validation/abstractvalidatorcomposite.zep.c index 9cc13e1d900..8bd4d84d6ce 100644 --- a/ext/phalcon/filter/validation/abstractvalidatorcomposite.zep.c +++ b/ext/phalcon/filter/validation/abstractvalidatorcomposite.zep.c @@ -50,9 +50,6 @@ ZEPHIR_INIT_CLASS(Phalcon_Filter_Validation_AbstractValidatorComposite) */ PHP_METHOD(Phalcon_Filter_Validation_AbstractValidatorComposite, getValidators) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "validators"); } @@ -78,19 +75,13 @@ PHP_METHOD(Phalcon_Filter_Validation_AbstractValidatorComposite, validate) ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_7$$4); ZVAL_UNDEF(&_8$$6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(validation, phalcon_filter_validation_ce) Z_PARAM_ZVAL(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &validation, &field); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "getvalidators", NULL, 0); zephir_check_call_status(); if (UNEXPECTED(zephir_fast_count_int(&_0) == 0)) { @@ -100,7 +91,7 @@ PHP_METHOD(Phalcon_Filter_Validation_AbstractValidatorComposite, validate) zephir_get_class(&_2$$3, this_ptr, 0); ZEPHIR_INIT_VAR(&_3$$3); ZEPHIR_CONCAT_VS(&_3$$3, &_2$$3, " does not have any validator added"); - ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 32, &_3$$3); + ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 33, &_3$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_1$$3, "phalcon/Filter/Validation/AbstractValidatorComposite.zep", 41); ZEPHIR_MM_RESTORE(); @@ -156,7 +147,8 @@ zend_object *zephir_init_properties_Phalcon_Filter_Validation_AbstractValidatorC ZVAL_UNDEF(&_5$$5); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/filter/validation/validator/alnum.zep.c b/ext/phalcon/filter/validation/validator/alnum.zep.c index d34593ca226..03a5a71188e 100644 --- a/ext/phalcon/filter/validation/validator/alnum.zep.c +++ b/ext/phalcon/filter/validation/validator/alnum.zep.c @@ -83,22 +83,16 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Alnum, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *options_param = NULL; zval options; - zval *this_ptr = getThis(); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -106,9 +100,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Alnum, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - - ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_alnum_ce, getThis(), "__construct", &_0, 0, &options); + ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_alnum_ce, getThis(), "__construct", NULL, 0, &options); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -131,19 +123,13 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Alnum, validate) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3$$4); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(validation, phalcon_filter_validation_ce) Z_PARAM_ZVAL(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &validation, &field); - - ZEPHIR_CALL_METHOD(&value, validation, "getvalue", NULL, 0, field); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_0, this_ptr, "allowempty", NULL, 0, field, &value); @@ -152,7 +138,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Alnum, validate) RETURN_MM_BOOL(1); } zephir_cast_to_string(&_1, &value); - ZEPHIR_CALL_FUNCTION(&_2, "ctype_alnum", NULL, 291, &_1); + ZEPHIR_CALL_FUNCTION(&_2, "ctype_alnum", NULL, 292, &_1); zephir_check_call_status(); if (!(zephir_is_true(&_2))) { ZEPHIR_CALL_METHOD(&_3$$4, this_ptr, "messagefactory", NULL, 0, validation, field); diff --git a/ext/phalcon/filter/validation/validator/alnum.zep.h b/ext/phalcon/filter/validation/validator/alnum.zep.h index 8b919e18cc6..0e9ad037a9e 100644 --- a/ext/phalcon/filter/validation/validator/alnum.zep.h +++ b/ext/phalcon/filter/validation/validator/alnum.zep.h @@ -7,11 +7,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Alnum, __construct); PHP_METHOD(Phalcon_Filter_Validation_Validator_Alnum, validate); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_filter_validation_validator_alnum___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_filter_validation_validator_alnum_validate, 0, 2, _IS_BOOL, 0) diff --git a/ext/phalcon/filter/validation/validator/alpha.zep.c b/ext/phalcon/filter/validation/validator/alpha.zep.c index 5e8a7df752b..76922264018 100644 --- a/ext/phalcon/filter/validation/validator/alpha.zep.c +++ b/ext/phalcon/filter/validation/validator/alpha.zep.c @@ -84,22 +84,16 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Alpha, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *options_param = NULL; zval options; - zval *this_ptr = getThis(); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -107,9 +101,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Alpha, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - - ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_alpha_ce, getThis(), "__construct", &_0, 0, &options); + ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_alpha_ce, getThis(), "__construct", NULL, 0, &options); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -135,19 +127,13 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Alpha, validate) ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_6$$4); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(validation, phalcon_filter_validation_ce) Z_PARAM_ZVAL(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &validation, &field); - - ZEPHIR_CALL_METHOD(&value, validation, "getvalue", NULL, 0, field); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_0, this_ptr, "allowempty", NULL, 0, field, &value); diff --git a/ext/phalcon/filter/validation/validator/alpha.zep.h b/ext/phalcon/filter/validation/validator/alpha.zep.h index aaa916fca67..400af3bdd45 100644 --- a/ext/phalcon/filter/validation/validator/alpha.zep.h +++ b/ext/phalcon/filter/validation/validator/alpha.zep.h @@ -7,11 +7,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Alpha, __construct); PHP_METHOD(Phalcon_Filter_Validation_Validator_Alpha, validate); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_filter_validation_validator_alpha___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_filter_validation_validator_alpha_validate, 0, 2, _IS_BOOL, 0) diff --git a/ext/phalcon/filter/validation/validator/between.zep.c b/ext/phalcon/filter/validation/validator/between.zep.c index 514e98574e5..f95b6cd9b31 100644 --- a/ext/phalcon/filter/validation/validator/between.zep.c +++ b/ext/phalcon/filter/validation/validator/between.zep.c @@ -97,22 +97,16 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Between, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *options_param = NULL; zval options; - zval *this_ptr = getThis(); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -120,9 +114,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Between, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - - ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_between_ce, getThis(), "__construct", &_0, 0, &options); + ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_between_ce, getThis(), "__construct", NULL, 0, &options); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -149,19 +141,13 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Between, validate) ZVAL_UNDEF(&_2$$4); ZVAL_UNDEF(&_3$$5); ZVAL_UNDEF(&_5$$6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(validation, phalcon_filter_validation_ce) Z_PARAM_ZVAL(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &validation, &field); - - ZEPHIR_CALL_METHOD(&value, validation, "getvalue", NULL, 0, field); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_0); diff --git a/ext/phalcon/filter/validation/validator/between.zep.h b/ext/phalcon/filter/validation/validator/between.zep.h index 6add9506384..4f92f0f91bf 100644 --- a/ext/phalcon/filter/validation/validator/between.zep.h +++ b/ext/phalcon/filter/validation/validator/between.zep.h @@ -7,11 +7,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Between, __construct); PHP_METHOD(Phalcon_Filter_Validation_Validator_Between, validate); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_filter_validation_validator_between___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_filter_validation_validator_between_validate, 0, 2, _IS_BOOL, 0) diff --git a/ext/phalcon/filter/validation/validator/callback.zep.c b/ext/phalcon/filter/validation/validator/callback.zep.c index 95bc2931566..6838e947600 100644 --- a/ext/phalcon/filter/validation/validator/callback.zep.c +++ b/ext/phalcon/filter/validation/validator/callback.zep.c @@ -93,22 +93,16 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Callback, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *options_param = NULL; zval options; - zval *this_ptr = getThis(); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -116,9 +110,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Callback, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - - ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_callback_ce, getThis(), "__construct", &_0, 0, &options); + ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_callback_ce, getThis(), "__construct", NULL, 0, &options); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -141,19 +133,13 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Callback, validate) ZVAL_UNDEF(&data); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2$$6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(validation, phalcon_filter_validation_ce) Z_PARAM_ZVAL(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &validation, &field); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "callback"); ZEPHIR_CALL_METHOD(&callback, this_ptr, "getoption", NULL, 0, &_0); @@ -165,7 +151,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Callback, validate) ZEPHIR_CALL_METHOD(&data, validation, "getdata", NULL, 0); zephir_check_call_status(); } - ZEPHIR_CALL_FUNCTION(&returnedValue, "call_user_func", NULL, 187, &callback, &data); + ZEPHIR_CALL_FUNCTION(&returnedValue, "call_user_func", NULL, 188, &callback, &data); zephir_check_call_status(); _1$$3 = Z_TYPE_P(&returnedValue) == IS_OBJECT; if (_1$$3) { diff --git a/ext/phalcon/filter/validation/validator/callback.zep.h b/ext/phalcon/filter/validation/validator/callback.zep.h index ab58aeaf31b..2df7a7f179b 100644 --- a/ext/phalcon/filter/validation/validator/callback.zep.h +++ b/ext/phalcon/filter/validation/validator/callback.zep.h @@ -7,11 +7,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Callback, __construct); PHP_METHOD(Phalcon_Filter_Validation_Validator_Callback, validate); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_filter_validation_validator_callback___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_filter_validation_validator_callback_validate, 0, 2, _IS_BOOL, 0) diff --git a/ext/phalcon/filter/validation/validator/confirmation.zep.c b/ext/phalcon/filter/validation/validator/confirmation.zep.c index 1bfc269ed65..905fa2aca0e 100644 --- a/ext/phalcon/filter/validation/validator/confirmation.zep.c +++ b/ext/phalcon/filter/validation/validator/confirmation.zep.c @@ -91,22 +91,16 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Confirmation, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *options_param = NULL; zval options; - zval *this_ptr = getThis(); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -114,9 +108,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Confirmation, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - - ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_confirmation_ce, getThis(), "__construct", &_0, 0, &options); + ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_confirmation_ce, getThis(), "__construct", NULL, 0, &options); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -147,19 +139,13 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Confirmation, validate) ZVAL_UNDEF(&_6$$5); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(validation, phalcon_filter_validation_ce) Z_PARAM_ZVAL(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &validation, &field); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "with"); ZEPHIR_CALL_METHOD(&fieldWith, this_ptr, "getoption", NULL, 0, &_0); @@ -174,7 +160,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Confirmation, validate) zephir_check_call_status(); zephir_cast_to_string(&_3, &value); zephir_cast_to_string(&_4, &valueWith); - ZEPHIR_CALL_METHOD(&_2, this_ptr, "compare", NULL, 292, &_3, &_4); + ZEPHIR_CALL_METHOD(&_2, this_ptr, "compare", NULL, 293, &_3, &_4); zephir_check_call_status(); if (!(zephir_is_true(&_2))) { ZEPHIR_INIT_VAR(&_5$$4); @@ -221,21 +207,15 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Confirmation, compare) ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$3); ZVAL_UNDEF(&_5$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(a) Z_PARAM_STR(b) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &a_param, &b_param); zephir_get_strval(&a, a_param); zephir_get_strval(&b, b_param); - - ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "ignoreCase"); ZVAL_BOOL(&_2, 0); @@ -257,7 +237,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Confirmation, compare) zephir_check_call_status(); zephir_get_strval(&b, &_5$$3); } - ZEPHIR_CALL_FUNCTION(&_6, "strcmp", NULL, 293, &a, &b); + ZEPHIR_CALL_FUNCTION(&_6, "strcmp", NULL, 294, &a, &b); zephir_check_call_status(); RETURN_MM_BOOL(ZEPHIR_IS_LONG_IDENTICAL(&_6, 0)); } diff --git a/ext/phalcon/filter/validation/validator/confirmation.zep.h b/ext/phalcon/filter/validation/validator/confirmation.zep.h index 62f765d7209..cfb6508d226 100644 --- a/ext/phalcon/filter/validation/validator/confirmation.zep.h +++ b/ext/phalcon/filter/validation/validator/confirmation.zep.h @@ -8,11 +8,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Confirmation, validate); PHP_METHOD(Phalcon_Filter_Validation_Validator_Confirmation, compare); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_filter_validation_validator_confirmation___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_filter_validation_validator_confirmation_validate, 0, 2, _IS_BOOL, 0) diff --git a/ext/phalcon/filter/validation/validator/creditcard.zep.c b/ext/phalcon/filter/validation/validator/creditcard.zep.c index 49128df3724..b7f9d150fc1 100644 --- a/ext/phalcon/filter/validation/validator/creditcard.zep.c +++ b/ext/phalcon/filter/validation/validator/creditcard.zep.c @@ -83,22 +83,16 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_CreditCard, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *options_param = NULL; zval options; - zval *this_ptr = getThis(); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -106,9 +100,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_CreditCard, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - - ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_creditcard_ce, getThis(), "__construct", &_0, 0, &options); + ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_creditcard_ce, getThis(), "__construct", NULL, 0, &options); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -131,19 +123,13 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_CreditCard, validate) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2$$4); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(validation, phalcon_filter_validation_ce) Z_PARAM_ZVAL(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &validation, &field); - - ZEPHIR_CALL_METHOD(&value, validation, "getvalue", NULL, 0, field); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_0, this_ptr, "allowempty", NULL, 0, field, &value); @@ -152,7 +138,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_CreditCard, validate) RETURN_MM_BOOL(1); } zephir_cast_to_string(&_1, &value); - ZEPHIR_CALL_METHOD(&valid, this_ptr, "verifybyluhnalgorithm", NULL, 294, &_1); + ZEPHIR_CALL_METHOD(&valid, this_ptr, "verifybyluhnalgorithm", NULL, 295, &_1); zephir_check_call_status(); if (!(zephir_is_true(&valid))) { ZEPHIR_CALL_METHOD(&_2$$4, this_ptr, "messagefactory", NULL, 0, validation, field); @@ -170,101 +156,94 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_CreditCard, validate) */ PHP_METHOD(Phalcon_Filter_Validation_Validator_CreditCard, verifyByLuhnAlgorithm) { - zend_string *_7; - zend_ulong _6; - zval digits, _1; + zend_string *_5; + zend_ulong _4; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *number_param = NULL, digit, position, hash, result, _0, _2, _3, *_4, _5, _10, _8$$3, _9$$4; + zval *number_param = NULL, digit, digits, position, hash, result, _0, _1, *_2, _3, _8, _6$$4, _7$$5; zval number; - zval *this_ptr = getThis(); ZVAL_UNDEF(&number); ZVAL_UNDEF(&digit); + ZVAL_UNDEF(&digits); ZVAL_UNDEF(&position); ZVAL_UNDEF(&hash); ZVAL_UNDEF(&result); ZVAL_UNDEF(&_0); - ZVAL_UNDEF(&_2); - ZVAL_UNDEF(&_3); - ZVAL_UNDEF(&_5); - ZVAL_UNDEF(&_10); - ZVAL_UNDEF(&_8$$3); - ZVAL_UNDEF(&_9$$4); - ZVAL_UNDEF(&digits); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; + ZVAL_UNDEF(&_3); + ZVAL_UNDEF(&_8); + ZVAL_UNDEF(&_6$$4); + ZVAL_UNDEF(&_7$$5); ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(number) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &number_param); zephir_get_strval(&number, number_param); - - ZEPHIR_INIT_VAR(&hash); ZVAL_STRING(&hash, ""); - ZEPHIR_CALL_FUNCTION(&_0, "str_split", NULL, 87, &number); + ZEPHIR_CALL_FUNCTION(&_0, "ctype_digit", NULL, 296, &number); + zephir_check_call_status(); + if (ZEPHIR_IS_FALSE_IDENTICAL(&_0)) { + RETURN_MM_BOOL(0); + } + ZEPHIR_CALL_FUNCTION(&_1, "str_split", NULL, 88, &number); zephir_check_call_status(); - zephir_get_arrval(&_1, &_0); - ZEPHIR_CPY_WRT(&digits, &_1); - ZEPHIR_CALL_FUNCTION(&_3, "array_reverse", NULL, 295, &digits); + ZEPHIR_CALL_FUNCTION(&digits, "array_reverse", NULL, 297, &_1); zephir_check_call_status(); - zephir_is_iterable(&_3, 0, "phalcon/Filter/Validation/Validator/CreditCard.zep", 109); - if (Z_TYPE_P(&_3) == IS_ARRAY) { - ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&_3), _6, _7, _4) + zephir_is_iterable(&digits, 0, "phalcon/Filter/Validation/Validator/CreditCard.zep", 112); + if (Z_TYPE_P(&digits) == IS_ARRAY) { + ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&digits), _4, _5, _2) { ZEPHIR_INIT_NVAR(&position); - if (_7 != NULL) { - ZVAL_STR_COPY(&position, _7); + if (_5 != NULL) { + ZVAL_STR_COPY(&position, _5); } else { - ZVAL_LONG(&position, _6); + ZVAL_LONG(&position, _4); } ZEPHIR_INIT_NVAR(&digit); - ZVAL_COPY(&digit, _4); - ZEPHIR_INIT_NVAR(&_8$$3); + ZVAL_COPY(&digit, _2); + ZEPHIR_INIT_NVAR(&_6$$4); if (zephir_safe_mod_zval_long(&position, 2)) { - ZEPHIR_INIT_NVAR(&_8$$3); - ZVAL_LONG(&_8$$3, (zephir_get_numberval(&digit) * 2)); + ZEPHIR_INIT_NVAR(&_6$$4); + ZVAL_LONG(&_6$$4, (zephir_get_numberval(&digit) * 2)); } else { - ZEPHIR_CPY_WRT(&_8$$3, &digit); + ZEPHIR_CPY_WRT(&_6$$4, &digit); } - zephir_concat_self(&hash, &_8$$3); + zephir_concat_self(&hash, &_6$$4); } ZEND_HASH_FOREACH_END(); } else { - ZEPHIR_CALL_METHOD(NULL, &_3, "rewind", NULL, 0); + ZEPHIR_CALL_METHOD(NULL, &digits, "rewind", NULL, 0); zephir_check_call_status(); while (1) { - ZEPHIR_CALL_METHOD(&_5, &_3, "valid", NULL, 0); + ZEPHIR_CALL_METHOD(&_3, &digits, "valid", NULL, 0); zephir_check_call_status(); - if (!zend_is_true(&_5)) { + if (!zend_is_true(&_3)) { break; } - ZEPHIR_CALL_METHOD(&position, &_3, "key", NULL, 0); + ZEPHIR_CALL_METHOD(&position, &digits, "key", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&digit, &_3, "current", NULL, 0); + ZEPHIR_CALL_METHOD(&digit, &digits, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_9$$4); + ZEPHIR_INIT_NVAR(&_7$$5); if (zephir_safe_mod_zval_long(&position, 2)) { - ZEPHIR_INIT_NVAR(&_9$$4); - ZVAL_LONG(&_9$$4, (zephir_get_numberval(&digit) * 2)); + ZEPHIR_INIT_NVAR(&_7$$5); + ZVAL_LONG(&_7$$5, (zephir_get_numberval(&digit) * 2)); } else { - ZEPHIR_CPY_WRT(&_9$$4, &digit); + ZEPHIR_CPY_WRT(&_7$$5, &digit); } - zephir_concat_self(&hash, &_9$$4); - ZEPHIR_CALL_METHOD(NULL, &_3, "next", NULL, 0); + zephir_concat_self(&hash, &_7$$5); + ZEPHIR_CALL_METHOD(NULL, &digits, "next", NULL, 0); zephir_check_call_status(); } } ZEPHIR_INIT_NVAR(&digit); ZEPHIR_INIT_NVAR(&position); - ZEPHIR_CALL_FUNCTION(&_10, "str_split", NULL, 87, &hash); + ZEPHIR_CALL_FUNCTION(&_8, "str_split", NULL, 88, &hash); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&result, "array_sum", NULL, 296, &_10); + ZEPHIR_CALL_FUNCTION(&result, "array_sum", NULL, 298, &_8); zephir_check_call_status(); RETURN_MM_BOOL((zephir_safe_mod_zval_long(&result, 10) == 0)); } diff --git a/ext/phalcon/filter/validation/validator/creditcard.zep.h b/ext/phalcon/filter/validation/validator/creditcard.zep.h index e6e7b66527d..52463ca8b03 100644 --- a/ext/phalcon/filter/validation/validator/creditcard.zep.h +++ b/ext/phalcon/filter/validation/validator/creditcard.zep.h @@ -8,11 +8,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_CreditCard, validate); PHP_METHOD(Phalcon_Filter_Validation_Validator_CreditCard, verifyByLuhnAlgorithm); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_filter_validation_validator_creditcard___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_filter_validation_validator_creditcard_validate, 0, 2, _IS_BOOL, 0) diff --git a/ext/phalcon/filter/validation/validator/date.zep.c b/ext/phalcon/filter/validation/validator/date.zep.c index 6ffdd1b9452..99a0ec04042 100644 --- a/ext/phalcon/filter/validation/validator/date.zep.c +++ b/ext/phalcon/filter/validation/validator/date.zep.c @@ -90,22 +90,16 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Date, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *options_param = NULL; zval options; - zval *this_ptr = getThis(); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -113,9 +107,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Date, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - - ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_date_ce, getThis(), "__construct", &_0, 0, &options); + ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_date_ce, getThis(), "__construct", NULL, 0, &options); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -139,19 +131,13 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Date, validate) ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_2$$4); ZVAL_UNDEF(&_4$$6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(validation, phalcon_filter_validation_ce) Z_PARAM_ZVAL(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &validation, &field); - - ZEPHIR_CALL_METHOD(&value, validation, "getvalue", NULL, 0, field); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_0, this_ptr, "allowempty", NULL, 0, field, &value); @@ -171,7 +157,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Date, validate) ZEPHIR_INIT_NVAR(&format); ZVAL_STRING(&format, "Y-m-d"); } - ZEPHIR_CALL_METHOD(&_3, this_ptr, "checkdate", NULL, 297, &value, &format); + ZEPHIR_CALL_METHOD(&_3, this_ptr, "checkdate", NULL, 299, &value, &format); zephir_check_call_status(); if (!(zephir_is_true(&_3))) { ZEPHIR_CALL_METHOD(&_4$$6, this_ptr, "messagefactory", NULL, 0, validation, field); @@ -190,7 +176,6 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Date, checkDate) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *value, value_sub, *format, format_sub, date, errors, _3, _5; - zval *this_ptr = getThis(); ZVAL_UNDEF(&value_sub); ZVAL_UNDEF(&format_sub); @@ -198,19 +183,13 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Date, checkDate) ZVAL_UNDEF(&errors); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ZVAL(value) Z_PARAM_ZVAL(format) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &value, &format); - - if (!(Z_TYPE_P(value) == IS_STRING)) { RETURN_MM_BOOL(0); } diff --git a/ext/phalcon/filter/validation/validator/date.zep.h b/ext/phalcon/filter/validation/validator/date.zep.h index b5ee2202cd0..76318a43a05 100644 --- a/ext/phalcon/filter/validation/validator/date.zep.h +++ b/ext/phalcon/filter/validation/validator/date.zep.h @@ -8,11 +8,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Date, validate); PHP_METHOD(Phalcon_Filter_Validation_Validator_Date, checkDate); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_filter_validation_validator_date___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_filter_validation_validator_date_validate, 0, 2, _IS_BOOL, 0) diff --git a/ext/phalcon/filter/validation/validator/digit.zep.c b/ext/phalcon/filter/validation/validator/digit.zep.c index cce3f6f3daa..99a87e8e44f 100644 --- a/ext/phalcon/filter/validation/validator/digit.zep.c +++ b/ext/phalcon/filter/validation/validator/digit.zep.c @@ -83,22 +83,16 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Digit, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *options_param = NULL; zval options; - zval *this_ptr = getThis(); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -106,9 +100,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Digit, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - - ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_digit_ce, getThis(), "__construct", &_0, 0, &options); + ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_digit_ce, getThis(), "__construct", NULL, 0, &options); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -132,19 +124,13 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Digit, validate) ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(validation, phalcon_filter_validation_ce) Z_PARAM_ZVAL(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &validation, &field); - - ZEPHIR_CALL_METHOD(&value, validation, "getvalue", NULL, 0, field); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_0, this_ptr, "allowempty", NULL, 0, field, &value); @@ -155,7 +141,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Digit, validate) _1 = Z_TYPE_P(&value) == IS_LONG; if (!(_1)) { zephir_cast_to_string(&_2, &value); - ZEPHIR_CALL_FUNCTION(&_3, "ctype_digit", NULL, 298, &_2); + ZEPHIR_CALL_FUNCTION(&_3, "ctype_digit", NULL, 296, &_2); zephir_check_call_status(); _1 = zephir_is_true(&_3); } diff --git a/ext/phalcon/filter/validation/validator/digit.zep.h b/ext/phalcon/filter/validation/validator/digit.zep.h index 19d30e03687..b1b0c7b890e 100644 --- a/ext/phalcon/filter/validation/validator/digit.zep.h +++ b/ext/phalcon/filter/validation/validator/digit.zep.h @@ -7,11 +7,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Digit, __construct); PHP_METHOD(Phalcon_Filter_Validation_Validator_Digit, validate); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_filter_validation_validator_digit___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_filter_validation_validator_digit_validate, 0, 2, _IS_BOOL, 0) diff --git a/ext/phalcon/filter/validation/validator/email.zep.c b/ext/phalcon/filter/validation/validator/email.zep.c index c78b3afc66a..f5b1fcf079b 100644 --- a/ext/phalcon/filter/validation/validator/email.zep.c +++ b/ext/phalcon/filter/validation/validator/email.zep.c @@ -83,22 +83,16 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Email, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *options_param = NULL; zval options; - zval *this_ptr = getThis(); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -106,9 +100,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Email, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - - ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_email_ce, getThis(), "__construct", &_0, 0, &options); + ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_email_ce, getThis(), "__construct", NULL, 0, &options); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -130,19 +122,13 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Email, validate) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(validation, phalcon_filter_validation_ce) Z_PARAM_ZVAL(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &validation, &field); - - ZEPHIR_CALL_METHOD(&value, validation, "getvalue", NULL, 0, field); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_0, this_ptr, "allowempty", NULL, 0, field, &value); @@ -151,7 +137,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Email, validate) RETURN_MM_BOOL(1); } ZVAL_LONG(&_1, 274); - ZEPHIR_CALL_FUNCTION(&_2, "filter_var", NULL, 282, &value, &_1); + ZEPHIR_CALL_FUNCTION(&_2, "filter_var", NULL, 283, &value, &_1); zephir_check_call_status(); if (!(zephir_is_true(&_2))) { ZEPHIR_CALL_METHOD(&_3$$4, this_ptr, "messagefactory", NULL, 0, validation, field); diff --git a/ext/phalcon/filter/validation/validator/email.zep.h b/ext/phalcon/filter/validation/validator/email.zep.h index fb525939d5a..fa26240c1ed 100644 --- a/ext/phalcon/filter/validation/validator/email.zep.h +++ b/ext/phalcon/filter/validation/validator/email.zep.h @@ -7,11 +7,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Email, __construct); PHP_METHOD(Phalcon_Filter_Validation_Validator_Email, validate); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_filter_validation_validator_email___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_filter_validation_validator_email_validate, 0, 2, _IS_BOOL, 0) diff --git a/ext/phalcon/filter/validation/validator/exclusionin.zep.c b/ext/phalcon/filter/validation/validator/exclusionin.zep.c index d29c6da1bb5..d88b7f288fe 100644 --- a/ext/phalcon/filter/validation/validator/exclusionin.zep.c +++ b/ext/phalcon/filter/validation/validator/exclusionin.zep.c @@ -98,22 +98,16 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_ExclusionIn, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *options_param = NULL; zval options; - zval *this_ptr = getThis(); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -121,9 +115,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_ExclusionIn, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - - ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_exclusionin_ce, getThis(), "__construct", &_0, 0, &options); + ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_exclusionin_ce, getThis(), "__construct", NULL, 0, &options); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -153,19 +145,13 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_ExclusionIn, validate) ZVAL_UNDEF(&_4$$8); ZVAL_UNDEF(&_6$$10); ZVAL_UNDEF(&_7$$10); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(validation, phalcon_filter_validation_ce) Z_PARAM_ZVAL(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &validation, &field); - - ZEPHIR_CALL_METHOD(&value, validation, "getvalue", NULL, 0, field); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_0, this_ptr, "allowempty", NULL, 0, field, &value); @@ -177,7 +163,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_ExclusionIn, validate) ZVAL_STRING(&_1, "domain"); ZEPHIR_CALL_METHOD(&domain, this_ptr, "getoption", NULL, 0, &_1); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&fieldDomain); + zephir_memory_observe(&fieldDomain); if (zephir_array_isset_fetch(&fieldDomain, &domain, field, 0)) { if (Z_TYPE_P(&fieldDomain) == IS_ARRAY) { ZEPHIR_CPY_WRT(&domain, &fieldDomain); @@ -207,7 +193,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_ExclusionIn, validate) return; } } - ZEPHIR_CALL_FUNCTION(&_5, "in_array", NULL, 299, &value, &domain, &strict); + ZEPHIR_CALL_FUNCTION(&_5, "in_array", NULL, 300, &value, &domain, &strict); zephir_check_call_status(); if (zephir_is_true(&_5)) { ZEPHIR_INIT_VAR(&replacePairs); diff --git a/ext/phalcon/filter/validation/validator/exclusionin.zep.h b/ext/phalcon/filter/validation/validator/exclusionin.zep.h index 25b7a54660d..7b8515cdd9f 100644 --- a/ext/phalcon/filter/validation/validator/exclusionin.zep.h +++ b/ext/phalcon/filter/validation/validator/exclusionin.zep.h @@ -7,11 +7,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_ExclusionIn, __construct); PHP_METHOD(Phalcon_Filter_Validation_Validator_ExclusionIn, validate); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_filter_validation_validator_exclusionin___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_filter_validation_validator_exclusionin_validate, 0, 2, _IS_BOOL, 0) diff --git a/ext/phalcon/filter/validation/validator/file.zep.c b/ext/phalcon/filter/validation/validator/file.zep.c index 7f6ae2e5c3e..3c8455670ae 100644 --- a/ext/phalcon/filter/validation/validator/file.zep.c +++ b/ext/phalcon/filter/validation/validator/file.zep.c @@ -139,7 +139,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File, __construct) zend_string *_6; zend_ulong _5; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zephir_fcall_cache_entry *_9 = NULL, *_18 = NULL, *_27 = NULL, *_30 = NULL, *_33 = NULL, *_34 = NULL, *_35 = NULL, *_36 = NULL, *_59 = NULL; + zephir_fcall_cache_entry *_9 = NULL, *_18 = NULL, *_27 = NULL, *_30 = NULL, *_33 = NULL, *_34 = NULL, *_35 = NULL, *_36 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *options_param = NULL, helper, included, key, message, messageFileEmpty, messageIniSize, messageValid, validator, value, *_3, _4, _0$$3, _1$$4, _2$$5, _7$$6, _8$$6, _10$$6, _11$$6, _12$$6, _13$$6, _14$$6, _15$$6, _16$$7, _19$$8, _21$$9, _23$$10, _25$$11, _28$$12, _31$$13, _37$$18, _38$$18, _39$$18, _40$$18, _41$$18, _42$$18, _43$$18, _44$$18, _45$$19, _47$$20, _49$$21, _51$$22, _53$$23, _55$$24, _57$$25; zval options, _17$$7, _20$$8, _22$$9, _24$$10, _26$$11, _29$$12, _32$$13, _46$$19, _48$$20, _50$$21, _52$$22, _54$$23, _56$$24, _58$$25; @@ -203,16 +203,12 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File, __construct) ZVAL_UNDEF(&_53$$23); ZVAL_UNDEF(&_55$$24); ZVAL_UNDEF(&_57$$25); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -220,8 +216,6 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - ZEPHIR_INIT_VAR(&included); ZVAL_NULL(&included); ZEPHIR_INIT_VAR(&message); @@ -242,21 +236,21 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File, __construct) if (zephir_array_isset_string(&options, SL("messageFileEmpty"))) { ZEPHIR_INIT_VAR(&_0$$3); ZVAL_STRING(&_0$$3, "messageFileEmpty"); - ZEPHIR_CALL_METHOD(&messageFileEmpty, &helper, "__invoke", NULL, 158, &options, &_0$$3); + ZEPHIR_CALL_METHOD(&messageFileEmpty, &helper, "__invoke", NULL, 159, &options, &_0$$3); zephir_check_call_status(); zephir_array_unset_string(&options, SL("messageFileEmpty"), PH_SEPARATE); } if (zephir_array_isset_string(&options, SL("messageIniSize"))) { ZEPHIR_INIT_VAR(&_1$$4); ZVAL_STRING(&_1$$4, "messageIniSize"); - ZEPHIR_CALL_METHOD(&messageIniSize, &helper, "__invoke", NULL, 158, &options, &_1$$4); + ZEPHIR_CALL_METHOD(&messageIniSize, &helper, "__invoke", NULL, 159, &options, &_1$$4); zephir_check_call_status(); zephir_array_unset_string(&options, SL("messageIniSize"), PH_SEPARATE); } if (zephir_array_isset_string(&options, SL("messageValid"))) { ZEPHIR_INIT_VAR(&_2$$5); ZVAL_STRING(&_2$$5, "messageValid"); - ZEPHIR_CALL_METHOD(&messageValid, &helper, "__invoke", NULL, 158, &options, &_2$$5); + ZEPHIR_CALL_METHOD(&messageValid, &helper, "__invoke", NULL, 159, &options, &_2$$5); zephir_check_call_status(); zephir_array_unset_string(&options, SL("messageValid"), PH_SEPARATE); } @@ -274,40 +268,40 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File, __construct) ZVAL_COPY(&value, _3); ZEPHIR_INIT_NVAR(&_7$$6); ZVAL_STRING(&_7$$6, "minSize"); - ZEPHIR_CALL_FUNCTION(&_8$$6, "strcasecmp", &_9, 38, &key, &_7$$6); + ZEPHIR_CALL_FUNCTION(&_8$$6, "strcasecmp", &_9, 39, &key, &_7$$6); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_7$$6); ZVAL_STRING(&_7$$6, "maxSize"); - ZEPHIR_CALL_FUNCTION(&_10$$6, "strcasecmp", &_9, 38, &key, &_7$$6); + ZEPHIR_CALL_FUNCTION(&_10$$6, "strcasecmp", &_9, 39, &key, &_7$$6); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_7$$6); ZVAL_STRING(&_7$$6, "equalSize"); - ZEPHIR_CALL_FUNCTION(&_11$$6, "strcasecmp", &_9, 38, &key, &_7$$6); + ZEPHIR_CALL_FUNCTION(&_11$$6, "strcasecmp", &_9, 39, &key, &_7$$6); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_7$$6); ZVAL_STRING(&_7$$6, "allowedTypes"); - ZEPHIR_CALL_FUNCTION(&_12$$6, "strcasecmp", &_9, 38, &key, &_7$$6); + ZEPHIR_CALL_FUNCTION(&_12$$6, "strcasecmp", &_9, 39, &key, &_7$$6); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_7$$6); ZVAL_STRING(&_7$$6, "maxResolution"); - ZEPHIR_CALL_FUNCTION(&_13$$6, "strcasecmp", &_9, 38, &key, &_7$$6); + ZEPHIR_CALL_FUNCTION(&_13$$6, "strcasecmp", &_9, 39, &key, &_7$$6); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_7$$6); ZVAL_STRING(&_7$$6, "minResolution"); - ZEPHIR_CALL_FUNCTION(&_14$$6, "strcasecmp", &_9, 38, &key, &_7$$6); + ZEPHIR_CALL_FUNCTION(&_14$$6, "strcasecmp", &_9, 39, &key, &_7$$6); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_7$$6); ZVAL_STRING(&_7$$6, "equalResolution"); - ZEPHIR_CALL_FUNCTION(&_15$$6, "strcasecmp", &_9, 38, &key, &_7$$6); + ZEPHIR_CALL_FUNCTION(&_15$$6, "strcasecmp", &_9, 39, &key, &_7$$6); zephir_check_call_status(); if (ZEPHIR_IS_LONG_IDENTICAL(&_8$$6, 0)) { ZEPHIR_INIT_NVAR(&_16$$7); ZVAL_STRING(&_16$$7, "messageMinSize"); - ZEPHIR_CALL_METHOD(&message, &helper, "__invoke", NULL, 158, &options, &_16$$7); + ZEPHIR_CALL_METHOD(&message, &helper, "__invoke", NULL, 159, &options, &_16$$7); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_16$$7); ZVAL_STRING(&_16$$7, "includedMinSize"); - ZEPHIR_CALL_METHOD(&included, &helper, "__invoke", NULL, 158, &options, &_16$$7); + ZEPHIR_CALL_METHOD(&included, &helper, "__invoke", NULL, 159, &options, &_16$$7); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&validator); object_init_ex(&validator, phalcon_filter_validation_validator_file_size_min_ce); @@ -316,18 +310,18 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File, __construct) zephir_array_update_string(&_17$$7, SL("size"), &value, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_17$$7, SL("message"), &message, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_17$$7, SL("included"), &included, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_18, 300, &_17$$7); + ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_18, 301, &_17$$7); zephir_check_call_status(); zephir_array_unset_string(&options, SL("messageMinSize"), PH_SEPARATE); zephir_array_unset_string(&options, SL("includedMinSize"), PH_SEPARATE); } else if (ZEPHIR_IS_LONG_IDENTICAL(&_10$$6, 0)) { ZEPHIR_INIT_NVAR(&_19$$8); ZVAL_STRING(&_19$$8, "messageSize"); - ZEPHIR_CALL_METHOD(&message, &helper, "__invoke", NULL, 158, &options, &_19$$8); + ZEPHIR_CALL_METHOD(&message, &helper, "__invoke", NULL, 159, &options, &_19$$8); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_19$$8); ZVAL_STRING(&_19$$8, "includedSize"); - ZEPHIR_CALL_METHOD(&included, &helper, "__invoke", NULL, 158, &options, &_19$$8); + ZEPHIR_CALL_METHOD(&included, &helper, "__invoke", NULL, 159, &options, &_19$$8); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&validator); object_init_ex(&validator, phalcon_filter_validation_validator_file_size_max_ce); @@ -336,7 +330,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File, __construct) zephir_array_update_string(&_20$$8, SL("size"), &value, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_20$$8, SL("message"), &message, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_20$$8, SL("included"), &included, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_18, 300, &_20$$8); + ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_18, 301, &_20$$8); zephir_check_call_status(); zephir_array_unset_string(&options, SL("maxSize"), PH_SEPARATE); zephir_array_unset_string(&options, SL("messageSize"), PH_SEPARATE); @@ -344,7 +338,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File, __construct) } else if (ZEPHIR_IS_LONG_IDENTICAL(&_11$$6, 0)) { ZEPHIR_INIT_NVAR(&_21$$9); ZVAL_STRING(&_21$$9, "messageEqualSize"); - ZEPHIR_CALL_METHOD(&message, &helper, "__invoke", NULL, 158, &options, &_21$$9); + ZEPHIR_CALL_METHOD(&message, &helper, "__invoke", NULL, 159, &options, &_21$$9); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&validator); object_init_ex(&validator, phalcon_filter_validation_validator_file_size_equal_ce); @@ -352,14 +346,14 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File, __construct) zephir_create_array(&_22$$9, 2, 0); zephir_array_update_string(&_22$$9, SL("size"), &value, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_22$$9, SL("message"), &message, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_18, 300, &_22$$9); + ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_18, 301, &_22$$9); zephir_check_call_status(); zephir_array_unset_string(&options, SL("equalSize"), PH_SEPARATE); zephir_array_unset_string(&options, SL("messageEqualSize"), PH_SEPARATE); } else if (ZEPHIR_IS_LONG_IDENTICAL(&_12$$6, 0)) { ZEPHIR_INIT_NVAR(&_23$$10); ZVAL_STRING(&_23$$10, "messageType"); - ZEPHIR_CALL_METHOD(&message, &helper, "__invoke", NULL, 158, &options, &_23$$10); + ZEPHIR_CALL_METHOD(&message, &helper, "__invoke", NULL, 159, &options, &_23$$10); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&validator); object_init_ex(&validator, phalcon_filter_validation_validator_file_mimetype_ce); @@ -367,18 +361,18 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File, __construct) zephir_create_array(&_24$$10, 2, 0); zephir_array_update_string(&_24$$10, SL("types"), &value, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_24$$10, SL("message"), &message, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_18, 300, &_24$$10); + ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_18, 301, &_24$$10); zephir_check_call_status(); zephir_array_unset_string(&options, SL("allowedTypes"), PH_SEPARATE); zephir_array_unset_string(&options, SL("messageType"), PH_SEPARATE); } else if (ZEPHIR_IS_LONG_IDENTICAL(&_13$$6, 0)) { ZEPHIR_INIT_NVAR(&_25$$11); ZVAL_STRING(&_25$$11, "messageMaxResolution"); - ZEPHIR_CALL_METHOD(&message, &helper, "__invoke", NULL, 158, &options, &_25$$11); + ZEPHIR_CALL_METHOD(&message, &helper, "__invoke", NULL, 159, &options, &_25$$11); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_25$$11); ZVAL_STRING(&_25$$11, "includedMaxResolution"); - ZEPHIR_CALL_METHOD(&included, &helper, "__invoke", NULL, 158, &options, &_25$$11); + ZEPHIR_CALL_METHOD(&included, &helper, "__invoke", NULL, 159, &options, &_25$$11); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&validator); object_init_ex(&validator, phalcon_filter_validation_validator_file_resolution_max_ce); @@ -387,7 +381,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File, __construct) zephir_array_update_string(&_26$$11, SL("resolution"), &value, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_26$$11, SL("included"), &included, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_26$$11, SL("message"), &message, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_27, 301, &_26$$11); + ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_27, 302, &_26$$11); zephir_check_call_status(); zephir_array_unset_string(&options, SL("maxResolution"), PH_SEPARATE); zephir_array_unset_string(&options, SL("includedMaxResolution"), PH_SEPARATE); @@ -395,11 +389,11 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File, __construct) } else if (ZEPHIR_IS_LONG_IDENTICAL(&_14$$6, 0)) { ZEPHIR_INIT_NVAR(&_28$$12); ZVAL_STRING(&_28$$12, "messageMinResolution"); - ZEPHIR_CALL_METHOD(&message, &helper, "__invoke", NULL, 158, &options, &_28$$12); + ZEPHIR_CALL_METHOD(&message, &helper, "__invoke", NULL, 159, &options, &_28$$12); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_28$$12); ZVAL_STRING(&_28$$12, "includedMinResolution"); - ZEPHIR_CALL_METHOD(&included, &helper, "__invoke", NULL, 158, &options, &_28$$12); + ZEPHIR_CALL_METHOD(&included, &helper, "__invoke", NULL, 159, &options, &_28$$12); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&validator); object_init_ex(&validator, phalcon_filter_validation_validator_file_resolution_min_ce); @@ -408,7 +402,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File, __construct) zephir_array_update_string(&_29$$12, SL("resolution"), &value, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_29$$12, SL("included"), &included, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_29$$12, SL("message"), &message, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_30, 302, &_29$$12); + ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_30, 303, &_29$$12); zephir_check_call_status(); zephir_array_unset_string(&options, SL("minResolution"), PH_SEPARATE); zephir_array_unset_string(&options, SL("includedMinResolution"), PH_SEPARATE); @@ -416,7 +410,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File, __construct) } else if (ZEPHIR_IS_LONG_IDENTICAL(&_15$$6, 0)) { ZEPHIR_INIT_NVAR(&_31$$13); ZVAL_STRING(&_31$$13, "messageEqualResolution"); - ZEPHIR_CALL_METHOD(&message, &helper, "__invoke", NULL, 158, &options, &_31$$13); + ZEPHIR_CALL_METHOD(&message, &helper, "__invoke", NULL, 159, &options, &_31$$13); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&validator); object_init_ex(&validator, phalcon_filter_validation_validator_file_resolution_equal_ce); @@ -424,7 +418,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File, __construct) zephir_create_array(&_32$$13, 2, 0); zephir_array_update_string(&_32$$13, SL("resolution"), &value, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_32$$13, SL("message"), &message, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_33, 303, &_32$$13); + ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_33, 304, &_32$$13); zephir_check_call_status(); zephir_array_unset_string(&options, SL("equalResolution"), PH_SEPARATE); zephir_array_unset_string(&options, SL("messageEqualResolution"), PH_SEPARATE); @@ -432,15 +426,15 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File, __construct) continue; } if (Z_TYPE_P(&messageFileEmpty) != IS_NULL) { - ZEPHIR_CALL_METHOD(NULL, &validator, "setmessagefileempty", &_34, 304, &messageFileEmpty); + ZEPHIR_CALL_METHOD(NULL, &validator, "setmessagefileempty", &_34, 305, &messageFileEmpty); zephir_check_call_status(); } if (Z_TYPE_P(&messageIniSize) != IS_NULL) { - ZEPHIR_CALL_METHOD(NULL, &validator, "setmessageinisize", &_35, 305, &messageIniSize); + ZEPHIR_CALL_METHOD(NULL, &validator, "setmessageinisize", &_35, 306, &messageIniSize); zephir_check_call_status(); } if (Z_TYPE_P(&messageValid) != IS_NULL) { - ZEPHIR_CALL_METHOD(NULL, &validator, "setmessagevalid", &_36, 306, &messageValid); + ZEPHIR_CALL_METHOD(NULL, &validator, "setmessagevalid", &_36, 307, &messageValid); zephir_check_call_status(); } zephir_update_property_array_append(this_ptr, SL("validators"), &validator); @@ -460,40 +454,40 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File, __construct) zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_37$$18); ZVAL_STRING(&_37$$18, "minSize"); - ZEPHIR_CALL_FUNCTION(&_38$$18, "strcasecmp", &_9, 38, &key, &_37$$18); + ZEPHIR_CALL_FUNCTION(&_38$$18, "strcasecmp", &_9, 39, &key, &_37$$18); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_37$$18); ZVAL_STRING(&_37$$18, "maxSize"); - ZEPHIR_CALL_FUNCTION(&_39$$18, "strcasecmp", &_9, 38, &key, &_37$$18); + ZEPHIR_CALL_FUNCTION(&_39$$18, "strcasecmp", &_9, 39, &key, &_37$$18); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_37$$18); ZVAL_STRING(&_37$$18, "equalSize"); - ZEPHIR_CALL_FUNCTION(&_40$$18, "strcasecmp", &_9, 38, &key, &_37$$18); + ZEPHIR_CALL_FUNCTION(&_40$$18, "strcasecmp", &_9, 39, &key, &_37$$18); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_37$$18); ZVAL_STRING(&_37$$18, "allowedTypes"); - ZEPHIR_CALL_FUNCTION(&_41$$18, "strcasecmp", &_9, 38, &key, &_37$$18); + ZEPHIR_CALL_FUNCTION(&_41$$18, "strcasecmp", &_9, 39, &key, &_37$$18); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_37$$18); ZVAL_STRING(&_37$$18, "maxResolution"); - ZEPHIR_CALL_FUNCTION(&_42$$18, "strcasecmp", &_9, 38, &key, &_37$$18); + ZEPHIR_CALL_FUNCTION(&_42$$18, "strcasecmp", &_9, 39, &key, &_37$$18); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_37$$18); ZVAL_STRING(&_37$$18, "minResolution"); - ZEPHIR_CALL_FUNCTION(&_43$$18, "strcasecmp", &_9, 38, &key, &_37$$18); + ZEPHIR_CALL_FUNCTION(&_43$$18, "strcasecmp", &_9, 39, &key, &_37$$18); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_37$$18); ZVAL_STRING(&_37$$18, "equalResolution"); - ZEPHIR_CALL_FUNCTION(&_44$$18, "strcasecmp", &_9, 38, &key, &_37$$18); + ZEPHIR_CALL_FUNCTION(&_44$$18, "strcasecmp", &_9, 39, &key, &_37$$18); zephir_check_call_status(); if (ZEPHIR_IS_LONG_IDENTICAL(&_38$$18, 0)) { ZEPHIR_INIT_NVAR(&_45$$19); ZVAL_STRING(&_45$$19, "messageMinSize"); - ZEPHIR_CALL_METHOD(&message, &helper, "__invoke", NULL, 158, &options, &_45$$19); + ZEPHIR_CALL_METHOD(&message, &helper, "__invoke", NULL, 159, &options, &_45$$19); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_45$$19); ZVAL_STRING(&_45$$19, "includedMinSize"); - ZEPHIR_CALL_METHOD(&included, &helper, "__invoke", NULL, 158, &options, &_45$$19); + ZEPHIR_CALL_METHOD(&included, &helper, "__invoke", NULL, 159, &options, &_45$$19); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&validator); object_init_ex(&validator, phalcon_filter_validation_validator_file_size_min_ce); @@ -502,18 +496,18 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File, __construct) zephir_array_update_string(&_46$$19, SL("size"), &value, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_46$$19, SL("message"), &message, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_46$$19, SL("included"), &included, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_33, 303, &_46$$19); + ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_33, 304, &_46$$19); zephir_check_call_status(); zephir_array_unset_string(&options, SL("messageMinSize"), PH_SEPARATE); zephir_array_unset_string(&options, SL("includedMinSize"), PH_SEPARATE); } else if (ZEPHIR_IS_LONG_IDENTICAL(&_39$$18, 0)) { ZEPHIR_INIT_NVAR(&_47$$20); ZVAL_STRING(&_47$$20, "messageSize"); - ZEPHIR_CALL_METHOD(&message, &helper, "__invoke", NULL, 158, &options, &_47$$20); + ZEPHIR_CALL_METHOD(&message, &helper, "__invoke", NULL, 159, &options, &_47$$20); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_47$$20); ZVAL_STRING(&_47$$20, "includedSize"); - ZEPHIR_CALL_METHOD(&included, &helper, "__invoke", NULL, 158, &options, &_47$$20); + ZEPHIR_CALL_METHOD(&included, &helper, "__invoke", NULL, 159, &options, &_47$$20); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&validator); object_init_ex(&validator, phalcon_filter_validation_validator_file_size_max_ce); @@ -522,7 +516,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File, __construct) zephir_array_update_string(&_48$$20, SL("size"), &value, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_48$$20, SL("message"), &message, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_48$$20, SL("included"), &included, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_33, 303, &_48$$20); + ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_33, 304, &_48$$20); zephir_check_call_status(); zephir_array_unset_string(&options, SL("maxSize"), PH_SEPARATE); zephir_array_unset_string(&options, SL("messageSize"), PH_SEPARATE); @@ -530,7 +524,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File, __construct) } else if (ZEPHIR_IS_LONG_IDENTICAL(&_40$$18, 0)) { ZEPHIR_INIT_NVAR(&_49$$21); ZVAL_STRING(&_49$$21, "messageEqualSize"); - ZEPHIR_CALL_METHOD(&message, &helper, "__invoke", NULL, 158, &options, &_49$$21); + ZEPHIR_CALL_METHOD(&message, &helper, "__invoke", NULL, 159, &options, &_49$$21); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&validator); object_init_ex(&validator, phalcon_filter_validation_validator_file_size_equal_ce); @@ -538,14 +532,14 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File, __construct) zephir_create_array(&_50$$21, 2, 0); zephir_array_update_string(&_50$$21, SL("size"), &value, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_50$$21, SL("message"), &message, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_33, 303, &_50$$21); + ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_33, 304, &_50$$21); zephir_check_call_status(); zephir_array_unset_string(&options, SL("equalSize"), PH_SEPARATE); zephir_array_unset_string(&options, SL("messageEqualSize"), PH_SEPARATE); } else if (ZEPHIR_IS_LONG_IDENTICAL(&_41$$18, 0)) { ZEPHIR_INIT_NVAR(&_51$$22); ZVAL_STRING(&_51$$22, "messageType"); - ZEPHIR_CALL_METHOD(&message, &helper, "__invoke", NULL, 158, &options, &_51$$22); + ZEPHIR_CALL_METHOD(&message, &helper, "__invoke", NULL, 159, &options, &_51$$22); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&validator); object_init_ex(&validator, phalcon_filter_validation_validator_file_mimetype_ce); @@ -553,18 +547,18 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File, __construct) zephir_create_array(&_52$$22, 2, 0); zephir_array_update_string(&_52$$22, SL("types"), &value, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_52$$22, SL("message"), &message, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_33, 303, &_52$$22); + ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_33, 304, &_52$$22); zephir_check_call_status(); zephir_array_unset_string(&options, SL("allowedTypes"), PH_SEPARATE); zephir_array_unset_string(&options, SL("messageType"), PH_SEPARATE); } else if (ZEPHIR_IS_LONG_IDENTICAL(&_42$$18, 0)) { ZEPHIR_INIT_NVAR(&_53$$23); ZVAL_STRING(&_53$$23, "messageMaxResolution"); - ZEPHIR_CALL_METHOD(&message, &helper, "__invoke", NULL, 158, &options, &_53$$23); + ZEPHIR_CALL_METHOD(&message, &helper, "__invoke", NULL, 159, &options, &_53$$23); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_53$$23); ZVAL_STRING(&_53$$23, "includedMaxResolution"); - ZEPHIR_CALL_METHOD(&included, &helper, "__invoke", NULL, 158, &options, &_53$$23); + ZEPHIR_CALL_METHOD(&included, &helper, "__invoke", NULL, 159, &options, &_53$$23); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&validator); object_init_ex(&validator, phalcon_filter_validation_validator_file_resolution_max_ce); @@ -573,7 +567,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File, __construct) zephir_array_update_string(&_54$$23, SL("resolution"), &value, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_54$$23, SL("included"), &included, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_54$$23, SL("message"), &message, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_33, 303, &_54$$23); + ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_33, 304, &_54$$23); zephir_check_call_status(); zephir_array_unset_string(&options, SL("maxResolution"), PH_SEPARATE); zephir_array_unset_string(&options, SL("includedMaxResolution"), PH_SEPARATE); @@ -581,11 +575,11 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File, __construct) } else if (ZEPHIR_IS_LONG_IDENTICAL(&_43$$18, 0)) { ZEPHIR_INIT_NVAR(&_55$$24); ZVAL_STRING(&_55$$24, "messageMinResolution"); - ZEPHIR_CALL_METHOD(&message, &helper, "__invoke", NULL, 158, &options, &_55$$24); + ZEPHIR_CALL_METHOD(&message, &helper, "__invoke", NULL, 159, &options, &_55$$24); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_55$$24); ZVAL_STRING(&_55$$24, "includedMinResolution"); - ZEPHIR_CALL_METHOD(&included, &helper, "__invoke", NULL, 158, &options, &_55$$24); + ZEPHIR_CALL_METHOD(&included, &helper, "__invoke", NULL, 159, &options, &_55$$24); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&validator); object_init_ex(&validator, phalcon_filter_validation_validator_file_resolution_min_ce); @@ -594,7 +588,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File, __construct) zephir_array_update_string(&_56$$24, SL("resolution"), &value, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_56$$24, SL("included"), &included, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_56$$24, SL("message"), &message, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_33, 303, &_56$$24); + ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_33, 304, &_56$$24); zephir_check_call_status(); zephir_array_unset_string(&options, SL("minResolution"), PH_SEPARATE); zephir_array_unset_string(&options, SL("includedMinResolution"), PH_SEPARATE); @@ -602,7 +596,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File, __construct) } else if (ZEPHIR_IS_LONG_IDENTICAL(&_44$$18, 0)) { ZEPHIR_INIT_NVAR(&_57$$25); ZVAL_STRING(&_57$$25, "messageEqualResolution"); - ZEPHIR_CALL_METHOD(&message, &helper, "__invoke", NULL, 158, &options, &_57$$25); + ZEPHIR_CALL_METHOD(&message, &helper, "__invoke", NULL, 159, &options, &_57$$25); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&validator); object_init_ex(&validator, phalcon_filter_validation_validator_file_resolution_equal_ce); @@ -610,7 +604,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File, __construct) zephir_create_array(&_58$$25, 2, 0); zephir_array_update_string(&_58$$25, SL("resolution"), &value, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_58$$25, SL("message"), &message, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_33, 303, &_58$$25); + ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_33, 304, &_58$$25); zephir_check_call_status(); zephir_array_unset_string(&options, SL("equalResolution"), PH_SEPARATE); zephir_array_unset_string(&options, SL("messageEqualResolution"), PH_SEPARATE); @@ -618,15 +612,15 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File, __construct) continue; } if (Z_TYPE_P(&messageFileEmpty) != IS_NULL) { - ZEPHIR_CALL_METHOD(NULL, &validator, "setmessagefileempty", &_34, 304, &messageFileEmpty); + ZEPHIR_CALL_METHOD(NULL, &validator, "setmessagefileempty", &_34, 305, &messageFileEmpty); zephir_check_call_status(); } if (Z_TYPE_P(&messageIniSize) != IS_NULL) { - ZEPHIR_CALL_METHOD(NULL, &validator, "setmessageinisize", &_35, 305, &messageIniSize); + ZEPHIR_CALL_METHOD(NULL, &validator, "setmessageinisize", &_35, 306, &messageIniSize); zephir_check_call_status(); } if (Z_TYPE_P(&messageValid) != IS_NULL) { - ZEPHIR_CALL_METHOD(NULL, &validator, "setmessagevalid", &_36, 306, &messageValid); + ZEPHIR_CALL_METHOD(NULL, &validator, "setmessagevalid", &_36, 307, &messageValid); zephir_check_call_status(); } zephir_update_property_array_append(this_ptr, SL("validators"), &validator); @@ -636,7 +630,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File, __construct) } ZEPHIR_INIT_NVAR(&value); ZEPHIR_INIT_NVAR(&key); - ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_file_ce, getThis(), "__construct", &_59, 0, &options); + ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_file_ce, getThis(), "__construct", NULL, 0, &options); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } diff --git a/ext/phalcon/filter/validation/validator/file.zep.h b/ext/phalcon/filter/validation/validator/file.zep.h index 9268fea8b29..5ea3a815d9f 100644 --- a/ext/phalcon/filter/validation/validator/file.zep.h +++ b/ext/phalcon/filter/validation/validator/file.zep.h @@ -6,11 +6,7 @@ ZEPHIR_INIT_CLASS(Phalcon_Filter_Validation_Validator_File); PHP_METHOD(Phalcon_Filter_Validation_Validator_File, __construct); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_filter_validation_validator_file___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_filter_validation_validator_file_method_entry) { diff --git a/ext/phalcon/filter/validation/validator/file/abstractfile.zep.c b/ext/phalcon/filter/validation/validator/file/abstractfile.zep.c index b9de7deedb0..9bfc8d90bcd 100644 --- a/ext/phalcon/filter/validation/validator/file/abstractfile.zep.c +++ b/ext/phalcon/filter/validation/validator/file/abstractfile.zep.c @@ -116,20 +116,14 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_AbstractFile, checkUpload) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_4); ZVAL_UNDEF(&field); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(validation, phalcon_filter_validation_ce) Z_PARAM_STR(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &validation, &field_param); zephir_get_strval(&field, field_param); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "checkuploadmaxsize", NULL, 0, validation, &field); zephir_check_call_status(); _1 = zephir_is_true(&_0); @@ -178,20 +172,14 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_AbstractFile, checkUploadIsE ZVAL_UNDEF(&_10$$3); ZVAL_UNDEF(&_11$$3); ZVAL_UNDEF(&field); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(validation, phalcon_filter_validation_ce) Z_PARAM_STR(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &validation, &field_param); zephir_get_strval(&field, field_param); - - ZEPHIR_CALL_METHOD(&value, validation, "getvalue", NULL, 0, &field); zephir_check_call_status(); _0 = Z_TYPE_P(&value) == IS_ARRAY; @@ -267,20 +255,14 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_AbstractFile, checkUploadIsV ZVAL_UNDEF(&_6$$3); ZVAL_UNDEF(&_7$$3); ZVAL_UNDEF(&field); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(validation, phalcon_filter_validation_ce) Z_PARAM_STR(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &validation, &field_param); zephir_get_strval(&field, field_param); - - ZEPHIR_CALL_METHOD(&value, validation, "getvalue", NULL, 0, &field); zephir_check_call_status(); _0 = Z_TYPE_P(&value) == IS_ARRAY; @@ -358,23 +340,17 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_AbstractFile, checkUploadMax ZVAL_UNDEF(&_11$$8); ZVAL_UNDEF(&_12$$8); ZVAL_UNDEF(&field); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(validation, phalcon_filter_validation_ce) Z_PARAM_STR(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_get_global(&_FILES, SL("_FILES")); zephir_get_global(&_POST, SL("_POST")); zephir_get_global(&_SERVER, SL("_SERVER")); zephir_fetch_params(1, 2, 0, &validation, &field_param); zephir_get_strval(&field, field_param); - - ZEPHIR_CALL_METHOD(&value, validation, "getvalue", NULL, 0, &field); zephir_check_call_status(); ZEPHIR_INIT_VAR(&server); @@ -469,7 +445,6 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_AbstractFile, getFileSizeInB zend_long ZEPHIR_LAST_CALL_STATUS; zval *size_param = NULL, byteUnits, matches, unit, _0, _1, _2, _3, _4, _5, _6, _7, _8; zval size; - zval *this_ptr = getThis(); ZVAL_UNDEF(&size); ZVAL_UNDEF(&byteUnits); @@ -484,19 +459,13 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_AbstractFile, getFileSizeInB ZVAL_UNDEF(&_6); ZVAL_UNDEF(&_7); ZVAL_UNDEF(&_8); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(size) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &size_param); zephir_get_strval(&size, size_param); - - ZEPHIR_INIT_VAR(&byteUnits); zephir_create_array(&byteUnits, 9, 0); add_assoc_long_ex(&byteUnits, SL("B"), 0); @@ -527,11 +496,11 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_AbstractFile, getFileSizeInB zephir_array_fetch_long(&_4, &matches, 1, PH_NOISY | PH_READONLY, "phalcon/Filter/Validation/Validator/File/AbstractFile.zep", 291); ZEPHIR_CALL_FUNCTION(&_5, "floatval", NULL, 18, &_4); zephir_check_call_status(); - ZEPHIR_INIT_VAR(&_6); - zephir_array_fetch(&_7, &byteUnits, &unit, PH_NOISY | PH_READONLY, "phalcon/Filter/Validation/Validator/File/AbstractFile.zep", 291); - ZVAL_LONG(&_8, 2); - zephir_pow_function(&_6, &_8, &_7); - mul_function(return_value, &_5, &_6); + zephir_array_fetch(&_6, &byteUnits, &unit, PH_NOISY | PH_READONLY, "phalcon/Filter/Validation/Validator/File/AbstractFile.zep", 291); + ZVAL_LONG(&_7, 2); + ZEPHIR_CALL_FUNCTION(&_8, "pow", NULL, 19, &_7, &_6); + zephir_check_call_status(); + mul_function(return_value, &_5, &_8); RETURN_MM(); } @@ -542,9 +511,6 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_AbstractFile, getFileSizeInB */ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_AbstractFile, getMessageFileEmpty) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "messageFileEmpty"); } @@ -556,9 +522,6 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_AbstractFile, getMessageFile */ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_AbstractFile, getMessageIniSize) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "messageIniSize"); } @@ -570,9 +533,6 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_AbstractFile, getMessageIniS */ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_AbstractFile, getMessageValid) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "messageValid"); } @@ -593,26 +553,19 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_AbstractFile, isAllowEmpty) zend_long ZEPHIR_LAST_CALL_STATUS; zval field; zval *validation, validation_sub, *field_param = NULL, value, _3; - zval *this_ptr = getThis(); ZVAL_UNDEF(&validation_sub); ZVAL_UNDEF(&value); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&field); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(validation, phalcon_filter_validation_ce) Z_PARAM_STR(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &validation, &field_param); zephir_get_strval(&field, field_param); - - ZEPHIR_CALL_METHOD(&value, validation, "getvalue", NULL, 0, &field); zephir_check_call_status(); _0 = 1 == ZEPHIR_IS_EMPTY(&value); @@ -646,19 +599,13 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_AbstractFile, setMessageFile zval *this_ptr = getThis(); ZVAL_UNDEF(&message); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(message) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &message_param); zephir_get_strval(&message, message_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("messageFileEmpty"), &message); ZEPHIR_MM_RESTORE(); } @@ -678,19 +625,13 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_AbstractFile, setMessageIniS zval *this_ptr = getThis(); ZVAL_UNDEF(&message); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(message) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &message_param); zephir_get_strval(&message, message_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("messageIniSize"), &message); ZEPHIR_MM_RESTORE(); } @@ -710,19 +651,13 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_AbstractFile, setMessageVali zval *this_ptr = getThis(); ZVAL_UNDEF(&message); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(message) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &message_param); zephir_get_strval(&message, message_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("messageValid"), &message); ZEPHIR_MM_RESTORE(); } @@ -741,23 +676,16 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_AbstractFile, checkIsUploade zend_long ZEPHIR_LAST_CALL_STATUS; zval *name_param = NULL; zval name; - zval *this_ptr = getThis(); ZVAL_UNDEF(&name); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &name_param); zephir_get_strval(&name, name_param); - - - ZEPHIR_RETURN_CALL_FUNCTION("is_uploaded_file", NULL, 19, &name); + ZEPHIR_RETURN_CALL_FUNCTION("is_uploaded_file", NULL, 20, &name); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/filter/validation/validator/file/mimetype.zep.c b/ext/phalcon/filter/validation/validator/file/mimetype.zep.c index 5945ec2c6d6..d89f12514d6 100644 --- a/ext/phalcon/filter/validation/validator/file/mimetype.zep.c +++ b/ext/phalcon/filter/validation/validator/file/mimetype.zep.c @@ -113,19 +113,13 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_MimeType, validate) ZVAL_UNDEF(&_3$$6); ZVAL_UNDEF(&_4$$8); ZVAL_UNDEF(&_5$$8); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(validation, phalcon_filter_validation_ce) Z_PARAM_ZVAL(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &validation, &field); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "checkupload", NULL, 0, validation, field); zephir_check_call_status(); if (ZEPHIR_IS_FALSE_IDENTICAL(&_0)) { @@ -137,7 +131,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_MimeType, validate) ZVAL_STRING(&_1, "types"); ZEPHIR_CALL_METHOD(&types, this_ptr, "getoption", NULL, 0, &_1); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&fieldTypes); + zephir_memory_observe(&fieldTypes); if (zephir_array_isset_fetch(&fieldTypes, &types, field, 0)) { ZEPHIR_CPY_WRT(&types, &fieldTypes); } @@ -147,12 +141,12 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_MimeType, validate) } if ((zephir_function_exists_ex(ZEND_STRL("finfo_open")) == SUCCESS)) { ZVAL_LONG(&_2$$6, 16); - ZEPHIR_CALL_FUNCTION(&tmp, "finfo_open", NULL, 307, &_2$$6); + ZEPHIR_CALL_FUNCTION(&tmp, "finfo_open", NULL, 308, &_2$$6); zephir_check_call_status(); zephir_array_fetch_string(&_3$$6, &value, SL("tmp_name"), PH_NOISY | PH_READONLY, "phalcon/Filter/Validation/Validator/File/MimeType.zep", 101); - ZEPHIR_CALL_FUNCTION(&mime, "finfo_file", NULL, 308, &tmp, &_3$$6); + ZEPHIR_CALL_FUNCTION(&mime, "finfo_file", NULL, 309, &tmp, &_3$$6); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(NULL, "finfo_close", NULL, 309, &tmp); + ZEPHIR_CALL_FUNCTION(NULL, "finfo_close", NULL, 310, &tmp); zephir_check_call_status(); } else { ZEPHIR_OBS_NVAR(&mime); diff --git a/ext/phalcon/filter/validation/validator/file/resolution/equal.zep.c b/ext/phalcon/filter/validation/validator/file/resolution/equal.zep.c index 7f0e59ab96a..98152c2e59b 100644 --- a/ext/phalcon/filter/validation/validator/file/resolution/equal.zep.c +++ b/ext/phalcon/filter/validation/validator/file/resolution/equal.zep.c @@ -90,22 +90,16 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_Resolution_Equal, __construc { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *options_param = NULL; zval options; - zval *this_ptr = getThis(); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -113,9 +107,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_Resolution_Equal, __construc } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - - ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_file_resolution_equal_ce, getThis(), "__construct", &_0, 0, &options); + ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_file_resolution_equal_ce, getThis(), "__construct", NULL, 0, &options); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -148,19 +140,13 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_Resolution_Equal, validate) ZVAL_UNDEF(&_3$$4); ZVAL_UNDEF(&_4$$5); ZVAL_UNDEF(&_6$$6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(validation, phalcon_filter_validation_ce) Z_PARAM_ZVAL(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &validation, &field); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "checkupload", NULL, 0, validation, field); zephir_check_call_status(); if (ZEPHIR_IS_FALSE_IDENTICAL(&_0)) { @@ -169,11 +155,11 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_Resolution_Equal, validate) ZEPHIR_CALL_METHOD(&value, validation, "getvalue", NULL, 0, field); zephir_check_call_status(); zephir_array_fetch_string(&_1, &value, SL("tmp_name"), PH_NOISY | PH_READONLY, "phalcon/Filter/Validation/Validator/File/Resolution/Equal.zep", 88); - ZEPHIR_CALL_FUNCTION(&tmp, "getimagesize", NULL, 310, &_1); + ZEPHIR_CALL_FUNCTION(&tmp, "getimagesize", NULL, 311, &_1); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&width); + zephir_memory_observe(&width); zephir_array_fetch_long(&width, &tmp, 0, PH_NOISY, "phalcon/Filter/Validation/Validator/File/Resolution/Equal.zep", 89); - ZEPHIR_OBS_VAR(&height); + zephir_memory_observe(&height); zephir_array_fetch_long(&height, &tmp, 1, PH_NOISY, "phalcon/Filter/Validation/Validator/File/Resolution/Equal.zep", 90); ZEPHIR_INIT_VAR(&_2); ZVAL_STRING(&_2, "resolution"); @@ -185,9 +171,9 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_Resolution_Equal, validate) } ZEPHIR_INIT_VAR(&resolutionArray); zephir_fast_explode_str(&resolutionArray, SL("x"), &resolution, LONG_MAX); - ZEPHIR_OBS_VAR(&equalWidth); + zephir_memory_observe(&equalWidth); zephir_array_fetch_long(&equalWidth, &resolutionArray, 0, PH_NOISY, "phalcon/Filter/Validation/Validator/File/Resolution/Equal.zep", 99); - ZEPHIR_OBS_VAR(&equalHeight); + zephir_memory_observe(&equalHeight); zephir_array_fetch_long(&equalHeight, &resolutionArray, 1, PH_NOISY, "phalcon/Filter/Validation/Validator/File/Resolution/Equal.zep", 100); if (Z_TYPE_P(&resolution) == IS_ARRAY) { zephir_array_fetch(&_4$$5, &resolution, field, PH_NOISY | PH_READONLY, "phalcon/Filter/Validation/Validator/File/Resolution/Equal.zep", 103); diff --git a/ext/phalcon/filter/validation/validator/file/resolution/equal.zep.h b/ext/phalcon/filter/validation/validator/file/resolution/equal.zep.h index 217d911116f..c44432dde5e 100644 --- a/ext/phalcon/filter/validation/validator/file/resolution/equal.zep.h +++ b/ext/phalcon/filter/validation/validator/file/resolution/equal.zep.h @@ -7,11 +7,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_Resolution_Equal, __construc PHP_METHOD(Phalcon_Filter_Validation_Validator_File_Resolution_Equal, validate); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_filter_validation_validator_file_resolution_equal___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_filter_validation_validator_file_resolution_equal_validate, 0, 2, _IS_BOOL, 0) diff --git a/ext/phalcon/filter/validation/validator/file/resolution/max.zep.c b/ext/phalcon/filter/validation/validator/file/resolution/max.zep.c index d344a114a16..7112480023e 100644 --- a/ext/phalcon/filter/validation/validator/file/resolution/max.zep.c +++ b/ext/phalcon/filter/validation/validator/file/resolution/max.zep.c @@ -96,22 +96,16 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_Resolution_Max, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *options_param = NULL; zval options; - zval *this_ptr = getThis(); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -119,9 +113,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_Resolution_Max, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - - ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_file_resolution_max_ce, getThis(), "__construct", &_0, 0, &options); + ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_file_resolution_max_ce, getThis(), "__construct", NULL, 0, &options); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -157,19 +149,13 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_Resolution_Max, validate) ZVAL_UNDEF(&_4$$5); ZVAL_UNDEF(&_9$$9); ZVAL_UNDEF(&_10$$10); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(validation, phalcon_filter_validation_ce) Z_PARAM_ZVAL(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &validation, &field); - - ZEPHIR_INIT_VAR(&included); ZVAL_BOOL(&included, 0); ZEPHIR_CALL_METHOD(&_0, this_ptr, "checkupload", NULL, 0, validation, field); @@ -180,11 +166,11 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_Resolution_Max, validate) ZEPHIR_CALL_METHOD(&value, validation, "getvalue", NULL, 0, field); zephir_check_call_status(); zephir_array_fetch_string(&_1, &value, SL("tmp_name"), PH_NOISY | PH_READONLY, "phalcon/Filter/Validation/Validator/File/Resolution/Max.zep", 94); - ZEPHIR_CALL_FUNCTION(&tmp, "getimagesize", NULL, 310, &_1); + ZEPHIR_CALL_FUNCTION(&tmp, "getimagesize", NULL, 311, &_1); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&width); + zephir_memory_observe(&width); zephir_array_fetch_long(&width, &tmp, 0, PH_NOISY, "phalcon/Filter/Validation/Validator/File/Resolution/Max.zep", 95); - ZEPHIR_OBS_VAR(&height); + zephir_memory_observe(&height); zephir_array_fetch_long(&height, &tmp, 1, PH_NOISY, "phalcon/Filter/Validation/Validator/File/Resolution/Max.zep", 96); ZEPHIR_INIT_VAR(&_2); ZVAL_STRING(&_2, "resolution"); @@ -196,16 +182,16 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_Resolution_Max, validate) } ZEPHIR_INIT_VAR(&resolutionArray); zephir_fast_explode_str(&resolutionArray, SL("x"), &resolution, LONG_MAX); - ZEPHIR_OBS_VAR(&maxWidth); + zephir_memory_observe(&maxWidth); zephir_array_fetch_long(&maxWidth, &resolutionArray, 0, PH_NOISY, "phalcon/Filter/Validation/Validator/File/Resolution/Max.zep", 105); - ZEPHIR_OBS_VAR(&maxHeight); + zephir_memory_observe(&maxHeight); zephir_array_fetch_long(&maxHeight, &resolutionArray, 1, PH_NOISY, "phalcon/Filter/Validation/Validator/File/Resolution/Max.zep", 106); ZEPHIR_INIT_NVAR(&_2); ZVAL_STRING(&_2, "included"); ZEPHIR_CALL_METHOD(&included, this_ptr, "getoption", NULL, 0, &_2); zephir_check_call_status(); if (Z_TYPE_P(&included) == IS_ARRAY) { - ZEPHIR_OBS_VAR(&_4$$5); + zephir_memory_observe(&_4$$5); zephir_array_fetch(&_4$$5, &included, field, PH_NOISY, "phalcon/Filter/Validation/Validator/File/Resolution/Max.zep", 111); _5$$5 = zephir_get_boolval(&_4$$5); ZEPHIR_INIT_NVAR(&included); diff --git a/ext/phalcon/filter/validation/validator/file/resolution/max.zep.h b/ext/phalcon/filter/validation/validator/file/resolution/max.zep.h index c41deb001fb..343edf46f0f 100644 --- a/ext/phalcon/filter/validation/validator/file/resolution/max.zep.h +++ b/ext/phalcon/filter/validation/validator/file/resolution/max.zep.h @@ -7,11 +7,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_Resolution_Max, __construct) PHP_METHOD(Phalcon_Filter_Validation_Validator_File_Resolution_Max, validate); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_filter_validation_validator_file_resolution_max___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_filter_validation_validator_file_resolution_max_validate, 0, 2, _IS_BOOL, 0) diff --git a/ext/phalcon/filter/validation/validator/file/resolution/min.zep.c b/ext/phalcon/filter/validation/validator/file/resolution/min.zep.c index 2fa7a808777..65f642ba54d 100644 --- a/ext/phalcon/filter/validation/validator/file/resolution/min.zep.c +++ b/ext/phalcon/filter/validation/validator/file/resolution/min.zep.c @@ -96,22 +96,16 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_Resolution_Min, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *options_param = NULL; zval options; - zval *this_ptr = getThis(); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -119,9 +113,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_Resolution_Min, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - - ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_file_resolution_min_ce, getThis(), "__construct", &_0, 0, &options); + ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_file_resolution_min_ce, getThis(), "__construct", NULL, 0, &options); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -157,19 +149,13 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_Resolution_Min, validate) ZVAL_UNDEF(&_4$$5); ZVAL_UNDEF(&_9$$9); ZVAL_UNDEF(&_10$$10); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(validation, phalcon_filter_validation_ce) Z_PARAM_ZVAL(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &validation, &field); - - ZEPHIR_INIT_VAR(&included); ZVAL_BOOL(&included, 0); ZEPHIR_CALL_METHOD(&_0, this_ptr, "checkupload", NULL, 0, validation, field); @@ -180,11 +166,11 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_Resolution_Min, validate) ZEPHIR_CALL_METHOD(&value, validation, "getvalue", NULL, 0, field); zephir_check_call_status(); zephir_array_fetch_string(&_1, &value, SL("tmp_name"), PH_NOISY | PH_READONLY, "phalcon/Filter/Validation/Validator/File/Resolution/Min.zep", 94); - ZEPHIR_CALL_FUNCTION(&tmp, "getimagesize", NULL, 310, &_1); + ZEPHIR_CALL_FUNCTION(&tmp, "getimagesize", NULL, 311, &_1); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&width); + zephir_memory_observe(&width); zephir_array_fetch_long(&width, &tmp, 0, PH_NOISY, "phalcon/Filter/Validation/Validator/File/Resolution/Min.zep", 95); - ZEPHIR_OBS_VAR(&height); + zephir_memory_observe(&height); zephir_array_fetch_long(&height, &tmp, 1, PH_NOISY, "phalcon/Filter/Validation/Validator/File/Resolution/Min.zep", 96); ZEPHIR_INIT_VAR(&_2); ZVAL_STRING(&_2, "resolution"); @@ -196,16 +182,16 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_Resolution_Min, validate) } ZEPHIR_INIT_VAR(&resolutionArray); zephir_fast_explode_str(&resolutionArray, SL("x"), &resolution, LONG_MAX); - ZEPHIR_OBS_VAR(&minWidth); + zephir_memory_observe(&minWidth); zephir_array_fetch_long(&minWidth, &resolutionArray, 0, PH_NOISY, "phalcon/Filter/Validation/Validator/File/Resolution/Min.zep", 105); - ZEPHIR_OBS_VAR(&minHeight); + zephir_memory_observe(&minHeight); zephir_array_fetch_long(&minHeight, &resolutionArray, 1, PH_NOISY, "phalcon/Filter/Validation/Validator/File/Resolution/Min.zep", 106); ZEPHIR_INIT_NVAR(&_2); ZVAL_STRING(&_2, "included"); ZEPHIR_CALL_METHOD(&included, this_ptr, "getoption", NULL, 0, &_2); zephir_check_call_status(); if (Z_TYPE_P(&included) == IS_ARRAY) { - ZEPHIR_OBS_VAR(&_4$$5); + zephir_memory_observe(&_4$$5); zephir_array_fetch(&_4$$5, &included, field, PH_NOISY, "phalcon/Filter/Validation/Validator/File/Resolution/Min.zep", 111); _5$$5 = zephir_get_boolval(&_4$$5); ZEPHIR_INIT_NVAR(&included); diff --git a/ext/phalcon/filter/validation/validator/file/resolution/min.zep.h b/ext/phalcon/filter/validation/validator/file/resolution/min.zep.h index a1f37b5f3d8..a4e6c50abd7 100644 --- a/ext/phalcon/filter/validation/validator/file/resolution/min.zep.h +++ b/ext/phalcon/filter/validation/validator/file/resolution/min.zep.h @@ -7,11 +7,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_Resolution_Min, __construct) PHP_METHOD(Phalcon_Filter_Validation_Validator_File_Resolution_Min, validate); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_filter_validation_validator_file_resolution_min___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_filter_validation_validator_file_resolution_min_validate, 0, 2, _IS_BOOL, 0) diff --git a/ext/phalcon/filter/validation/validator/file/size/equal.zep.c b/ext/phalcon/filter/validation/validator/file/size/equal.zep.c index cb6bb233d6d..e42351c97f8 100644 --- a/ext/phalcon/filter/validation/validator/file/size/equal.zep.c +++ b/ext/phalcon/filter/validation/validator/file/size/equal.zep.c @@ -119,19 +119,13 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_Size_Equal, validate) ZVAL_UNDEF(&_9); ZVAL_UNDEF(&_10); ZVAL_UNDEF(&_11$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(validation, phalcon_filter_validation_ce) Z_PARAM_ZVAL(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &validation, &field); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "checkupload", NULL, 0, validation, field); zephir_check_call_status(); if (!ZEPHIR_IS_TRUE_IDENTICAL(&_0)) { @@ -198,29 +192,20 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_Size_Equal, getConditional) zend_bool included, _0; zval *source_param = NULL, *target_param = NULL, *included_param = NULL; double source, target; - zval *this_ptr = getThis(); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_ZVAL(source) Z_PARAM_ZVAL(target) Z_PARAM_OPTIONAL Z_PARAM_BOOL(included) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(2, 1, &source_param, &target_param, &included_param); source = zephir_get_doubleval(source_param); target = zephir_get_doubleval(target_param); if (!included_param) { included = 0; } else { - included = zephir_get_boolval(included_param); - } - - + } _0 = included == 0; if (_0) { _0 = source != target; diff --git a/ext/phalcon/filter/validation/validator/file/size/max.zep.c b/ext/phalcon/filter/validation/validator/file/size/max.zep.c index 138b579b5da..c964c4b42fe 100644 --- a/ext/phalcon/filter/validation/validator/file/size/max.zep.c +++ b/ext/phalcon/filter/validation/validator/file/size/max.zep.c @@ -94,29 +94,20 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_Size_Max, getConditional) zend_bool included; zval *source_param = NULL, *target_param = NULL, *included_param = NULL; double source, target; - zval *this_ptr = getThis(); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_ZVAL(source) Z_PARAM_ZVAL(target) Z_PARAM_OPTIONAL Z_PARAM_BOOL(included) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(2, 1, &source_param, &target_param, &included_param); source = zephir_get_doubleval(source_param); target = zephir_get_doubleval(target_param); if (!included_param) { included = 0; } else { - included = zephir_get_boolval(included_param); - } - - + } if (included == 1) { RETURN_BOOL(target >= source); } diff --git a/ext/phalcon/filter/validation/validator/file/size/min.zep.c b/ext/phalcon/filter/validation/validator/file/size/min.zep.c index b2cb46a8197..1f6b99f9219 100644 --- a/ext/phalcon/filter/validation/validator/file/size/min.zep.c +++ b/ext/phalcon/filter/validation/validator/file/size/min.zep.c @@ -94,29 +94,20 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_File_Size_Min, getConditional) zend_bool included; zval *source_param = NULL, *target_param = NULL, *included_param = NULL; double source, target; - zval *this_ptr = getThis(); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_ZVAL(source) Z_PARAM_ZVAL(target) Z_PARAM_OPTIONAL Z_PARAM_BOOL(included) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(2, 1, &source_param, &target_param, &included_param); source = zephir_get_doubleval(source_param); target = zephir_get_doubleval(target_param); if (!included_param) { included = 0; } else { - included = zephir_get_boolval(included_param); - } - - + } if (included == 1) { RETURN_BOOL(target <= source); } diff --git a/ext/phalcon/filter/validation/validator/identical.zep.c b/ext/phalcon/filter/validation/validator/identical.zep.c index 834832639b6..7b8657a00fa 100644 --- a/ext/phalcon/filter/validation/validator/identical.zep.c +++ b/ext/phalcon/filter/validation/validator/identical.zep.c @@ -91,22 +91,16 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Identical, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *options_param = NULL; zval options; - zval *this_ptr = getThis(); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -114,9 +108,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Identical, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - - ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_identical_ce, getThis(), "__construct", &_0, 0, &options); + ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_identical_ce, getThis(), "__construct", NULL, 0, &options); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -144,19 +136,13 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Identical, validate) ZVAL_UNDEF(&_5$$5); ZVAL_UNDEF(&_6$$7); ZVAL_UNDEF(&_7$$8); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(validation, phalcon_filter_validation_ce) Z_PARAM_ZVAL(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &validation, &field); - - ZEPHIR_CALL_METHOD(&value, validation, "getvalue", NULL, 0, field); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_0, this_ptr, "allowempty", NULL, 0, field, &value); diff --git a/ext/phalcon/filter/validation/validator/identical.zep.h b/ext/phalcon/filter/validation/validator/identical.zep.h index ce01ea9af95..28b413f9e60 100644 --- a/ext/phalcon/filter/validation/validator/identical.zep.h +++ b/ext/phalcon/filter/validation/validator/identical.zep.h @@ -7,11 +7,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Identical, __construct); PHP_METHOD(Phalcon_Filter_Validation_Validator_Identical, validate); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_filter_validation_validator_identical___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_filter_validation_validator_identical_validate, 0, 2, _IS_BOOL, 0) diff --git a/ext/phalcon/filter/validation/validator/inclusionin.zep.c b/ext/phalcon/filter/validation/validator/inclusionin.zep.c index 720ec48d3ee..4d80ba89a08 100644 --- a/ext/phalcon/filter/validation/validator/inclusionin.zep.c +++ b/ext/phalcon/filter/validation/validator/inclusionin.zep.c @@ -92,22 +92,16 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_InclusionIn, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *options_param = NULL; zval options; - zval *this_ptr = getThis(); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -115,9 +109,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_InclusionIn, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - - ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_inclusionin_ce, getThis(), "__construct", &_0, 0, &options); + ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_inclusionin_ce, getThis(), "__construct", NULL, 0, &options); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -147,19 +139,13 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_InclusionIn, validate) ZVAL_UNDEF(&_4$$8); ZVAL_UNDEF(&_6$$10); ZVAL_UNDEF(&_7$$10); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(validation, phalcon_filter_validation_ce) Z_PARAM_ZVAL(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &validation, &field); - - ZEPHIR_CALL_METHOD(&value, validation, "getvalue", NULL, 0, field); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_0, this_ptr, "allowempty", NULL, 0, field, &value); @@ -171,7 +157,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_InclusionIn, validate) ZVAL_STRING(&_1, "domain"); ZEPHIR_CALL_METHOD(&domain, this_ptr, "getoption", NULL, 0, &_1); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&fieldDomain); + zephir_memory_observe(&fieldDomain); if (zephir_array_isset_fetch(&fieldDomain, &domain, field, 0)) { if (Z_TYPE_P(&fieldDomain) == IS_ARRAY) { ZEPHIR_CPY_WRT(&domain, &fieldDomain); @@ -201,7 +187,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_InclusionIn, validate) return; } } - ZEPHIR_CALL_FUNCTION(&_5, "in_array", NULL, 299, &value, &domain, &strict); + ZEPHIR_CALL_FUNCTION(&_5, "in_array", NULL, 300, &value, &domain, &strict); zephir_check_call_status(); if (!(zephir_is_true(&_5))) { ZEPHIR_INIT_VAR(&replacePairs); diff --git a/ext/phalcon/filter/validation/validator/inclusionin.zep.h b/ext/phalcon/filter/validation/validator/inclusionin.zep.h index e8a183291e8..ec7319fdfca 100644 --- a/ext/phalcon/filter/validation/validator/inclusionin.zep.h +++ b/ext/phalcon/filter/validation/validator/inclusionin.zep.h @@ -7,11 +7,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_InclusionIn, __construct); PHP_METHOD(Phalcon_Filter_Validation_Validator_InclusionIn, validate); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_filter_validation_validator_inclusionin___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_filter_validation_validator_inclusionin_validate, 0, 2, _IS_BOOL, 0) diff --git a/ext/phalcon/filter/validation/validator/ip.zep.c b/ext/phalcon/filter/validation/validator/ip.zep.c index 9c2d962d814..15612eea6d8 100644 --- a/ext/phalcon/filter/validation/validator/ip.zep.c +++ b/ext/phalcon/filter/validation/validator/ip.zep.c @@ -107,22 +107,16 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Ip, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *options_param = NULL; zval options; - zval *this_ptr = getThis(); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -130,9 +124,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Ip, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - - ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_ip_ce, getThis(), "__construct", &_0, 0, &options); + ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_ip_ce, getThis(), "__construct", NULL, 0, &options); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -169,19 +161,13 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Ip, validate) ZVAL_UNDEF(&_7$$6); ZVAL_UNDEF(&_12$$7); ZVAL_UNDEF(&_8); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(validation, phalcon_filter_validation_ce) Z_PARAM_ZVAL(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &validation, &field); - - ZEPHIR_CALL_METHOD(&value, validation, "getvalue", NULL, 0, field); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_0, this_ptr, "allowempty", NULL, 0, field, &value); @@ -240,7 +226,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Ip, validate) zephir_bitwise_or_function(&_10, &_9, &allowReserved); zephir_array_update_string(&options, SL("flags"), &_10, PH_COPY | PH_SEPARATE); ZVAL_LONG(&_2, 275); - ZEPHIR_CALL_FUNCTION(&_11, "filter_var", NULL, 282, &value, &_2, &options); + ZEPHIR_CALL_FUNCTION(&_11, "filter_var", NULL, 283, &value, &_2, &options); zephir_check_call_status(); if (!(zephir_is_true(&_11))) { ZEPHIR_CALL_METHOD(&_12$$7, this_ptr, "messagefactory", NULL, 0, validation, field); diff --git a/ext/phalcon/filter/validation/validator/ip.zep.h b/ext/phalcon/filter/validation/validator/ip.zep.h index eb12e3b31c9..9b18cc0fe0d 100644 --- a/ext/phalcon/filter/validation/validator/ip.zep.h +++ b/ext/phalcon/filter/validation/validator/ip.zep.h @@ -7,11 +7,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Ip, __construct); PHP_METHOD(Phalcon_Filter_Validation_Validator_Ip, validate); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_filter_validation_validator_ip___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_filter_validation_validator_ip_validate, 0, 2, _IS_BOOL, 0) diff --git a/ext/phalcon/filter/validation/validator/numericality.zep.c b/ext/phalcon/filter/validation/validator/numericality.zep.c index 4a347299232..733b23c9c0a 100644 --- a/ext/phalcon/filter/validation/validator/numericality.zep.c +++ b/ext/phalcon/filter/validation/validator/numericality.zep.c @@ -84,22 +84,16 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Numericality, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *options_param = NULL; zval options; - zval *this_ptr = getThis(); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -107,9 +101,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Numericality, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - - ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_numericality_ce, getThis(), "__construct", &_0, 0, &options); + ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_numericality_ce, getThis(), "__construct", NULL, 0, &options); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -122,7 +114,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Numericality, validate) zval pattern, _0; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *validation, validation_sub, *field, field_sub, value, _1, _2, _3, _4, _5, _6$$4; + zval *validation, validation_sub, *field, field_sub, value, _1, _2, _3, _4$$4; zval *this_ptr = getThis(); ZVAL_UNDEF(&validation_sub); @@ -131,49 +123,34 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Numericality, validate) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); - ZVAL_UNDEF(&_4); - ZVAL_UNDEF(&_5); - ZVAL_UNDEF(&_6$$4); + ZVAL_UNDEF(&_4$$4); ZVAL_UNDEF(&pattern); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(validation, phalcon_filter_validation_ce) Z_PARAM_ZVAL(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &validation, &field); - - ZEPHIR_CALL_METHOD(&value, validation, "getvalue", NULL, 0, field); zephir_check_call_status(); zephir_cast_to_string(&_0, &value); ZEPHIR_CPY_WRT(&value, &_0); - ZEPHIR_INIT_VAR(&_1); - ZEPHIR_INIT_VAR(&_2); - ZVAL_STRING(&_2, " "); - ZEPHIR_INIT_VAR(&_3); - ZVAL_STRING(&_3, ""); - zephir_fast_str_replace(&_1, &_2, &_3, &value); - ZEPHIR_CPY_WRT(&value, &_1); ZEPHIR_INIT_VAR(&pattern); ZVAL_STRING(&pattern, "/((^[-]?[0-9,]+(\\.[0-9]+)?$)|(^[-]?[0-9.]+(,[0-9]+)?$))/"); - ZEPHIR_CALL_METHOD(&_4, this_ptr, "allowempty", NULL, 0, field, &value); + ZEPHIR_CALL_METHOD(&_1, this_ptr, "allowempty", NULL, 0, field, &value); zephir_check_call_status(); - if (zephir_is_true(&_4)) { + if (zephir_is_true(&_1)) { RETURN_MM_BOOL(1); } - ZEPHIR_INIT_VAR(&_5); - ZEPHIR_INIT_NVAR(&_1); - zephir_preg_match(&_1, &pattern, &value, &_5, 0, 0 , 0 ); - if (!(zephir_is_true(&_1))) { - ZEPHIR_CALL_METHOD(&_6$$4, this_ptr, "messagefactory", NULL, 0, validation, field); + ZEPHIR_INIT_VAR(&_2); + ZEPHIR_INIT_VAR(&_3); + zephir_preg_match(&_3, &pattern, &value, &_2, 0, 0 , 0 ); + if (!(zephir_is_true(&_3))) { + ZEPHIR_CALL_METHOD(&_4$$4, this_ptr, "messagefactory", NULL, 0, validation, field); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, validation, "appendmessage", NULL, 0, &_6$$4); + ZEPHIR_CALL_METHOD(NULL, validation, "appendmessage", NULL, 0, &_4$$4); zephir_check_call_status(); RETURN_MM_BOOL(0); } diff --git a/ext/phalcon/filter/validation/validator/numericality.zep.h b/ext/phalcon/filter/validation/validator/numericality.zep.h index a339a2fd589..78415043d88 100644 --- a/ext/phalcon/filter/validation/validator/numericality.zep.h +++ b/ext/phalcon/filter/validation/validator/numericality.zep.h @@ -7,11 +7,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Numericality, __construct); PHP_METHOD(Phalcon_Filter_Validation_Validator_Numericality, validate); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_filter_validation_validator_numericality___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_filter_validation_validator_numericality_validate, 0, 2, _IS_BOOL, 0) diff --git a/ext/phalcon/filter/validation/validator/presenceof.zep.c b/ext/phalcon/filter/validation/validator/presenceof.zep.c index 909ecfb6d73..a48a9e82d84 100644 --- a/ext/phalcon/filter/validation/validator/presenceof.zep.c +++ b/ext/phalcon/filter/validation/validator/presenceof.zep.c @@ -83,22 +83,16 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_PresenceOf, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *options_param = NULL; zval options; - zval *this_ptr = getThis(); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -106,9 +100,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_PresenceOf, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - - ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_presenceof_ce, getThis(), "__construct", &_0, 0, &options); + ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_presenceof_ce, getThis(), "__construct", NULL, 0, &options); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -129,19 +121,13 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_PresenceOf, validate) ZVAL_UNDEF(&value); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(validation, phalcon_filter_validation_ce) Z_PARAM_ZVAL(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &validation, &field); - - ZEPHIR_CALL_METHOD(&value, validation, "getvalue", NULL, 0, field); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_0, this_ptr, "allowempty", NULL, 0, field, &value); diff --git a/ext/phalcon/filter/validation/validator/presenceof.zep.h b/ext/phalcon/filter/validation/validator/presenceof.zep.h index c83965b70ca..fdca3e28dac 100644 --- a/ext/phalcon/filter/validation/validator/presenceof.zep.h +++ b/ext/phalcon/filter/validation/validator/presenceof.zep.h @@ -7,11 +7,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_PresenceOf, __construct); PHP_METHOD(Phalcon_Filter_Validation_Validator_PresenceOf, validate); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_filter_validation_validator_presenceof___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_filter_validation_validator_presenceof_validate, 0, 2, _IS_BOOL, 0) diff --git a/ext/phalcon/filter/validation/validator/regex.zep.c b/ext/phalcon/filter/validation/validator/regex.zep.c index a4f26e39996..097d5b95abe 100644 --- a/ext/phalcon/filter/validation/validator/regex.zep.c +++ b/ext/phalcon/filter/validation/validator/regex.zep.c @@ -91,22 +91,16 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Regex, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *options_param = NULL; zval options; - zval *this_ptr = getThis(); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -114,9 +108,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Regex, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - - ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_regex_ce, getThis(), "__construct", &_0, 0, &options); + ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_regex_ce, getThis(), "__construct", NULL, 0, &options); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -142,19 +134,13 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Regex, validate) ZVAL_UNDEF(&_2$$4); ZVAL_UNDEF(&_4$$5); ZVAL_UNDEF(&_5$$7); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(validation, phalcon_filter_validation_ce) Z_PARAM_ZVAL(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &validation, &field); - - ZEPHIR_INIT_VAR(&matches); ZVAL_NULL(&matches); ZEPHIR_CALL_METHOD(&value, validation, "getvalue", NULL, 0, field); diff --git a/ext/phalcon/filter/validation/validator/regex.zep.h b/ext/phalcon/filter/validation/validator/regex.zep.h index bf61b47b856..2dea75ce11b 100644 --- a/ext/phalcon/filter/validation/validator/regex.zep.h +++ b/ext/phalcon/filter/validation/validator/regex.zep.h @@ -7,11 +7,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Regex, __construct); PHP_METHOD(Phalcon_Filter_Validation_Validator_Regex, validate); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_filter_validation_validator_regex___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_filter_validation_validator_regex_validate, 0, 2, _IS_BOOL, 0) diff --git a/ext/phalcon/filter/validation/validator/stringlength.zep.c b/ext/phalcon/filter/validation/validator/stringlength.zep.c index 9d1bc87fc44..1e6bb238237 100644 --- a/ext/phalcon/filter/validation/validator/stringlength.zep.c +++ b/ext/phalcon/filter/validation/validator/stringlength.zep.c @@ -117,7 +117,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_StringLength, __construct) zend_string *_3; zend_ulong _2; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zephir_fcall_cache_entry *_6 = NULL, *_9 = NULL, *_11 = NULL, *_17 = NULL; + zephir_fcall_cache_entry *_6 = NULL, *_9 = NULL, *_11 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *options_param = NULL, included, key, message, validator, value, *_0, _1, _4$$3, _5$$3, _7$$3, _12$$15, _13$$15, _14$$15; zval options, _8$$4, _10$$9, _15$$16, _16$$21; @@ -140,16 +140,12 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_StringLength, __construct) ZVAL_UNDEF(&_12$$15); ZVAL_UNDEF(&_13$$15); ZVAL_UNDEF(&_14$$15); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -157,8 +153,6 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_StringLength, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - ZEPHIR_INIT_VAR(&included); ZVAL_NULL(&included); ZEPHIR_INIT_VAR(&message); @@ -177,11 +171,11 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_StringLength, __construct) ZVAL_COPY(&value, _0); ZEPHIR_INIT_NVAR(&_4$$3); ZVAL_STRING(&_4$$3, "min"); - ZEPHIR_CALL_FUNCTION(&_5$$3, "strcasecmp", &_6, 38, &key, &_4$$3); + ZEPHIR_CALL_FUNCTION(&_5$$3, "strcasecmp", &_6, 39, &key, &_4$$3); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_4$$3); ZVAL_STRING(&_4$$3, "max"); - ZEPHIR_CALL_FUNCTION(&_7$$3, "strcasecmp", &_6, 38, &key, &_4$$3); + ZEPHIR_CALL_FUNCTION(&_7$$3, "strcasecmp", &_6, 39, &key, &_4$$3); zephir_check_call_status(); if (ZEPHIR_IS_LONG_IDENTICAL(&_5$$3, 0)) { if (zephir_array_isset_string(&options, SL("message"))) { @@ -205,7 +199,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_StringLength, __construct) zephir_array_update_string(&_8$$4, SL("min"), &value, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_8$$4, SL("message"), &message, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_8$$4, SL("included"), &included, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_9, 311, &_8$$4); + ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_9, 312, &_8$$4); zephir_check_call_status(); zephir_array_unset_string(&options, SL("min"), PH_SEPARATE); zephir_array_unset_string(&options, SL("message"), PH_SEPARATE); @@ -234,7 +228,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_StringLength, __construct) zephir_array_update_string(&_10$$9, SL("max"), &value, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_10$$9, SL("message"), &message, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_10$$9, SL("included"), &included, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_11, 312, &_10$$9); + ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_11, 313, &_10$$9); zephir_check_call_status(); zephir_array_unset_string(&options, SL("max"), PH_SEPARATE); zephir_array_unset_string(&options, SL("message"), PH_SEPARATE); @@ -261,11 +255,11 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_StringLength, __construct) zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_12$$15); ZVAL_STRING(&_12$$15, "min"); - ZEPHIR_CALL_FUNCTION(&_13$$15, "strcasecmp", &_6, 38, &key, &_12$$15); + ZEPHIR_CALL_FUNCTION(&_13$$15, "strcasecmp", &_6, 39, &key, &_12$$15); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_12$$15); ZVAL_STRING(&_12$$15, "max"); - ZEPHIR_CALL_FUNCTION(&_14$$15, "strcasecmp", &_6, 38, &key, &_12$$15); + ZEPHIR_CALL_FUNCTION(&_14$$15, "strcasecmp", &_6, 39, &key, &_12$$15); zephir_check_call_status(); if (ZEPHIR_IS_LONG_IDENTICAL(&_13$$15, 0)) { if (zephir_array_isset_string(&options, SL("message"))) { @@ -289,7 +283,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_StringLength, __construct) zephir_array_update_string(&_15$$16, SL("min"), &value, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_15$$16, SL("message"), &message, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_15$$16, SL("included"), &included, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_11, 312, &_15$$16); + ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_11, 313, &_15$$16); zephir_check_call_status(); zephir_array_unset_string(&options, SL("min"), PH_SEPARATE); zephir_array_unset_string(&options, SL("message"), PH_SEPARATE); @@ -318,7 +312,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_StringLength, __construct) zephir_array_update_string(&_16$$21, SL("max"), &value, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_16$$21, SL("message"), &message, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_16$$21, SL("included"), &included, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_11, 312, &_16$$21); + ZEPHIR_CALL_METHOD(NULL, &validator, "__construct", &_11, 313, &_16$$21); zephir_check_call_status(); zephir_array_unset_string(&options, SL("max"), PH_SEPARATE); zephir_array_unset_string(&options, SL("message"), PH_SEPARATE); @@ -335,7 +329,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_StringLength, __construct) } ZEPHIR_INIT_NVAR(&value); ZEPHIR_INIT_NVAR(&key); - ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_stringlength_ce, getThis(), "__construct", &_17, 0, &options); + ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_stringlength_ce, getThis(), "__construct", NULL, 0, &options); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } diff --git a/ext/phalcon/filter/validation/validator/stringlength.zep.h b/ext/phalcon/filter/validation/validator/stringlength.zep.h index 87bb5731c48..195e93bae2b 100644 --- a/ext/phalcon/filter/validation/validator/stringlength.zep.h +++ b/ext/phalcon/filter/validation/validator/stringlength.zep.h @@ -6,11 +6,7 @@ ZEPHIR_INIT_CLASS(Phalcon_Filter_Validation_Validator_StringLength); PHP_METHOD(Phalcon_Filter_Validation_Validator_StringLength, __construct); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_filter_validation_validator_stringlength___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_filter_validation_validator_stringlength_method_entry) { diff --git a/ext/phalcon/filter/validation/validator/stringlength/max.zep.c b/ext/phalcon/filter/validation/validator/stringlength/max.zep.c index bba70f675ad..7f1a61e58f5 100644 --- a/ext/phalcon/filter/validation/validator/stringlength/max.zep.c +++ b/ext/phalcon/filter/validation/validator/stringlength/max.zep.c @@ -99,22 +99,16 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_StringLength_Max, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *options_param = NULL; zval options; - zval *this_ptr = getThis(); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -122,9 +116,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_StringLength_Max, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - - ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_stringlength_max_ce, getThis(), "__construct", &_0, 0, &options); + ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_stringlength_max_ce, getThis(), "__construct", NULL, 0, &options); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -156,19 +148,13 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_StringLength_Max, validate) ZVAL_UNDEF(&_8$$11); ZVAL_UNDEF(&_1$$4); ZVAL_UNDEF(&_2$$5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(validation, phalcon_filter_validation_ce) Z_PARAM_ZVAL(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &validation, &field); - - ZEPHIR_CALL_METHOD(&value, validation, "getvalue", NULL, 0, field); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_0, this_ptr, "allowempty", NULL, 0, field, &value); @@ -178,7 +164,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_StringLength_Max, validate) } if ((zephir_function_exists_ex(ZEND_STRL("mb_strlen")) == SUCCESS)) { zephir_cast_to_string(&_1$$4, &value); - ZEPHIR_CALL_FUNCTION(&length, "mb_strlen", NULL, 233, &_1$$4); + ZEPHIR_CALL_FUNCTION(&length, "mb_strlen", NULL, 234, &_1$$4); zephir_check_call_status(); } else { zephir_cast_to_string(&_2$$5, &value); @@ -198,7 +184,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_StringLength_Max, validate) ZEPHIR_CALL_METHOD(&included, this_ptr, "getoption", NULL, 0, &_3); zephir_check_call_status(); if (Z_TYPE_P(&included) == IS_ARRAY) { - ZEPHIR_OBS_VAR(&_5$$7); + zephir_memory_observe(&_5$$7); zephir_array_fetch(&_5$$7, &included, field, PH_NOISY, "phalcon/Filter/Validation/Validator/StringLength/Max.zep", 112); _6$$7 = zephir_get_boolval(&_5$$7); ZEPHIR_INIT_NVAR(&included); diff --git a/ext/phalcon/filter/validation/validator/stringlength/max.zep.h b/ext/phalcon/filter/validation/validator/stringlength/max.zep.h index 595f754d38c..cee476a7c03 100644 --- a/ext/phalcon/filter/validation/validator/stringlength/max.zep.h +++ b/ext/phalcon/filter/validation/validator/stringlength/max.zep.h @@ -7,11 +7,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_StringLength_Max, __construct); PHP_METHOD(Phalcon_Filter_Validation_Validator_StringLength_Max, validate); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_filter_validation_validator_stringlength_max___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_filter_validation_validator_stringlength_max_validate, 0, 2, _IS_BOOL, 0) diff --git a/ext/phalcon/filter/validation/validator/stringlength/min.zep.c b/ext/phalcon/filter/validation/validator/stringlength/min.zep.c index 4cead638917..f8913af3422 100644 --- a/ext/phalcon/filter/validation/validator/stringlength/min.zep.c +++ b/ext/phalcon/filter/validation/validator/stringlength/min.zep.c @@ -99,22 +99,16 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_StringLength_Min, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *options_param = NULL; zval options; - zval *this_ptr = getThis(); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -122,9 +116,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_StringLength_Min, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - - ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_stringlength_min_ce, getThis(), "__construct", &_0, 0, &options); + ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_stringlength_min_ce, getThis(), "__construct", NULL, 0, &options); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -156,19 +148,13 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_StringLength_Min, validate) ZVAL_UNDEF(&_8$$11); ZVAL_UNDEF(&_1$$4); ZVAL_UNDEF(&_2$$5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(validation, phalcon_filter_validation_ce) Z_PARAM_ZVAL(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &validation, &field); - - ZEPHIR_CALL_METHOD(&value, validation, "getvalue", NULL, 0, field); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_0, this_ptr, "allowempty", NULL, 0, field, &value); @@ -178,7 +164,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_StringLength_Min, validate) } if ((zephir_function_exists_ex(ZEND_STRL("mb_strlen")) == SUCCESS)) { zephir_cast_to_string(&_1$$4, &value); - ZEPHIR_CALL_FUNCTION(&length, "mb_strlen", NULL, 233, &_1$$4); + ZEPHIR_CALL_FUNCTION(&length, "mb_strlen", NULL, 234, &_1$$4); zephir_check_call_status(); } else { zephir_cast_to_string(&_2$$5, &value); @@ -198,7 +184,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_StringLength_Min, validate) ZEPHIR_CALL_METHOD(&included, this_ptr, "getoption", NULL, 0, &_3); zephir_check_call_status(); if (Z_TYPE_P(&included) == IS_ARRAY) { - ZEPHIR_OBS_VAR(&_5$$7); + zephir_memory_observe(&_5$$7); zephir_array_fetch(&_5$$7, &included, field, PH_NOISY, "phalcon/Filter/Validation/Validator/StringLength/Min.zep", 112); _6$$7 = zephir_get_boolval(&_5$$7); ZEPHIR_INIT_NVAR(&included); diff --git a/ext/phalcon/filter/validation/validator/stringlength/min.zep.h b/ext/phalcon/filter/validation/validator/stringlength/min.zep.h index 78d54ea3cd1..340b9e69c0c 100644 --- a/ext/phalcon/filter/validation/validator/stringlength/min.zep.h +++ b/ext/phalcon/filter/validation/validator/stringlength/min.zep.h @@ -7,11 +7,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_StringLength_Min, __construct); PHP_METHOD(Phalcon_Filter_Validation_Validator_StringLength_Min, validate); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_filter_validation_validator_stringlength_min___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_filter_validation_validator_stringlength_min_validate, 0, 2, _IS_BOOL, 0) diff --git a/ext/phalcon/filter/validation/validator/uniqueness.zep.c b/ext/phalcon/filter/validation/validator/uniqueness.zep.c index bf6299a1859..ee6db1cf031 100644 --- a/ext/phalcon/filter/validation/validator/uniqueness.zep.c +++ b/ext/phalcon/filter/validation/validator/uniqueness.zep.c @@ -129,22 +129,16 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Uniqueness, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *options_param = NULL; zval options; - zval *this_ptr = getThis(); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -152,9 +146,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Uniqueness, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - - ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_uniqueness_ce, getThis(), "__construct", &_0, 0, &options); + ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_uniqueness_ce, getThis(), "__construct", NULL, 0, &options); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -173,19 +165,13 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Uniqueness, validate) ZVAL_UNDEF(&field_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(validation, phalcon_filter_validation_ce) Z_PARAM_ZVAL(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &validation, &field); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "isuniqueness", NULL, 0, validation, field); zephir_check_call_status(); if (!(zephir_is_true(&_0))) { @@ -221,16 +207,12 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Uniqueness, getColumnNameReal) ZVAL_UNDEF(&_9$$4); ZVAL_UNDEF(&_10$$4); ZVAL_UNDEF(&field); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ZVAL(record) Z_PARAM_STR(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &record, &field_param); if (UNEXPECTED(Z_TYPE_P(field_param) != IS_STRING && Z_TYPE_P(field_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'field' must be of the type string")); @@ -241,8 +223,6 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Uniqueness, getColumnNameReal) } else { ZEPHIR_INIT_VAR(&field); } - - _0 = ZEPHIR_GLOBAL(orm).column_renaming; if (_0) { zephir_read_property(&_1, this_ptr, ZEND_STRL("columnMap"), PH_NOISY_CC | PH_READONLY); @@ -259,7 +239,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Uniqueness, getColumnNameReal) zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("columnMap"), &_5$$3); } - ZEPHIR_OBS_VAR(&_6); + zephir_memory_observe(&_6); zephir_read_property(&_6, this_ptr, ZEND_STRL("columnMap"), PH_NOISY_CC); _7 = Z_TYPE_P(&_6) == IS_ARRAY; if (_7) { @@ -298,20 +278,14 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Uniqueness, isUniqueness) ZVAL_UNDEF(&_3$$4); ZVAL_UNDEF(&_5$$5); ZVAL_UNDEF(&_6$$6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(validation, phalcon_filter_validation_ce) Z_PARAM_ZVAL(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &validation, &field); ZEPHIR_SEPARATE_PARAM(field); - - if (Z_TYPE_P(field) != IS_ARRAY) { ZEPHIR_CPY_WRT(&singleField, field); ZEPHIR_INIT_NVAR(field); @@ -578,22 +552,16 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Uniqueness, isUniquenessModel) ZVAL_UNDEF(&_142$$58); ZVAL_UNDEF(&_152$$62); ZVAL_UNDEF(&_154$$63); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_ZVAL(record) Z_PARAM_ARRAY(field) Z_PARAM_ARRAY(values) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &record, &field_param, &values_param); zephir_get_arrval(&field, field_param); zephir_get_arrval(&values, values_param); - - ZEPHIR_INIT_VAR(&exceptConditions); array_init(&exceptConditions); index = 0; @@ -648,7 +616,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Uniqueness, isUniquenessModel) zephir_array_keys(&_10$$6, &except); ZVAL_LONG(&_11$$6, 0); ZVAL_LONG(&_12$$6, (zephir_fast_count_int(&except) - 1)); - ZEPHIR_CALL_FUNCTION(&_13$$6, "range", &_14, 313, &_11$$6, &_12$$6); + ZEPHIR_CALL_FUNCTION(&_13$$6, "range", &_14, 314, &_11$$6, &_12$$6); zephir_check_call_status(); _9$$6 = !ZEPHIR_IS_IDENTICAL(&_10$$6, &_13$$6); } @@ -1052,7 +1020,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Uniqueness, isUniquenessModel) zephir_array_keys(&_88$$37, &except); ZVAL_LONG(&_89$$37, 0); ZVAL_LONG(&_90$$37, (zephir_fast_count_int(&except) - 1)); - ZEPHIR_CALL_FUNCTION(&_91$$37, "range", &_14, 313, &_89$$37, &_90$$37); + ZEPHIR_CALL_FUNCTION(&_91$$37, "range", &_14, 314, &_89$$37, &_90$$37); zephir_check_call_status(); _87$$37 = !ZEPHIR_IS_IDENTICAL(&_88$$37, &_91$$37); } diff --git a/ext/phalcon/filter/validation/validator/uniqueness.zep.h b/ext/phalcon/filter/validation/validator/uniqueness.zep.h index 0056caa316c..34c59e3e0ab 100644 --- a/ext/phalcon/filter/validation/validator/uniqueness.zep.h +++ b/ext/phalcon/filter/validation/validator/uniqueness.zep.h @@ -10,11 +10,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Uniqueness, isUniqueness); PHP_METHOD(Phalcon_Filter_Validation_Validator_Uniqueness, isUniquenessModel); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_filter_validation_validator_uniqueness___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_filter_validation_validator_uniqueness_validate, 0, 2, _IS_BOOL, 0) diff --git a/ext/phalcon/filter/validation/validator/url.zep.c b/ext/phalcon/filter/validation/validator/url.zep.c index ff52d20db8c..44683cce3d2 100644 --- a/ext/phalcon/filter/validation/validator/url.zep.c +++ b/ext/phalcon/filter/validation/validator/url.zep.c @@ -85,22 +85,16 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Url, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *options_param = NULL; zval options; - zval *this_ptr = getThis(); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -108,9 +102,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Url, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - - ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_url_ce, getThis(), "__construct", &_0, 0, &options); + ZEPHIR_CALL_PARENT(NULL, phalcon_filter_validation_validator_url_ce, getThis(), "__construct", NULL, 0, &options); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -135,19 +127,13 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Url, validate) ZVAL_UNDEF(&_2$$4); ZVAL_UNDEF(&_3$$5); ZVAL_UNDEF(&_4$$6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(validation, phalcon_filter_validation_ce) Z_PARAM_ZVAL(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &validation, &field); - - ZEPHIR_CALL_METHOD(&value, validation, "getvalue", NULL, 0, field); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_0, this_ptr, "allowempty", NULL, 0, field, &value); @@ -155,15 +141,15 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Url, validate) if (zephir_is_true(&_0)) { RETURN_MM_BOOL(1); } - ZEPHIR_OBS_VAR(&options); + zephir_memory_observe(&options); zephir_read_property(&_1, this_ptr, ZEND_STRL("options"), PH_NOISY_CC | PH_READONLY); if (zephir_array_isset_string_fetch(&options, &_1, SL("options"), 0)) { ZVAL_LONG(&_2$$4, 273); - ZEPHIR_CALL_FUNCTION(&result, "filter_var", NULL, 282, &value, &_2$$4, &options); + ZEPHIR_CALL_FUNCTION(&result, "filter_var", NULL, 283, &value, &_2$$4, &options); zephir_check_call_status(); } else { ZVAL_LONG(&_3$$5, 273); - ZEPHIR_CALL_FUNCTION(&result, "filter_var", NULL, 282, &value, &_3$$5); + ZEPHIR_CALL_FUNCTION(&result, "filter_var", NULL, 283, &value, &_3$$5); zephir_check_call_status(); } if (!(zephir_is_true(&result))) { diff --git a/ext/phalcon/filter/validation/validator/url.zep.h b/ext/phalcon/filter/validation/validator/url.zep.h index 30b00609c98..6e9117d8846 100644 --- a/ext/phalcon/filter/validation/validator/url.zep.h +++ b/ext/phalcon/filter/validation/validator/url.zep.h @@ -7,11 +7,7 @@ PHP_METHOD(Phalcon_Filter_Validation_Validator_Url, __construct); PHP_METHOD(Phalcon_Filter_Validation_Validator_Url, validate); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_filter_validation_validator_url___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_filter_validation_validator_url_validate, 0, 2, _IS_BOOL, 0) diff --git a/ext/phalcon/filter/validation/validatorfactory.zep.c b/ext/phalcon/filter/validation/validatorfactory.zep.c index 3bc15cd238c..e714820e43d 100644 --- a/ext/phalcon/filter/validation/validatorfactory.zep.c +++ b/ext/phalcon/filter/validation/validatorfactory.zep.c @@ -48,16 +48,12 @@ PHP_METHOD(Phalcon_Filter_Validation_ValidatorFactory, __construct) zval *this_ptr = getThis(); ZVAL_UNDEF(&services); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(services) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &services_param); if (!services_param) { ZEPHIR_INIT_VAR(&services); @@ -65,8 +61,6 @@ PHP_METHOD(Phalcon_Filter_Validation_ValidatorFactory, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&services, services_param); } - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "init", NULL, 0, &services); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); @@ -85,15 +79,11 @@ PHP_METHOD(Phalcon_Filter_Validation_ValidatorFactory, newInstance) ZVAL_UNDEF(&name); ZVAL_UNDEF(&definition); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -104,8 +94,6 @@ PHP_METHOD(Phalcon_Filter_Validation_ValidatorFactory, newInstance) } else { ZEPHIR_INIT_VAR(&name); } - - ZEPHIR_CALL_METHOD(&definition, this_ptr, "getservice", NULL, 0, &name); zephir_check_call_status(); ZEPHIR_LAST_CALL_STATUS = zephir_create_instance(return_value, &definition); @@ -118,9 +106,6 @@ PHP_METHOD(Phalcon_Filter_Validation_ValidatorFactory, newInstance) */ PHP_METHOD(Phalcon_Filter_Validation_ValidatorFactory, getExceptionClass) { - zval *this_ptr = getThis(); - - RETURN_STRING("Phalcon\\Validation\\Exception"); } @@ -132,9 +117,6 @@ PHP_METHOD(Phalcon_Filter_Validation_ValidatorFactory, getExceptionClass) */ PHP_METHOD(Phalcon_Filter_Validation_ValidatorFactory, getServices) { - zval *this_ptr = getThis(); - - zephir_create_array(return_value, 21, 0); add_assoc_stringl_ex(return_value, SL("alnum"), SL("Phalcon\\Filter\\Validation\\Validator\\Alnum")); diff --git a/ext/phalcon/filter/validation/validatorfactory.zep.h b/ext/phalcon/filter/validation/validatorfactory.zep.h index 0bbfa99d5f1..44591ec1607 100644 --- a/ext/phalcon/filter/validation/validatorfactory.zep.h +++ b/ext/phalcon/filter/validation/validatorfactory.zep.h @@ -9,11 +9,7 @@ PHP_METHOD(Phalcon_Filter_Validation_ValidatorFactory, getExceptionClass); PHP_METHOD(Phalcon_Filter_Validation_ValidatorFactory, getServices); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_filter_validation_validatorfactory___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, services, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, services, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, services, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_filter_validation_validatorfactory_newinstance, 0, 1, Phalcon\\Filter\\Validation\\ValidatorInterface, 0) diff --git a/ext/phalcon/flash/abstractflash.zep.c b/ext/phalcon/flash/abstractflash.zep.c index edf30c5c59a..6ebf114e43d 100644 --- a/ext/phalcon/flash/abstractflash.zep.c +++ b/ext/phalcon/flash/abstractflash.zep.c @@ -113,17 +113,14 @@ PHP_METHOD(Phalcon_Flash_AbstractFlash, __construct) ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_OBJECT_OF_CLASS_OR_NULL(escaper, phalcon_html_escaper_escaperinterface_ce) Z_PARAM_OBJECT_OF_CLASS_OR_NULL(session, phalcon_session_managerinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 2, &escaper, &session); if (!escaper) { escaper = &escaper_sub; @@ -133,8 +130,6 @@ PHP_METHOD(Phalcon_Flash_AbstractFlash, __construct) session = &session_sub; session = &__$null; } - - zephir_update_property_zval(this_ptr, ZEND_STRL("escaperService"), escaper); zephir_update_property_zval(this_ptr, ZEND_STRL("sessionService"), session); ZEPHIR_INIT_VAR(&_0); @@ -165,9 +160,8 @@ PHP_METHOD(Phalcon_Flash_AbstractFlash, clear) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); array_init(&_0); @@ -196,19 +190,13 @@ PHP_METHOD(Phalcon_Flash_AbstractFlash, error) ZVAL_UNDEF(&message); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(message) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &message_param); zephir_get_strval(&message, message_param); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "error"); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "message", NULL, 0, &_0, &message); @@ -221,9 +209,6 @@ PHP_METHOD(Phalcon_Flash_AbstractFlash, error) */ PHP_METHOD(Phalcon_Flash_AbstractFlash, getAutoescape) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "autoescape"); } @@ -233,9 +218,6 @@ PHP_METHOD(Phalcon_Flash_AbstractFlash, getAutoescape) */ PHP_METHOD(Phalcon_Flash_AbstractFlash, getAutomaticHtml) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "automaticHtml"); } @@ -245,9 +227,6 @@ PHP_METHOD(Phalcon_Flash_AbstractFlash, getAutomaticHtml) */ PHP_METHOD(Phalcon_Flash_AbstractFlash, getCssClasses) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "cssClasses"); } @@ -257,9 +236,6 @@ PHP_METHOD(Phalcon_Flash_AbstractFlash, getCssClasses) */ PHP_METHOD(Phalcon_Flash_AbstractFlash, getCssIconClasses) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "cssIconClasses"); } @@ -269,9 +245,6 @@ PHP_METHOD(Phalcon_Flash_AbstractFlash, getCssIconClasses) */ PHP_METHOD(Phalcon_Flash_AbstractFlash, getCustomTemplate) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "customTemplate"); } @@ -298,9 +271,8 @@ PHP_METHOD(Phalcon_Flash_AbstractFlash, getEscaperService) ZVAL_UNDEF(&_6$$4); ZVAL_UNDEF(&_7$$4); ZVAL_UNDEF(&_8$$4); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("escaperService"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_0) != IS_NULL) { @@ -350,19 +322,13 @@ PHP_METHOD(Phalcon_Flash_AbstractFlash, notice) ZVAL_UNDEF(&message); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(message) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &message_param); zephir_get_strval(&message, message_param); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "notice"); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "message", NULL, 0, &_0, &message); @@ -383,18 +349,10 @@ PHP_METHOD(Phalcon_Flash_AbstractFlash, setAutoescape) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(autoescape) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &autoescape_param); - autoescape = zephir_get_boolval(autoescape_param); - - if (autoescape) { zephir_update_property_zval(this_ptr, ZEND_STRL("autoescape"), &__$true); } else { @@ -416,18 +374,10 @@ PHP_METHOD(Phalcon_Flash_AbstractFlash, setAutomaticHtml) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(automaticHtml) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &automaticHtml_param); - automaticHtml = zephir_get_boolval(automaticHtml_param); - - if (automaticHtml) { zephir_update_property_zval(this_ptr, ZEND_STRL("automaticHtml"), &__$true); } else { @@ -449,19 +399,13 @@ PHP_METHOD(Phalcon_Flash_AbstractFlash, setCssClasses) zval *this_ptr = getThis(); ZVAL_UNDEF(&cssClasses); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(cssClasses) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &cssClasses_param); ZEPHIR_OBS_COPY_OR_DUP(&cssClasses, cssClasses_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("cssClasses"), &cssClasses); RETURN_THIS(); } @@ -479,19 +423,13 @@ PHP_METHOD(Phalcon_Flash_AbstractFlash, setCssIconClasses) zval *this_ptr = getThis(); ZVAL_UNDEF(&cssIconClasses); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(cssIconClasses) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &cssIconClasses_param); ZEPHIR_OBS_COPY_OR_DUP(&cssIconClasses, cssIconClasses_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("cssIconClasses"), &cssIconClasses); RETURN_THIS(); } @@ -509,15 +447,11 @@ PHP_METHOD(Phalcon_Flash_AbstractFlash, setCustomTemplate) zval *this_ptr = getThis(); ZVAL_UNDEF(&customTemplate); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(customTemplate) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &customTemplate_param); if (UNEXPECTED(Z_TYPE_P(customTemplate_param) != IS_STRING && Z_TYPE_P(customTemplate_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'customTemplate' must be of the type string")); @@ -528,8 +462,6 @@ PHP_METHOD(Phalcon_Flash_AbstractFlash, setCustomTemplate) } else { ZEPHIR_INIT_VAR(&customTemplate); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("customTemplate"), &customTemplate); RETURN_THIS(); } @@ -545,17 +477,10 @@ PHP_METHOD(Phalcon_Flash_AbstractFlash, setEscaperService) zval *this_ptr = getThis(); ZVAL_UNDEF(&escaperService_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(escaperService, phalcon_html_escaper_escaperinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &escaperService); - - zephir_update_property_zval(this_ptr, ZEND_STRL("escaperService"), escaperService); RETURN_THISW(); } @@ -574,18 +499,10 @@ PHP_METHOD(Phalcon_Flash_AbstractFlash, setImplicitFlush) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(implicitFlush) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &implicitFlush_param); - implicitFlush = zephir_get_boolval(implicitFlush_param); - - if (implicitFlush) { zephir_update_property_zval(this_ptr, ZEND_STRL("implicitFlush"), &__$true); } else { @@ -615,19 +532,13 @@ PHP_METHOD(Phalcon_Flash_AbstractFlash, success) ZVAL_UNDEF(&message); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(message) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &message_param); zephir_get_strval(&message, message_param); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "success"); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "message", NULL, 0, &_0, &message); @@ -668,21 +579,15 @@ PHP_METHOD(Phalcon_Flash_AbstractFlash, outputMessage) ZVAL_UNDEF(&_1$$4); ZVAL_UNDEF(&_6$$5); ZVAL_UNDEF(&_7$$8); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(type) Z_PARAM_ZVAL(message) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &type_param, &message); zephir_get_strval(&type, type_param); ZEPHIR_SEPARATE_PARAM(message); - - ZEPHIR_INIT_VAR(&content); ZVAL_STRING(&content, ""); _0 = Z_TYPE_P(message) != IS_ARRAY; @@ -705,9 +610,9 @@ PHP_METHOD(Phalcon_Flash_AbstractFlash, outputMessage) { ZEPHIR_INIT_NVAR(&item); ZVAL_COPY(&item, _2); - ZEPHIR_CALL_METHOD(&prepared, this_ptr, "prepareescapedmessage", &_4, 81, &item); + ZEPHIR_CALL_METHOD(&prepared, this_ptr, "prepareescapedmessage", &_4, 82, &item); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&html, this_ptr, "preparehtmlmessage", &_5, 82, &type, &prepared); + ZEPHIR_CALL_METHOD(&html, this_ptr, "preparehtmlmessage", &_5, 83, &type, &prepared); zephir_check_call_status(); zephir_read_property(&_6$$5, this_ptr, ZEND_STRL("implicitFlush"), PH_NOISY_CC | PH_READONLY); if (ZEPHIR_IS_TRUE_IDENTICAL(&_6$$5)) { @@ -728,9 +633,9 @@ PHP_METHOD(Phalcon_Flash_AbstractFlash, outputMessage) } ZEPHIR_CALL_METHOD(&item, message, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&prepared, this_ptr, "prepareescapedmessage", &_4, 81, &item); + ZEPHIR_CALL_METHOD(&prepared, this_ptr, "prepareescapedmessage", &_4, 82, &item); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&html, this_ptr, "preparehtmlmessage", &_5, 82, &type, &prepared); + ZEPHIR_CALL_METHOD(&html, this_ptr, "preparehtmlmessage", &_5, 83, &type, &prepared); zephir_check_call_status(); zephir_read_property(&_7$$8, this_ptr, ZEND_STRL("implicitFlush"), PH_NOISY_CC | PH_READONLY); if (ZEPHIR_IS_TRUE_IDENTICAL(&_7$$8)) { @@ -768,19 +673,13 @@ PHP_METHOD(Phalcon_Flash_AbstractFlash, warning) ZVAL_UNDEF(&message); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(message) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &message_param); zephir_get_strval(&message, message_param); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "warning"); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "message", NULL, 0, &_0, &message); @@ -816,21 +715,15 @@ PHP_METHOD(Phalcon_Flash_AbstractFlash, getTemplate) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(cssClassses) Z_PARAM_STR(cssIconClasses) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &cssClassses_param, &cssIconClasses_param); zephir_get_strval(&cssClassses, cssClassses_param); zephir_get_strval(&cssIconClasses, cssIconClasses_param); - - ZEPHIR_INIT_VAR(&_0); ZEPHIR_GET_CONSTANT(&_0, "PHP_EOL"); ZEPHIR_INIT_VAR(&_1); @@ -880,19 +773,13 @@ PHP_METHOD(Phalcon_Flash_AbstractFlash, prepareEscapedMessage) ZVAL_UNDEF(&message); ZVAL_UNDEF(&escaper); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(message) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &message_param); zephir_get_strval(&message, message_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("autoescape"), PH_NOISY_CC | PH_READONLY); if (!ZEPHIR_IS_TRUE_IDENTICAL(&_0)) { RETURN_CTOR(&message); @@ -932,33 +819,27 @@ PHP_METHOD(Phalcon_Flash_AbstractFlash, prepareHtmlMessage) ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(type) Z_PARAM_STR(message) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &type_param, &message_param); zephir_get_strval(&type, type_param); zephir_get_strval(&message, message_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("automaticHtml"), PH_NOISY_CC | PH_READONLY); if (!ZEPHIR_IS_TRUE_IDENTICAL(&_0)) { RETURN_CTOR(&message); } zephir_read_property(&_1, this_ptr, ZEND_STRL("cssClasses"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_METHOD(&cssClasses, this_ptr, "checkclasses", NULL, 83, &_1, &type); + ZEPHIR_CALL_METHOD(&cssClasses, this_ptr, "checkclasses", NULL, 84, &_1, &type); zephir_check_call_status(); zephir_read_property(&_2, this_ptr, ZEND_STRL("cssIconClasses"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_METHOD(&cssIconClasses, this_ptr, "checkclasses", NULL, 83, &_2, &type); + ZEPHIR_CALL_METHOD(&cssIconClasses, this_ptr, "checkclasses", NULL, 84, &_2, &type); zephir_check_call_status(); zephir_read_property(&_3, this_ptr, ZEND_STRL("interpolator"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_METHOD(&_4, this_ptr, "gettemplate", NULL, 84, &cssClasses, &cssIconClasses); + ZEPHIR_CALL_METHOD(&_4, this_ptr, "gettemplate", NULL, 85, &cssClasses, &cssIconClasses); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_5); zephir_create_array(&_5, 3, 0); @@ -985,28 +866,21 @@ PHP_METHOD(Phalcon_Flash_AbstractFlash, checkClasses) zval type; zval *collection_param = NULL, *type_param = NULL, content, _0$$5, _1$$4; zval collection; - zval *this_ptr = getThis(); ZVAL_UNDEF(&collection); ZVAL_UNDEF(&content); ZVAL_UNDEF(&_0$$5); ZVAL_UNDEF(&_1$$4); ZVAL_UNDEF(&type); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ARRAY(collection) Z_PARAM_STR(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &collection_param, &type_param); zephir_get_arrval(&collection, collection_param); zephir_get_strval(&type, type_param); - - ZEPHIR_INIT_VAR(&content); ZVAL_STRING(&content, ""); if (zephir_array_isset(&collection, &type)) { @@ -1039,7 +913,8 @@ zend_object *zephir_init_properties_Phalcon_Flash_AbstractFlash(zend_class_entry ZVAL_UNDEF(&_5$$5); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/flash/direct.zep.c b/ext/phalcon/flash/direct.zep.c index af13591e4db..0b658a6914a 100644 --- a/ext/phalcon/flash/direct.zep.c +++ b/ext/phalcon/flash/direct.zep.c @@ -57,20 +57,14 @@ PHP_METHOD(Phalcon_Flash_Direct, message) ZVAL_UNDEF(&type); ZVAL_UNDEF(&message_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(type) Z_PARAM_ZVAL(message) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &type_param, &message); zephir_get_strval(&type, type_param); - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "outputmessage", NULL, 0, &type, message); zephir_check_call_status(); RETURN_MM(); @@ -82,7 +76,6 @@ PHP_METHOD(Phalcon_Flash_Direct, message) PHP_METHOD(Phalcon_Flash_Direct, output) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zephir_fcall_cache_entry *_3 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *remove_param = NULL, message, _0, *_1, _2; zend_bool remove; @@ -91,24 +84,17 @@ PHP_METHOD(Phalcon_Flash_Direct, output) ZVAL_UNDEF(&message); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_BOOL(remove) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &remove_param); if (!remove_param) { remove = 1; } else { - remove = zephir_get_boolval(remove_param); - } - - + } zephir_read_property(&_0, this_ptr, ZEND_STRL("messages"), PH_NOISY_CC | PH_READONLY); zephir_is_iterable(&_0, 0, "phalcon/Flash/Direct.zep", 45); if (Z_TYPE_P(&_0) == IS_ARRAY) { @@ -136,7 +122,7 @@ PHP_METHOD(Phalcon_Flash_Direct, output) } ZEPHIR_INIT_NVAR(&message); if (remove) { - ZEPHIR_CALL_PARENT(NULL, phalcon_flash_direct_ce, getThis(), "clear", &_3, 0); + ZEPHIR_CALL_PARENT(NULL, phalcon_flash_direct_ce, getThis(), "clear", NULL, 0); zephir_check_call_status(); } ZEPHIR_MM_RESTORE(); diff --git a/ext/phalcon/flash/session.zep.c b/ext/phalcon/flash/session.zep.c index da08eb7b3c8..2a5d9ba16ed 100644 --- a/ext/phalcon/flash/session.zep.c +++ b/ext/phalcon/flash/session.zep.c @@ -56,19 +56,17 @@ PHP_METHOD(Phalcon_Flash_Session, clear) { zval _0; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zephir_fcall_cache_entry *_1 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZVAL_BOOL(&_0, 1); ZEPHIR_CALL_METHOD(NULL, this_ptr, "getsessionmessages", NULL, 0, &_0); zephir_check_call_status(); - ZEPHIR_CALL_PARENT(NULL, phalcon_flash_session_ce, getThis(), "clear", &_1, 0); + ZEPHIR_CALL_PARENT(NULL, phalcon_flash_session_ce, getThis(), "clear", NULL, 0); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -93,17 +91,14 @@ PHP_METHOD(Phalcon_Flash_Session, getMessages) ZVAL_UNDEF(&type_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(type) Z_PARAM_BOOL(remove) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 2, &type, &remove_param); if (!type) { type = &type_sub; @@ -112,10 +107,7 @@ PHP_METHOD(Phalcon_Flash_Session, getMessages) if (!remove_param) { remove = 1; } else { - remove = zephir_get_boolval(remove_param); - } - - + } if (remove) { ZVAL_BOOL(&_0, 1); } else { @@ -145,24 +137,19 @@ PHP_METHOD(Phalcon_Flash_Session, has) ZVAL_UNDEF(&type); ZVAL_UNDEF(&messages); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &type_param); if (!type_param) { ZEPHIR_INIT_VAR(&type); } else { zephir_get_strval(&type, type_param); } - - ZVAL_BOOL(&_0, 0); ZEPHIR_CALL_METHOD(&messages, this_ptr, "getsessionmessages", NULL, 0, &_0); zephir_check_call_status(); @@ -194,20 +181,14 @@ PHP_METHOD(Phalcon_Flash_Session, message) ZVAL_UNDEF(&messages); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(type) Z_PARAM_ZVAL(message) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &type_param, &message); zephir_get_strval(&type, type_param); - - ZVAL_BOOL(&_0, 0); ZEPHIR_CALL_METHOD(&messages, this_ptr, "getsessionmessages", NULL, 0, &_0); zephir_check_call_status(); @@ -234,7 +215,7 @@ PHP_METHOD(Phalcon_Flash_Session, output) zend_string *_4; zend_ulong _3; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zephir_fcall_cache_entry *_5 = NULL, *_6 = NULL; + zephir_fcall_cache_entry *_5 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *remove_param = NULL, message, messages, type, _0, *_1, _2; zend_bool remove; @@ -245,24 +226,17 @@ PHP_METHOD(Phalcon_Flash_Session, output) ZVAL_UNDEF(&type); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_BOOL(remove) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &remove_param); if (!remove_param) { remove = 1; } else { - remove = zephir_get_boolval(remove_param); - } - - + } if (remove) { ZVAL_BOOL(&_0, 1); } else { @@ -306,7 +280,7 @@ PHP_METHOD(Phalcon_Flash_Session, output) } ZEPHIR_INIT_NVAR(&message); ZEPHIR_INIT_NVAR(&type); - ZEPHIR_CALL_PARENT(NULL, phalcon_flash_session_ce, getThis(), "clear", &_6, 0); + ZEPHIR_CALL_PARENT(NULL, phalcon_flash_session_ce, getThis(), "clear", NULL, 0); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -336,26 +310,20 @@ PHP_METHOD(Phalcon_Flash_Session, getSessionMessages) ZVAL_UNDEF(&_1$$6); ZVAL_UNDEF(&_2$$7); ZVAL_UNDEF(&type); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_BOOL(remove) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &remove_param, &type_param); - remove = zephir_get_boolval(remove_param); if (!type_param) { ZEPHIR_INIT_VAR(&type); } else { zephir_get_strval(&type, type_param); } - - ZEPHIR_CALL_METHOD(&session, this_ptr, "getsessionservice", NULL, 0); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_0); @@ -367,7 +335,7 @@ PHP_METHOD(Phalcon_Flash_Session, getSessionMessages) array_init(&messages); } if (1 != ZEPHIR_IS_EMPTY(&type)) { - ZEPHIR_OBS_VAR(&returnMessages); + zephir_memory_observe(&returnMessages); if (zephir_array_isset_fetch(&returnMessages, &messages, &type, 0)) { if (remove) { zephir_array_unset(&messages, &type, PH_SEPARATE); @@ -409,19 +377,13 @@ PHP_METHOD(Phalcon_Flash_Session, setSessionMessages) ZVAL_UNDEF(&messages); ZVAL_UNDEF(&session); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(messages) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &messages_param); ZEPHIR_OBS_COPY_OR_DUP(&messages, messages_param); - - ZEPHIR_CALL_METHOD(&session, this_ptr, "getsessionservice", NULL, 0); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_0); @@ -453,9 +415,8 @@ PHP_METHOD(Phalcon_Flash_Session, getSessionService) ZVAL_UNDEF(&_6$$4); ZVAL_UNDEF(&_7$$4); ZVAL_UNDEF(&_8$$4); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("sessionService"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_0) != IS_NULL) { diff --git a/ext/phalcon/forms/element/abstractelement.zep.c b/ext/phalcon/forms/element/abstractelement.zep.c index 69996a2b050..a7b8a7b2c3c 100644 --- a/ext/phalcon/forms/element/abstractelement.zep.c +++ b/ext/phalcon/forms/element/abstractelement.zep.c @@ -106,17 +106,13 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, __construct) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(name) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &name_param, &attributes_param); zephir_get_strval(&name, name_param); if (!attributes_param) { @@ -125,8 +121,6 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, __construct) } else { zephir_get_arrval(&attributes, attributes_param); } - - ZEPHIR_INIT_VAR(&_0); zephir_fast_trim(&_0, &name, NULL , ZEPHIR_TRIM_BOTH); zephir_get_strval(&name, &_0); @@ -152,10 +146,8 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, __toString) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *this_ptr = getThis(); - - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "render", NULL, 0); zephir_check_call_status(); @@ -178,19 +170,13 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, addFilter) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$5); ZVAL_UNDEF(&_2$$6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(filter) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &filter_param); zephir_get_strval(&filter, filter_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("filters"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&filters, &_0); if (Z_TYPE_P(&filters) == IS_ARRAY) { @@ -221,17 +207,10 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, addValidator) zval *this_ptr = getThis(); ZVAL_UNDEF(&validator_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(validator, phalcon_filter_validation_validatorinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &validator); - - zephir_update_property_array_append(this_ptr, SL("validators"), validator); RETURN_THISW(); } @@ -256,26 +235,19 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, addValidators) ZVAL_UNDEF(&validator); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_0$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(validators) Z_PARAM_OPTIONAL Z_PARAM_BOOL(merge) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &validators_param, &merge_param); ZEPHIR_OBS_COPY_OR_DUP(&validators, validators_param); if (!merge_param) { merge = 1; } else { - merge = zephir_get_boolval(merge_param); - } - - + } if (UNEXPECTED(!merge)) { ZEPHIR_INIT_VAR(&_0$$3); array_init(&_0$$3); @@ -323,18 +295,12 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, appendMessage) ZVAL_UNDEF(&message_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(message, phalcon_messages_messageinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &message); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("messages"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(NULL, &_0, "appendmessage", NULL, 0, message); zephir_check_call_status(); @@ -354,9 +320,8 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, clear) ZVAL_UNDEF(&form); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&name); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("form"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&form, &_0); @@ -385,32 +350,28 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, getAttribute) ZVAL_UNDEF(&attributes); ZVAL_UNDEF(&value); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(attribute) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(defaultValue) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &attribute_param, &defaultValue); zephir_get_strval(&attribute, attribute_param); if (!defaultValue) { defaultValue = &defaultValue_sub; defaultValue = &__$null; } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("attributes"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&attributes, &_0); - if (!(zephir_array_isset_fetch(&value, &attributes, &attribute, 1))) { + zephir_memory_observe(&value); + if (!(zephir_array_isset_fetch(&value, &attributes, &attribute, 0))) { RETVAL_ZVAL(defaultValue, 1, 0); RETURN_MM(); } - RETURN_CTOR(&value); + RETURN_CCTOR(&value); } /** @@ -424,9 +385,8 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, getAttributes) ZVAL_UNDEF(&attributes); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("attributes"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&attributes, &_0); @@ -438,9 +398,6 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, getAttributes) */ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, getDefault) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "value"); } @@ -452,9 +409,6 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, getDefault) */ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, getFilters) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "filters"); } @@ -464,9 +418,6 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, getFilters) */ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, getForm) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "form"); } @@ -476,9 +427,6 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, getForm) */ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, getLabel) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "label"); } @@ -489,9 +437,6 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, getLabel) */ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, getMessages) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "messages"); } @@ -501,9 +446,6 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, getMessages) */ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, getName) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "name"); } @@ -513,9 +455,6 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, getName) */ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, getTagFactory) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "tagFactory"); } @@ -535,31 +474,27 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, getUserOption) ZVAL_NULL(&__$null); ZVAL_UNDEF(&value); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(option) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(defaultValue) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &option_param, &defaultValue); zephir_get_strval(&option, option_param); if (!defaultValue) { defaultValue = &defaultValue_sub; defaultValue = &__$null; } - - + zephir_memory_observe(&value); zephir_read_property(&_0, this_ptr, ZEND_STRL("options"), PH_NOISY_CC | PH_READONLY); - if (!(zephir_array_isset_fetch(&value, &_0, &option, 1))) { + if (!(zephir_array_isset_fetch(&value, &_0, &option, 0))) { RETVAL_ZVAL(defaultValue, 1, 0); RETURN_MM(); } - RETURN_CTOR(&value); + RETURN_CCTOR(&value); } /** @@ -567,9 +502,6 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, getUserOption) */ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, getUserOptions) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "options"); } @@ -579,9 +511,6 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, getUserOptions) */ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, getValidators) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "validators"); } @@ -601,9 +530,8 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, getValue) ZVAL_UNDEF(&form); ZVAL_UNDEF(&value); ZVAL_UNDEF(&_1$$4); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("name"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&name, &_0); @@ -632,9 +560,6 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, hasMessages) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - zephir_read_property(&_0, this_ptr, ZEND_STRL("messages"), PH_NOISY_CC | PH_READONLY); RETURN_BOOL(zephir_fast_count_int(&_0) > 0); } @@ -658,16 +583,12 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, label) ZVAL_UNDEF(&name); ZVAL_UNDEF(&tagFactory); ZVAL_UNDEF(&_0$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &attributes_param); if (!attributes_param) { ZEPHIR_INIT_VAR(&attributes); @@ -675,13 +596,11 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, label) } else { zephir_get_arrval(&attributes, attributes_param); } - - ZEPHIR_CALL_METHOD(&tagFactory, this_ptr, "getlocaltagfactory", NULL, 0); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&internalAttributes); + zephir_memory_observe(&internalAttributes); zephir_read_property(&internalAttributes, this_ptr, ZEND_STRL("attributes"), PH_NOISY_CC); - ZEPHIR_OBS_VAR(&name); + zephir_memory_observe(&name); if (!(zephir_array_isset_string_fetch(&name, &internalAttributes, SL("id"), 0))) { zephir_read_property(&_0$$3, this_ptr, ZEND_STRL("name"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&name, &_0$$3); @@ -689,7 +608,7 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, label) if (!(zephir_array_isset_string(&attributes, SL("for")))) { zephir_array_update_string(&attributes, SL("for"), &name, PH_COPY | PH_SEPARATE); } - ZEPHIR_OBS_VAR(&labelName); + zephir_memory_observe(&labelName); zephir_read_property(&labelName, this_ptr, ZEND_STRL("label"), PH_NOISY_CC); _1 = zephir_is_true(&labelName); if (!(_1)) { @@ -725,16 +644,12 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, render) ZVAL_UNDEF(&value); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &attributes_param); if (!attributes_param) { ZEPHIR_INIT_VAR(&attributes); @@ -742,8 +657,6 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, render) } else { zephir_get_arrval(&attributes, attributes_param); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("name"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&name, &_0); ZEPHIR_CALL_METHOD(&value, this_ptr, "getvalue", NULL, 0); @@ -780,20 +693,14 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, setAttribute) ZVAL_UNDEF(&attribute); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(attribute) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &attribute_param, &value); zephir_get_strval(&attribute, attribute_param); - - zephir_update_property_array(this_ptr, SL("attributes"), &attribute, value); RETURN_THIS(); } @@ -809,19 +716,13 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, setAttributes) zval *this_ptr = getThis(); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &attributes_param); ZEPHIR_OBS_COPY_OR_DUP(&attributes, attributes_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("attributes"), &attributes); RETURN_THIS(); } @@ -836,17 +737,10 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, setDefault) zval *this_ptr = getThis(); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &value); - - zephir_update_property_zval(this_ptr, ZEND_STRL("value"), value); RETURN_THISW(); } @@ -863,17 +757,10 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, setFilters) zval *this_ptr = getThis(); ZVAL_UNDEF(&filters_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(filters) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &filters); - - _0 = Z_TYPE_P(filters) != IS_STRING; if (_0) { _0 = Z_TYPE_P(filters) != IS_ARRAY; @@ -895,17 +782,10 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, setForm) zval *this_ptr = getThis(); ZVAL_UNDEF(&form_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(form, phalcon_forms_form_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &form); - - zephir_update_property_zval(this_ptr, ZEND_STRL("form"), form); RETURN_THISW(); } @@ -921,19 +801,13 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, setLabel) zval *this_ptr = getThis(); ZVAL_UNDEF(&label); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(label) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &label_param); zephir_get_strval(&label, label_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("label"), &label); RETURN_THIS(); } @@ -947,17 +821,10 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, setMessages) zval *this_ptr = getThis(); ZVAL_UNDEF(&messages_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(messages, phalcon_messages_messages_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &messages); - - zephir_update_property_zval(this_ptr, ZEND_STRL("messages"), messages); RETURN_THISW(); } @@ -973,15 +840,11 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, setName) zval *this_ptr = getThis(); ZVAL_UNDEF(&name); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -992,8 +855,6 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, setName) } else { ZEPHIR_INIT_VAR(&name); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("name"), &name); RETURN_THIS(); } @@ -1007,17 +868,10 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, setTagFactory) zval *this_ptr = getThis(); ZVAL_UNDEF(&tagFactory_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(tagFactory, phalcon_html_tagfactory_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &tagFactory); - - zephir_update_property_zval(this_ptr, ZEND_STRL("tagFactory"), tagFactory); RETURN_THISW(); } @@ -1034,20 +888,14 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, setUserOption) ZVAL_UNDEF(&option); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(option) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &option_param, &value); zephir_get_strval(&option, option_param); - - zephir_update_property_array(this_ptr, SL("options"), &option, value); RETURN_THIS(); } @@ -1063,19 +911,13 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, setUserOptions) zval *this_ptr = getThis(); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &options_param); zephir_get_arrval(&options, options_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("options"), &options); RETURN_THIS(); } @@ -1085,9 +927,8 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, setUserOptions) */ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, getLocalTagFactory) { - zval container, escaper, tagFactory, _0, _1$$3, _2$$4, _4$$5, _5$$5, _6$$6, _7$$7, _8$$7, _9$$8; + zval container, escaper, tagFactory, _0, _1$$3, _2$$4, _3$$5, _4$$5, _5$$6, _6$$7, _7$$7, _8$$8; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zephir_fcall_cache_entry *_3 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *this_ptr = getThis(); @@ -1097,15 +938,14 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, getLocalTagFactory) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$4); + ZVAL_UNDEF(&_3$$5); ZVAL_UNDEF(&_4$$5); - ZVAL_UNDEF(&_5$$5); - ZVAL_UNDEF(&_6$$6); + ZVAL_UNDEF(&_5$$6); + ZVAL_UNDEF(&_6$$7); ZVAL_UNDEF(&_7$$7); - ZVAL_UNDEF(&_8$$7); - ZVAL_UNDEF(&_9$$8); - - - ZEPHIR_MM_GROW(); + ZVAL_UNDEF(&_8$$8); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&tagFactory); ZVAL_NULL(&tagFactory); @@ -1118,30 +958,30 @@ PHP_METHOD(Phalcon_Forms_Element_AbstractElement, getLocalTagFactory) zephir_check_call_status(); } if (Z_TYPE_P(&tagFactory) == IS_NULL) { - ZEPHIR_CALL_CE_STATIC(&container, phalcon_di_di_ce, "getdefault", &_3, 0); + ZEPHIR_CALL_CE_STATIC(&container, phalcon_di_di_ce, "getdefault", NULL, 0); zephir_check_call_status(); - ZEPHIR_INIT_VAR(&_5$$5); - ZVAL_STRING(&_5$$5, "tag"); - ZEPHIR_CALL_METHOD(&_4$$5, &container, "has", NULL, 0, &_5$$5); + ZEPHIR_INIT_VAR(&_4$$5); + ZVAL_STRING(&_4$$5, "tag"); + ZEPHIR_CALL_METHOD(&_3$$5, &container, "has", NULL, 0, &_4$$5); zephir_check_call_status(); - if (EXPECTED(ZEPHIR_IS_TRUE_IDENTICAL(&_4$$5))) { - ZEPHIR_INIT_VAR(&_6$$6); - ZVAL_STRING(&_6$$6, "tag"); - ZEPHIR_CALL_METHOD(&tagFactory, &container, "getshared", NULL, 0, &_6$$6); + if (EXPECTED(ZEPHIR_IS_TRUE_IDENTICAL(&_3$$5))) { + ZEPHIR_INIT_VAR(&_5$$6); + ZVAL_STRING(&_5$$6, "tag"); + ZEPHIR_CALL_METHOD(&tagFactory, &container, "getshared", NULL, 0, &_5$$6); zephir_check_call_status(); } } if (Z_TYPE_P(&tagFactory) == IS_NULL) { - ZEPHIR_CALL_CE_STATIC(&container, phalcon_di_di_ce, "getdefault", &_3, 0); + ZEPHIR_CALL_CE_STATIC(&container, phalcon_di_di_ce, "getdefault", NULL, 0); zephir_check_call_status(); - ZEPHIR_INIT_VAR(&_8$$7); - ZVAL_STRING(&_8$$7, "escaper"); - ZEPHIR_CALL_METHOD(&_7$$7, &container, "has", NULL, 0, &_8$$7); + ZEPHIR_INIT_VAR(&_7$$7); + ZVAL_STRING(&_7$$7, "escaper"); + ZEPHIR_CALL_METHOD(&_6$$7, &container, "has", NULL, 0, &_7$$7); zephir_check_call_status(); - if (EXPECTED(ZEPHIR_IS_TRUE_IDENTICAL(&_7$$7))) { - ZEPHIR_INIT_VAR(&_9$$8); - ZVAL_STRING(&_9$$8, "escaper"); - ZEPHIR_CALL_METHOD(&escaper, &container, "getshared", NULL, 0, &_9$$8); + if (EXPECTED(ZEPHIR_IS_TRUE_IDENTICAL(&_6$$7))) { + ZEPHIR_INIT_VAR(&_8$$8); + ZVAL_STRING(&_8$$8, "escaper"); + ZEPHIR_CALL_METHOD(&escaper, &container, "getshared", NULL, 0, &_8$$8); zephir_check_call_status(); } else { ZEPHIR_INIT_NVAR(&escaper); @@ -1176,7 +1016,8 @@ zend_object *zephir_init_properties_Phalcon_Forms_Element_AbstractElement(zend_c ZVAL_UNDEF(&_7$$6); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/forms/element/abstractelement.zep.h b/ext/phalcon/forms/element/abstractelement.zep.h index 5404b33cc7f..2ce2a7179fe 100644 --- a/ext/phalcon/forms/element/abstractelement.zep.h +++ b/ext/phalcon/forms/element/abstractelement.zep.h @@ -42,11 +42,7 @@ zend_object *zephir_init_properties_Phalcon_Forms_Element_AbstractElement(zend_c ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_forms_element_abstractelement___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_forms_element_abstractelement___tostring, 0, 0, IS_STRING, 0) @@ -119,19 +115,11 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_forms_element_abstractel ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_forms_element_abstractelement_label, 0, 0, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_forms_element_abstractelement_render, 0, 0, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_forms_element_abstractelement_setattribute, 0, 2, Phalcon\\Forms\\Element\\ElementInterface, 0) @@ -196,16 +184,8 @@ ZEPHIR_INIT_FUNCS(phalcon_forms_element_abstractelement_method_entry) { PHP_ME(Phalcon_Forms_Element_AbstractElement, clear, arginfo_phalcon_forms_element_abstractelement_clear, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Forms_Element_AbstractElement, getAttribute, arginfo_phalcon_forms_element_abstractelement_getattribute, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Forms_Element_AbstractElement, getAttributes, arginfo_phalcon_forms_element_abstractelement_getattributes, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Forms_Element_AbstractElement, getDefault, arginfo_phalcon_forms_element_abstractelement_getdefault, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Forms_Element_AbstractElement, getDefault, NULL, ZEND_ACC_PUBLIC) -#endif -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Forms_Element_AbstractElement, getFilters, arginfo_phalcon_forms_element_abstractelement_getfilters, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Forms_Element_AbstractElement, getFilters, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Forms_Element_AbstractElement, getDefault, arginfo_phalcon_forms_element_abstractelement_getdefault, ZEND_ACC_PUBLIC) +PHP_ME(Phalcon_Forms_Element_AbstractElement, getFilters, arginfo_phalcon_forms_element_abstractelement_getfilters, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Forms_Element_AbstractElement, getForm, arginfo_phalcon_forms_element_abstractelement_getform, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Forms_Element_AbstractElement, getLabel, arginfo_phalcon_forms_element_abstractelement_getlabel, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Forms_Element_AbstractElement, getMessages, arginfo_phalcon_forms_element_abstractelement_getmessages, ZEND_ACC_PUBLIC) @@ -214,11 +194,7 @@ ZEPHIR_INIT_FUNCS(phalcon_forms_element_abstractelement_method_entry) { PHP_ME(Phalcon_Forms_Element_AbstractElement, getUserOption, arginfo_phalcon_forms_element_abstractelement_getuseroption, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Forms_Element_AbstractElement, getUserOptions, arginfo_phalcon_forms_element_abstractelement_getuseroptions, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Forms_Element_AbstractElement, getValidators, arginfo_phalcon_forms_element_abstractelement_getvalidators, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Forms_Element_AbstractElement, getValue, arginfo_phalcon_forms_element_abstractelement_getvalue, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Forms_Element_AbstractElement, getValue, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Forms_Element_AbstractElement, getValue, arginfo_phalcon_forms_element_abstractelement_getvalue, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Forms_Element_AbstractElement, hasMessages, arginfo_phalcon_forms_element_abstractelement_hasmessages, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Forms_Element_AbstractElement, label, arginfo_phalcon_forms_element_abstractelement_label, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Forms_Element_AbstractElement, render, arginfo_phalcon_forms_element_abstractelement_render, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/forms/element/elementinterface.zep.h b/ext/phalcon/forms/element/elementinterface.zep.h index c226c49b149..b5467019ffc 100644 --- a/ext/phalcon/forms/element/elementinterface.zep.h +++ b/ext/phalcon/forms/element/elementinterface.zep.h @@ -70,11 +70,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_forms_element_elementint ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_forms_element_elementinterface_render, 0, 0, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_forms_element_elementinterface_setattribute, 0, 2, Phalcon\\Forms\\Element\\ElementInterface, 0) diff --git a/ext/phalcon/forms/element/select.zep.c b/ext/phalcon/forms/element/select.zep.c index af9df3b69af..8c9de9a14d7 100644 --- a/ext/phalcon/forms/element/select.zep.c +++ b/ext/phalcon/forms/element/select.zep.c @@ -51,7 +51,6 @@ PHP_METHOD(Phalcon_Forms_Element_Select, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval attributes; zval *name_param = NULL, *options = NULL, options_sub, *attributes_param = NULL, __$null; zval name; @@ -61,7 +60,6 @@ PHP_METHOD(Phalcon_Forms_Element_Select, __construct) ZVAL_UNDEF(&options_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(name) @@ -69,10 +67,8 @@ PHP_METHOD(Phalcon_Forms_Element_Select, __construct) Z_PARAM_ZVAL_OR_NULL(options) Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &name_param, &options, &attributes_param); zephir_get_strval(&name, name_param); if (!options) { @@ -85,10 +81,8 @@ PHP_METHOD(Phalcon_Forms_Element_Select, __construct) } else { zephir_get_arrval(&attributes, attributes_param); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("optionsValues"), options); - ZEPHIR_CALL_PARENT(NULL, phalcon_forms_element_select_ce, getThis(), "__construct", &_0, 0, &name, &attributes); + ZEPHIR_CALL_PARENT(NULL, phalcon_forms_element_select_ce, getThis(), "__construct", NULL, 0, &name, &attributes); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -111,18 +105,12 @@ PHP_METHOD(Phalcon_Forms_Element_Select, addOption) ZVAL_UNDEF(&key); ZVAL_UNDEF(&value); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(option) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &option); - - if (Z_TYPE_P(option) == IS_ARRAY) { zephir_is_iterable(option, 0, "phalcon/Forms/Element/Select.zep", 51); if (Z_TYPE_P(option) == IS_ARRAY) { @@ -171,9 +159,6 @@ PHP_METHOD(Phalcon_Forms_Element_Select, addOption) */ PHP_METHOD(Phalcon_Forms_Element_Select, getOptions) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "optionsValues"); } @@ -185,24 +170,19 @@ PHP_METHOD(Phalcon_Forms_Element_Select, render) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; - zval *attributes_param = NULL, _1, _2; + zval *attributes_param = NULL, _0, _1; zval attributes; zval *this_ptr = getThis(); ZVAL_UNDEF(&attributes); + ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &attributes_param); if (!attributes_param) { ZEPHIR_INIT_VAR(&attributes); @@ -210,12 +190,10 @@ PHP_METHOD(Phalcon_Forms_Element_Select, render) } else { zephir_get_arrval(&attributes, attributes_param); } - - - ZEPHIR_CALL_METHOD(&_1, this_ptr, "prepareattributes", NULL, 0, &attributes); + ZEPHIR_CALL_METHOD(&_0, this_ptr, "prepareattributes", NULL, 0, &attributes); zephir_check_call_status(); - zephir_read_property(&_2, this_ptr, ZEND_STRL("optionsValues"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_RETURN_CALL_CE_STATIC(phalcon_tag_select_ce, "selectfield", &_0, 0, &_1, &_2); + zephir_read_property(&_1, this_ptr, ZEND_STRL("optionsValues"), PH_NOISY_CC | PH_READONLY); + ZEPHIR_RETURN_CALL_CE_STATIC(phalcon_tag_select_ce, "selectfield", NULL, 0, &_0, &_1); zephir_check_call_status(); RETURN_MM(); } @@ -231,17 +209,10 @@ PHP_METHOD(Phalcon_Forms_Element_Select, setOptions) zval *this_ptr = getThis(); ZVAL_UNDEF(&options_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &options); - - zephir_update_property_zval(this_ptr, ZEND_STRL("optionsValues"), options); RETURN_THISW(); } @@ -264,16 +235,12 @@ PHP_METHOD(Phalcon_Forms_Element_Select, prepareAttributes) ZVAL_UNDEF(&mergedAttributes); ZVAL_UNDEF(&defaultAttributes); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &attributes_param); if (!attributes_param) { ZEPHIR_INIT_VAR(&attributes); @@ -281,12 +248,10 @@ PHP_METHOD(Phalcon_Forms_Element_Select, prepareAttributes) } else { zephir_get_arrval(&attributes, attributes_param); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("name"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&name, &_0); zephir_array_update_long(&attributes, 0, &name, PH_COPY | PH_SEPARATE ZEPHIR_DEBUG_PARAMS_DUMMY); - ZEPHIR_OBS_VAR(&defaultAttributes); + zephir_memory_observe(&defaultAttributes); zephir_read_property(&defaultAttributes, this_ptr, ZEND_STRL("attributes"), PH_NOISY_CC); ZEPHIR_INIT_VAR(&mergedAttributes); zephir_fast_array_merge(&mergedAttributes, &defaultAttributes, &attributes); diff --git a/ext/phalcon/forms/element/select.zep.h b/ext/phalcon/forms/element/select.zep.h index a5de02d4704..1113c19d4b5 100644 --- a/ext/phalcon/forms/element/select.zep.h +++ b/ext/phalcon/forms/element/select.zep.h @@ -13,11 +13,7 @@ PHP_METHOD(Phalcon_Forms_Element_Select, prepareAttributes); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_forms_element_select___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_ARG_INFO(0, options) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_forms_element_select_addoption, 0, 1, Phalcon\\Forms\\Element\\ElementInterface, 0) @@ -28,11 +24,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_forms_element_select_getoptions, 0, 0, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_forms_element_select_render, 0, 0, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_forms_element_select_setoptions, 0, 1, Phalcon\\Forms\\Element\\ElementInterface, 0) @@ -40,21 +32,13 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_forms_element_select_seto ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_forms_element_select_prepareattributes, 0, 0, IS_ARRAY, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_forms_element_select_method_entry) { PHP_ME(Phalcon_Forms_Element_Select, __construct, arginfo_phalcon_forms_element_select___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) PHP_ME(Phalcon_Forms_Element_Select, addOption, arginfo_phalcon_forms_element_select_addoption, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Forms_Element_Select, getOptions, arginfo_phalcon_forms_element_select_getoptions, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Forms_Element_Select, getOptions, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Forms_Element_Select, getOptions, arginfo_phalcon_forms_element_select_getoptions, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Forms_Element_Select, render, arginfo_phalcon_forms_element_select_render, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Forms_Element_Select, setOptions, arginfo_phalcon_forms_element_select_setoptions, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Forms_Element_Select, prepareAttributes, arginfo_phalcon_forms_element_select_prepareattributes, ZEND_ACC_PROTECTED) diff --git a/ext/phalcon/forms/form.zep.c b/ext/phalcon/forms/form.zep.c index fc68d8177aa..e949af8833a 100644 --- a/ext/phalcon/forms/form.zep.c +++ b/ext/phalcon/forms/form.zep.c @@ -111,17 +111,14 @@ PHP_METHOD(Phalcon_Forms_Form, __construct) ZVAL_NULL(&__$null); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&userOptions); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(entity) Z_PARAM_ARRAY(userOptions) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 2, &entity, &userOptions_param); if (!entity) { entity = &entity_sub; @@ -133,8 +130,6 @@ PHP_METHOD(Phalcon_Forms_Form, __construct) } else { zephir_get_arrval(&userOptions, userOptions_param); } - - _0 = Z_TYPE_P(entity) != IS_NULL; if (_0) { _0 = Z_TYPE_P(entity) != IS_OBJECT; @@ -147,7 +142,7 @@ PHP_METHOD(Phalcon_Forms_Form, __construct) zephir_update_property_zval(this_ptr, ZEND_STRL("options"), &userOptions); ZEPHIR_INIT_VAR(&_1); object_init_ex(&_1, phalcon_html_attributes_ce); - ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 22); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 23); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("attributes"), &_1); if ((zephir_method_exists_ex(this_ptr, ZEND_STRL("initialize")) == SUCCESS)) { @@ -183,7 +178,6 @@ PHP_METHOD(Phalcon_Forms_Form, add) ZVAL_UNDEF(&_7$$5); ZVAL_UNDEF(&position); ZVAL_UNDEF(&elements); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_OBJECT_OF_CLASS(element, phalcon_forms_element_elementinterface_ce) @@ -191,10 +185,8 @@ PHP_METHOD(Phalcon_Forms_Form, add) Z_PARAM_STR_OR_NULL(position) Z_PARAM_BOOL_OR_NULL(type, is_null_true) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &element, &position_param, &type_param); if (!position_param) { ZEPHIR_INIT_VAR(&position); @@ -204,10 +196,7 @@ PHP_METHOD(Phalcon_Forms_Form, add) if (!type_param) { type = 0; } else { - type = zephir_get_boolval(type_param); - } - - + } ZEPHIR_CALL_METHOD(&name, element, "getname", NULL, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, element, "setform", NULL, 0, this_ptr); @@ -338,7 +327,6 @@ PHP_METHOD(Phalcon_Forms_Form, bind) ZVAL_UNDEF(&_17$$19); ZVAL_UNDEF(&_18$$19); ZVAL_UNDEF(&method); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_ARRAY(data) @@ -346,10 +334,8 @@ PHP_METHOD(Phalcon_Forms_Form, bind) Z_PARAM_ZVAL_OR_NULL(entity) Z_PARAM_ARRAY(whitelist) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &data_param, &entity, &whitelist_param); ZEPHIR_OBS_COPY_OR_DUP(&data, data_param); if (!entity) { @@ -364,8 +350,6 @@ PHP_METHOD(Phalcon_Forms_Form, bind) } else { zephir_get_arrval(&whitelist, whitelist_param); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("elements"), PH_NOISY_CC | PH_READONLY); if (UNEXPECTED(ZEPHIR_IS_EMPTY(&_0))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_forms_exception_ce, "There are no elements in the form", "phalcon/Forms/Form.zep", 195); @@ -426,7 +410,7 @@ PHP_METHOD(Phalcon_Forms_Form, bind) zephir_array_update_zval(&filteredData, &key, &filteredValue, PH_COPY | PH_SEPARATE); if (Z_TYPE_P(entity) != IS_NULL) { ZEPHIR_INIT_NVAR(&_11$$11); - zephir_camelize(&_11$$11, &key, NULL ); + zephir_camelize(&_11$$11, &key, NULL ); ZEPHIR_INIT_NVAR(&_12$$11); ZEPHIR_CONCAT_SV(&_12$$11, "set", &_11$$11); zephir_get_strval(&method, &_12$$11); @@ -484,7 +468,7 @@ PHP_METHOD(Phalcon_Forms_Form, bind) zephir_array_update_zval(&filteredData, &key, &filteredValue, PH_COPY | PH_SEPARATE); if (Z_TYPE_P(entity) != IS_NULL) { ZEPHIR_INIT_NVAR(&_17$$19); - zephir_camelize(&_17$$19, &key, NULL ); + zephir_camelize(&_17$$19, &key, NULL ); ZEPHIR_INIT_NVAR(&_18$$19); ZEPHIR_CONCAT_SV(&_18$$19, "set", &_17$$19); zephir_get_strval(&method, &_18$$19); @@ -536,16 +520,13 @@ PHP_METHOD(Phalcon_Forms_Form, clear) ZVAL_UNDEF(&_11$$10); ZVAL_UNDEF(&_12$$13); ZVAL_UNDEF(&_13$$13); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(fields) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &fields); if (!fields) { fields = &fields_sub; @@ -553,8 +534,6 @@ PHP_METHOD(Phalcon_Forms_Form, clear) } else { ZEPHIR_SEPARATE_PARAM(fields); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("data"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&data, &_0); zephir_read_property(&_0, this_ptr, ZEND_STRL("elements"), PH_NOISY_CC | PH_READONLY); @@ -661,9 +640,6 @@ PHP_METHOD(Phalcon_Forms_Form, count) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - zephir_read_property(&_0, this_ptr, ZEND_STRL("elements"), PH_NOISY_CC | PH_READONLY); RETURN_LONG(zephir_fast_count_int(&_0)); } @@ -674,20 +650,22 @@ PHP_METHOD(Phalcon_Forms_Form, count) PHP_METHOD(Phalcon_Forms_Form, current) { zval element, _0, _1; + zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *this_ptr = getThis(); ZVAL_UNDEF(&element); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - + zephir_memory_observe(&element); zephir_read_property(&_0, this_ptr, ZEND_STRL("elementsIndexed"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_1, this_ptr, ZEND_STRL("position"), PH_NOISY_CC | PH_READONLY); - if (!(zephir_array_isset_fetch(&element, &_0, &_1, 1))) { - RETURN_BOOL(0); + if (!(zephir_array_isset_fetch(&element, &_0, &_1, 0))) { + RETURN_MM_BOOL(0); } - RETURN_CTORW(&element); + RETURN_CCTOR(&element); } /** @@ -706,15 +684,11 @@ PHP_METHOD(Phalcon_Forms_Form, get) ZVAL_UNDEF(&element); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -725,16 +699,14 @@ PHP_METHOD(Phalcon_Forms_Form, get) } else { ZEPHIR_INIT_VAR(&name); } - - - ZEPHIR_OBS_VAR(&element); + zephir_memory_observe(&element); zephir_read_property(&_0, this_ptr, ZEND_STRL("elements"), PH_NOISY_CC | PH_READONLY); if (UNEXPECTED(!(zephir_array_isset_fetch(&element, &_0, &name, 0)))) { ZEPHIR_INIT_VAR(&_1$$3); object_init_ex(&_1$$3, phalcon_forms_exception_ce); ZEPHIR_INIT_VAR(&_2$$3); ZEPHIR_CONCAT_SVS(&_2$$3, "Element with ID=", &name, " is not part of the form"); - ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 32, &_2$$3); + ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 33, &_2$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_1$$3, "phalcon/Forms/Form.zep", 343); ZEPHIR_MM_RESTORE(); @@ -758,9 +730,8 @@ PHP_METHOD(Phalcon_Forms_Form, getAction) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&_0, this_ptr, "getattributes", NULL, 0); zephir_check_call_status(); @@ -784,15 +755,14 @@ PHP_METHOD(Phalcon_Forms_Form, getAttributes) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("attributes"), PH_NOISY_CC | PH_READONLY); if (UNEXPECTED(Z_TYPE_P(&_0) == IS_NULL)) { ZEPHIR_INIT_VAR(&_1$$3); object_init_ex(&_1$$3, phalcon_html_attributes_ce); - ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 22); + ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 23); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("attributes"), &_1$$3); } @@ -804,9 +774,6 @@ PHP_METHOD(Phalcon_Forms_Form, getAttributes) */ PHP_METHOD(Phalcon_Forms_Form, getElements) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "elements"); } @@ -818,9 +785,6 @@ PHP_METHOD(Phalcon_Forms_Form, getElements) */ PHP_METHOD(Phalcon_Forms_Form, getEntity) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "entity"); } @@ -840,15 +804,11 @@ PHP_METHOD(Phalcon_Forms_Form, getFilteredValue) ZVAL_UNDEF(&filteredData); ZVAL_UNDEF(&value); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -859,12 +819,10 @@ PHP_METHOD(Phalcon_Forms_Form, getFilteredValue) } else { ZEPHIR_INIT_VAR(&name); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("filteredData"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&filteredData, &_0); if (Z_TYPE_P(&filteredData) == IS_ARRAY) { - ZEPHIR_OBS_VAR(&value); + zephir_memory_observe(&value); if (zephir_array_isset_fetch(&value, &filteredData, &name, 0)) { RETURN_CCTOR(&value); } @@ -891,15 +849,11 @@ PHP_METHOD(Phalcon_Forms_Form, getLabel) ZVAL_UNDEF(&label); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -910,16 +864,14 @@ PHP_METHOD(Phalcon_Forms_Form, getLabel) } else { ZEPHIR_INIT_VAR(&name); } - - - ZEPHIR_OBS_VAR(&element); + zephir_memory_observe(&element); zephir_read_property(&_0, this_ptr, ZEND_STRL("elements"), PH_NOISY_CC | PH_READONLY); if (UNEXPECTED(!(zephir_array_isset_fetch(&element, &_0, &name, 0)))) { ZEPHIR_INIT_VAR(&_1$$3); object_init_ex(&_1$$3, phalcon_forms_exception_ce); ZEPHIR_INIT_VAR(&_2$$3); ZEPHIR_CONCAT_SVS(&_2$$3, "Element with ID=", &name, " is not part of the form"); - ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 32, &_2$$3); + ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 33, &_2$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_1$$3, "phalcon/Forms/Form.zep", 418); ZEPHIR_MM_RESTORE(); @@ -956,9 +908,8 @@ PHP_METHOD(Phalcon_Forms_Form, getMessages) ZVAL_UNDEF(&messages); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("messages"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&messages, &_0); @@ -989,15 +940,11 @@ PHP_METHOD(Phalcon_Forms_Form, getMessagesFor) ZVAL_UNDEF(&name); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -1008,8 +955,6 @@ PHP_METHOD(Phalcon_Forms_Form, getMessagesFor) } else { ZEPHIR_INIT_VAR(&name); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "has", NULL, 0, &name); zephir_check_call_status(); if (!(zephir_is_true(&_0))) { @@ -1030,9 +975,6 @@ PHP_METHOD(Phalcon_Forms_Form, getMessagesFor) */ PHP_METHOD(Phalcon_Forms_Form, getTagFactory) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "tagFactory"); } @@ -1052,31 +994,27 @@ PHP_METHOD(Phalcon_Forms_Form, getUserOption) ZVAL_NULL(&__$null); ZVAL_UNDEF(&value); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(option) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(defaultValue) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &option_param, &defaultValue); zephir_get_strval(&option, option_param); if (!defaultValue) { defaultValue = &defaultValue_sub; defaultValue = &__$null; } - - + zephir_memory_observe(&value); zephir_read_property(&_0, this_ptr, ZEND_STRL("options"), PH_NOISY_CC | PH_READONLY); - if (!(zephir_array_isset_fetch(&value, &_0, &option, 1))) { + if (!(zephir_array_isset_fetch(&value, &_0, &option, 0))) { RETVAL_ZVAL(defaultValue, 1, 0); RETURN_MM(); } - RETURN_CTOR(&value); + RETURN_CCTOR(&value); } /** @@ -1084,9 +1022,6 @@ PHP_METHOD(Phalcon_Forms_Form, getUserOption) */ PHP_METHOD(Phalcon_Forms_Form, getUserOptions) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "options"); } @@ -1117,15 +1052,11 @@ PHP_METHOD(Phalcon_Forms_Form, getValue) ZVAL_UNDEF(&_1$$4); ZVAL_UNDEF(&_2$$4); ZVAL_UNDEF(&forbidden); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -1136,8 +1067,6 @@ PHP_METHOD(Phalcon_Forms_Form, getValue) } else { ZEPHIR_INIT_VAR(&name); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("entity"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&entity, &_0); zephir_read_property(&_0, this_ptr, ZEND_STRL("data"), PH_NOISY_CC | PH_READONLY); @@ -1149,7 +1078,7 @@ PHP_METHOD(Phalcon_Forms_Form, getValue) } if (Z_TYPE_P(&entity) == IS_OBJECT) { ZEPHIR_INIT_VAR(&_1$$4); - zephir_camelize(&_1$$4, &name, NULL ); + zephir_camelize(&_1$$4, &name, NULL ); ZEPHIR_INIT_VAR(&_2$$4); ZEPHIR_CONCAT_SV(&_2$$4, "get", &_1$$4); zephir_get_strval(&method, &_2$$4); @@ -1158,7 +1087,7 @@ PHP_METHOD(Phalcon_Forms_Form, getValue) zephir_check_call_status(); RETURN_MM(); } - ZEPHIR_OBS_VAR(&value); + zephir_memory_observe(&value); if (zephir_fetch_property_zval(&value, &entity, &name, PH_SILENT_CC)) { RETURN_CCTOR(&value); } @@ -1191,7 +1120,7 @@ PHP_METHOD(Phalcon_Forms_Form, getValue) RETURN_MM_NULL(); } ZEPHIR_INIT_VAR(&_3); - zephir_camelize(&_3, &name, NULL ); + zephir_camelize(&_3, &name, NULL ); ZEPHIR_INIT_VAR(&_4); ZEPHIR_CONCAT_SV(&_4, "get", &_3); zephir_get_strval(&method, &_4); @@ -1200,7 +1129,7 @@ PHP_METHOD(Phalcon_Forms_Form, getValue) zephir_check_call_status(); RETURN_MM(); } - ZEPHIR_OBS_VAR(&element); + zephir_memory_observe(&element); zephir_read_property(&_0, this_ptr, ZEND_STRL("elements"), PH_NOISY_CC | PH_READONLY); if (zephir_array_isset_fetch(&element, &_0, &name, 0)) { ZEPHIR_RETURN_CALL_METHOD(&element, "getdefault", NULL, 0); @@ -1215,9 +1144,6 @@ PHP_METHOD(Phalcon_Forms_Form, getValue) */ PHP_METHOD(Phalcon_Forms_Form, getValidation) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "validation"); } @@ -1227,9 +1153,6 @@ PHP_METHOD(Phalcon_Forms_Form, getValidation) */ PHP_METHOD(Phalcon_Forms_Form, getWhitelist) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "whitelist"); } @@ -1246,15 +1169,11 @@ PHP_METHOD(Phalcon_Forms_Form, has) ZVAL_UNDEF(&name); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -1265,8 +1184,6 @@ PHP_METHOD(Phalcon_Forms_Form, has) } else { ZEPHIR_INIT_VAR(&name); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("elements"), PH_NOISY_CC | PH_READONLY); RETURN_MM_BOOL(zephir_array_isset(&_0, &name)); } @@ -1285,15 +1202,11 @@ PHP_METHOD(Phalcon_Forms_Form, hasMessagesFor) ZVAL_UNDEF(&name); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -1304,8 +1217,6 @@ PHP_METHOD(Phalcon_Forms_Form, hasMessagesFor) } else { ZEPHIR_INIT_VAR(&name); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "getmessagesfor", NULL, 0, &name); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_1, &_0, "count", NULL, 0); @@ -1356,7 +1267,6 @@ PHP_METHOD(Phalcon_Forms_Form, isValid) ZVAL_UNDEF(&_19$$21); ZVAL_UNDEF(&_20$$21); ZVAL_UNDEF(&whitelist); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 3) Z_PARAM_OPTIONAL @@ -1364,10 +1274,8 @@ PHP_METHOD(Phalcon_Forms_Form, isValid) Z_PARAM_ZVAL_OR_NULL(entity) Z_PARAM_ARRAY(whitelist) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 3, &data, &entity, &whitelist_param); if (!data) { data = &data_sub; @@ -1387,8 +1295,6 @@ PHP_METHOD(Phalcon_Forms_Form, isValid) } else { zephir_get_arrval(&whitelist, whitelist_param); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("elements"), PH_NOISY_CC | PH_READONLY); if (ZEPHIR_IS_EMPTY(&_0)) { RETURN_MM_BOOL(1); @@ -1403,7 +1309,7 @@ PHP_METHOD(Phalcon_Forms_Form, isValid) } _3 = Z_TYPE_P(entity) != IS_OBJECT; if (_3) { - ZEPHIR_OBS_VAR(&_4); + zephir_memory_observe(&_4); zephir_read_property(&_4, this_ptr, ZEND_STRL("entity"), PH_NOISY_CC); _3 = Z_TYPE_P(&_4) == IS_OBJECT; } @@ -1430,7 +1336,7 @@ PHP_METHOD(Phalcon_Forms_Form, isValid) if (_7) { ZEPHIR_INIT_NVAR(&validation); object_init_ex(&validation, phalcon_filter_validation_ce); - ZEPHIR_CALL_METHOD(NULL, &validation, "__construct", NULL, 314); + ZEPHIR_CALL_METHOD(NULL, &validation, "__construct", NULL, 315); zephir_check_call_status(); } zephir_read_property(&_8, this_ptr, ZEND_STRL("elements"), PH_NOISY_CC | PH_READONLY); @@ -1453,7 +1359,7 @@ PHP_METHOD(Phalcon_Forms_Form, isValid) { ZEPHIR_INIT_NVAR(&validator); ZVAL_COPY(&validator, _11$$10); - ZEPHIR_CALL_METHOD(NULL, &validation, "add", &_13, 315, &name, &validator); + ZEPHIR_CALL_METHOD(NULL, &validation, "add", &_13, 316, &name, &validator); zephir_check_call_status(); } ZEND_HASH_FOREACH_END(); } else { @@ -1467,7 +1373,7 @@ PHP_METHOD(Phalcon_Forms_Form, isValid) } ZEPHIR_CALL_METHOD(&validator, &validators, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &validation, "add", &_13, 315, &name, &validator); + ZEPHIR_CALL_METHOD(NULL, &validation, "add", &_13, 316, &name, &validator); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &validators, "next", NULL, 0); zephir_check_call_status(); @@ -1477,7 +1383,7 @@ PHP_METHOD(Phalcon_Forms_Form, isValid) ZEPHIR_CALL_METHOD(&filters, &element, "getfilters", NULL, 0); zephir_check_call_status(); if (Z_TYPE_P(&filters) == IS_ARRAY) { - ZEPHIR_CALL_METHOD(NULL, &validation, "setfilters", &_14, 316, &name, &filters); + ZEPHIR_CALL_METHOD(NULL, &validation, "setfilters", &_14, 317, &name, &filters); zephir_check_call_status(); } } ZEND_HASH_FOREACH_END(); @@ -1505,7 +1411,7 @@ PHP_METHOD(Phalcon_Forms_Form, isValid) { ZEPHIR_INIT_NVAR(&validator); ZVAL_COPY(&validator, _15$$15); - ZEPHIR_CALL_METHOD(NULL, &validation, "add", &_13, 315, &name, &validator); + ZEPHIR_CALL_METHOD(NULL, &validation, "add", &_13, 316, &name, &validator); zephir_check_call_status(); } ZEND_HASH_FOREACH_END(); } else { @@ -1519,7 +1425,7 @@ PHP_METHOD(Phalcon_Forms_Form, isValid) } ZEPHIR_CALL_METHOD(&validator, &validators, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &validation, "add", &_13, 315, &name, &validator); + ZEPHIR_CALL_METHOD(NULL, &validation, "add", &_13, 316, &name, &validator); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &validators, "next", NULL, 0); zephir_check_call_status(); @@ -1529,7 +1435,7 @@ PHP_METHOD(Phalcon_Forms_Form, isValid) ZEPHIR_CALL_METHOD(&filters, &element, "getfilters", NULL, 0); zephir_check_call_status(); if (Z_TYPE_P(&filters) == IS_ARRAY) { - ZEPHIR_CALL_METHOD(NULL, &validation, "setfilters", &_14, 316, &name, &filters); + ZEPHIR_CALL_METHOD(NULL, &validation, "setfilters", &_14, 317, &name, &filters); zephir_check_call_status(); } ZEPHIR_CALL_METHOD(NULL, &_8, "next", NULL, 0); @@ -1537,7 +1443,7 @@ PHP_METHOD(Phalcon_Forms_Form, isValid) } } ZEPHIR_INIT_NVAR(&element); - ZEPHIR_CALL_METHOD(&messages, &validation, "validate", NULL, 317, data, entity); + ZEPHIR_CALL_METHOD(&messages, &validation, "validate", NULL, 318, data, entity); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_17, &messages, "count", NULL, 0); zephir_check_call_status(); @@ -1575,9 +1481,6 @@ PHP_METHOD(Phalcon_Forms_Form, isValid) */ PHP_METHOD(Phalcon_Forms_Form, key) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "position"); } @@ -1600,17 +1503,13 @@ PHP_METHOD(Phalcon_Forms_Form, label) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(name) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &name_param, &attributes_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")); @@ -1627,16 +1526,14 @@ PHP_METHOD(Phalcon_Forms_Form, label) } else { zephir_get_arrval(&attributes, attributes_param); } - - - ZEPHIR_OBS_VAR(&element); + zephir_memory_observe(&element); zephir_read_property(&_0, this_ptr, ZEND_STRL("elements"), PH_NOISY_CC | PH_READONLY); if (UNEXPECTED(!(zephir_array_isset_fetch(&element, &_0, &name, 0)))) { ZEPHIR_INIT_VAR(&_1$$3); object_init_ex(&_1$$3, phalcon_forms_exception_ce); ZEPHIR_INIT_VAR(&_2$$3); ZEPHIR_CONCAT_SVS(&_2$$3, "Element with ID=", &name, " is not part of the form"); - ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 32, &_2$$3); + ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 33, &_2$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_1$$3, "phalcon/Forms/Form.zep", 764); ZEPHIR_MM_RESTORE(); @@ -1653,9 +1550,6 @@ PHP_METHOD(Phalcon_Forms_Form, label) PHP_METHOD(Phalcon_Forms_Form, next) { zval *this_ptr = getThis(); - - - RETURN_ON_FAILURE(zephir_property_incr(this_ptr, SL("position"))); } @@ -1677,17 +1571,13 @@ PHP_METHOD(Phalcon_Forms_Form, render) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(name) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &name_param, &attributes_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")); @@ -1704,16 +1594,14 @@ PHP_METHOD(Phalcon_Forms_Form, render) } else { zephir_get_arrval(&attributes, attributes_param); } - - - ZEPHIR_OBS_VAR(&element); + zephir_memory_observe(&element); zephir_read_property(&_0, this_ptr, ZEND_STRL("elements"), PH_NOISY_CC | PH_READONLY); if (UNEXPECTED(!(zephir_array_isset_fetch(&element, &_0, &name, 0)))) { ZEPHIR_INIT_VAR(&_1$$3); object_init_ex(&_1$$3, phalcon_forms_exception_ce); ZEPHIR_INIT_VAR(&_2$$3); ZEPHIR_CONCAT_SVS(&_2$$3, "Element with ID=", &name, " is not part of the form"); - ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 32, &_2$$3); + ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 33, &_2$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_1$$3, "phalcon/Forms/Form.zep", 788); ZEPHIR_MM_RESTORE(); @@ -1738,15 +1626,11 @@ PHP_METHOD(Phalcon_Forms_Form, remove) ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -1757,8 +1641,6 @@ PHP_METHOD(Phalcon_Forms_Form, remove) } else { ZEPHIR_INIT_VAR(&name); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("elements"), PH_NOISY_CC | PH_READONLY); if (zephir_array_isset(&_0, &name)) { zephir_unset_property_array(this_ptr, ZEND_STRL("elements"), &name); @@ -1782,11 +1664,10 @@ PHP_METHOD(Phalcon_Forms_Form, rewind) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, 0); zephir_update_property_zval(this_ptr, ZEND_STRL("position"), &_0); zephir_read_property(&_0, this_ptr, ZEND_STRL("elements"), PH_NOISY_CC | PH_READONLY); @@ -1812,15 +1693,11 @@ PHP_METHOD(Phalcon_Forms_Form, setAction) ZVAL_UNDEF(&action); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(action) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &action_param); if (UNEXPECTED(Z_TYPE_P(action_param) != IS_STRING && Z_TYPE_P(action_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'action' must be of the type string")); @@ -1831,8 +1708,6 @@ PHP_METHOD(Phalcon_Forms_Form, setAction) } else { ZEPHIR_INIT_VAR(&action); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "getattributes", NULL, 0); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_1); @@ -1851,17 +1726,10 @@ PHP_METHOD(Phalcon_Forms_Form, setAttributes) zval *this_ptr = getThis(); ZVAL_UNDEF(&attributes_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(attributes, phalcon_html_attributes_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &attributes); - - zephir_update_property_zval(this_ptr, ZEND_STRL("attributes"), attributes); RETURN_THISW(); } @@ -1877,17 +1745,10 @@ PHP_METHOD(Phalcon_Forms_Form, setEntity) zval *this_ptr = getThis(); ZVAL_UNDEF(&entity_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(entity) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &entity); - - zephir_update_property_zval(this_ptr, ZEND_STRL("entity"), entity); RETURN_THISW(); } @@ -1901,17 +1762,10 @@ PHP_METHOD(Phalcon_Forms_Form, setTagFactory) zval *this_ptr = getThis(); ZVAL_UNDEF(&tagFactory_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(tagFactory, phalcon_html_tagfactory_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &tagFactory); - - zephir_update_property_zval(this_ptr, ZEND_STRL("tagFactory"), tagFactory); RETURN_THISW(); } @@ -1927,17 +1781,10 @@ PHP_METHOD(Phalcon_Forms_Form, setValidation) zval *this_ptr = getThis(); ZVAL_UNDEF(&validation_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(validation, phalcon_filter_validation_validationinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &validation); - - zephir_update_property_zval(this_ptr, ZEND_STRL("validation"), validation); RETURN_THISW(); } @@ -1955,19 +1802,13 @@ PHP_METHOD(Phalcon_Forms_Form, setWhitelist) zval *this_ptr = getThis(); ZVAL_UNDEF(&whitelist); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(whitelist) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &whitelist_param); zephir_get_arrval(&whitelist, whitelist_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("whitelist"), &whitelist); RETURN_THIS(); } @@ -1984,20 +1825,14 @@ PHP_METHOD(Phalcon_Forms_Form, setUserOption) ZVAL_UNDEF(&option); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(option) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &option_param, &value); zephir_get_strval(&option, option_param); - - zephir_update_property_array(this_ptr, SL("options"), &option, value); RETURN_THIS(); } @@ -2013,19 +1848,13 @@ PHP_METHOD(Phalcon_Forms_Form, setUserOptions) zval *this_ptr = getThis(); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &options_param); ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("options"), &options); RETURN_THIS(); } @@ -2040,9 +1869,6 @@ PHP_METHOD(Phalcon_Forms_Form, valid) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - zephir_read_property(&_0, this_ptr, ZEND_STRL("elementsIndexed"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_1, this_ptr, ZEND_STRL("position"), PH_NOISY_CC | PH_READONLY); RETURN_BOOL(zephir_array_isset(&_0, &_1)); @@ -2066,7 +1892,8 @@ zend_object *zephir_init_properties_Phalcon_Forms_Form(zend_class_entry *class_t ZVAL_UNDEF(&_11$$8); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/forms/form.zep.h b/ext/phalcon/forms/form.zep.h index b25bec81159..9bfaf98f828 100644 --- a/ext/phalcon/forms/form.zep.h +++ b/ext/phalcon/forms/form.zep.h @@ -46,11 +46,7 @@ zend_object *zephir_init_properties_Phalcon_Forms_Form(zend_class_entry *class_t ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_forms_form___construct, 0, 0, 0) ZEND_ARG_INFO(0, entity) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, userOptions, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, userOptions, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, userOptions, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_forms_form_add, 0, 1, Phalcon\\Forms\\Form, 0) @@ -62,11 +58,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_forms_form_bind, 0, 1, Phalcon\\Forms\\Form, 0) ZEND_ARG_ARRAY_INFO(0, data, 0) ZEND_ARG_INFO(0, entity) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, whitelist, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, whitelist, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, whitelist, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_forms_form_clear, 0, 0, Phalcon\\Forms\\Form, 0) @@ -76,11 +68,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_forms_form_count, 0, 0, IS_LONG, 0) ZEND_END_ARG_INFO() -#if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_forms_form_current, 0, 0, IS_MIXED, 0) -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_forms_form_current, 0, 0, 0) -#endif ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_forms_form_get, 0, 1, Phalcon\\Forms\\Element\\ElementInterface, 0) @@ -146,11 +134,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_forms_form_isvalid, 0, 0, _IS_BOOL, 0) ZEND_ARG_INFO(0, data) ZEND_ARG_INFO(0, entity) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, whitelist, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, whitelist, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, whitelist, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_forms_form_key, 0, 0, IS_LONG, 0) @@ -158,11 +142,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_forms_form_label, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_forms_form_next, 0, 0, IS_VOID, 0) @@ -170,11 +150,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_forms_form_render, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_forms_form_remove, 0, 1, _IS_BOOL, 0) @@ -234,18 +210,10 @@ ZEPHIR_INIT_FUNCS(phalcon_forms_form_method_entry) { PHP_ME(Phalcon_Forms_Form, getAction, arginfo_phalcon_forms_form_getaction, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Forms_Form, getAttributes, arginfo_phalcon_forms_form_getattributes, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Forms_Form, getElements, arginfo_phalcon_forms_form_getelements, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Forms_Form, getEntity, arginfo_phalcon_forms_form_getentity, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Forms_Form, getEntity, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Forms_Form, getEntity, arginfo_phalcon_forms_form_getentity, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Forms_Form, getFilteredValue, arginfo_phalcon_forms_form_getfilteredvalue, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Forms_Form, getLabel, arginfo_phalcon_forms_form_getlabel, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Forms_Form, getMessages, arginfo_phalcon_forms_form_getmessages, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Forms_Form, getMessages, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Forms_Form, getMessages, arginfo_phalcon_forms_form_getmessages, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Forms_Form, getMessagesFor, arginfo_phalcon_forms_form_getmessagesfor, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Forms_Form, getTagFactory, arginfo_phalcon_forms_form_gettagfactory, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Forms_Form, getUserOption, arginfo_phalcon_forms_form_getuseroption, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/forms/manager.zep.c b/ext/phalcon/forms/manager.zep.c index 958824ca224..c62ec867685 100644 --- a/ext/phalcon/forms/manager.zep.c +++ b/ext/phalcon/forms/manager.zep.c @@ -62,28 +62,23 @@ PHP_METHOD(Phalcon_Forms_Manager, create) ZVAL_UNDEF(&entity_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&form); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(name) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(entity) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &name_param, &entity); zephir_get_strval(&name, name_param); if (!entity) { entity = &entity_sub; entity = &__$null; } - - ZEPHIR_INIT_VAR(&form); object_init_ex(&form, phalcon_forms_form_ce); - ZEPHIR_CALL_METHOD(NULL, &form, "__construct", NULL, 318, entity); + ZEPHIR_CALL_METHOD(NULL, &form, "__construct", NULL, 319, entity); zephir_check_call_status(); zephir_update_property_array(this_ptr, SL("forms"), &name, &form); RETURN_CCTOR(&form); @@ -105,27 +100,21 @@ PHP_METHOD(Phalcon_Forms_Manager, get) ZVAL_UNDEF(&form); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &name_param); zephir_get_strval(&name, name_param); - - - ZEPHIR_OBS_VAR(&form); + zephir_memory_observe(&form); zephir_read_property(&_0, this_ptr, ZEND_STRL("forms"), PH_NOISY_CC | PH_READONLY); if (UNEXPECTED(!(zephir_array_isset_fetch(&form, &_0, &name, 0)))) { ZEPHIR_INIT_VAR(&_1$$3); object_init_ex(&_1$$3, phalcon_forms_exception_ce); ZEPHIR_INIT_VAR(&_2$$3); ZEPHIR_CONCAT_SVS(&_2$$3, "There is no form with name='", &name, "'"); - ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 32, &_2$$3); + ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 33, &_2$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_1$$3, "phalcon/Forms/Manager.zep", 46); ZEPHIR_MM_RESTORE(); @@ -146,19 +135,13 @@ PHP_METHOD(Phalcon_Forms_Manager, has) ZVAL_UNDEF(&name); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &name_param); zephir_get_strval(&name, name_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("forms"), PH_NOISY_CC | PH_READONLY); RETURN_MM_BOOL(zephir_array_isset(&_0, &name)); } @@ -175,20 +158,14 @@ PHP_METHOD(Phalcon_Forms_Manager, set) ZVAL_UNDEF(&name); ZVAL_UNDEF(&form_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(name) Z_PARAM_OBJECT_OF_CLASS(form, phalcon_forms_form_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &name_param, &form); zephir_get_strval(&name, name_param); - - zephir_update_property_array(this_ptr, SL("forms"), &name, form); RETURN_THIS(); } @@ -201,7 +178,8 @@ zend_object *zephir_init_properties_Phalcon_Forms_Manager(zend_class_entry *clas ZVAL_UNDEF(&_1$$3); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/html/attributes.zep.c b/ext/phalcon/html/attributes.zep.c index 28f2c512b2b..55eab3c41f0 100644 --- a/ext/phalcon/html/attributes.zep.c +++ b/ext/phalcon/html/attributes.zep.c @@ -50,9 +50,8 @@ PHP_METHOD(Phalcon_Html_Attributes, render) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&_0, this_ptr, "toarray", NULL, 0); zephir_check_call_status(); @@ -69,10 +68,8 @@ PHP_METHOD(Phalcon_Html_Attributes, __toString) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *this_ptr = getThis(); - - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "render", NULL, 0); zephir_check_call_status(); @@ -92,7 +89,6 @@ PHP_METHOD(Phalcon_Html_Attributes, renderAttributes) zend_long ZEPHIR_LAST_CALL_STATUS; zval *attributes_param = NULL, __$null, __$true, intersect, key, result, results, value, *_0, _1, _5$$4, _6$$4, _7$$4, _9$$4, _11$$6, _12$$6, _13$$6, _14$$6; zval attributes, order; - zval *this_ptr = getThis(); ZVAL_UNDEF(&attributes); ZVAL_UNDEF(&order); @@ -112,19 +108,13 @@ PHP_METHOD(Phalcon_Html_Attributes, renderAttributes) ZVAL_UNDEF(&_12$$6); ZVAL_UNDEF(&_13$$6); ZVAL_UNDEF(&_14$$6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &attributes_param); zephir_get_arrval(&attributes, attributes_param); - - ZEPHIR_INIT_VAR(&order); zephir_create_array(&order, 10, 0); zephir_array_update_string(&order, SL("rel"), &__$null, PH_COPY | PH_SEPARATE); @@ -164,7 +154,7 @@ PHP_METHOD(Phalcon_Html_Attributes, renderAttributes) ZVAL_LONG(&_5$$4, 3); ZEPHIR_INIT_NVAR(&_6$$4); ZVAL_STRING(&_6$$4, "utf-8"); - ZEPHIR_CALL_FUNCTION(&_7$$4, "htmlspecialchars", &_8, 285, &value, &_5$$4, &_6$$4, &__$true); + ZEPHIR_CALL_FUNCTION(&_7$$4, "htmlspecialchars", &_8, 286, &value, &_5$$4, &_6$$4, &__$true); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_9$$4); ZEPHIR_CONCAT_VSVS(&_9$$4, &key, "=\"", &_7$$4, "\" "); @@ -192,7 +182,7 @@ PHP_METHOD(Phalcon_Html_Attributes, renderAttributes) ZVAL_LONG(&_11$$6, 3); ZEPHIR_INIT_NVAR(&_12$$6); ZVAL_STRING(&_12$$6, "utf-8"); - ZEPHIR_CALL_FUNCTION(&_13$$6, "htmlspecialchars", &_8, 285, &value, &_11$$6, &_12$$6, &__$true); + ZEPHIR_CALL_FUNCTION(&_13$$6, "htmlspecialchars", &_8, 286, &value, &_11$$6, &_12$$6, &__$true); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_14$$6); ZEPHIR_CONCAT_VSVS(&_14$$6, &key, "=\"", &_13$$6, "\" "); diff --git a/ext/phalcon/html/breadcrumbs.zep.c b/ext/phalcon/html/breadcrumbs.zep.c index 7de994f339b..b12363b030b 100644 --- a/ext/phalcon/html/breadcrumbs.zep.c +++ b/ext/phalcon/html/breadcrumbs.zep.c @@ -83,17 +83,13 @@ PHP_METHOD(Phalcon_Html_Breadcrumbs, add) ZVAL_UNDEF(&label); ZVAL_UNDEF(&link); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(label) Z_PARAM_OPTIONAL Z_PARAM_STR(link) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &label_param, &link_param); zephir_get_strval(&label, label_param); if (!link_param) { @@ -102,8 +98,6 @@ PHP_METHOD(Phalcon_Html_Breadcrumbs, add) } else { zephir_get_strval(&link, link_param); } - - zephir_update_property_array(this_ptr, SL("elements"), &link, &label); RETURN_THIS(); } @@ -122,9 +116,8 @@ PHP_METHOD(Phalcon_Html_Breadcrumbs, clear) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); array_init(&_0); @@ -139,9 +132,6 @@ PHP_METHOD(Phalcon_Html_Breadcrumbs, clear) */ PHP_METHOD(Phalcon_Html_Breadcrumbs, getSeparator) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "separator"); } @@ -166,19 +156,13 @@ PHP_METHOD(Phalcon_Html_Breadcrumbs, remove) ZVAL_UNDEF(&link); ZVAL_UNDEF(&elements); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(link) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &link_param); zephir_get_strval(&link, link_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("elements"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&elements, &_0); zephir_array_unset(&elements, &link, PH_SEPARATE); @@ -228,9 +212,8 @@ PHP_METHOD(Phalcon_Html_Breadcrumbs, render) ZVAL_UNDEF(&_12$$4); ZVAL_UNDEF(&_15$$6); ZVAL_UNDEF(&_17$$6); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&output); array_init(&output); @@ -241,10 +224,10 @@ PHP_METHOD(Phalcon_Html_Breadcrumbs, render) ZEPHIR_INIT_VAR(&urls); zephir_array_keys(&urls, &elements); ZEPHIR_MAKE_REF(&urls); - ZEPHIR_CALL_FUNCTION(&lastUrl, "end", NULL, 319, &urls); + ZEPHIR_CALL_FUNCTION(&lastUrl, "end", NULL, 320, &urls); ZEPHIR_UNREF(&urls); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&lastLabel); + zephir_memory_observe(&lastLabel); zephir_array_fetch(&lastLabel, &elements, &lastUrl, PH_NOISY, "phalcon/Html/Breadcrumbs.zep", 122); zephir_array_unset(&elements, &lastUrl, PH_SEPARATE); zephir_is_iterable(&elements, 0, "phalcon/Html/Breadcrumbs.zep", 143); @@ -352,19 +335,13 @@ PHP_METHOD(Phalcon_Html_Breadcrumbs, setSeparator) zval *this_ptr = getThis(); ZVAL_UNDEF(&separator); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(separator) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &separator_param); zephir_get_strval(&separator, separator_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("separator"), &separator); RETURN_THIS(); } @@ -374,9 +351,6 @@ PHP_METHOD(Phalcon_Html_Breadcrumbs, setSeparator) */ PHP_METHOD(Phalcon_Html_Breadcrumbs, toArray) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "elements"); } @@ -389,7 +363,8 @@ zend_object *zephir_init_properties_Phalcon_Html_Breadcrumbs(zend_class_entry *c ZVAL_UNDEF(&_1$$3); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/html/escaper.zep.c b/ext/phalcon/html/escaper.zep.c index 3743ccb4c16..7e8dd8f4c30 100644 --- a/ext/phalcon/html/escaper.zep.c +++ b/ext/phalcon/html/escaper.zep.c @@ -114,18 +114,12 @@ PHP_METHOD(Phalcon_Html_Escaper, attributes) ZVAL_UNDEF(&_11$$7); ZVAL_UNDEF(&_17$$8); ZVAL_UNDEF(&_19$$11); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &input); - - if (EXPECTED((Z_TYPE_P(input) != IS_ARRAY))) { zephir_cast_to_string(&_0$$3, input); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "phphtmlspecialchars", NULL, 0, &_0$$3); @@ -244,22 +238,16 @@ PHP_METHOD(Phalcon_Html_Escaper, css) ZVAL_UNDEF(&input); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &input_param); zephir_get_strval(&input, input_param); - - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "normalizeencoding", NULL, 320, &input); + ZEPHIR_CALL_METHOD(&_0, this_ptr, "normalizeencoding", NULL, 321, &input); zephir_check_call_status(); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "doescapecss", NULL, 321, &_0); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "doescapecss", NULL, 322, &_0); zephir_check_call_status(); RETURN_MM(); } @@ -281,7 +269,6 @@ PHP_METHOD(Phalcon_Html_Escaper, detectEncoding) zend_long ZEPHIR_LAST_CALL_STATUS; zval *input_param = NULL, __$true, charset, _1, *_2, _3, _4$$5, _6$$7; zval input; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input); ZVAL_BOOL(&__$true, 1); @@ -291,19 +278,13 @@ PHP_METHOD(Phalcon_Html_Escaper, detectEncoding) ZVAL_UNDEF(&_4$$5); ZVAL_UNDEF(&_6$$7); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &input_param); zephir_get_strval(&input, input_param); - - ZEPHIR_INIT_VAR(&charset); zephir_is_basic_charset(&charset, &input); if (Z_TYPE_P(&charset) == IS_STRING) { @@ -332,7 +313,7 @@ PHP_METHOD(Phalcon_Html_Escaper, detectEncoding) { ZEPHIR_INIT_NVAR(&charset); ZVAL_COPY(&charset, _2); - ZEPHIR_CALL_FUNCTION(&_4$$5, "mb_detect_encoding", &_5, 322, &input, &charset, &__$true); + ZEPHIR_CALL_FUNCTION(&_4$$5, "mb_detect_encoding", &_5, 323, &input, &charset, &__$true); zephir_check_call_status(); if (!ZEPHIR_IS_FALSE_IDENTICAL(&_4$$5)) { RETURN_CCTOR(&charset); @@ -349,7 +330,7 @@ PHP_METHOD(Phalcon_Html_Escaper, detectEncoding) } ZEPHIR_CALL_METHOD(&charset, &_0, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&_6$$7, "mb_detect_encoding", &_5, 322, &input, &charset, &__$true); + ZEPHIR_CALL_FUNCTION(&_6$$7, "mb_detect_encoding", &_5, 323, &input, &charset, &__$true); zephir_check_call_status(); if (!ZEPHIR_IS_FALSE_IDENTICAL(&_6$$7)) { RETURN_CCTOR(&charset); @@ -359,7 +340,7 @@ PHP_METHOD(Phalcon_Html_Escaper, detectEncoding) } } ZEPHIR_INIT_NVAR(&charset); - ZEPHIR_RETURN_CALL_FUNCTION("mb_detect_encoding", &_5, 322, &input); + ZEPHIR_RETURN_CALL_FUNCTION("mb_detect_encoding", &_5, 323, &input); zephir_check_call_status(); RETURN_MM(); } @@ -382,19 +363,13 @@ PHP_METHOD(Phalcon_Html_Escaper, escapeCss) zval *this_ptr = getThis(); ZVAL_UNDEF(&input); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &input_param); zephir_get_strval(&input, input_param); - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "css", NULL, 0, &input); zephir_check_call_status(); RETURN_MM(); @@ -418,19 +393,13 @@ PHP_METHOD(Phalcon_Html_Escaper, escapeJs) zval *this_ptr = getThis(); ZVAL_UNDEF(&input); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &input_param); zephir_get_strval(&input, input_param); - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "js", NULL, 0, &input); zephir_check_call_status(); RETURN_MM(); @@ -454,24 +423,19 @@ PHP_METHOD(Phalcon_Html_Escaper, escapeHtml) ZVAL_UNDEF(&input); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &input_param); if (!input_param) { ZEPHIR_INIT_VAR(&input); } else { zephir_get_strval(&input, input_param); } - - zephir_cast_to_string(&_0, &input); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "html", NULL, 0, &_0); zephir_check_call_status(); @@ -496,24 +460,19 @@ PHP_METHOD(Phalcon_Html_Escaper, escapeHtmlAttr) ZVAL_UNDEF(&input); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &input_param); if (!input_param) { ZEPHIR_INIT_VAR(&input); } else { zephir_get_strval(&input, input_param); } - - zephir_cast_to_string(&_0, &input); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "attributes", NULL, 0, &_0); zephir_check_call_status(); @@ -537,19 +496,13 @@ PHP_METHOD(Phalcon_Html_Escaper, escapeUrl) zval *this_ptr = getThis(); ZVAL_UNDEF(&input); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &input_param); zephir_get_strval(&input, input_param); - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "url", NULL, 0, &input); zephir_check_call_status(); RETURN_MM(); @@ -560,9 +513,6 @@ PHP_METHOD(Phalcon_Html_Escaper, escapeUrl) */ PHP_METHOD(Phalcon_Html_Escaper, getEncoding) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "encoding"); } @@ -572,9 +522,6 @@ PHP_METHOD(Phalcon_Html_Escaper, getEncoding) */ PHP_METHOD(Phalcon_Html_Escaper, getFlags) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "flags"); } @@ -598,31 +545,26 @@ PHP_METHOD(Phalcon_Html_Escaper, html) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &input_param); if (!input_param) { ZEPHIR_INIT_VAR(&input); } else { zephir_get_strval(&input, input_param); } - - if (Z_TYPE_P(&input) == IS_NULL) { RETURN_MM_STRING(""); } zephir_read_property(&_0, this_ptr, ZEND_STRL("flags"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_1, this_ptr, ZEND_STRL("encoding"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_2, this_ptr, ZEND_STRL("doubleEncode"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_RETURN_CALL_FUNCTION("htmlspecialchars", NULL, 285, &input, &_0, &_1, &_2); + ZEPHIR_RETURN_CALL_FUNCTION("htmlspecialchars", NULL, 286, &input, &_0, &_1, &_2); zephir_check_call_status(); RETURN_MM(); } @@ -645,22 +587,16 @@ PHP_METHOD(Phalcon_Html_Escaper, js) ZVAL_UNDEF(&input); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &input_param); zephir_get_strval(&input, input_param); - - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "normalizeencoding", NULL, 320, &input); + ZEPHIR_CALL_METHOD(&_0, this_ptr, "normalizeencoding", NULL, 321, &input); zephir_check_call_status(); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "doescapejs", NULL, 323, &_0); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "doescapejs", NULL, 324, &_0); zephir_check_call_status(); RETURN_MM(); } @@ -683,24 +619,18 @@ PHP_METHOD(Phalcon_Html_Escaper, normalizeEncoding) ZVAL_UNDEF(&input); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &input_param); zephir_get_strval(&input, input_param); - - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "detectencoding", NULL, 324, &input); + ZEPHIR_CALL_METHOD(&_0, this_ptr, "detectencoding", NULL, 325, &input); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "UTF-32"); - ZEPHIR_RETURN_CALL_FUNCTION("mb_convert_encoding", NULL, 325, &input, &_1, &_0); + ZEPHIR_RETURN_CALL_FUNCTION("mb_convert_encoding", NULL, 326, &input, &_1, &_0); zephir_check_call_status(); RETURN_MM(); } @@ -722,18 +652,10 @@ PHP_METHOD(Phalcon_Html_Escaper, setDoubleEncode) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(doubleEncode) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &doubleEncode_param); - doubleEncode = zephir_get_boolval(doubleEncode_param); - - if (doubleEncode) { zephir_update_property_zval(this_ptr, ZEND_STRL("doubleEncode"), &__$true); } else { @@ -759,19 +681,13 @@ PHP_METHOD(Phalcon_Html_Escaper, setEncoding) zval *this_ptr = getThis(); ZVAL_UNDEF(&encoding); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(encoding) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &encoding_param); zephir_get_strval(&encoding, encoding_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("encoding"), &encoding); RETURN_THIS(); } @@ -792,19 +708,11 @@ PHP_METHOD(Phalcon_Html_Escaper, setFlags) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(flags) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &flags_param); - flags = zephir_get_intval(flags_param); - - - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, flags); zephir_update_property_zval(this_ptr, ZEND_STRL("flags"), &_0); RETURN_THISW(); @@ -828,19 +736,12 @@ PHP_METHOD(Phalcon_Html_Escaper, setHtmlQuoteType) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(flags) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &flags_param); - flags = zephir_get_intval(flags_param); - - ZVAL_LONG(&_0, flags); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "setflags", NULL, 0, &_0); zephir_check_call_status(); @@ -860,23 +761,16 @@ PHP_METHOD(Phalcon_Html_Escaper, url) zend_long ZEPHIR_LAST_CALL_STATUS; zval *input_param = NULL; zval input; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &input_param); zephir_get_strval(&input, input_param); - - - ZEPHIR_RETURN_CALL_FUNCTION("rawurlencode", NULL, 326, &input); + ZEPHIR_RETURN_CALL_FUNCTION("rawurlencode", NULL, 327, &input); zephir_check_call_status(); RETURN_MM(); } @@ -900,23 +794,17 @@ PHP_METHOD(Phalcon_Html_Escaper, phpHtmlSpecialChars) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &input_param); zephir_get_strval(&input, input_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("flags"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_1, this_ptr, ZEND_STRL("encoding"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_2, this_ptr, ZEND_STRL("doubleEncode"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_RETURN_CALL_FUNCTION("htmlspecialchars", NULL, 285, &input, &_0, &_1, &_2); + ZEPHIR_RETURN_CALL_FUNCTION("htmlspecialchars", NULL, 286, &input, &_0, &_1, &_2); zephir_check_call_status(); RETURN_MM(); } @@ -931,22 +819,15 @@ PHP_METHOD(Phalcon_Html_Escaper, doEscapeCss) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *input_param = NULL; zval input; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &input_param); zephir_get_strval(&input, input_param); - - zephir_escape_css(return_value, &input); RETURN_MM(); } @@ -961,22 +842,15 @@ PHP_METHOD(Phalcon_Html_Escaper, doEscapeJs) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *input_param = NULL; zval input; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(input) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &input_param); zephir_get_strval(&input, input_param); - - zephir_escape_js(return_value, &input); RETURN_MM(); } diff --git a/ext/phalcon/html/escaperfactory.zep.c b/ext/phalcon/html/escaperfactory.zep.c index e87f0f71ef9..728878dfd17 100644 --- a/ext/phalcon/html/escaperfactory.zep.c +++ b/ext/phalcon/html/escaperfactory.zep.c @@ -42,11 +42,8 @@ PHP_METHOD(Phalcon_Html_EscaperFactory, newInstance) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *this_ptr = getThis(); - - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); object_init_ex(return_value, phalcon_html_escaper_ce); if (zephir_has_constructor(return_value)) { diff --git a/ext/phalcon/html/helper/abstracthelper.zep.c b/ext/phalcon/html/helper/abstracthelper.zep.c index 183ed41a957..a1598b7bd26 100644 --- a/ext/phalcon/html/helper/abstracthelper.zep.c +++ b/ext/phalcon/html/helper/abstracthelper.zep.c @@ -71,18 +71,12 @@ PHP_METHOD(Phalcon_Html_Helper_AbstractHelper, __construct) ZVAL_UNDEF(&escaper_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(escaper, phalcon_html_escaper_escaperinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &escaper); - - ZEPHIR_INIT_VAR(&_0); ZEPHIR_GET_CONSTANT(&_0, "PHP_EOL"); zephir_update_property_zval(this_ptr, ZEND_STRL("delimiter"), &_0); @@ -110,26 +104,19 @@ PHP_METHOD(Phalcon_Html_Helper_AbstractHelper, close) ZVAL_UNDEF(&tag); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(tag) Z_PARAM_OPTIONAL Z_PARAM_BOOL(raw) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &tag_param, &raw_param); zephir_get_strval(&tag, tag_param); if (!raw_param) { raw = 0; } else { - raw = zephir_get_boolval(raw_param); - } - - + } ZEPHIR_INIT_VAR(&_0); if (raw) { ZEPHIR_CPY_WRT(&_0, &tag); @@ -157,9 +144,8 @@ PHP_METHOD(Phalcon_Html_Helper_AbstractHelper, indent) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("indent"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_1, this_ptr, ZEND_STRL("indentLevel"), PH_NOISY_CC | PH_READONLY); @@ -182,7 +168,6 @@ PHP_METHOD(Phalcon_Html_Helper_AbstractHelper, orderAttributes) zend_long ZEPHIR_LAST_CALL_STATUS; zval *overrides_param = NULL, *attributes_param = NULL, __$null, intersect, results, _0; zval overrides, attributes, order; - zval *this_ptr = getThis(); ZVAL_UNDEF(&overrides); ZVAL_UNDEF(&attributes); @@ -191,21 +176,15 @@ PHP_METHOD(Phalcon_Html_Helper_AbstractHelper, orderAttributes) ZVAL_UNDEF(&intersect); ZVAL_UNDEF(&results); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ARRAY(overrides) Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &overrides_param, &attributes_param); zephir_get_arrval(&overrides, overrides_param); zephir_get_arrval(&attributes, attributes_param); - - ZEPHIR_INIT_VAR(&order); zephir_create_array(&order, 10, 0); zephir_array_update_string(&order, SL("rel"), &__$null, PH_COPY | PH_SEPARATE); @@ -264,21 +243,15 @@ PHP_METHOD(Phalcon_Html_Helper_AbstractHelper, renderArrayElements) ZVAL_UNDEF(&_12$$4); ZVAL_UNDEF(&_13$$4); ZVAL_UNDEF(&delimiter); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ARRAY(elements) Z_PARAM_STR(delimiter) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &elements_param, &delimiter_param); zephir_get_arrval(&elements, elements_param); zephir_get_strval(&delimiter, delimiter_param); - - ZEPHIR_INIT_VAR(&result); ZVAL_STRING(&result, ""); zephir_is_iterable(&elements, 0, "phalcon/Html/Helper/AbstractHelper.zep", 140); @@ -364,19 +337,13 @@ PHP_METHOD(Phalcon_Html_Helper_AbstractHelper, renderAttributes) ZVAL_UNDEF(&_9$$6); ZVAL_UNDEF(&_10$$6); ZVAL_UNDEF(&_11$$6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &attributes_param); zephir_get_arrval(&attributes, attributes_param); - - ZEPHIR_INIT_VAR(&result); ZVAL_STRING(&result, ""); zephir_is_iterable(&attributes, 0, "phalcon/Html/Helper/AbstractHelper.zep", 161); @@ -458,17 +425,13 @@ PHP_METHOD(Phalcon_Html_Helper_AbstractHelper, renderElement) ZVAL_UNDEF(&tag); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(tag) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &tag_param, &attributes_param); zephir_get_strval(&tag, tag_param); if (!attributes_param) { @@ -477,8 +440,6 @@ PHP_METHOD(Phalcon_Html_Helper_AbstractHelper, renderElement) } else { zephir_get_arrval(&attributes, attributes_param); } - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "rendertag", NULL, 0, &tag, &attributes); zephir_check_call_status(); RETURN_MM(); @@ -513,8 +474,6 @@ PHP_METHOD(Phalcon_Html_Helper_AbstractHelper, renderFullElement) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 4) Z_PARAM_STR(tag) Z_PARAM_STR(text) @@ -522,10 +481,8 @@ PHP_METHOD(Phalcon_Html_Helper_AbstractHelper, renderFullElement) Z_PARAM_ARRAY(attributes) Z_PARAM_BOOL(raw) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 2, &tag_param, &text_param, &attributes_param, &raw_param); zephir_get_strval(&tag, tag_param); zephir_get_strval(&text, text_param); @@ -538,10 +495,7 @@ PHP_METHOD(Phalcon_Html_Helper_AbstractHelper, renderFullElement) if (!raw_param) { raw = 0; } else { - raw = zephir_get_boolval(raw_param); - } - - + } if (raw) { ZEPHIR_CPY_WRT(&content, &text); } else { @@ -591,18 +545,14 @@ PHP_METHOD(Phalcon_Html_Helper_AbstractHelper, renderTag) ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(tag) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(attributes) Z_PARAM_STR(close) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &tag_param, &attributes_param, &close_param); zephir_get_strval(&tag, tag_param); if (!attributes_param) { @@ -617,8 +567,6 @@ PHP_METHOD(Phalcon_Html_Helper_AbstractHelper, renderTag) } else { zephir_get_strval(&close, close_param); } - - ZEPHIR_INIT_VAR(&escapedAttrs); ZVAL_STRING(&escapedAttrs, ""); if (1 != ZEPHIR_IS_EMPTY(&attributes)) { @@ -670,17 +618,13 @@ PHP_METHOD(Phalcon_Html_Helper_AbstractHelper, selfClose) ZVAL_UNDEF(&tag); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(tag) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &tag_param, &attributes_param); zephir_get_strval(&tag, tag_param); if (!attributes_param) { @@ -689,8 +633,6 @@ PHP_METHOD(Phalcon_Html_Helper_AbstractHelper, selfClose) } else { zephir_get_arrval(&attributes, attributes_param); } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "/"); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "rendertag", NULL, 0, &tag, &attributes, &_0); diff --git a/ext/phalcon/html/helper/abstracthelper.zep.h b/ext/phalcon/html/helper/abstracthelper.zep.h index cb16e1ed50d..74d4bbf49d8 100644 --- a/ext/phalcon/html/helper/abstracthelper.zep.h +++ b/ext/phalcon/html/helper/abstracthelper.zep.h @@ -42,41 +42,25 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_html_helper_abstracthelper_renderelement, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, tag, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_html_helper_abstracthelper_renderfullelement, 0, 2, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, tag, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, text, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_ARG_TYPE_INFO(0, raw, _IS_BOOL, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_html_helper_abstracthelper_rendertag, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, tag, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_ARG_TYPE_INFO(0, close, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_html_helper_abstracthelper_selfclose, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, tag, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_html_helper_abstracthelper_method_entry) { diff --git a/ext/phalcon/html/helper/abstractlist.zep.c b/ext/phalcon/html/helper/abstractlist.zep.c index 62042249184..1d9d729f455 100644 --- a/ext/phalcon/html/helper/abstractlist.zep.c +++ b/ext/phalcon/html/helper/abstractlist.zep.c @@ -71,7 +71,6 @@ PHP_METHOD(Phalcon_Html_Helper_AbstractList, __invoke) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 3) Z_PARAM_OPTIONAL @@ -79,10 +78,8 @@ PHP_METHOD(Phalcon_Html_Helper_AbstractList, __invoke) Z_PARAM_STR_OR_NULL(delimiter) Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 3, &indent_param, &delimiter_param, &attributes_param); if (!indent_param) { ZEPHIR_INIT_VAR(&indent); @@ -101,8 +98,6 @@ PHP_METHOD(Phalcon_Html_Helper_AbstractList, __invoke) } else { zephir_get_arrval(&attributes, attributes_param); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("attributes"), &attributes); ZEPHIR_INIT_VAR(&_0); if (ZEPHIR_IS_EMPTY(&delimiter)) { @@ -141,9 +136,8 @@ PHP_METHOD(Phalcon_Html_Helper_AbstractList, __toString) ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_6); ZVAL_UNDEF(&_7); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("store"), PH_NOISY_CC | PH_READONLY); if (ZEPHIR_IS_EMPTY(&_0)) { @@ -186,7 +180,8 @@ zend_object *zephir_init_properties_Phalcon_Html_Helper_AbstractList(zend_class_ ZVAL_UNDEF(&_3$$4); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/html/helper/abstractlist.zep.h b/ext/phalcon/html/helper/abstractlist.zep.h index b1729e92469..5d0dc368d3e 100644 --- a/ext/phalcon/html/helper/abstractlist.zep.h +++ b/ext/phalcon/html/helper/abstractlist.zep.h @@ -11,18 +11,10 @@ zend_object *zephir_init_properties_Phalcon_Html_Helper_AbstractList(zend_class_ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_html_helper_abstractlist___invoke, 0, 0, Phalcon\\Html\\Helper\\AbstractList, 0) ZEND_ARG_TYPE_INFO(0, indent, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, delimiter, IS_STRING, 1) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() -#if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_html_helper_abstractlist___tostring, 0, 0, IS_STRING, 0) -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_html_helper_abstractlist___tostring, 0, 0, 0) -#endif ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_html_helper_abstractlist_gettag, 0, 0, IS_STRING, 0) @@ -33,11 +25,7 @@ ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_html_helper_abstractlist_method_entry) { PHP_ME(Phalcon_Html_Helper_AbstractList, __invoke, arginfo_phalcon_html_helper_abstractlist___invoke, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Html_Helper_AbstractList, __toString, arginfo_phalcon_html_helper_abstractlist___tostring, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Html_Helper_AbstractList, __toString, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Html_Helper_AbstractList, __toString, arginfo_phalcon_html_helper_abstractlist___tostring, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Html_Helper_AbstractList, getTag, arginfo_phalcon_html_helper_abstractlist_gettag, ZEND_ACC_ABSTRACT|ZEND_ACC_PROTECTED) PHP_FE_END }; diff --git a/ext/phalcon/html/helper/abstractseries.zep.c b/ext/phalcon/html/helper/abstractseries.zep.c index 31c3c171780..9c4085a2d53 100644 --- a/ext/phalcon/html/helper/abstractseries.zep.c +++ b/ext/phalcon/html/helper/abstractseries.zep.c @@ -63,17 +63,14 @@ PHP_METHOD(Phalcon_Html_Helper_AbstractSeries, __invoke) ZVAL_UNDEF(&indent); ZVAL_UNDEF(&delimiter); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_STR(indent) Z_PARAM_STR_OR_NULL(delimiter) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 2, &indent_param, &delimiter_param); if (!indent_param) { ZEPHIR_INIT_VAR(&indent); @@ -86,8 +83,6 @@ PHP_METHOD(Phalcon_Html_Helper_AbstractSeries, __invoke) } else { zephir_get_strval(&delimiter, delimiter_param); } - - ZEPHIR_INIT_VAR(&_0); if (Z_TYPE_P(&delimiter) == IS_NULL) { ZEPHIR_INIT_NVAR(&_0); @@ -114,9 +109,8 @@ PHP_METHOD(Phalcon_Html_Helper_AbstractSeries, __toString) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("store"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_1, this_ptr, ZEND_STRL("delimiter"), PH_NOISY_CC | PH_READONLY); @@ -135,9 +129,8 @@ PHP_METHOD(Phalcon_Html_Helper_AbstractSeries, reset) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); array_init(&_0); @@ -164,7 +157,8 @@ zend_object *zephir_init_properties_Phalcon_Html_Helper_AbstractSeries(zend_clas ZVAL_UNDEF(&_3$$4); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/html/helper/abstractseries.zep.h b/ext/phalcon/html/helper/abstractseries.zep.h index dd25342fd71..f0c55e6271e 100644 --- a/ext/phalcon/html/helper/abstractseries.zep.h +++ b/ext/phalcon/html/helper/abstractseries.zep.h @@ -14,11 +14,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_html_helper_abstractserie ZEND_ARG_TYPE_INFO(0, delimiter, IS_STRING, 1) ZEND_END_ARG_INFO() -#if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_html_helper_abstractseries___tostring, 0, 0, IS_STRING, 0) -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_html_helper_abstractseries___tostring, 0, 0, 0) -#endif ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_html_helper_abstractseries_reset, 0, 0, Phalcon\\Html\\Helper\\AbstractSeries, 0) @@ -32,11 +28,7 @@ ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_html_helper_abstractseries_method_entry) { PHP_ME(Phalcon_Html_Helper_AbstractSeries, __invoke, arginfo_phalcon_html_helper_abstractseries___invoke, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Html_Helper_AbstractSeries, __toString, arginfo_phalcon_html_helper_abstractseries___tostring, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Html_Helper_AbstractSeries, __toString, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Html_Helper_AbstractSeries, __toString, arginfo_phalcon_html_helper_abstractseries___tostring, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Html_Helper_AbstractSeries, reset, arginfo_phalcon_html_helper_abstractseries_reset, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Html_Helper_AbstractSeries, getTag, arginfo_phalcon_html_helper_abstractseries_gettag, ZEND_ACC_ABSTRACT|ZEND_ACC_PROTECTED) PHP_FE_END diff --git a/ext/phalcon/html/helper/anchor.zep.c b/ext/phalcon/html/helper/anchor.zep.c index fbaade54bbd..b3b86a06fc9 100644 --- a/ext/phalcon/html/helper/anchor.zep.c +++ b/ext/phalcon/html/helper/anchor.zep.c @@ -64,8 +64,6 @@ PHP_METHOD(Phalcon_Html_Helper_Anchor, __invoke) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 4) Z_PARAM_STR(href) Z_PARAM_STR(text) @@ -73,10 +71,8 @@ PHP_METHOD(Phalcon_Html_Helper_Anchor, __invoke) Z_PARAM_ARRAY(attributes) Z_PARAM_BOOL(raw) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 2, &href_param, &text_param, &attributes_param, &raw_param); zephir_get_strval(&href, href_param); zephir_get_strval(&text, text_param); @@ -89,10 +85,7 @@ PHP_METHOD(Phalcon_Html_Helper_Anchor, __invoke) if (!raw_param) { raw = 0; } else { - raw = zephir_get_boolval(raw_param); - } - - + } ZEPHIR_CALL_METHOD(&overrides, this_ptr, "processattributes", NULL, 0, &href, &attributes); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_0); @@ -119,26 +112,19 @@ PHP_METHOD(Phalcon_Html_Helper_Anchor, processAttributes) zval attributes; zval *href_param = NULL, *attributes_param = NULL, overrides; zval href; - zval *this_ptr = getThis(); ZVAL_UNDEF(&href); ZVAL_UNDEF(&overrides); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(href) Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &href_param, &attributes_param); zephir_get_strval(&href, href_param); zephir_get_arrval(&attributes, attributes_param); - - ZEPHIR_INIT_VAR(&overrides); zephir_create_array(&overrides, 1, 0); zephir_array_update_string(&overrides, SL("href"), &href, PH_COPY | PH_SEPARATE); diff --git a/ext/phalcon/html/helper/anchor.zep.h b/ext/phalcon/html/helper/anchor.zep.h index 006b34b0856..a51f3b43ca2 100644 --- a/ext/phalcon/html/helper/anchor.zep.h +++ b/ext/phalcon/html/helper/anchor.zep.h @@ -9,11 +9,7 @@ PHP_METHOD(Phalcon_Html_Helper_Anchor, processAttributes); ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_html_helper_anchor___invoke, 0, 2, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, href, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, text, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_ARG_TYPE_INFO(0, raw, _IS_BOOL, 0) ZEND_END_ARG_INFO() diff --git a/ext/phalcon/html/helper/base.zep.c b/ext/phalcon/html/helper/base.zep.c index b5e854120c8..75c7c202c09 100644 --- a/ext/phalcon/html/helper/base.zep.c +++ b/ext/phalcon/html/helper/base.zep.c @@ -60,17 +60,14 @@ PHP_METHOD(Phalcon_Html_Helper_Base, __invoke) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(href) Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 2, &href_param, &attributes_param); if (!href_param) { ZEPHIR_INIT_VAR(&href); @@ -83,8 +80,6 @@ PHP_METHOD(Phalcon_Html_Helper_Base, __invoke) } else { zephir_get_arrval(&attributes, attributes_param); } - - ZEPHIR_INIT_VAR(&overrides); array_init(&overrides); if (!(ZEPHIR_IS_EMPTY(&href))) { diff --git a/ext/phalcon/html/helper/base.zep.h b/ext/phalcon/html/helper/base.zep.h index df177bf05ce..cc89f49767e 100644 --- a/ext/phalcon/html/helper/base.zep.h +++ b/ext/phalcon/html/helper/base.zep.h @@ -7,11 +7,7 @@ PHP_METHOD(Phalcon_Html_Helper_Base, __invoke); ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_html_helper_base___invoke, 0, 0, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, href, IS_STRING, 1) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_html_helper_base_method_entry) { diff --git a/ext/phalcon/html/helper/body.zep.c b/ext/phalcon/html/helper/body.zep.c index 9437e8e9444..c23e483f127 100644 --- a/ext/phalcon/html/helper/body.zep.c +++ b/ext/phalcon/html/helper/body.zep.c @@ -54,16 +54,12 @@ PHP_METHOD(Phalcon_Html_Helper_Body, __invoke) ZVAL_UNDEF(&attributes); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &attributes_param); if (!attributes_param) { ZEPHIR_INIT_VAR(&attributes); @@ -71,8 +67,6 @@ PHP_METHOD(Phalcon_Html_Helper_Body, __invoke) } else { zephir_get_arrval(&attributes, attributes_param); } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "body"); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "renderelement", NULL, 0, &_0, &attributes); diff --git a/ext/phalcon/html/helper/body.zep.h b/ext/phalcon/html/helper/body.zep.h index 956abeb94d1..d0819d5c51e 100644 --- a/ext/phalcon/html/helper/body.zep.h +++ b/ext/phalcon/html/helper/body.zep.h @@ -6,11 +6,7 @@ ZEPHIR_INIT_CLASS(Phalcon_Html_Helper_Body); PHP_METHOD(Phalcon_Html_Helper_Body, __invoke); ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_html_helper_body___invoke, 0, 0, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_html_helper_body_method_entry) { diff --git a/ext/phalcon/html/helper/button.zep.c b/ext/phalcon/html/helper/button.zep.c index 7da0dce07ae..138c6583d1e 100644 --- a/ext/phalcon/html/helper/button.zep.c +++ b/ext/phalcon/html/helper/button.zep.c @@ -60,18 +60,14 @@ PHP_METHOD(Phalcon_Html_Helper_Button, __invoke) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(text) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(attributes) Z_PARAM_BOOL(raw) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &text_param, &attributes_param, &raw_param); zephir_get_strval(&text, text_param); if (!attributes_param) { @@ -83,10 +79,7 @@ PHP_METHOD(Phalcon_Html_Helper_Button, __invoke) if (!raw_param) { raw = 0; } else { - raw = zephir_get_boolval(raw_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "button"); if (raw) { diff --git a/ext/phalcon/html/helper/button.zep.h b/ext/phalcon/html/helper/button.zep.h index d6fe3992ef5..184827c02a6 100644 --- a/ext/phalcon/html/helper/button.zep.h +++ b/ext/phalcon/html/helper/button.zep.h @@ -7,11 +7,7 @@ PHP_METHOD(Phalcon_Html_Helper_Button, __invoke); ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_html_helper_button___invoke, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, text, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_ARG_TYPE_INFO(0, raw, _IS_BOOL, 0) ZEND_END_ARG_INFO() diff --git a/ext/phalcon/html/helper/close.zep.c b/ext/phalcon/html/helper/close.zep.c index d9c24360b94..3912f6b159b 100644 --- a/ext/phalcon/html/helper/close.zep.c +++ b/ext/phalcon/html/helper/close.zep.c @@ -55,26 +55,19 @@ PHP_METHOD(Phalcon_Html_Helper_Close, __invoke) ZVAL_UNDEF(&tag); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(tag) Z_PARAM_OPTIONAL Z_PARAM_BOOL(raw) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &tag_param, &raw_param); zephir_get_strval(&tag, tag_param); if (!raw_param) { raw = 0; } else { - raw = zephir_get_boolval(raw_param); - } - - + } if (raw) { ZVAL_BOOL(&_0, 1); } else { diff --git a/ext/phalcon/html/helper/doctype.zep.c b/ext/phalcon/html/helper/doctype.zep.c index 6176438946b..16234d0d649 100644 --- a/ext/phalcon/html/helper/doctype.zep.c +++ b/ext/phalcon/html/helper/doctype.zep.c @@ -72,11 +72,10 @@ PHP_METHOD(Phalcon_Html_Helper_Doctype, __construct) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, 5); zephir_update_property_zval(this_ptr, ZEND_STRL("flag"), &_0); ZEPHIR_INIT_VAR(&_1); @@ -101,32 +100,25 @@ PHP_METHOD(Phalcon_Html_Helper_Doctype, __invoke) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&delimiter); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_LONG(flag) Z_PARAM_STR(delimiter) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 2, &flag_param, &delimiter_param); if (!flag_param) { flag = 5; } else { - flag = zephir_get_intval(flag_param); - } + } if (!delimiter_param) { ZEPHIR_INIT_VAR(&delimiter); ZVAL_STRING(&delimiter, "\n"); } else { zephir_get_strval(&delimiter, delimiter_param); } - - - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, flag); zephir_update_property_zval(this_ptr, ZEND_STRL("flag"), &_0); zephir_update_property_zval(this_ptr, ZEND_STRL("delimiter"), &delimiter); @@ -160,9 +152,6 @@ PHP_METHOD(Phalcon_Html_Helper_Doctype, __toString) ZVAL_UNDEF(&_15$$10); ZVAL_UNDEF(&_16$$11); ZVAL_UNDEF(&_17$$11); - - - zephir_read_property(&_0, this_ptr, ZEND_STRL("flag"), PH_NOISY_CC | PH_READONLY); do { if (ZEPHIR_IS_LONG(&_0, 1)) { diff --git a/ext/phalcon/html/helper/doctype.zep.h b/ext/phalcon/html/helper/doctype.zep.h index b683367bf3c..f021503e68c 100644 --- a/ext/phalcon/html/helper/doctype.zep.h +++ b/ext/phalcon/html/helper/doctype.zep.h @@ -19,11 +19,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_html_helper_doctype___to ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_html_helper_doctype_method_entry) { -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Html_Helper_Doctype, __construct, arginfo_phalcon_html_helper_doctype___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) -#else - PHP_ME(Phalcon_Html_Helper_Doctype, __construct, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) -#endif +PHP_ME(Phalcon_Html_Helper_Doctype, __construct, arginfo_phalcon_html_helper_doctype___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) PHP_ME(Phalcon_Html_Helper_Doctype, __invoke, arginfo_phalcon_html_helper_doctype___invoke, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Html_Helper_Doctype, __toString, arginfo_phalcon_html_helper_doctype___tostring, ZEND_ACC_PUBLIC) PHP_FE_END diff --git a/ext/phalcon/html/helper/element.zep.c b/ext/phalcon/html/helper/element.zep.c index e5e4c06373b..694b06d0be3 100644 --- a/ext/phalcon/html/helper/element.zep.c +++ b/ext/phalcon/html/helper/element.zep.c @@ -61,8 +61,6 @@ PHP_METHOD(Phalcon_Html_Helper_Element, __invoke) ZVAL_UNDEF(&text); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 4) Z_PARAM_STR(tag) Z_PARAM_STR(text) @@ -70,10 +68,8 @@ PHP_METHOD(Phalcon_Html_Helper_Element, __invoke) Z_PARAM_ARRAY(attributes) Z_PARAM_BOOL(raw) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 2, &tag_param, &text_param, &attributes_param, &raw_param); zephir_get_strval(&tag, tag_param); zephir_get_strval(&text, text_param); @@ -86,10 +82,7 @@ PHP_METHOD(Phalcon_Html_Helper_Element, __invoke) if (!raw_param) { raw = 0; } else { - raw = zephir_get_boolval(raw_param); - } - - + } if (raw) { ZVAL_BOOL(&_0, 1); } else { diff --git a/ext/phalcon/html/helper/element.zep.h b/ext/phalcon/html/helper/element.zep.h index 6945fbac568..bada0fde587 100644 --- a/ext/phalcon/html/helper/element.zep.h +++ b/ext/phalcon/html/helper/element.zep.h @@ -8,11 +8,7 @@ PHP_METHOD(Phalcon_Html_Helper_Element, __invoke); ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_html_helper_element___invoke, 0, 2, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, tag, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, text, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_ARG_TYPE_INFO(0, raw, _IS_BOOL, 0) ZEND_END_ARG_INFO() diff --git a/ext/phalcon/html/helper/form.zep.c b/ext/phalcon/html/helper/form.zep.c index eef6bd65101..e9235afd242 100644 --- a/ext/phalcon/html/helper/form.zep.c +++ b/ext/phalcon/html/helper/form.zep.c @@ -57,16 +57,12 @@ PHP_METHOD(Phalcon_Html_Helper_Form, __invoke) ZVAL_UNDEF(&overrides); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &attributes_param); if (!attributes_param) { ZEPHIR_INIT_VAR(&attributes); @@ -74,8 +70,6 @@ PHP_METHOD(Phalcon_Html_Helper_Form, __invoke) } else { zephir_get_arrval(&attributes, attributes_param); } - - ZEPHIR_INIT_VAR(&overrides); zephir_create_array(&overrides, 2, 0); add_assoc_stringl_ex(&overrides, SL("method"), SL("post")); diff --git a/ext/phalcon/html/helper/form.zep.h b/ext/phalcon/html/helper/form.zep.h index c3ff604a670..d28f8da29dc 100644 --- a/ext/phalcon/html/helper/form.zep.h +++ b/ext/phalcon/html/helper/form.zep.h @@ -6,11 +6,7 @@ ZEPHIR_INIT_CLASS(Phalcon_Html_Helper_Form); PHP_METHOD(Phalcon_Html_Helper_Form, __invoke); ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_html_helper_form___invoke, 0, 0, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_html_helper_form_method_entry) { diff --git a/ext/phalcon/html/helper/img.zep.c b/ext/phalcon/html/helper/img.zep.c index 719b4487a87..8eec0ae06ae 100644 --- a/ext/phalcon/html/helper/img.zep.c +++ b/ext/phalcon/html/helper/img.zep.c @@ -59,17 +59,13 @@ PHP_METHOD(Phalcon_Html_Helper_Img, __invoke) ZVAL_UNDEF(&overrides); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(src) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &src_param, &attributes_param); zephir_get_strval(&src, src_param); if (!attributes_param) { @@ -78,8 +74,6 @@ PHP_METHOD(Phalcon_Html_Helper_Img, __invoke) } else { zephir_get_arrval(&attributes, attributes_param); } - - ZEPHIR_INIT_VAR(&overrides); zephir_create_array(&overrides, 1, 0); zephir_array_update_string(&overrides, SL("src"), &src, PH_COPY | PH_SEPARATE); diff --git a/ext/phalcon/html/helper/img.zep.h b/ext/phalcon/html/helper/img.zep.h index 686cba5c80f..f69c7eadbc9 100644 --- a/ext/phalcon/html/helper/img.zep.h +++ b/ext/phalcon/html/helper/img.zep.h @@ -7,11 +7,7 @@ PHP_METHOD(Phalcon_Html_Helper_Img, __invoke); ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_html_helper_img___invoke, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, src, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_html_helper_img_method_entry) { diff --git a/ext/phalcon/html/helper/input/abstractinput.zep.c b/ext/phalcon/html/helper/input/abstractinput.zep.c index 745705e4df0..f46ebeaccc1 100644 --- a/ext/phalcon/html/helper/input/abstractinput.zep.c +++ b/ext/phalcon/html/helper/input/abstractinput.zep.c @@ -75,7 +75,6 @@ PHP_METHOD(Phalcon_Html_Helper_Input_AbstractInput, __invoke) ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&attributes); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(name) @@ -83,10 +82,8 @@ PHP_METHOD(Phalcon_Html_Helper_Input_AbstractInput, __invoke) Z_PARAM_STR_OR_NULL(value) Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &name_param, &value_param, &attributes_param); zephir_get_strval(&name, name_param); if (!value_param) { @@ -100,11 +97,9 @@ PHP_METHOD(Phalcon_Html_Helper_Input_AbstractInput, __invoke) } else { zephir_get_arrval(&attributes, attributes_param); } - - ZEPHIR_INIT_VAR(&_0); zephir_create_array(&_0, 2, 0); - ZEPHIR_OBS_VAR(&_1); + zephir_memory_observe(&_1); zephir_read_property(&_1, this_ptr, ZEND_STRL("type"), PH_NOISY_CC); zephir_array_update_string(&_0, SL("type"), &_1, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_0, SL("name"), &name, PH_COPY | PH_SEPARATE); @@ -141,9 +136,8 @@ PHP_METHOD(Phalcon_Html_Helper_Input_AbstractInput, __toString) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("attributes"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&attributes, &_0); @@ -176,24 +170,19 @@ PHP_METHOD(Phalcon_Html_Helper_Input_AbstractInput, setValue) ZVAL_UNDEF(&value); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &value_param); if (!value_param) { ZEPHIR_INIT_VAR(&value); } else { zephir_get_strval(&value, value_param); } - - _0 = zephir_is_numeric(&value); if (!(_0)) { _0 = !(ZEPHIR_IS_EMPTY(&value)); @@ -214,7 +203,8 @@ zend_object *zephir_init_properties_Phalcon_Html_Helper_Input_AbstractInput(zend ZVAL_UNDEF(&_1$$3); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/html/helper/input/abstractinput.zep.h b/ext/phalcon/html/helper/input/abstractinput.zep.h index 1583615d635..bf3977a21a3 100644 --- a/ext/phalcon/html/helper/input/abstractinput.zep.h +++ b/ext/phalcon/html/helper/input/abstractinput.zep.h @@ -11,18 +11,10 @@ zend_object *zephir_init_properties_Phalcon_Html_Helper_Input_AbstractInput(zend ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_html_helper_input_abstractinput___invoke, 0, 1, Phalcon\\Html\\Helper\\Input\\AbstractInput, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 1) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() -#if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_html_helper_input_abstractinput___tostring, 0, 0, IS_STRING, 0) -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_html_helper_input_abstractinput___tostring, 0, 0, 0) -#endif ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_html_helper_input_abstractinput_setvalue, 0, 0, Phalcon\\Html\\Helper\\Input\\AbstractInput, 0) @@ -34,11 +26,7 @@ ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_html_helper_input_abstractinput_method_entry) { PHP_ME(Phalcon_Html_Helper_Input_AbstractInput, __invoke, arginfo_phalcon_html_helper_input_abstractinput___invoke, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Html_Helper_Input_AbstractInput, __toString, arginfo_phalcon_html_helper_input_abstractinput___tostring, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Html_Helper_Input_AbstractInput, __toString, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Html_Helper_Input_AbstractInput, __toString, arginfo_phalcon_html_helper_input_abstractinput___tostring, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Html_Helper_Input_AbstractInput, setValue, arginfo_phalcon_html_helper_input_abstractinput_setvalue, ZEND_ACC_PUBLIC) PHP_FE_END }; diff --git a/ext/phalcon/html/helper/input/checkbox.zep.c b/ext/phalcon/html/helper/input/checkbox.zep.c index a4e35e43ab4..2d5f58a9c7a 100644 --- a/ext/phalcon/html/helper/input/checkbox.zep.c +++ b/ext/phalcon/html/helper/input/checkbox.zep.c @@ -57,35 +57,28 @@ ZEPHIR_INIT_CLASS(Phalcon_Html_Helper_Input_Checkbox) */ PHP_METHOD(Phalcon_Html_Helper_Input_Checkbox, __construct) { - zval _1; + zval _0; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *escaper, escaper_sub; zval *this_ptr = getThis(); ZVAL_UNDEF(&escaper_sub); - ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; + ZVAL_UNDEF(&_0); ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(escaper, phalcon_html_escaper_escaperinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &escaper); - - - ZEPHIR_CALL_PARENT(NULL, phalcon_html_helper_input_checkbox_ce, getThis(), "__construct", &_0, 0, escaper); + ZEPHIR_CALL_PARENT(NULL, phalcon_html_helper_input_checkbox_ce, getThis(), "__construct", NULL, 0, escaper); zephir_check_call_status(); - ZEPHIR_INIT_VAR(&_1); - zephir_create_array(&_1, 3, 0); - add_assoc_stringl_ex(&_1, SL("start"), SL("")); - add_assoc_stringl_ex(&_1, SL("text"), SL("")); - add_assoc_stringl_ex(&_1, SL("end"), SL("")); - zephir_update_property_zval(this_ptr, ZEND_STRL("label"), &_1); + ZEPHIR_INIT_VAR(&_0); + zephir_create_array(&_0, 3, 0); + add_assoc_stringl_ex(&_0, SL("start"), SL("")); + add_assoc_stringl_ex(&_0, SL("text"), SL("")); + add_assoc_stringl_ex(&_0, SL("end"), SL("")); + zephir_update_property_zval(this_ptr, ZEND_STRL("label"), &_0); ZEPHIR_MM_RESTORE(); } @@ -96,43 +89,41 @@ PHP_METHOD(Phalcon_Html_Helper_Input_Checkbox, __construct) */ PHP_METHOD(Phalcon_Html_Helper_Input_Checkbox, __toString) { - zval _2; - zval element, label, unchecked, _1, _3, _4, _5; + zval _1; + zval element, label, unchecked, _0, _2, _3, _4; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zephir_fcall_cache_entry *_0 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *this_ptr = getThis(); ZVAL_UNDEF(&element); ZVAL_UNDEF(&label); ZVAL_UNDEF(&unchecked); - ZVAL_UNDEF(&_1); + ZVAL_UNDEF(&_0); + ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); - ZVAL_UNDEF(&_5); - ZVAL_UNDEF(&_2); - - - ZEPHIR_MM_GROW(); + ZVAL_UNDEF(&_1); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "processchecked", NULL, 94); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "processchecked", NULL, 95); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&unchecked, this_ptr, "processunchecked", NULL, 95); + ZEPHIR_CALL_METHOD(&unchecked, this_ptr, "processunchecked", NULL, 96); zephir_check_call_status(); - ZEPHIR_CALL_PARENT(&element, phalcon_html_helper_input_checkbox_ce, getThis(), "__tostring", &_0, 0); + ZEPHIR_CALL_PARENT(&element, phalcon_html_helper_input_checkbox_ce, getThis(), "__tostring", NULL, 0); zephir_check_call_status(); - zephir_read_property(&_1, this_ptr, ZEND_STRL("label"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CPY_WRT(&label, &_1); - ZEPHIR_INIT_VAR(&_2); - zephir_create_array(&_2, 3, 0); - add_assoc_stringl_ex(&_2, SL("start"), SL("")); - add_assoc_stringl_ex(&_2, SL("text"), SL("")); - add_assoc_stringl_ex(&_2, SL("end"), SL("")); - zephir_update_property_zval(this_ptr, ZEND_STRL("label"), &_2); - zephir_array_fetch_string(&_3, &label, SL("start"), PH_NOISY | PH_READONLY, "phalcon/Html/Helper/Input/Checkbox.zep", 70); - zephir_array_fetch_string(&_4, &label, SL("text"), PH_NOISY | PH_READONLY, "phalcon/Html/Helper/Input/Checkbox.zep", 72); - zephir_array_fetch_string(&_5, &label, SL("end"), PH_NOISY | PH_READONLY, "phalcon/Html/Helper/Input/Checkbox.zep", 72); - ZEPHIR_CONCAT_VVVVV(return_value, &unchecked, &_3, &element, &_4, &_5); + zephir_read_property(&_0, this_ptr, ZEND_STRL("label"), PH_NOISY_CC | PH_READONLY); + ZEPHIR_CPY_WRT(&label, &_0); + ZEPHIR_INIT_VAR(&_1); + zephir_create_array(&_1, 3, 0); + add_assoc_stringl_ex(&_1, SL("start"), SL("")); + add_assoc_stringl_ex(&_1, SL("text"), SL("")); + add_assoc_stringl_ex(&_1, SL("end"), SL("")); + zephir_update_property_zval(this_ptr, ZEND_STRL("label"), &_1); + zephir_array_fetch_string(&_2, &label, SL("start"), PH_NOISY | PH_READONLY, "phalcon/Html/Helper/Input/Checkbox.zep", 70); + zephir_array_fetch_string(&_3, &label, SL("text"), PH_NOISY | PH_READONLY, "phalcon/Html/Helper/Input/Checkbox.zep", 72); + zephir_array_fetch_string(&_4, &label, SL("end"), PH_NOISY | PH_READONLY, "phalcon/Html/Helper/Input/Checkbox.zep", 72); + ZEPHIR_CONCAT_VVVVV(return_value, &unchecked, &_2, &element, &_3, &_4); RETURN_MM(); } @@ -160,16 +151,12 @@ PHP_METHOD(Phalcon_Html_Helper_Input_Checkbox, label) ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &attributes_param); if (!attributes_param) { ZEPHIR_INIT_VAR(&attributes); @@ -177,9 +164,7 @@ PHP_METHOD(Phalcon_Html_Helper_Input_Checkbox, label) } else { zephir_get_arrval(&attributes, attributes_param); } - - - ZEPHIR_OBS_VAR(&text); + zephir_memory_observe(&text); if (!(zephir_array_isset_string_fetch(&text, &attributes, SL("text"), 0))) { ZEPHIR_INIT_NVAR(&text); ZVAL_STRING(&text, ""); @@ -189,7 +174,7 @@ PHP_METHOD(Phalcon_Html_Helper_Input_Checkbox, label) ZEPHIR_INIT_VAR(&_1); zephir_create_array(&_1, 1, 0); zephir_read_property(&_2, this_ptr, ZEND_STRL("attributes"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_OBS_VAR(&_3); + zephir_memory_observe(&_3); zephir_array_fetch_string(&_3, &_2, SL("id"), PH_NOISY, "phalcon/Html/Helper/Input/Checkbox.zep", 95); zephir_array_update_string(&_1, SL("for"), &_3, PH_COPY | PH_SEPARATE); zephir_fast_array_merge(&_0, &_1, &attributes); @@ -222,20 +207,19 @@ PHP_METHOD(Phalcon_Html_Helper_Input_Checkbox, processChecked) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$6); ZVAL_UNDEF(&attributes); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("attributes"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&attributes, &_0); - ZEPHIR_OBS_VAR(&checked); + zephir_memory_observe(&checked); if (!(zephir_array_isset_string_fetch(&checked, &attributes, SL("checked"), 0))) { ZEPHIR_INIT_NVAR(&checked); ZVAL_NULL(&checked); } zephir_array_unset_string(&attributes, SL("checked"), PH_SEPARATE); if (Z_TYPE_P(&checked) != IS_NULL) { - ZEPHIR_OBS_VAR(&value); + zephir_memory_observe(&value); if (!(zephir_array_isset_string_fetch(&value, &attributes, SL("value"), 0))) { ZEPHIR_INIT_NVAR(&value); ZVAL_NULL(&value); @@ -270,13 +254,12 @@ PHP_METHOD(Phalcon_Html_Helper_Input_Checkbox, processUnchecked) ZVAL_UNDEF(&_4$$4); ZVAL_UNDEF(&attributes); ZVAL_UNDEF(&_1$$4); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("attributes"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&attributes, &_0); - ZEPHIR_OBS_VAR(&unchecked); + zephir_memory_observe(&unchecked); if (!(zephir_array_isset_string_fetch(&unchecked, &attributes, SL("unchecked"), 0))) { ZEPHIR_INIT_NVAR(&unchecked); ZVAL_STRING(&unchecked, ""); @@ -286,7 +269,7 @@ PHP_METHOD(Phalcon_Html_Helper_Input_Checkbox, processUnchecked) ZEPHIR_INIT_VAR(&_1$$4); zephir_create_array(&_1$$4, 2, 0); zephir_read_property(&_2$$4, this_ptr, ZEND_STRL("attributes"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_OBS_VAR(&_3$$4); + zephir_memory_observe(&_3$$4); zephir_array_fetch_string(&_3$$4, &_2$$4, SL("name"), PH_NOISY, "phalcon/Html/Helper/Input/Checkbox.zep", 156); zephir_array_update_string(&_1$$4, SL("name"), &_3$$4, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_1$$4, SL("value"), &unchecked, PH_COPY | PH_SEPARATE); @@ -309,7 +292,8 @@ zend_object *zephir_init_properties_Phalcon_Html_Helper_Input_Checkbox(zend_clas ZVAL_UNDEF(&_3$$4); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/html/helper/input/checkbox.zep.h b/ext/phalcon/html/helper/input/checkbox.zep.h index 6fc79eb8674..6520caa80ed 100644 --- a/ext/phalcon/html/helper/input/checkbox.zep.h +++ b/ext/phalcon/html/helper/input/checkbox.zep.h @@ -14,19 +14,11 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_html_helper_input_checkbox___construct, 0 ZEND_ARG_OBJ_INFO(0, escaper, Phalcon\\Html\\Escaper\\EscaperInterface, 0) ZEND_END_ARG_INFO() -#if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_html_helper_input_checkbox___tostring, 0, 0, IS_STRING, 0) -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_html_helper_input_checkbox___tostring, 0, 0, 0) -#endif ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_html_helper_input_checkbox_label, 0, 0, Phalcon\\Html\\Helper\\Input\\Checkbox, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_html_helper_input_checkbox_processchecked, 0, 0, IS_VOID, 0) @@ -40,11 +32,7 @@ ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_html_helper_input_checkbox_method_entry) { PHP_ME(Phalcon_Html_Helper_Input_Checkbox, __construct, arginfo_phalcon_html_helper_input_checkbox___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Html_Helper_Input_Checkbox, __toString, arginfo_phalcon_html_helper_input_checkbox___tostring, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Html_Helper_Input_Checkbox, __toString, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Html_Helper_Input_Checkbox, __toString, arginfo_phalcon_html_helper_input_checkbox___tostring, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Html_Helper_Input_Checkbox, label, arginfo_phalcon_html_helper_input_checkbox_label, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Html_Helper_Input_Checkbox, processChecked, arginfo_phalcon_html_helper_input_checkbox_processchecked, ZEND_ACC_PRIVATE) PHP_ME(Phalcon_Html_Helper_Input_Checkbox, processUnchecked, arginfo_phalcon_html_helper_input_checkbox_processunchecked, ZEND_ACC_PRIVATE) diff --git a/ext/phalcon/html/helper/input/input.zep.c b/ext/phalcon/html/helper/input/input.zep.c index de6ce473de6..71fe8261133 100644 --- a/ext/phalcon/html/helper/input/input.zep.c +++ b/ext/phalcon/html/helper/input/input.zep.c @@ -50,19 +50,13 @@ PHP_METHOD(Phalcon_Html_Helper_Input_Input, setType) zval *this_ptr = getThis(); ZVAL_UNDEF(&type); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &type_param); zephir_get_strval(&type, type_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("type"), &type); RETURN_THIS(); } diff --git a/ext/phalcon/html/helper/input/select.zep.c b/ext/phalcon/html/helper/input/select.zep.c index 522e5c5b666..f39ce42456c 100644 --- a/ext/phalcon/html/helper/input/select.zep.c +++ b/ext/phalcon/html/helper/input/select.zep.c @@ -82,7 +82,6 @@ PHP_METHOD(Phalcon_Html_Helper_Input_Select, add) ZVAL_UNDEF(&attributes); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 4) Z_PARAM_STR(text) @@ -91,10 +90,8 @@ PHP_METHOD(Phalcon_Html_Helper_Input_Select, add) Z_PARAM_ARRAY(attributes) Z_PARAM_BOOL(raw) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 3, &text_param, &value_param, &attributes_param, &raw_param); zephir_get_strval(&text, text_param); if (!value_param) { @@ -111,11 +108,8 @@ PHP_METHOD(Phalcon_Html_Helper_Input_Select, add) if (!raw_param) { raw = 0; } else { - raw = zephir_get_boolval(raw_param); - } - - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "processvalue", NULL, 327, &attributes, &value); + } + ZEPHIR_CALL_METHOD(&_0, this_ptr, "processvalue", NULL, 328, &attributes, &value); zephir_check_call_status(); ZEPHIR_CPY_WRT(&attributes, &_0); ZEPHIR_INIT_VAR(&_1); @@ -125,7 +119,7 @@ PHP_METHOD(Phalcon_Html_Helper_Input_Select, add) zephir_array_fast_append(&_1, &_2); ZEPHIR_INIT_VAR(&_3); zephir_create_array(&_3, 4, 0); - ZEPHIR_OBS_VAR(&_4); + zephir_memory_observe(&_4); zephir_read_property(&_4, this_ptr, ZEND_STRL("elementTag"), PH_NOISY_CC); zephir_array_fast_append(&_3, &_4); zephir_array_fast_append(&_3, &text); @@ -171,7 +165,6 @@ PHP_METHOD(Phalcon_Html_Helper_Input_Select, addPlaceholder) ZVAL_UNDEF(&attributes); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 4) Z_PARAM_STR(text) @@ -180,10 +173,8 @@ PHP_METHOD(Phalcon_Html_Helper_Input_Select, addPlaceholder) Z_PARAM_ARRAY(attributes) Z_PARAM_BOOL(raw) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 3, &text_param, &value, &attributes_param, &raw_param); zephir_get_strval(&text, text_param); if (!value) { @@ -199,10 +190,7 @@ PHP_METHOD(Phalcon_Html_Helper_Input_Select, addPlaceholder) if (!raw_param) { raw = 0; } else { - raw = zephir_get_boolval(raw_param); - } - - + } if (Z_TYPE_P(value) != IS_NULL) { zephir_cast_to_string(&_0$$3, value); zephir_array_update_string(&attributes, SL("value"), &_0$$3, PH_COPY | PH_SEPARATE); @@ -214,7 +202,7 @@ PHP_METHOD(Phalcon_Html_Helper_Input_Select, addPlaceholder) zephir_array_fast_append(&_1, &_2); ZEPHIR_INIT_VAR(&_3); zephir_create_array(&_3, 4, 0); - ZEPHIR_OBS_VAR(&_4); + zephir_memory_observe(&_4); zephir_read_property(&_4, this_ptr, ZEND_STRL("elementTag"), PH_NOISY_CC); zephir_array_fast_append(&_3, &_4); zephir_array_fast_append(&_3, &text); @@ -263,17 +251,14 @@ PHP_METHOD(Phalcon_Html_Helper_Input_Select, optGroup) ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_8$$4); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(label) Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 2, &label_param, &attributes_param); if (!label_param) { ZEPHIR_INIT_VAR(&label); @@ -286,8 +271,6 @@ PHP_METHOD(Phalcon_Html_Helper_Input_Select, optGroup) } else { zephir_get_arrval(&attributes, attributes_param); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("inOptGroup"), PH_NOISY_CC | PH_READONLY); if (!(zephir_is_true(&_0))) { ZEPHIR_INIT_VAR(&_1$$3); @@ -328,7 +311,7 @@ PHP_METHOD(Phalcon_Html_Helper_Input_Select, optGroup) zephir_array_fast_append(&_8$$4, &_10$$4); zephir_update_property_array_append(this_ptr, SL("store"), &_8$$4); } - ZEPHIR_OBS_VAR(&_11); + zephir_memory_observe(&_11); zephir_read_property(&_11, this_ptr, ZEND_STRL("inOptGroup"), PH_NOISY_CC); if (!zephir_is_true(&_11)) { zephir_update_property_zval(this_ptr, ZEND_STRL("inOptGroup"), &__$true); @@ -351,19 +334,13 @@ PHP_METHOD(Phalcon_Html_Helper_Input_Select, selected) zval *this_ptr = getThis(); ZVAL_UNDEF(&selected); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(selected) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &selected_param); zephir_get_strval(&selected, selected_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("selected"), &selected); RETURN_THIS(); } @@ -373,9 +350,6 @@ PHP_METHOD(Phalcon_Html_Helper_Input_Select, selected) */ PHP_METHOD(Phalcon_Html_Helper_Input_Select, getTag) { - zval *this_ptr = getThis(); - - RETURN_STRING("select"); } @@ -385,9 +359,6 @@ PHP_METHOD(Phalcon_Html_Helper_Input_Select, getTag) */ PHP_METHOD(Phalcon_Html_Helper_Input_Select, optGroupEnd) { - zval *this_ptr = getThis(); - - RETURN_STRING(""); } @@ -410,21 +381,15 @@ PHP_METHOD(Phalcon_Html_Helper_Input_Select, optGroupStart) ZVAL_UNDEF(&label); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(label) Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &label_param, &attributes_param); zephir_get_strval(&label, label_param); zephir_get_arrval(&attributes, attributes_param); - - zephir_array_update_string(&attributes, SL("label"), &label, PH_COPY | PH_SEPARATE); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "optgroup"); @@ -456,25 +421,20 @@ PHP_METHOD(Phalcon_Html_Helper_Input_Select, processValue) ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$4); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(attributes) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &attributes_param, &value); zephir_get_arrval(&attributes, attributes_param); if (!value) { value = &value_sub; value = &__$null; } - - _0 = zephir_is_numeric(value); if (!(_0)) { _0 = !(ZEPHIR_IS_EMPTY(value)); diff --git a/ext/phalcon/html/helper/input/select.zep.h b/ext/phalcon/html/helper/input/select.zep.h index d4494c87f65..f01581347a2 100644 --- a/ext/phalcon/html/helper/input/select.zep.h +++ b/ext/phalcon/html/helper/input/select.zep.h @@ -15,32 +15,20 @@ PHP_METHOD(Phalcon_Html_Helper_Input_Select, processValue); ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_html_helper_input_select_add, 0, 1, Phalcon\\Html\\Helper\\Input\\Select, 0) ZEND_ARG_TYPE_INFO(0, text, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 1) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_ARG_TYPE_INFO(0, raw, _IS_BOOL, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_html_helper_input_select_addplaceholder, 0, 1, Phalcon\\Html\\Helper\\Input\\Select, 0) ZEND_ARG_TYPE_INFO(0, text, IS_STRING, 0) ZEND_ARG_INFO(0, value) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_ARG_TYPE_INFO(0, raw, _IS_BOOL, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_html_helper_input_select_optgroup, 0, 0, Phalcon\\Html\\Helper\\Input\\Select, 0) ZEND_ARG_TYPE_INFO(0, label, IS_STRING, 1) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_html_helper_input_select_selected, 0, 1, Phalcon\\Html\\Helper\\Input\\Select, 0) diff --git a/ext/phalcon/html/helper/input/textarea.zep.c b/ext/phalcon/html/helper/input/textarea.zep.c index 6d106fa7d56..466e4c25fad 100644 --- a/ext/phalcon/html/helper/input/textarea.zep.c +++ b/ext/phalcon/html/helper/input/textarea.zep.c @@ -59,16 +59,15 @@ PHP_METHOD(Phalcon_Html_Helper_Input_Textarea, __toString) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&attributes); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("attributes"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&attributes, &_0); ZEPHIR_INIT_VAR(&_1); array_init(&_1); zephir_update_property_zval(this_ptr, ZEND_STRL("attributes"), &_1); - ZEPHIR_OBS_VAR(&value); + zephir_memory_observe(&value); if (!(zephir_array_isset_string_fetch(&value, &attributes, SL("value"), 0))) { ZEPHIR_INIT_NVAR(&value); ZVAL_STRING(&value, ""); diff --git a/ext/phalcon/html/helper/input/textarea.zep.h b/ext/phalcon/html/helper/input/textarea.zep.h index 4f5248fe5f2..5d706fee5db 100644 --- a/ext/phalcon/html/helper/input/textarea.zep.h +++ b/ext/phalcon/html/helper/input/textarea.zep.h @@ -5,18 +5,10 @@ ZEPHIR_INIT_CLASS(Phalcon_Html_Helper_Input_Textarea); PHP_METHOD(Phalcon_Html_Helper_Input_Textarea, __toString); -#if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_html_helper_input_textarea___tostring, 0, 0, IS_STRING, 0) -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_html_helper_input_textarea___tostring, 0, 0, 0) -#endif ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_html_helper_input_textarea_method_entry) { -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Html_Helper_Input_Textarea, __toString, arginfo_phalcon_html_helper_input_textarea___tostring, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Html_Helper_Input_Textarea, __toString, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Html_Helper_Input_Textarea, __toString, arginfo_phalcon_html_helper_input_textarea___tostring, ZEND_ACC_PUBLIC) PHP_FE_END }; diff --git a/ext/phalcon/html/helper/label.zep.c b/ext/phalcon/html/helper/label.zep.c index b5d9c3a25ac..c209841e234 100644 --- a/ext/phalcon/html/helper/label.zep.c +++ b/ext/phalcon/html/helper/label.zep.c @@ -60,18 +60,14 @@ PHP_METHOD(Phalcon_Html_Helper_Label, __invoke) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(label) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(attributes) Z_PARAM_BOOL(raw) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &label_param, &attributes_param, &raw_param); zephir_get_strval(&label, label_param); if (!attributes_param) { @@ -83,10 +79,7 @@ PHP_METHOD(Phalcon_Html_Helper_Label, __invoke) if (!raw_param) { raw = 0; } else { - raw = zephir_get_boolval(raw_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "label"); if (raw) { diff --git a/ext/phalcon/html/helper/label.zep.h b/ext/phalcon/html/helper/label.zep.h index 48351fadbf0..260c444fa38 100644 --- a/ext/phalcon/html/helper/label.zep.h +++ b/ext/phalcon/html/helper/label.zep.h @@ -7,11 +7,7 @@ PHP_METHOD(Phalcon_Html_Helper_Label, __invoke); ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_html_helper_label___invoke, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, label, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_ARG_TYPE_INFO(0, raw, _IS_BOOL, 0) ZEND_END_ARG_INFO() diff --git a/ext/phalcon/html/helper/link.zep.c b/ext/phalcon/html/helper/link.zep.c index 70d13da5383..a0f41d129c4 100644 --- a/ext/phalcon/html/helper/link.zep.c +++ b/ext/phalcon/html/helper/link.zep.c @@ -56,17 +56,13 @@ PHP_METHOD(Phalcon_Html_Helper_Link, add) ZVAL_UNDEF(&attributes); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(url) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &url_param, &attributes_param); zephir_get_strval(&url, url_param); if (!attributes_param) { @@ -75,8 +71,6 @@ PHP_METHOD(Phalcon_Html_Helper_Link, add) } else { zephir_get_arrval(&attributes, attributes_param); } - - ZEPHIR_INIT_VAR(&_0); zephir_create_array(&_0, 3, 0); ZEPHIR_INIT_VAR(&_1); @@ -106,9 +100,6 @@ PHP_METHOD(Phalcon_Html_Helper_Link, add) */ PHP_METHOD(Phalcon_Html_Helper_Link, getTag) { - zval *this_ptr = getThis(); - - RETURN_STRING("link"); } @@ -127,26 +118,19 @@ PHP_METHOD(Phalcon_Html_Helper_Link, getAttributes) zval attributes, required; zval *url_param = NULL, *attributes_param = NULL; zval url; - zval *this_ptr = getThis(); ZVAL_UNDEF(&url); ZVAL_UNDEF(&attributes); ZVAL_UNDEF(&required); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(url) Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &url_param, &attributes_param); zephir_get_strval(&url, url_param); zephir_get_arrval(&attributes, attributes_param); - - ZEPHIR_INIT_VAR(&required); zephir_create_array(&required, 1, 0); zephir_array_update_string(&required, SL("href"), &url, PH_COPY | PH_SEPARATE); diff --git a/ext/phalcon/html/helper/link.zep.h b/ext/phalcon/html/helper/link.zep.h index 8b2dd2dc325..2129039b209 100644 --- a/ext/phalcon/html/helper/link.zep.h +++ b/ext/phalcon/html/helper/link.zep.h @@ -9,11 +9,7 @@ PHP_METHOD(Phalcon_Html_Helper_Link, getAttributes); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_html_helper_link_add, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, url, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_html_helper_link_gettag, 0, 0, IS_STRING, 0) diff --git a/ext/phalcon/html/helper/meta.zep.c b/ext/phalcon/html/helper/meta.zep.c index fca49590d32..deacb6a31bd 100644 --- a/ext/phalcon/html/helper/meta.zep.c +++ b/ext/phalcon/html/helper/meta.zep.c @@ -57,16 +57,12 @@ PHP_METHOD(Phalcon_Html_Helper_Meta, add) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &attributes_param); if (!attributes_param) { ZEPHIR_INIT_VAR(&attributes); @@ -74,8 +70,6 @@ PHP_METHOD(Phalcon_Html_Helper_Meta, add) } else { zephir_get_arrval(&attributes, attributes_param); } - - ZEPHIR_INIT_VAR(&_0); zephir_create_array(&_0, 3, 0); ZEPHIR_INIT_VAR(&_1); @@ -113,24 +107,18 @@ PHP_METHOD(Phalcon_Html_Helper_Meta, addHttp) ZVAL_UNDEF(&httpEquiv); ZVAL_UNDEF(&content); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(httpEquiv) Z_PARAM_STR(content) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &httpEquiv_param, &content_param); zephir_get_strval(&httpEquiv, httpEquiv_param); zephir_get_strval(&content, content_param); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "http-equiv"); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "addelement", NULL, 328, &_0, &httpEquiv, &content); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "addelement", NULL, 329, &_0, &httpEquiv, &content); zephir_check_call_status(); RETURN_MM(); } @@ -153,24 +141,18 @@ PHP_METHOD(Phalcon_Html_Helper_Meta, addName) ZVAL_UNDEF(&name); ZVAL_UNDEF(&content); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(name) Z_PARAM_STR(content) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &name_param, &content_param); zephir_get_strval(&name, name_param); zephir_get_strval(&content, content_param); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "name"); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "addelement", NULL, 328, &_0, &name, &content); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "addelement", NULL, 329, &_0, &name, &content); zephir_check_call_status(); RETURN_THIS(); } @@ -193,24 +175,18 @@ PHP_METHOD(Phalcon_Html_Helper_Meta, addProperty) ZVAL_UNDEF(&name); ZVAL_UNDEF(&content); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(name) Z_PARAM_STR(content) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &name_param, &content_param); zephir_get_strval(&name, name_param); zephir_get_strval(&content, content_param); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "property"); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "addelement", NULL, 328, &_0, &name, &content); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "addelement", NULL, 329, &_0, &name, &content); zephir_check_call_status(); RETURN_THIS(); } @@ -220,9 +196,6 @@ PHP_METHOD(Phalcon_Html_Helper_Meta, addProperty) */ PHP_METHOD(Phalcon_Html_Helper_Meta, getTag) { - zval *this_ptr = getThis(); - - RETURN_STRING("meta"); } @@ -248,23 +221,17 @@ PHP_METHOD(Phalcon_Html_Helper_Meta, addElement) ZVAL_UNDEF(&value); ZVAL_UNDEF(&content); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(element) Z_PARAM_STR(value) Z_PARAM_STR(content) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &element_param, &value_param, &content_param); zephir_get_strval(&element, element_param); zephir_get_strval(&value, value_param); zephir_get_strval(&content, content_param); - - ZEPHIR_INIT_VAR(&attributes); zephir_create_array(&attributes, 2, 0); zephir_array_update_zval(&attributes, &element, &value, PH_COPY); diff --git a/ext/phalcon/html/helper/meta.zep.h b/ext/phalcon/html/helper/meta.zep.h index 43031ad2104..8a9e93d6201 100644 --- a/ext/phalcon/html/helper/meta.zep.h +++ b/ext/phalcon/html/helper/meta.zep.h @@ -11,11 +11,7 @@ PHP_METHOD(Phalcon_Html_Helper_Meta, getTag); PHP_METHOD(Phalcon_Html_Helper_Meta, addElement); ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_html_helper_meta_add, 0, 0, Phalcon\\Html\\Helper\\Meta, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_html_helper_meta_addhttp, 0, 2, Phalcon\\Html\\Helper\\Meta, 0) diff --git a/ext/phalcon/html/helper/ol.zep.c b/ext/phalcon/html/helper/ol.zep.c index a2189c9445d..614883f30be 100644 --- a/ext/phalcon/html/helper/ol.zep.c +++ b/ext/phalcon/html/helper/ol.zep.c @@ -63,18 +63,14 @@ PHP_METHOD(Phalcon_Html_Helper_Ol, add) ZVAL_UNDEF(&attributes); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(text) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(attributes) Z_PARAM_BOOL(raw) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &text_param, &attributes_param, &raw_param); zephir_get_strval(&text, text_param); if (!attributes_param) { @@ -86,10 +82,7 @@ PHP_METHOD(Phalcon_Html_Helper_Ol, add) if (!raw_param) { raw = 0; } else { - raw = zephir_get_boolval(raw_param); - } - - + } ZEPHIR_INIT_VAR(&_0); zephir_create_array(&_0, 3, 0); ZEPHIR_INIT_VAR(&_1); @@ -97,7 +90,7 @@ PHP_METHOD(Phalcon_Html_Helper_Ol, add) zephir_array_fast_append(&_0, &_1); ZEPHIR_INIT_VAR(&_2); zephir_create_array(&_2, 4, 0); - ZEPHIR_OBS_VAR(&_3); + zephir_memory_observe(&_3); zephir_read_property(&_3, this_ptr, ZEND_STRL("elementTag"), PH_NOISY_CC); zephir_array_fast_append(&_2, &_3); zephir_array_fast_append(&_2, &text); @@ -118,9 +111,6 @@ PHP_METHOD(Phalcon_Html_Helper_Ol, add) */ PHP_METHOD(Phalcon_Html_Helper_Ol, getTag) { - zval *this_ptr = getThis(); - - RETURN_STRING("ol"); } diff --git a/ext/phalcon/html/helper/ol.zep.h b/ext/phalcon/html/helper/ol.zep.h index ad04a656c7c..40974773b64 100644 --- a/ext/phalcon/html/helper/ol.zep.h +++ b/ext/phalcon/html/helper/ol.zep.h @@ -8,11 +8,7 @@ PHP_METHOD(Phalcon_Html_Helper_Ol, getTag); ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_html_helper_ol_add, 0, 1, Phalcon\\Html\\Helper\\AbstractList, 0) ZEND_ARG_TYPE_INFO(0, text, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_ARG_TYPE_INFO(0, raw, _IS_BOOL, 0) ZEND_END_ARG_INFO() diff --git a/ext/phalcon/html/helper/script.zep.c b/ext/phalcon/html/helper/script.zep.c index 9deb1aa1e83..d3e00134dc3 100644 --- a/ext/phalcon/html/helper/script.zep.c +++ b/ext/phalcon/html/helper/script.zep.c @@ -61,17 +61,13 @@ PHP_METHOD(Phalcon_Html_Helper_Script, add) ZVAL_UNDEF(&attributes); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(url) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &url_param, &attributes_param); zephir_get_strval(&url, url_param); if (!attributes_param) { @@ -80,8 +76,6 @@ PHP_METHOD(Phalcon_Html_Helper_Script, add) } else { zephir_get_arrval(&attributes, attributes_param); } - - ZEPHIR_INIT_VAR(&_0); zephir_create_array(&_0, 3, 0); ZEPHIR_INIT_VAR(&_1); @@ -120,26 +114,19 @@ PHP_METHOD(Phalcon_Html_Helper_Script, getAttributes) zval attributes, required; zval *url_param = NULL, *attributes_param = NULL; zval url; - zval *this_ptr = getThis(); ZVAL_UNDEF(&url); ZVAL_UNDEF(&attributes); ZVAL_UNDEF(&required); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(url) Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &url_param, &attributes_param); zephir_get_strval(&url, url_param); zephir_get_arrval(&attributes, attributes_param); - - ZEPHIR_INIT_VAR(&required); zephir_create_array(&required, 2, 0); zephir_array_update_string(&required, SL("src"), &url, PH_COPY | PH_SEPARATE); @@ -154,9 +141,6 @@ PHP_METHOD(Phalcon_Html_Helper_Script, getAttributes) */ PHP_METHOD(Phalcon_Html_Helper_Script, getTag) { - zval *this_ptr = getThis(); - - RETURN_STRING("script"); } diff --git a/ext/phalcon/html/helper/script.zep.h b/ext/phalcon/html/helper/script.zep.h index 96f24b53ab6..178364483d5 100644 --- a/ext/phalcon/html/helper/script.zep.h +++ b/ext/phalcon/html/helper/script.zep.h @@ -9,11 +9,7 @@ PHP_METHOD(Phalcon_Html_Helper_Script, getTag); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_html_helper_script_add, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, url, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_html_helper_script_getattributes, 0, 2, IS_ARRAY, 0) diff --git a/ext/phalcon/html/helper/style.zep.c b/ext/phalcon/html/helper/style.zep.c index 43d6670b4c2..d7b106941f1 100644 --- a/ext/phalcon/html/helper/style.zep.c +++ b/ext/phalcon/html/helper/style.zep.c @@ -65,17 +65,13 @@ PHP_METHOD(Phalcon_Html_Helper_Style, add) ZVAL_UNDEF(&attributes); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(url) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &url_param, &attributes_param); zephir_get_strval(&url, url_param); if (!attributes_param) { @@ -84,8 +80,6 @@ PHP_METHOD(Phalcon_Html_Helper_Style, add) } else { zephir_get_arrval(&attributes, attributes_param); } - - ZEPHIR_INIT_VAR(&_0); zephir_create_array(&_0, 3, 0); ZEPHIR_INIT_VAR(&_1); @@ -123,18 +117,10 @@ PHP_METHOD(Phalcon_Html_Helper_Style, setStyle) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(flag) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &flag_param); - flag = zephir_get_boolval(flag_param); - - if (flag) { zephir_update_property_zval(this_ptr, ZEND_STRL("isStyle"), &__$true); } else { @@ -163,21 +149,15 @@ PHP_METHOD(Phalcon_Html_Helper_Style, getAttributes) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&attributes); ZVAL_UNDEF(&required); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(url) Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &url_param, &attributes_param); zephir_get_strval(&url, url_param); zephir_get_arrval(&attributes, attributes_param); - - ZEPHIR_INIT_VAR(&required); zephir_create_array(&required, 4, 0); add_assoc_stringl_ex(&required, SL("rel"), SL("stylesheet")); @@ -204,15 +184,16 @@ PHP_METHOD(Phalcon_Html_Helper_Style, getTag) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); zephir_read_property(&_1, this_ptr, ZEND_STRL("isStyle"), PH_NOISY_CC | PH_READONLY); if (ZEPHIR_IS_TRUE_IDENTICAL(&_1)) { + ZEPHIR_INIT_NVAR(&_0); ZVAL_STRING(&_0, "style"); } else { + ZEPHIR_INIT_NVAR(&_0); ZVAL_STRING(&_0, "link"); } RETURN_CCTOR(&_0); diff --git a/ext/phalcon/html/helper/style.zep.h b/ext/phalcon/html/helper/style.zep.h index 72db3dc468a..47275a0ed74 100644 --- a/ext/phalcon/html/helper/style.zep.h +++ b/ext/phalcon/html/helper/style.zep.h @@ -10,11 +10,7 @@ PHP_METHOD(Phalcon_Html_Helper_Style, getTag); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_html_helper_style_add, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, url, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_html_helper_style_setstyle, 0, 1, Phalcon\\Html\\Helper\\Style, 0) diff --git a/ext/phalcon/html/helper/title.zep.c b/ext/phalcon/html/helper/title.zep.c index d97e2c7c76d..4fb36087f95 100644 --- a/ext/phalcon/html/helper/title.zep.c +++ b/ext/phalcon/html/helper/title.zep.c @@ -82,17 +82,14 @@ PHP_METHOD(Phalcon_Html_Helper_Title, __invoke) ZVAL_UNDEF(&indent); ZVAL_UNDEF(&delimiter); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_STR(indent) Z_PARAM_STR_OR_NULL(delimiter) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 2, &indent_param, &delimiter_param); if (!indent_param) { ZEPHIR_INIT_VAR(&indent); @@ -105,8 +102,6 @@ PHP_METHOD(Phalcon_Html_Helper_Title, __invoke) } else { zephir_get_strval(&delimiter, delimiter_param); } - - ZEPHIR_INIT_VAR(&_0); if (Z_TYPE_P(&delimiter) == IS_NULL) { ZEPHIR_INIT_NVAR(&_0); @@ -147,18 +142,17 @@ PHP_METHOD(Phalcon_Html_Helper_Title, __toString) ZVAL_UNDEF(&_11); ZVAL_UNDEF(&_12); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("prepend"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_1); zephir_create_array(&_1, 1, 0); - ZEPHIR_OBS_VAR(&_2); + zephir_memory_observe(&_2); zephir_read_property(&_2, this_ptr, ZEND_STRL("title"), PH_NOISY_CC); zephir_array_fast_append(&_1, &_2); zephir_read_property(&_3, this_ptr, ZEND_STRL("append"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&items, "array_merge", NULL, 329, &_0, &_1, &_3); + ZEPHIR_CALL_FUNCTION(&items, "array_merge", NULL, 330, &_0, &_1, &_3); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_4); array_init(&_4); @@ -206,26 +200,19 @@ PHP_METHOD(Phalcon_Html_Helper_Title, append) ZVAL_UNDEF(&text); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(text) Z_PARAM_OPTIONAL Z_PARAM_BOOL(raw) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &text_param, &raw_param); zephir_get_strval(&text, text_param); if (!raw_param) { raw = 0; } else { - raw = zephir_get_boolval(raw_param); - } - - + } ZEPHIR_INIT_VAR(&_0); if (raw) { ZEPHIR_CPY_WRT(&_0, &text); @@ -246,9 +233,6 @@ PHP_METHOD(Phalcon_Html_Helper_Title, append) */ PHP_METHOD(Phalcon_Html_Helper_Title, get) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "title"); } @@ -273,26 +257,19 @@ PHP_METHOD(Phalcon_Html_Helper_Title, set) ZVAL_UNDEF(&text); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(text) Z_PARAM_OPTIONAL Z_PARAM_BOOL(raw) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &text_param, &raw_param); zephir_get_strval(&text, text_param); if (!raw_param) { raw = 0; } else { - raw = zephir_get_boolval(raw_param); - } - - + } ZEPHIR_INIT_VAR(&_0); if (raw) { ZEPHIR_CPY_WRT(&_0, &text); @@ -326,26 +303,19 @@ PHP_METHOD(Phalcon_Html_Helper_Title, setSeparator) ZVAL_UNDEF(&separator); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(separator) Z_PARAM_OPTIONAL Z_PARAM_BOOL(raw) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &separator_param, &raw_param); zephir_get_strval(&separator, separator_param); if (!raw_param) { raw = 0; } else { - raw = zephir_get_boolval(raw_param); - } - - + } ZEPHIR_INIT_VAR(&_0); if (raw) { ZEPHIR_CPY_WRT(&_0, &separator); @@ -380,26 +350,19 @@ PHP_METHOD(Phalcon_Html_Helper_Title, prepend) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(text) Z_PARAM_OPTIONAL Z_PARAM_BOOL(raw) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &text_param, &raw_param); zephir_get_strval(&text, text_param); if (!raw_param) { raw = 0; } else { - raw = zephir_get_boolval(raw_param); - } - - + } ZEPHIR_INIT_VAR(&_0); if (raw) { ZEPHIR_CPY_WRT(&_0, &text); @@ -412,7 +375,7 @@ PHP_METHOD(Phalcon_Html_Helper_Title, prepend) zephir_read_property(&_2, this_ptr, ZEND_STRL("prepend"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&prepend, &_2); ZEPHIR_MAKE_REF(&prepend); - ZEPHIR_CALL_FUNCTION(NULL, "array_unshift", NULL, 269, &prepend, &text); + ZEPHIR_CALL_FUNCTION(NULL, "array_unshift", NULL, 270, &prepend, &text); ZEPHIR_UNREF(&prepend); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("prepend"), &prepend); @@ -429,7 +392,8 @@ zend_object *zephir_init_properties_Phalcon_Html_Helper_Title(zend_class_entry * ZVAL_UNDEF(&_3$$4); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/html/helper/title.zep.h b/ext/phalcon/html/helper/title.zep.h index ef1c39267c1..3d0521f64f3 100644 --- a/ext/phalcon/html/helper/title.zep.h +++ b/ext/phalcon/html/helper/title.zep.h @@ -17,11 +17,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_html_helper_title___invok ZEND_ARG_TYPE_INFO(0, delimiter, IS_STRING, 1) ZEND_END_ARG_INFO() -#if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_html_helper_title___tostring, 0, 0, IS_STRING, 0) -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_html_helper_title___tostring, 0, 0, 0) -#endif ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_html_helper_title_append, 0, 1, Phalcon\\Html\\Helper\\Title, 0) @@ -52,11 +48,7 @@ ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_html_helper_title_method_entry) { PHP_ME(Phalcon_Html_Helper_Title, __invoke, arginfo_phalcon_html_helper_title___invoke, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Html_Helper_Title, __toString, arginfo_phalcon_html_helper_title___tostring, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Html_Helper_Title, __toString, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Html_Helper_Title, __toString, arginfo_phalcon_html_helper_title___tostring, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Html_Helper_Title, append, arginfo_phalcon_html_helper_title_append, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Html_Helper_Title, get, arginfo_phalcon_html_helper_title_get, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Html_Helper_Title, set, arginfo_phalcon_html_helper_title_set, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/html/helper/ul.zep.c b/ext/phalcon/html/helper/ul.zep.c index fd7fa4ada60..78d25855bba 100644 --- a/ext/phalcon/html/helper/ul.zep.c +++ b/ext/phalcon/html/helper/ul.zep.c @@ -38,9 +38,6 @@ ZEPHIR_INIT_CLASS(Phalcon_Html_Helper_Ul) */ PHP_METHOD(Phalcon_Html_Helper_Ul, getTag) { - zval *this_ptr = getThis(); - - RETURN_STRING("ul"); } diff --git a/ext/phalcon/html/link/abstractlink.zep.c b/ext/phalcon/html/link/abstractlink.zep.c index 85d35618fcd..aae1988a71f 100644 --- a/ext/phalcon/html/link/abstractlink.zep.c +++ b/ext/phalcon/html/link/abstractlink.zep.c @@ -79,18 +79,14 @@ PHP_METHOD(Phalcon_Html_Link_AbstractLink, __construct) ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$3); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 3) Z_PARAM_OPTIONAL Z_PARAM_STR(rel) Z_PARAM_STR(href) Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 3, &rel_param, &href_param, &attributes_param); if (!rel_param) { ZEPHIR_INIT_VAR(&rel); @@ -110,16 +106,14 @@ PHP_METHOD(Phalcon_Html_Link_AbstractLink, __construct) } else { zephir_get_arrval(&attributes, attributes_param); } - - ZEPHIR_INIT_VAR(&_0); object_init_ex(&_0, phalcon_support_collection_ce); - ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 22, &attributes); + ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 23, &attributes); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("attributes"), &_0); ZEPHIR_INIT_VAR(&_1); object_init_ex(&_1, phalcon_support_collection_ce); - ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 22); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 23); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("rels"), &_1); zephir_update_property_zval(this_ptr, ZEND_STRL("href"), &href); @@ -151,9 +145,8 @@ PHP_METHOD(Phalcon_Html_Link_AbstractLink, doGetAttributes) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("attributes"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_METHOD(&_0, "toarray", NULL, 0); @@ -176,9 +169,6 @@ PHP_METHOD(Phalcon_Html_Link_AbstractLink, doGetAttributes) */ PHP_METHOD(Phalcon_Html_Link_AbstractLink, doGetHref) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "href"); } @@ -200,9 +190,8 @@ PHP_METHOD(Phalcon_Html_Link_AbstractLink, doGetRels) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("rels"), PH_NOISY_CC | PH_READONLY); ZVAL_BOOL(&_1, 0); @@ -219,9 +208,6 @@ PHP_METHOD(Phalcon_Html_Link_AbstractLink, doGetRels) */ PHP_METHOD(Phalcon_Html_Link_AbstractLink, doIsTemplated) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "templated"); } @@ -242,34 +228,27 @@ PHP_METHOD(Phalcon_Html_Link_AbstractLink, hrefIsTemplated) zend_long ZEPHIR_LAST_CALL_STATUS; zval *href_param = NULL, _0, _1, _3; zval href; - zval *this_ptr = getThis(); ZVAL_UNDEF(&href); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(href) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &href_param); zephir_get_strval(&href, href_param); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "{"); - ZEPHIR_CALL_FUNCTION(&_1, "mb_strpos", NULL, 85, &href, &_0); + ZEPHIR_CALL_FUNCTION(&_1, "mb_strpos", NULL, 86, &href, &_0); zephir_check_call_status(); _2 = !ZEPHIR_IS_FALSE_IDENTICAL(&_1); if (_2) { ZEPHIR_INIT_NVAR(&_0); ZVAL_STRING(&_0, "}"); - ZEPHIR_CALL_FUNCTION(&_3, "mb_strpos", NULL, 85, &href, &_0); + ZEPHIR_CALL_FUNCTION(&_3, "mb_strpos", NULL, 86, &href, &_0); zephir_check_call_status(); _2 = !ZEPHIR_IS_FALSE_IDENTICAL(&_3); } @@ -294,20 +273,14 @@ PHP_METHOD(Phalcon_Html_Link_AbstractLink, doWithAttribute) ZVAL_UNDEF(&value_sub); ZVAL_UNDEF(&newInstance); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(key) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &key_param, &value); zephir_get_strval(&key, key_param); - - ZEPHIR_INIT_VAR(&newInstance); if (zephir_clone(&newInstance, this_ptr) == FAILURE) { RETURN_MM(); @@ -334,19 +307,13 @@ PHP_METHOD(Phalcon_Html_Link_AbstractLink, doWithHref) ZVAL_UNDEF(&href); ZVAL_UNDEF(&newInstance); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(href) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &href_param); zephir_get_strval(&href, href_param); - - ZEPHIR_INIT_VAR(&newInstance); if (zephir_clone(&newInstance, this_ptr) == FAILURE) { RETURN_MM(); @@ -375,19 +342,13 @@ PHP_METHOD(Phalcon_Html_Link_AbstractLink, doWithRel) ZVAL_UNDEF(&newInstance); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); zephir_get_strval(&key, key_param); - - ZEPHIR_INIT_VAR(&newInstance); if (zephir_clone(&newInstance, this_ptr) == FAILURE) { RETURN_MM(); @@ -415,19 +376,13 @@ PHP_METHOD(Phalcon_Html_Link_AbstractLink, doWithoutAttribute) ZVAL_UNDEF(&key); ZVAL_UNDEF(&newInstance); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); zephir_get_strval(&key, key_param); - - ZEPHIR_INIT_VAR(&newInstance); if (zephir_clone(&newInstance, this_ptr) == FAILURE) { RETURN_MM(); @@ -454,19 +409,13 @@ PHP_METHOD(Phalcon_Html_Link_AbstractLink, doWithoutRel) ZVAL_UNDEF(&key); ZVAL_UNDEF(&newInstance); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); zephir_get_strval(&key, key_param); - - ZEPHIR_INIT_VAR(&newInstance); if (zephir_clone(&newInstance, this_ptr) == FAILURE) { RETURN_MM(); diff --git a/ext/phalcon/html/link/abstractlink.zep.h b/ext/phalcon/html/link/abstractlink.zep.h index 9a2094a9098..ee8886b6a84 100644 --- a/ext/phalcon/html/link/abstractlink.zep.h +++ b/ext/phalcon/html/link/abstractlink.zep.h @@ -18,11 +18,7 @@ PHP_METHOD(Phalcon_Html_Link_AbstractLink, doWithoutRel); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_html_link_abstractlink___construct, 0, 0, 0) ZEND_ARG_TYPE_INFO(0, rel, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, href, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, attributes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_html_link_abstractlink_dogetattributes, 0, 0, IS_ARRAY, 0) diff --git a/ext/phalcon/html/link/abstractlinkprovider.zep.c b/ext/phalcon/html/link/abstractlinkprovider.zep.c index 0b9ce9038ef..c5d44618726 100644 --- a/ext/phalcon/html/link/abstractlinkprovider.zep.c +++ b/ext/phalcon/html/link/abstractlinkprovider.zep.c @@ -69,16 +69,12 @@ PHP_METHOD(Phalcon_Html_Link_AbstractLinkProvider, __construct) ZVAL_UNDEF(&_10$$5); ZVAL_UNDEF(&_12$$5); ZVAL_UNDEF(&_13$$6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(links) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &links_param); if (!links_param) { ZEPHIR_INIT_VAR(&links); @@ -86,8 +82,6 @@ PHP_METHOD(Phalcon_Html_Link_AbstractLinkProvider, __construct) } else { zephir_get_arrval(&links, links_param); } - - zephir_is_iterable(&links, 0, "phalcon/Html/Link/AbstractLinkProvider.zep", 42); if (Z_TYPE_P(&links) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&links), _0) @@ -96,13 +90,13 @@ PHP_METHOD(Phalcon_Html_Link_AbstractLinkProvider, __construct) ZVAL_COPY(&link, _0); ZEPHIR_INIT_NVAR(&_2$$3); ZVAL_STRING(&_2$$3, "Phalcon\\Html\\Link\\Interfaces\\LinkInterface"); - ZEPHIR_CALL_FUNCTION(&_3$$3, "is_a", &_4, 86, &link, &_2$$3); + ZEPHIR_CALL_FUNCTION(&_3$$3, "is_a", &_4, 87, &link, &_2$$3); zephir_check_call_status(); _5$$3 = ZEPHIR_IS_TRUE_IDENTICAL(&_3$$3); if (!(_5$$3)) { ZEPHIR_INIT_NVAR(&_2$$3); ZVAL_STRING(&_2$$3, "Psr\\Link\\LinkInterface"); - ZEPHIR_CALL_FUNCTION(&_6$$3, "is_a", &_4, 86, &link, &_2$$3); + ZEPHIR_CALL_FUNCTION(&_6$$3, "is_a", &_4, 87, &link, &_2$$3); zephir_check_call_status(); _5$$3 = ZEPHIR_IS_TRUE_IDENTICAL(&_6$$3); } @@ -125,13 +119,13 @@ PHP_METHOD(Phalcon_Html_Link_AbstractLinkProvider, __construct) zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_9$$5); ZVAL_STRING(&_9$$5, "Phalcon\\Html\\Link\\Interfaces\\LinkInterface"); - ZEPHIR_CALL_FUNCTION(&_10$$5, "is_a", &_4, 86, &link, &_9$$5); + ZEPHIR_CALL_FUNCTION(&_10$$5, "is_a", &_4, 87, &link, &_9$$5); zephir_check_call_status(); _11$$5 = ZEPHIR_IS_TRUE_IDENTICAL(&_10$$5); if (!(_11$$5)) { ZEPHIR_INIT_NVAR(&_9$$5); ZVAL_STRING(&_9$$5, "Psr\\Link\\LinkInterface"); - ZEPHIR_CALL_FUNCTION(&_12$$5, "is_a", &_4, 86, &link, &_9$$5); + ZEPHIR_CALL_FUNCTION(&_12$$5, "is_a", &_4, 87, &link, &_9$$5); zephir_check_call_status(); _11$$5 = ZEPHIR_IS_TRUE_IDENTICAL(&_12$$5); } @@ -158,9 +152,6 @@ PHP_METHOD(Phalcon_Html_Link_AbstractLinkProvider, __construct) */ PHP_METHOD(Phalcon_Html_Link_AbstractLinkProvider, doGetLinks) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "links"); } @@ -190,19 +181,13 @@ PHP_METHOD(Phalcon_Html_Link_AbstractLinkProvider, doGetLinksByRel) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&filtered); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(rel) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &rel_param); zephir_get_strval(&rel, rel_param); - - ZEPHIR_INIT_VAR(&filtered); array_init(&filtered); zephir_read_property(&_0, this_ptr, ZEND_STRL("links"), PH_NOISY_CC | PH_READONLY); @@ -264,18 +249,12 @@ PHP_METHOD(Phalcon_Html_Link_AbstractLinkProvider, doWithLink) ZVAL_UNDEF(&link_sub); ZVAL_UNDEF(&key); ZVAL_UNDEF(&newInstance); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(link) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &link); - - ZEPHIR_CALL_METHOD(&key, this_ptr, "getkey", NULL, 0, link); zephir_check_call_status(); ZEPHIR_INIT_VAR(&newInstance); @@ -308,18 +287,12 @@ PHP_METHOD(Phalcon_Html_Link_AbstractLinkProvider, doWithoutLink) ZVAL_UNDEF(&key); ZVAL_UNDEF(&newInstance); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(link) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &link); - - ZEPHIR_CALL_METHOD(&key, this_ptr, "getkey", NULL, 0, link); zephir_check_call_status(); ZEPHIR_INIT_VAR(&newInstance); @@ -344,22 +317,15 @@ PHP_METHOD(Phalcon_Html_Link_AbstractLinkProvider, getKey) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *link, link_sub; - zval *this_ptr = getThis(); ZVAL_UNDEF(&link_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(link) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &link); - - - ZEPHIR_RETURN_CALL_FUNCTION("spl_object_hash", NULL, 80, link); + ZEPHIR_RETURN_CALL_FUNCTION("spl_object_hash", NULL, 81, link); zephir_check_call_status(); RETURN_MM(); } @@ -372,7 +338,8 @@ zend_object *zephir_init_properties_Phalcon_Html_Link_AbstractLinkProvider(zend_ ZVAL_UNDEF(&_1$$3); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/html/link/abstractlinkprovider.zep.h b/ext/phalcon/html/link/abstractlinkprovider.zep.h index 070c526435a..9753751a9b0 100644 --- a/ext/phalcon/html/link/abstractlinkprovider.zep.h +++ b/ext/phalcon/html/link/abstractlinkprovider.zep.h @@ -12,11 +12,7 @@ PHP_METHOD(Phalcon_Html_Link_AbstractLinkProvider, getKey); zend_object *zephir_init_properties_Phalcon_Html_Link_AbstractLinkProvider(zend_class_entry *class_type); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_html_link_abstractlinkprovider___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, links, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, links, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, links, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_html_link_abstractlinkprovider_dogetlinks, 0, 0, IS_ARRAY, 0) diff --git a/ext/phalcon/html/link/evolvablelink.zep.c b/ext/phalcon/html/link/evolvablelink.zep.c index 6ac755087f5..c6cec93576c 100644 --- a/ext/phalcon/html/link/evolvablelink.zep.c +++ b/ext/phalcon/html/link/evolvablelink.zep.c @@ -60,19 +60,13 @@ PHP_METHOD(Phalcon_Html_Link_EvolvableLink, withAttribute) ZVAL_UNDEF(&attribute_sub); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ZVAL(attribute) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &attribute, &value); - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "dowithattribute", NULL, 0, attribute, value); zephir_check_call_status(); RETURN_MM(); @@ -104,19 +98,13 @@ PHP_METHOD(Phalcon_Html_Link_EvolvableLink, withHref) zval *this_ptr = getThis(); ZVAL_UNDEF(&href); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(href) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &href_param); zephir_get_strval(&href, href_param); - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "dowithhref", NULL, 0, &href); zephir_check_call_status(); RETURN_MM(); @@ -139,19 +127,13 @@ PHP_METHOD(Phalcon_Html_Link_EvolvableLink, withRel) zval *this_ptr = getThis(); ZVAL_UNDEF(&rel); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(rel) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &rel_param); zephir_get_strval(&rel, rel_param); - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "dowithrel", NULL, 0, &rel); zephir_check_call_status(); RETURN_MM(); @@ -174,19 +156,13 @@ PHP_METHOD(Phalcon_Html_Link_EvolvableLink, withoutAttribute) zval *this_ptr = getThis(); ZVAL_UNDEF(&attribute); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(attribute) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &attribute_param); zephir_get_strval(&attribute, attribute_param); - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "dowithoutattribute", NULL, 0, &attribute); zephir_check_call_status(); RETURN_MM(); @@ -209,19 +185,13 @@ PHP_METHOD(Phalcon_Html_Link_EvolvableLink, withoutRel) zval *this_ptr = getThis(); ZVAL_UNDEF(&rel); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(rel) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &rel_param); zephir_get_strval(&rel, rel_param); - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "dowithoutrel", NULL, 0, &rel); zephir_check_call_status(); RETURN_MM(); diff --git a/ext/phalcon/html/link/evolvablelinkprovider.zep.c b/ext/phalcon/html/link/evolvablelinkprovider.zep.c index 50d7cedffbd..bb7b9c717d8 100644 --- a/ext/phalcon/html/link/evolvablelinkprovider.zep.c +++ b/ext/phalcon/html/link/evolvablelinkprovider.zep.c @@ -58,18 +58,12 @@ PHP_METHOD(Phalcon_Html_Link_EvolvableLinkProvider, withLink) zval *this_ptr = getThis(); ZVAL_UNDEF(&link_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(link, phalcon_html_link_interfaces_linkinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &link); - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "dowithlink", NULL, 0, link); zephir_check_call_status(); RETURN_MM(); @@ -95,18 +89,12 @@ PHP_METHOD(Phalcon_Html_Link_EvolvableLinkProvider, withoutLink) zval *this_ptr = getThis(); ZVAL_UNDEF(&link_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(link, phalcon_html_link_interfaces_linkinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &link); - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "dowithoutlink", NULL, 0, link); zephir_check_call_status(); RETURN_MM(); diff --git a/ext/phalcon/html/link/link.zep.c b/ext/phalcon/html/link/link.zep.c index b8cdf262683..1977e6b5639 100644 --- a/ext/phalcon/html/link/link.zep.c +++ b/ext/phalcon/html/link/link.zep.c @@ -54,10 +54,8 @@ PHP_METHOD(Phalcon_Html_Link_Link, getAttributes) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *this_ptr = getThis(); - - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "dogetattributes", NULL, 0); zephir_check_call_status(); @@ -82,10 +80,8 @@ PHP_METHOD(Phalcon_Html_Link_Link, getHref) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *this_ptr = getThis(); - - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "dogethref", NULL, 0); zephir_check_call_status(); @@ -105,10 +101,8 @@ PHP_METHOD(Phalcon_Html_Link_Link, getRels) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *this_ptr = getThis(); - - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "dogetrels", NULL, 0); zephir_check_call_status(); @@ -125,10 +119,8 @@ PHP_METHOD(Phalcon_Html_Link_Link, isTemplated) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *this_ptr = getThis(); - - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "doistemplated", NULL, 0); zephir_check_call_status(); diff --git a/ext/phalcon/html/link/linkprovider.zep.c b/ext/phalcon/html/link/linkprovider.zep.c index 4b3ea9dfc55..bd24cb0aba4 100644 --- a/ext/phalcon/html/link/linkprovider.zep.c +++ b/ext/phalcon/html/link/linkprovider.zep.c @@ -47,10 +47,8 @@ PHP_METHOD(Phalcon_Html_Link_LinkProvider, getLinks) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *this_ptr = getThis(); - - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "dogetlinks", NULL, 0); zephir_check_call_status(); @@ -73,18 +71,12 @@ PHP_METHOD(Phalcon_Html_Link_LinkProvider, getLinksByRel) zval *this_ptr = getThis(); ZVAL_UNDEF(&rel_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(rel) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &rel); - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "dogetlinksbyrel", NULL, 0, rel); zephir_check_call_status(); RETURN_MM(); diff --git a/ext/phalcon/html/link/serializer/header.zep.c b/ext/phalcon/html/link/serializer/header.zep.c index f721a516efc..3c0ff640cde 100644 --- a/ext/phalcon/html/link/serializer/header.zep.c +++ b/ext/phalcon/html/link/serializer/header.zep.c @@ -51,7 +51,6 @@ PHP_METHOD(Phalcon_Html_Link_Serializer_Header, serialize) zend_long ZEPHIR_LAST_CALL_STATUS; zval *links_param = NULL, attributes, key, link, rels, result, subValue, value, *_0, _1, _2$$3, _3$$3, _4$$3, *_5$$3, _6$$3, _19$$3, _20$$3, *_9$$6, _10$$6, _11$$7, _12$$8, _13$$9, *_14$$12, _15$$12, _16$$13, _17$$14, _18$$15, _21$$17, _22$$17, _23$$17, _24$$17, *_25$$17, _26$$17, _39$$17, _40$$17, *_29$$20, _30$$20, _31$$21, _32$$22, _33$$23, *_34$$26, _35$$26, _36$$27, _37$$28, _38$$29; zval links, elements, parts; - zval *this_ptr = getThis(); ZVAL_UNDEF(&links); ZVAL_UNDEF(&elements); @@ -93,19 +92,13 @@ PHP_METHOD(Phalcon_Html_Link_Serializer_Header, serialize) ZVAL_UNDEF(&_36$$27); ZVAL_UNDEF(&_37$$28); ZVAL_UNDEF(&_38$$29); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(links) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &links_param); zephir_get_arrval(&links, links_param); - - ZEPHIR_INIT_VAR(&result); ZVAL_NULL(&result); ZEPHIR_INIT_VAR(&elements); diff --git a/ext/phalcon/html/tagfactory.zep.c b/ext/phalcon/html/tagfactory.zep.c index 3275381f0b9..02e04460d81 100644 --- a/ext/phalcon/html/tagfactory.zep.c +++ b/ext/phalcon/html/tagfactory.zep.c @@ -116,17 +116,13 @@ PHP_METHOD(Phalcon_Html_TagFactory, __construct) ZVAL_UNDEF(&escaper_sub); ZVAL_UNDEF(&services); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_OBJECT_OF_CLASS(escaper, phalcon_html_escaper_escaperinterface_ce) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(services) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &escaper, &services_param); if (!services_param) { ZEPHIR_INIT_VAR(&services); @@ -134,8 +130,6 @@ PHP_METHOD(Phalcon_Html_TagFactory, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&services, services_param); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("escaper"), escaper); ZEPHIR_CALL_METHOD(NULL, this_ptr, "init", NULL, 0, &services); zephir_check_call_status(); @@ -164,21 +158,15 @@ PHP_METHOD(Phalcon_Html_TagFactory, __call) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&arguments); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(name) Z_PARAM_ARRAY(arguments) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &name_param, &arguments_param); zephir_get_strval(&name, name_param); zephir_get_arrval(&arguments, arguments_param); - - ZEPHIR_CALL_METHOD(&helper, this_ptr, "newinstance", NULL, 0, &name); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_0); @@ -206,19 +194,13 @@ PHP_METHOD(Phalcon_Html_TagFactory, has) ZVAL_UNDEF(&name); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &name_param); zephir_get_strval(&name, name_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("mapper"), PH_NOISY_CC | PH_READONLY); RETURN_MM_BOOL(zephir_array_isset(&_0, &name)); } @@ -248,19 +230,13 @@ PHP_METHOD(Phalcon_Html_TagFactory, newInstance) ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_2$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &name_param); zephir_get_strval(&name, name_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("services"), PH_NOISY_CC | PH_READONLY); if (!(zephir_array_isset(&_0, &name))) { ZEPHIR_CALL_METHOD(&definition, this_ptr, "getservice", NULL, 0, &name); @@ -268,7 +244,7 @@ PHP_METHOD(Phalcon_Html_TagFactory, newInstance) ZEPHIR_INIT_VAR(&_1$$3); ZEPHIR_INIT_VAR(&_2$$3); zephir_create_array(&_2$$3, 1, 0); - ZEPHIR_OBS_VAR(&_3$$3); + zephir_memory_observe(&_3$$3); zephir_read_property(&_3$$3, this_ptr, ZEND_STRL("escaper"), PH_NOISY_CC); zephir_array_fast_append(&_2$$3, &_3$$3); ZEPHIR_LAST_CALL_STATUS = zephir_create_instance_params(&_1$$3, &definition, &_2$$3); @@ -294,20 +270,14 @@ PHP_METHOD(Phalcon_Html_TagFactory, set) ZVAL_UNDEF(&name); ZVAL_UNDEF(&method_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(name) Z_PARAM_ZVAL(method) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &name_param, &method); zephir_get_strval(&name, name_param); - - zephir_update_property_array(this_ptr, SL("mapper"), &name, method); zephir_unset_property_array(this_ptr, ZEND_STRL("services"), &name); zephir_read_property(&_0, this_ptr, ZEND_STRL("services"), PH_NOISY_CC | PH_READONLY); @@ -320,9 +290,6 @@ PHP_METHOD(Phalcon_Html_TagFactory, set) */ PHP_METHOD(Phalcon_Html_TagFactory, getExceptionClass) { - zval *this_ptr = getThis(); - - RETURN_STRING("Phalcon\\Html\\Exception"); } @@ -334,9 +301,6 @@ PHP_METHOD(Phalcon_Html_TagFactory, getExceptionClass) */ PHP_METHOD(Phalcon_Html_TagFactory, getServices) { - zval *this_ptr = getThis(); - - zephir_create_array(return_value, 41, 0); add_assoc_stringl_ex(return_value, SL("a"), SL("Phalcon\\Html\\Helper\\Anchor")); @@ -393,7 +357,8 @@ zend_object *zephir_init_properties_Phalcon_Html_TagFactory(zend_class_entry *cl ZVAL_UNDEF(&_3$$4); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/html/tagfactory.zep.h b/ext/phalcon/html/tagfactory.zep.h index eb307711225..5944d3336a5 100644 --- a/ext/phalcon/html/tagfactory.zep.h +++ b/ext/phalcon/html/tagfactory.zep.h @@ -14,11 +14,7 @@ zend_object *zephir_init_properties_Phalcon_Html_TagFactory(zend_class_entry *cl ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_html_tagfactory___construct, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, escaper, Phalcon\\Html\\Escaper\\EscaperInterface, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, services, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, services, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, services, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_html_tagfactory___call, 0, 0, 2) diff --git a/ext/phalcon/http/cookie.zep.c b/ext/phalcon/http/cookie.zep.c index fd98dc14e80..adf501d57af 100644 --- a/ext/phalcon/http/cookie.zep.c +++ b/ext/phalcon/http/cookie.zep.c @@ -13,11 +13,11 @@ #include "kernel/main.h" #include "kernel/object.h" -#include "kernel/memory.h" #include "kernel/operators.h" #include "kernel/fcall.h" #include "ext/spl/spl_exceptions.h" #include "kernel/exception.h" +#include "kernel/memory.h" #include "kernel/concat.h" #include "kernel/time.h" #include "kernel/array.h" @@ -120,7 +120,6 @@ PHP_METHOD(Phalcon_Http_Cookie, __construct) ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 8) Z_PARAM_STR(name) @@ -133,10 +132,8 @@ PHP_METHOD(Phalcon_Http_Cookie, __construct) Z_PARAM_BOOL_OR_NULL(httpOnly, is_null_true) Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 7, &name_param, &value, &expire_param, &path_param, &secure_param, &domain_param, &httpOnly_param, &options_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")); @@ -154,8 +151,7 @@ PHP_METHOD(Phalcon_Http_Cookie, __construct) if (!expire_param) { expire = 0; } else { - expire = zephir_get_intval(expire_param); - } + } if (!path_param) { ZEPHIR_INIT_VAR(&path); ZVAL_STRING(&path, "/"); @@ -165,8 +161,7 @@ PHP_METHOD(Phalcon_Http_Cookie, __construct) if (!secure_param) { secure = 0; } else { - secure = zephir_get_boolval(secure_param); - } + } if (!domain_param) { ZEPHIR_INIT_VAR(&domain); } else { @@ -175,18 +170,15 @@ PHP_METHOD(Phalcon_Http_Cookie, __construct) if (!httpOnly_param) { httpOnly = 0; } else { - httpOnly = zephir_get_boolval(httpOnly_param); - } + } if (!options_param) { ZEPHIR_INIT_VAR(&options); array_init(&options); } else { zephir_get_arrval(&options, options_param); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("name"), &name); - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, expire); zephir_update_property_zval(this_ptr, ZEND_STRL("expire"), &_0); zephir_update_property_zval(this_ptr, ZEND_STRL("path"), &path); @@ -222,9 +214,8 @@ PHP_METHOD(Phalcon_Http_Cookie, __toString) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&_0, this_ptr, "getvalue", NULL, 0); zephir_check_call_status(); @@ -264,9 +255,8 @@ PHP_METHOD(Phalcon_Http_Cookie, delete) ZVAL_UNDEF(&_4$$3); ZVAL_UNDEF(&_5$$3); ZVAL_UNDEF(&_6$$4); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("name"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&name, &_0); @@ -311,32 +301,32 @@ PHP_METHOD(Phalcon_Http_Cookie, delete) ZEPHIR_INIT_VAR(&_8); ZVAL_STRING(&_8, "expires"); ZVAL_LONG(&_0, (zephir_get_numberval(&_3) - 691200)); - ZEPHIR_CALL_METHOD(&_7, this_ptr, "getarrval", NULL, 330, &options, &_8, &_0); + ZEPHIR_CALL_METHOD(&_7, this_ptr, "getarrval", NULL, 331, &options, &_8, &_0); zephir_check_call_status(); zephir_array_update_string(&options, SL("expires"), &_7, PH_COPY | PH_SEPARATE); ZEPHIR_INIT_NVAR(&_8); ZVAL_STRING(&_8, "domain"); - ZEPHIR_CALL_METHOD(&_9, this_ptr, "getarrval", NULL, 330, &options, &_8, &domain); + ZEPHIR_CALL_METHOD(&_9, this_ptr, "getarrval", NULL, 331, &options, &_8, &domain); zephir_check_call_status(); zephir_array_update_string(&options, SL("domain"), &_9, PH_COPY | PH_SEPARATE); ZEPHIR_INIT_NVAR(&_8); ZVAL_STRING(&_8, "path"); - ZEPHIR_CALL_METHOD(&_10, this_ptr, "getarrval", NULL, 330, &options, &_8, &path); + ZEPHIR_CALL_METHOD(&_10, this_ptr, "getarrval", NULL, 331, &options, &_8, &path); zephir_check_call_status(); zephir_array_update_string(&options, SL("path"), &_10, PH_COPY | PH_SEPARATE); ZEPHIR_INIT_NVAR(&_8); ZVAL_STRING(&_8, "secure"); - ZEPHIR_CALL_METHOD(&_11, this_ptr, "getarrval", NULL, 330, &options, &_8, &secure); + ZEPHIR_CALL_METHOD(&_11, this_ptr, "getarrval", NULL, 331, &options, &_8, &secure); zephir_check_call_status(); zephir_array_update_string(&options, SL("secure"), &_11, PH_COPY | PH_SEPARATE); ZEPHIR_INIT_NVAR(&_8); ZVAL_STRING(&_8, "httponly"); - ZEPHIR_CALL_METHOD(&_12, this_ptr, "getarrval", NULL, 330, &options, &_8, &httpOnly); + ZEPHIR_CALL_METHOD(&_12, this_ptr, "getarrval", NULL, 331, &options, &_8, &httpOnly); zephir_check_call_status(); zephir_array_update_string(&options, SL("httponly"), &_12, PH_COPY | PH_SEPARATE); ZEPHIR_INIT_NVAR(&_8); ZVAL_STRING(&_8, ""); - ZEPHIR_CALL_FUNCTION(NULL, "setcookie", NULL, 331, &name, &_8, &options); + ZEPHIR_CALL_FUNCTION(NULL, "setcookie", NULL, 332, &name, &_8, &options); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -352,9 +342,8 @@ PHP_METHOD(Phalcon_Http_Cookie, getDomain) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("restored"), PH_NOISY_CC | PH_READONLY); if (!(zephir_is_true(&_0))) { @@ -375,9 +364,8 @@ PHP_METHOD(Phalcon_Http_Cookie, getExpiration) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("restored"), PH_NOISY_CC | PH_READONLY); if (!(zephir_is_true(&_0))) { @@ -398,9 +386,8 @@ PHP_METHOD(Phalcon_Http_Cookie, getHttpOnly) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("restored"), PH_NOISY_CC | PH_READONLY); if (!(zephir_is_true(&_0))) { @@ -415,9 +402,6 @@ PHP_METHOD(Phalcon_Http_Cookie, getHttpOnly) */ PHP_METHOD(Phalcon_Http_Cookie, getName) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "name"); } @@ -427,9 +411,6 @@ PHP_METHOD(Phalcon_Http_Cookie, getName) */ PHP_METHOD(Phalcon_Http_Cookie, getOptions) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "options"); } @@ -445,9 +426,8 @@ PHP_METHOD(Phalcon_Http_Cookie, getPath) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("restored"), PH_NOISY_CC | PH_READONLY); if (!(zephir_is_true(&_0))) { @@ -469,9 +449,8 @@ PHP_METHOD(Phalcon_Http_Cookie, getSecure) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("restored"), PH_NOISY_CC | PH_READONLY); if (!(zephir_is_true(&_0))) { @@ -512,17 +491,14 @@ PHP_METHOD(Phalcon_Http_Cookie, getValue) ZVAL_UNDEF(&_7$$14); ZVAL_UNDEF(&_8$$13); ZVAL_UNDEF(&_9$$13); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(filters) Z_PARAM_ZVAL_OR_NULL(defaultValue) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_get_global(&_COOKIE, SL("_COOKIE")); zephir_fetch_params(1, 0, 2, &filters, &defaultValue); if (!filters) { @@ -533,8 +509,6 @@ PHP_METHOD(Phalcon_Http_Cookie, getValue) defaultValue = &defaultValue_sub; defaultValue = &__$null; } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("restored"), PH_NOISY_CC | PH_READONLY); if (!(zephir_is_true(&_0))) { ZEPHIR_CALL_METHOD(NULL, this_ptr, "restore", NULL, 0); @@ -546,7 +520,7 @@ PHP_METHOD(Phalcon_Http_Cookie, getValue) ZEPHIR_CPY_WRT(&name, &_1); zephir_read_property(&_1, this_ptr, ZEND_STRL("read"), PH_NOISY_CC | PH_READONLY); if (ZEPHIR_IS_FALSE_IDENTICAL(&_1)) { - ZEPHIR_OBS_VAR(&value); + zephir_memory_observe(&value); if (!(zephir_array_isset_fetch(&value, &_COOKIE, &name, 0))) { RETVAL_ZVAL(defaultValue, 1, 0); RETURN_MM(); @@ -614,9 +588,6 @@ PHP_METHOD(Phalcon_Http_Cookie, getValue) */ PHP_METHOD(Phalcon_Http_Cookie, isUsingEncryption) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "useEncryption"); } @@ -655,9 +626,8 @@ PHP_METHOD(Phalcon_Http_Cookie, restore) ZVAL_UNDEF(&_6$$4); ZVAL_UNDEF(&_7$$5); ZVAL_UNDEF(&_8$$5); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("restored"), PH_NOISY_CC | PH_READONLY); if (!(zephir_is_true(&_0))) { @@ -757,9 +727,8 @@ PHP_METHOD(Phalcon_Http_Cookie, send) ZVAL_UNDEF(&_10$$11); ZVAL_UNDEF(&_11$$14); ZVAL_UNDEF(&_12$$15); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("name"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&name, &_0); @@ -857,30 +826,30 @@ PHP_METHOD(Phalcon_Http_Cookie, send) } ZEPHIR_INIT_NVAR(&_3); ZVAL_STRING(&_3, "expires"); - ZEPHIR_CALL_METHOD(&_13, this_ptr, "getarrval", NULL, 330, &options, &_3, &expire); + ZEPHIR_CALL_METHOD(&_13, this_ptr, "getarrval", NULL, 331, &options, &_3, &expire); zephir_check_call_status(); zephir_array_update_string(&options, SL("expires"), &_13, PH_COPY | PH_SEPARATE); ZEPHIR_INIT_NVAR(&_3); ZVAL_STRING(&_3, "domain"); - ZEPHIR_CALL_METHOD(&_14, this_ptr, "getarrval", NULL, 330, &options, &_3, &domain); + ZEPHIR_CALL_METHOD(&_14, this_ptr, "getarrval", NULL, 331, &options, &_3, &domain); zephir_check_call_status(); zephir_array_update_string(&options, SL("domain"), &_14, PH_COPY | PH_SEPARATE); ZEPHIR_INIT_NVAR(&_3); ZVAL_STRING(&_3, "path"); - ZEPHIR_CALL_METHOD(&_15, this_ptr, "getarrval", NULL, 330, &options, &_3, &path); + ZEPHIR_CALL_METHOD(&_15, this_ptr, "getarrval", NULL, 331, &options, &_3, &path); zephir_check_call_status(); zephir_array_update_string(&options, SL("path"), &_15, PH_COPY | PH_SEPARATE); ZEPHIR_INIT_NVAR(&_3); ZVAL_STRING(&_3, "secure"); - ZEPHIR_CALL_METHOD(&_16, this_ptr, "getarrval", NULL, 330, &options, &_3, &secure); + ZEPHIR_CALL_METHOD(&_16, this_ptr, "getarrval", NULL, 331, &options, &_3, &secure); zephir_check_call_status(); zephir_array_update_string(&options, SL("secure"), &_16, PH_COPY | PH_SEPARATE); ZEPHIR_INIT_NVAR(&_3); ZVAL_STRING(&_3, "httponly"); - ZEPHIR_CALL_METHOD(&_17, this_ptr, "getarrval", NULL, 330, &options, &_3, &httpOnly); + ZEPHIR_CALL_METHOD(&_17, this_ptr, "getarrval", NULL, 331, &options, &_3, &httpOnly); zephir_check_call_status(); zephir_array_update_string(&options, SL("httponly"), &_17, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_FUNCTION(NULL, "setcookie", NULL, 331, &name, &encryptValue, &options); + ZEPHIR_CALL_FUNCTION(NULL, "setcookie", NULL, 332, &name, &encryptValue, &options); zephir_check_call_status(); RETURN_THIS(); } @@ -898,15 +867,11 @@ PHP_METHOD(Phalcon_Http_Cookie, setDomain) ZVAL_UNDEF(&domain); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(domain) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &domain_param); if (UNEXPECTED(Z_TYPE_P(domain_param) != IS_STRING && Z_TYPE_P(domain_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'domain' must be of the type string")); @@ -917,8 +882,6 @@ PHP_METHOD(Phalcon_Http_Cookie, setDomain) } else { ZEPHIR_INIT_VAR(&domain); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("restored"), PH_NOISY_CC | PH_READONLY); if (!(zephir_is_true(&_0))) { ZEPHIR_CALL_METHOD(NULL, this_ptr, "restore", NULL, 0); @@ -940,25 +903,18 @@ PHP_METHOD(Phalcon_Http_Cookie, setExpiration) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(expire) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &expire_param); - expire = zephir_get_intval(expire_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("restored"), PH_NOISY_CC | PH_READONLY); if (!(zephir_is_true(&_0))) { ZEPHIR_CALL_METHOD(NULL, this_ptr, "restore", NULL, 0); zephir_check_call_status(); } - ZEPHIR_INIT_ZVAL_NREF(_1); + ZVAL_UNDEF(&_1); ZVAL_LONG(&_1, expire); zephir_update_property_zval(this_ptr, ZEND_STRL("expire"), &_1); RETURN_THIS(); @@ -978,19 +934,12 @@ PHP_METHOD(Phalcon_Http_Cookie, setHttpOnly) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(httpOnly) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &httpOnly_param); - httpOnly = zephir_get_boolval(httpOnly_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("restored"), PH_NOISY_CC | PH_READONLY); if (!(zephir_is_true(&_0))) { ZEPHIR_CALL_METHOD(NULL, this_ptr, "restore", NULL, 0); @@ -1015,19 +964,13 @@ PHP_METHOD(Phalcon_Http_Cookie, setOptions) zval *this_ptr = getThis(); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &options_param); ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("options"), &options); RETURN_THIS(); } @@ -1045,15 +988,11 @@ PHP_METHOD(Phalcon_Http_Cookie, setPath) ZVAL_UNDEF(&path); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(path) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &path_param); if (UNEXPECTED(Z_TYPE_P(path_param) != IS_STRING && Z_TYPE_P(path_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'path' must be of the type string")); @@ -1064,8 +1003,6 @@ PHP_METHOD(Phalcon_Http_Cookie, setPath) } else { ZEPHIR_INIT_VAR(&path); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("restored"), PH_NOISY_CC | PH_READONLY); if (!(zephir_is_true(&_0))) { ZEPHIR_CALL_METHOD(NULL, this_ptr, "restore", NULL, 0); @@ -1089,19 +1026,12 @@ PHP_METHOD(Phalcon_Http_Cookie, setSecure) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(secure) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &secure_param); - secure = zephir_get_boolval(secure_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("restored"), PH_NOISY_CC | PH_READONLY); if (!(zephir_is_true(&_0))) { ZEPHIR_CALL_METHOD(NULL, this_ptr, "restore", NULL, 0); @@ -1135,24 +1065,19 @@ PHP_METHOD(Phalcon_Http_Cookie, setSignKey) zval *this_ptr = getThis(); ZVAL_UNDEF(&signKey); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(signKey) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &signKey_param); if (!signKey_param) { ZEPHIR_INIT_VAR(&signKey); } else { zephir_get_strval(&signKey, signKey_param); } - - if (!ZEPHIR_IS_NULL(&signKey)) { ZEPHIR_CALL_METHOD(NULL, this_ptr, "assertsignkeyislongenough", NULL, 0, &signKey); zephir_check_call_status(); @@ -1174,17 +1099,10 @@ PHP_METHOD(Phalcon_Http_Cookie, setValue) ZVAL_UNDEF(&value_sub); ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &value); - - zephir_update_property_zval(this_ptr, ZEND_STRL("value"), value); if (1) { zephir_update_property_zval(this_ptr, ZEND_STRL("read"), &__$true); @@ -1205,18 +1123,10 @@ PHP_METHOD(Phalcon_Http_Cookie, useEncryption) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(useEncryption) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &useEncryption_param); - useEncryption = zephir_get_boolval(useEncryption_param); - - if (useEncryption) { zephir_update_property_zval(this_ptr, ZEND_STRL("useEncryption"), &__$true); } else { @@ -1236,22 +1146,17 @@ PHP_METHOD(Phalcon_Http_Cookie, assertSignKeyIsLongEnough) zend_long ZEPHIR_LAST_CALL_STATUS; zval *signKey_param = NULL, length, _0$$3, _1$$3, _2$$3; zval signKey; - zval *this_ptr = getThis(); ZVAL_UNDEF(&signKey); ZVAL_UNDEF(&length); ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(signKey) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &signKey_param); if (UNEXPECTED(Z_TYPE_P(signKey_param) != IS_STRING && Z_TYPE_P(signKey_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'signKey' must be of the type string")); @@ -1262,18 +1167,16 @@ PHP_METHOD(Phalcon_Http_Cookie, assertSignKeyIsLongEnough) } else { ZEPHIR_INIT_VAR(&signKey); } - - - ZEPHIR_CALL_FUNCTION(&length, "mb_strlen", NULL, 233, &signKey); + ZEPHIR_CALL_FUNCTION(&length, "mb_strlen", NULL, 234, &signKey); zephir_check_call_status(); if (UNEXPECTED(ZEPHIR_LT_LONG(&length, 32))) { ZEPHIR_INIT_VAR(&_0$$3); object_init_ex(&_0$$3, phalcon_http_cookie_exception_ce); ZEPHIR_INIT_VAR(&_1$$3); ZVAL_STRING(&_1$$3, "The cookie's key should be at least 32 characters long. Current length is %d."); - ZEPHIR_CALL_FUNCTION(&_2$$3, "sprintf", NULL, 116, &_1$$3, &length); + ZEPHIR_CALL_FUNCTION(&_2$$3, "sprintf", NULL, 117, &_1$$3, &length); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 32, &_2$$3); + ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 33, &_2$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_0$$3, "phalcon/Http/Cookie.zep", 649); ZEPHIR_MM_RESTORE(); @@ -1290,14 +1193,12 @@ PHP_METHOD(Phalcon_Http_Cookie, getArrVal) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *collection_param = NULL, *index, index_sub, *defaultValue = NULL, defaultValue_sub, __$null, value; zval collection; - zval *this_ptr = getThis(); ZVAL_UNDEF(&collection); ZVAL_UNDEF(&index_sub); ZVAL_UNDEF(&defaultValue_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&value); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_ARRAY(collection) @@ -1305,23 +1206,20 @@ PHP_METHOD(Phalcon_Http_Cookie, getArrVal) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(defaultValue) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &collection_param, &index, &defaultValue); ZEPHIR_OBS_COPY_OR_DUP(&collection, collection_param); if (!defaultValue) { defaultValue = &defaultValue_sub; defaultValue = &__$null; } - - - if (UNEXPECTED(!(zephir_array_isset_fetch(&value, &collection, index, 1)))) { + zephir_memory_observe(&value); + if (UNEXPECTED(!(zephir_array_isset_fetch(&value, &collection, index, 0)))) { RETVAL_ZVAL(defaultValue, 1, 0); RETURN_MM(); } - RETURN_CTOR(&value); + RETURN_CCTOR(&value); } zend_object *zephir_init_properties_Phalcon_Http_Cookie(zend_class_entry *class_type) @@ -1332,7 +1230,8 @@ zend_object *zephir_init_properties_Phalcon_Http_Cookie(zend_class_entry *class_ ZVAL_UNDEF(&_1$$3); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/http/cookie.zep.h b/ext/phalcon/http/cookie.zep.h index 35c25265503..ec7cb235886 100644 --- a/ext/phalcon/http/cookie.zep.h +++ b/ext/phalcon/http/cookie.zep.h @@ -38,11 +38,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_http_cookie___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, secure, _IS_BOOL, 1) ZEND_ARG_TYPE_INFO(0, domain, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, httpOnly, _IS_BOOL, 1) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_http_cookie___tostring, 0, 0, IS_STRING, 0) @@ -139,11 +135,7 @@ ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_http_cookie_method_entry) { PHP_ME(Phalcon_Http_Cookie, __construct, arginfo_phalcon_http_cookie___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) PHP_ME(Phalcon_Http_Cookie, __toString, arginfo_phalcon_http_cookie___tostring, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Http_Cookie, delete, arginfo_phalcon_http_cookie_delete, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Http_Cookie, delete, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Http_Cookie, delete, arginfo_phalcon_http_cookie_delete, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Cookie, getDomain, arginfo_phalcon_http_cookie_getdomain, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Cookie, getExpiration, arginfo_phalcon_http_cookie_getexpiration, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Cookie, getHttpOnly, arginfo_phalcon_http_cookie_gethttponly, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/http/request.zep.c b/ext/phalcon/http/request.zep.c index af32b3f05f8..1006438e829 100644 --- a/ext/phalcon/http/request.zep.c +++ b/ext/phalcon/http/request.zep.c @@ -125,7 +125,6 @@ PHP_METHOD(Phalcon_Http_Request, get) ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 5) Z_PARAM_OPTIONAL @@ -135,10 +134,8 @@ PHP_METHOD(Phalcon_Http_Request, get) Z_PARAM_BOOL(notAllowEmpty) Z_PARAM_BOOL(noRecursive) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_get_global(&_REQUEST, SL("_REQUEST")); zephir_fetch_params(1, 0, 5, &name_param, &filters, &defaultValue, ¬AllowEmpty_param, &noRecursive_param); if (!name_param) { @@ -165,15 +162,11 @@ PHP_METHOD(Phalcon_Http_Request, get) if (!notAllowEmpty_param) { notAllowEmpty = 0; } else { - notAllowEmpty = zephir_get_boolval(notAllowEmpty_param); - } + } if (!noRecursive_param) { noRecursive = 0; } else { - noRecursive = zephir_get_boolval(noRecursive_param); - } - - + } if (notAllowEmpty) { ZVAL_BOOL(&_0, 1); } else { @@ -184,7 +177,7 @@ PHP_METHOD(Phalcon_Http_Request, get) } else { ZVAL_BOOL(&_1, 0); } - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "gethelper", NULL, 332, &_REQUEST, &name, filters, defaultValue, &_0, &_1); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "gethelper", NULL, 333, &_REQUEST, &name, filters, defaultValue, &_0, &_1); zephir_check_call_status(); RETURN_MM(); } @@ -202,15 +195,14 @@ PHP_METHOD(Phalcon_Http_Request, getAcceptableContent) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "HTTP_ACCEPT"); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "accept"); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getqualityheader", NULL, 333, &_0, &_1); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getqualityheader", NULL, 334, &_0, &_1); zephir_check_call_status(); RETURN_MM(); } @@ -231,19 +223,18 @@ PHP_METHOD(Phalcon_Http_Request, getBasicAuth) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "PHP_AUTH_USER"); - ZEPHIR_CALL_METHOD(&_0, this_ptr, "hasserver", NULL, 334, &_1); + ZEPHIR_CALL_METHOD(&_0, this_ptr, "hasserver", NULL, 335, &_1); zephir_check_call_status(); _2 = !zephir_is_true(&_0); if (!(_2)) { ZEPHIR_INIT_NVAR(&_1); ZVAL_STRING(&_1, "PHP_AUTH_PW"); - ZEPHIR_CALL_METHOD(&_3, this_ptr, "hasserver", NULL, 334, &_1); + ZEPHIR_CALL_METHOD(&_3, this_ptr, "hasserver", NULL, 335, &_1); zephir_check_call_status(); _2 = !zephir_is_true(&_3); } @@ -277,15 +268,14 @@ PHP_METHOD(Phalcon_Http_Request, getBestAccept) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&_0, this_ptr, "getacceptablecontent", NULL, 0); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "accept"); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getbestquality", NULL, 335, &_0, &_1); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getbestquality", NULL, 336, &_0, &_1); zephir_check_call_status(); RETURN_MM(); } @@ -303,15 +293,14 @@ PHP_METHOD(Phalcon_Http_Request, getBestCharset) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&_0, this_ptr, "getclientcharsets", NULL, 0); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "charset"); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getbestquality", NULL, 335, &_0, &_1); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getbestquality", NULL, 336, &_0, &_1); zephir_check_call_status(); RETURN_MM(); } @@ -329,15 +318,14 @@ PHP_METHOD(Phalcon_Http_Request, getBestLanguage) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&_0, this_ptr, "getlanguages", NULL, 0); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "language"); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getbestquality", NULL, 335, &_0, &_1); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getbestquality", NULL, 336, &_0, &_1); zephir_check_call_status(); RETURN_MM(); } @@ -349,9 +337,6 @@ PHP_METHOD(Phalcon_Http_Request, getBestLanguage) */ PHP_METHOD(Phalcon_Http_Request, getHttpMethodParameterOverride) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "httpMethodParameterOverride"); } @@ -379,9 +364,8 @@ PHP_METHOD(Phalcon_Http_Request, getPreferredIsoLocaleVariant) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&language, this_ptr, "getbestlanguage", NULL, 0); zephir_check_call_status(); @@ -420,27 +404,20 @@ PHP_METHOD(Phalcon_Http_Request, getClientAddress) ZVAL_UNDEF(&server); ZVAL_UNDEF(&_0$$7); ZVAL_UNDEF(&_1$$7); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_BOOL(trustForwardedHeader) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &trustForwardedHeader_param); if (!trustForwardedHeader_param) { trustForwardedHeader = 0; } else { - trustForwardedHeader = zephir_get_boolval(trustForwardedHeader_param); - } - - + } ZEPHIR_INIT_VAR(&address); ZVAL_NULL(&address); - ZEPHIR_CALL_METHOD(&server, this_ptr, "getserverarray", NULL, 336); + ZEPHIR_CALL_METHOD(&server, this_ptr, "getserverarray", NULL, 337); zephir_check_call_status(); if (trustForwardedHeader) { ZEPHIR_OBS_NVAR(&address); @@ -479,15 +456,14 @@ PHP_METHOD(Phalcon_Http_Request, getClientCharsets) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "HTTP_ACCEPT_CHARSET"); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "charset"); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getqualityheader", NULL, 333, &_0, &_1); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getqualityheader", NULL, 334, &_0, &_1); zephir_check_call_status(); RETURN_MM(); } @@ -504,11 +480,10 @@ PHP_METHOD(Phalcon_Http_Request, getContentType) ZVAL_UNDEF(&contentType); ZVAL_UNDEF(&server); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_CALL_METHOD(&server, this_ptr, "getserverarray", NULL, 336); + ZEPHIR_CALL_METHOD(&server, this_ptr, "getserverarray", NULL, 337); zephir_check_call_status(); if (!(zephir_array_isset_string_fetch(&contentType, &server, SL("CONTENT_TYPE"), 1))) { RETURN_MM_NULL(); @@ -541,15 +516,14 @@ PHP_METHOD(Phalcon_Http_Request, getDigestAuth) ZVAL_UNDEF(&_7$$7); ZVAL_UNDEF(&_8$$7); ZVAL_UNDEF(&auth); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&auth); array_init(&auth); - ZEPHIR_CALL_METHOD(&server, this_ptr, "getserverarray", NULL, 336); + ZEPHIR_CALL_METHOD(&server, this_ptr, "getserverarray", NULL, 337); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&digest); + zephir_memory_observe(&digest); if (zephir_array_isset_string_fetch(&digest, &server, SL("PHP_AUTH_DIGEST"), 0)) { ZEPHIR_INIT_VAR(&matches); array_init(&matches); @@ -618,7 +592,6 @@ PHP_METHOD(Phalcon_Http_Request, getFilteredQuery) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 4) Z_PARAM_OPTIONAL @@ -627,10 +600,8 @@ PHP_METHOD(Phalcon_Http_Request, getFilteredQuery) Z_PARAM_BOOL(notAllowEmpty) Z_PARAM_BOOL(noRecursive) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 4, &name_param, &defaultValue, ¬AllowEmpty_param, &noRecursive_param); if (!name_param) { ZEPHIR_INIT_VAR(&name); @@ -644,15 +615,11 @@ PHP_METHOD(Phalcon_Http_Request, getFilteredQuery) if (!notAllowEmpty_param) { notAllowEmpty = 0; } else { - notAllowEmpty = zephir_get_boolval(notAllowEmpty_param); - } + } if (!noRecursive_param) { noRecursive = 0; } else { - noRecursive = zephir_get_boolval(noRecursive_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "GET"); ZEPHIR_INIT_VAR(&_1); @@ -691,7 +658,6 @@ PHP_METHOD(Phalcon_Http_Request, getFilteredPatch) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 4) Z_PARAM_OPTIONAL @@ -700,10 +666,8 @@ PHP_METHOD(Phalcon_Http_Request, getFilteredPatch) Z_PARAM_BOOL(notAllowEmpty) Z_PARAM_BOOL(noRecursive) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 4, &name_param, &defaultValue, ¬AllowEmpty_param, &noRecursive_param); if (!name_param) { ZEPHIR_INIT_VAR(&name); @@ -717,15 +681,11 @@ PHP_METHOD(Phalcon_Http_Request, getFilteredPatch) if (!notAllowEmpty_param) { notAllowEmpty = 0; } else { - notAllowEmpty = zephir_get_boolval(notAllowEmpty_param); - } + } if (!noRecursive_param) { noRecursive = 0; } else { - noRecursive = zephir_get_boolval(noRecursive_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "PATCH"); ZEPHIR_INIT_VAR(&_1); @@ -764,7 +724,6 @@ PHP_METHOD(Phalcon_Http_Request, getFilteredPost) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 4) Z_PARAM_OPTIONAL @@ -773,10 +732,8 @@ PHP_METHOD(Phalcon_Http_Request, getFilteredPost) Z_PARAM_BOOL(notAllowEmpty) Z_PARAM_BOOL(noRecursive) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 4, &name_param, &defaultValue, ¬AllowEmpty_param, &noRecursive_param); if (!name_param) { ZEPHIR_INIT_VAR(&name); @@ -790,15 +747,11 @@ PHP_METHOD(Phalcon_Http_Request, getFilteredPost) if (!notAllowEmpty_param) { notAllowEmpty = 0; } else { - notAllowEmpty = zephir_get_boolval(notAllowEmpty_param); - } + } if (!noRecursive_param) { noRecursive = 0; } else { - noRecursive = zephir_get_boolval(noRecursive_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "POST"); ZEPHIR_INIT_VAR(&_1); @@ -837,7 +790,6 @@ PHP_METHOD(Phalcon_Http_Request, getFilteredPut) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 4) Z_PARAM_OPTIONAL @@ -846,10 +798,8 @@ PHP_METHOD(Phalcon_Http_Request, getFilteredPut) Z_PARAM_BOOL(notAllowEmpty) Z_PARAM_BOOL(noRecursive) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 4, &name_param, &defaultValue, ¬AllowEmpty_param, &noRecursive_param); if (!name_param) { ZEPHIR_INIT_VAR(&name); @@ -863,15 +813,11 @@ PHP_METHOD(Phalcon_Http_Request, getFilteredPut) if (!notAllowEmpty_param) { notAllowEmpty = 0; } else { - notAllowEmpty = zephir_get_boolval(notAllowEmpty_param); - } + } if (!noRecursive_param) { noRecursive = 0; } else { - noRecursive = zephir_get_boolval(noRecursive_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "PUT"); ZEPHIR_INIT_VAR(&_1); @@ -910,15 +856,11 @@ PHP_METHOD(Phalcon_Http_Request, getHeader) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(header) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &header_param); if (UNEXPECTED(Z_TYPE_P(header_param) != IS_STRING && Z_TYPE_P(header_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'header' must be of the type string")); @@ -929,8 +871,6 @@ PHP_METHOD(Phalcon_Http_Request, getHeader) } else { ZEPHIR_INIT_VAR(&header); } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "-"); ZEPHIR_INIT_VAR(&_1); @@ -939,9 +879,9 @@ PHP_METHOD(Phalcon_Http_Request, getHeader) zephir_check_call_status(); ZEPHIR_INIT_VAR(&name); zephir_fast_strtoupper(&name, &_2); - ZEPHIR_CALL_METHOD(&server, this_ptr, "getserverarray", NULL, 336); + ZEPHIR_CALL_METHOD(&server, this_ptr, "getserverarray", NULL, 337); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&value); + zephir_memory_observe(&value); if (zephir_array_isset_fetch(&value, &server, &name, 0)) { RETURN_CCTOR(&value); } @@ -1022,9 +962,8 @@ PHP_METHOD(Phalcon_Http_Request, getHeaders) ZVAL_UNDEF(&_38$$8); ZVAL_UNDEF(&headers); ZVAL_UNDEF(&contentHeaders); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&headers); array_init(&headers); @@ -1033,7 +972,7 @@ PHP_METHOD(Phalcon_Http_Request, getHeaders) zephir_array_update_string(&contentHeaders, SL("CONTENT_TYPE"), &__$true, PH_COPY | PH_SEPARATE); zephir_array_update_string(&contentHeaders, SL("CONTENT_LENGTH"), &__$true, PH_COPY | PH_SEPARATE); zephir_array_update_string(&contentHeaders, SL("CONTENT_MD5"), &__$true, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(&server, this_ptr, "getserverarray", NULL, 336); + ZEPHIR_CALL_METHOD(&server, this_ptr, "getserverarray", NULL, 337); zephir_check_call_status(); zephir_is_iterable(&server, 0, "phalcon/Http/Request.zep", 461); if (Z_TYPE_P(&server) == IS_ARRAY) { @@ -1059,7 +998,7 @@ PHP_METHOD(Phalcon_Http_Request, getHeaders) ZVAL_STRING(&_9$$4, " "); zephir_fast_str_replace(&_5$$4, &_8$$4, &_9$$4, &_7$$4); zephir_fast_strtolower(&_4$$4, &_5$$4); - ZEPHIR_CALL_FUNCTION(&name, "ucwords", &_10, 287, &_4$$4); + ZEPHIR_CALL_FUNCTION(&name, "ucwords", &_10, 288, &_4$$4); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_11$$4); ZEPHIR_INIT_NVAR(&_12$$4); @@ -1083,7 +1022,7 @@ PHP_METHOD(Phalcon_Http_Request, getHeaders) ZVAL_STRING(&_18$$5, " "); zephir_fast_str_replace(&_16$$5, &_17$$5, &_18$$5, &name); zephir_fast_strtolower(&_15$$5, &_16$$5); - ZEPHIR_CALL_FUNCTION(&name, "ucwords", &_10, 287, &_15$$5); + ZEPHIR_CALL_FUNCTION(&name, "ucwords", &_10, 288, &_15$$5); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_19$$5); ZEPHIR_INIT_NVAR(&_20$$5); @@ -1120,7 +1059,7 @@ PHP_METHOD(Phalcon_Http_Request, getHeaders) ZVAL_STRING(&_27$$7, " "); zephir_fast_str_replace(&_23$$7, &_26$$7, &_27$$7, &_25$$7); zephir_fast_strtolower(&_22$$7, &_23$$7); - ZEPHIR_CALL_FUNCTION(&name, "ucwords", &_10, 287, &_22$$7); + ZEPHIR_CALL_FUNCTION(&name, "ucwords", &_10, 288, &_22$$7); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_28$$7); ZEPHIR_INIT_NVAR(&_29$$7); @@ -1144,7 +1083,7 @@ PHP_METHOD(Phalcon_Http_Request, getHeaders) ZVAL_STRING(&_35$$8, " "); zephir_fast_str_replace(&_33$$8, &_34$$8, &_35$$8, &name); zephir_fast_strtolower(&_32$$8, &_33$$8); - ZEPHIR_CALL_FUNCTION(&name, "ucwords", &_10, 287, &_32$$8); + ZEPHIR_CALL_FUNCTION(&name, "ucwords", &_10, 288, &_32$$8); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_36$$8); ZEPHIR_INIT_NVAR(&_37$$8); @@ -1229,11 +1168,10 @@ PHP_METHOD(Phalcon_Http_Request, getHttpHost) ZVAL_UNDEF(&_12$$7); ZVAL_UNDEF(&_13$$7); ZVAL_UNDEF(&_14); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_OBS_VAR(&strict); + zephir_memory_observe(&strict); zephir_read_property(&strict, this_ptr, ZEND_STRL("strictHostCheck"), PH_NOISY_CC); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "HTTP_HOST"); @@ -1265,7 +1203,7 @@ PHP_METHOD(Phalcon_Http_Request, getHttpHost) ZVAL_STRING(&_5$$6, "/:[[:digit:]]+$/"); ZEPHIR_INIT_VAR(&_6$$6); ZVAL_STRING(&_6$$6, ""); - ZEPHIR_CALL_FUNCTION(&_7$$6, "preg_replace", NULL, 40, &_5$$6, &_6$$6, &cleanHost); + ZEPHIR_CALL_FUNCTION(&_7$$6, "preg_replace", NULL, 41, &_5$$6, &_6$$6, &cleanHost); zephir_check_call_status(); ZEPHIR_CPY_WRT(&cleanHost, &_7$$6); } @@ -1273,7 +1211,7 @@ PHP_METHOD(Phalcon_Http_Request, getHttpHost) ZVAL_STRING(&_8$$5, "/[a-z0-9-]+\\.?/"); ZEPHIR_INIT_VAR(&_9$$5); ZVAL_STRING(&_9$$5, ""); - ZEPHIR_CALL_FUNCTION(&_10$$5, "preg_replace", NULL, 40, &_8$$5, &_9$$5, &cleanHost); + ZEPHIR_CALL_FUNCTION(&_10$$5, "preg_replace", NULL, 41, &_8$$5, &_9$$5, &cleanHost); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_11$$5); ZVAL_STRING(&_11$$5, ""); @@ -1282,7 +1220,7 @@ PHP_METHOD(Phalcon_Http_Request, getHttpHost) object_init_ex(&_12$$7, spl_ce_UnexpectedValueException); ZEPHIR_INIT_VAR(&_13$$7); ZEPHIR_CONCAT_SV(&_13$$7, "Invalid host ", &host); - ZEPHIR_CALL_METHOD(NULL, &_12$$7, "__construct", NULL, 337, &_13$$7); + ZEPHIR_CALL_METHOD(NULL, &_12$$7, "__construct", NULL, 338, &_13$$7); zephir_check_call_status(); zephir_throw_exception_debug(&_12$$7, "phalcon/Http/Request.zep", 545); ZEPHIR_MM_RESTORE(); @@ -1307,11 +1245,10 @@ PHP_METHOD(Phalcon_Http_Request, getHTTPReferer) ZVAL_UNDEF(&httpReferer); ZVAL_UNDEF(&server); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_CALL_METHOD(&server, this_ptr, "getserverarray", NULL, 336); + ZEPHIR_CALL_METHOD(&server, this_ptr, "getserverarray", NULL, 337); zephir_check_call_status(); if (!(zephir_array_isset_string_fetch(&httpReferer, &server, SL("HTTP_REFERER"), 1))) { RETURN_MM_STRING(""); @@ -1333,24 +1270,17 @@ PHP_METHOD(Phalcon_Http_Request, getJsonRawBody) ZVAL_UNDEF(&rawBody); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_BOOL(associative) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &associative_param); if (!associative_param) { associative = 0; } else { - associative = zephir_get_boolval(associative_param); - } - - + } ZEPHIR_CALL_METHOD(&rawBody, this_ptr, "getrawbody", NULL, 0); zephir_check_call_status(); if (Z_TYPE_P(&rawBody) != IS_STRING) { @@ -1372,7 +1302,7 @@ PHP_METHOD(Phalcon_Http_Request, getJsonRawBody) } else { ZVAL_BOOL(&_1, 0); } - ZEPHIR_RETURN_CALL_METHOD(&_0, "__invoke", NULL, 195, &rawBody, &_1); + ZEPHIR_RETURN_CALL_METHOD(&_0, "__invoke", NULL, 196, &rawBody, &_1); zephir_check_call_status(); RETURN_MM(); } @@ -1390,15 +1320,14 @@ PHP_METHOD(Phalcon_Http_Request, getLanguages) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "HTTP_ACCEPT_LANGUAGE"); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "language"); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getqualityheader", NULL, 333, &_0, &_1); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getqualityheader", NULL, 334, &_0, &_1); zephir_check_call_status(); RETURN_MM(); } @@ -1432,15 +1361,14 @@ PHP_METHOD(Phalcon_Http_Request, getMethod) ZVAL_UNDEF(&_1$$5); ZVAL_UNDEF(&_2$$5); ZVAL_UNDEF(&returnMethod); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_get_global(&_REQUEST, SL("_REQUEST")); ZEPHIR_INIT_VAR(&returnMethod); - ZEPHIR_CALL_METHOD(&server, this_ptr, "getserverarray", NULL, 336); + ZEPHIR_CALL_METHOD(&server, this_ptr, "getserverarray", NULL, 337); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&requestMethod); + zephir_memory_observe(&requestMethod); if (EXPECTED(zephir_array_isset_string_fetch(&requestMethod, &server, SL("REQUEST_METHOD"), 0))) { ZEPHIR_INIT_NVAR(&returnMethod); zephir_fast_strtoupper(&returnMethod, &requestMethod); @@ -1452,14 +1380,14 @@ PHP_METHOD(Phalcon_Http_Request, getMethod) if (ZEPHIR_IS_IDENTICAL(&_0, &returnMethod)) { ZEPHIR_INIT_VAR(&_1$$5); ZVAL_STRING(&_1$$5, "X-HTTP-METHOD-OVERRIDE"); - ZEPHIR_CALL_METHOD(&overridedMethod, this_ptr, "getheader", NULL, 338, &_1$$5); + ZEPHIR_CALL_METHOD(&overridedMethod, this_ptr, "getheader", NULL, 339, &_1$$5); zephir_check_call_status(); zephir_read_property(&_2$$5, this_ptr, ZEND_STRL("httpMethodParameterOverride"), PH_NOISY_CC | PH_READONLY); if (!(ZEPHIR_IS_EMPTY(&overridedMethod))) { ZEPHIR_INIT_NVAR(&returnMethod); zephir_fast_strtoupper(&returnMethod, &overridedMethod); } else if (zephir_is_true(&_2$$5)) { - ZEPHIR_OBS_VAR(&spoofedMethod); + zephir_memory_observe(&spoofedMethod); if (zephir_array_isset_string_fetch(&spoofedMethod, &_REQUEST, SL("_method"), 0)) { ZEPHIR_INIT_NVAR(&returnMethod); zephir_fast_strtoupper(&returnMethod, &spoofedMethod); @@ -1501,7 +1429,6 @@ PHP_METHOD(Phalcon_Http_Request, getPatch) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 5) Z_PARAM_OPTIONAL @@ -1511,10 +1438,8 @@ PHP_METHOD(Phalcon_Http_Request, getPatch) Z_PARAM_BOOL(notAllowEmpty) Z_PARAM_BOOL(noRecursive) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 5, &name_param, &filters, &defaultValue, ¬AllowEmpty_param, &noRecursive_param); if (!name_param) { ZEPHIR_INIT_VAR(&name); @@ -1540,15 +1465,11 @@ PHP_METHOD(Phalcon_Http_Request, getPatch) if (!notAllowEmpty_param) { notAllowEmpty = 0; } else { - notAllowEmpty = zephir_get_boolval(notAllowEmpty_param); - } + } if (!noRecursive_param) { noRecursive = 0; } else { - noRecursive = zephir_get_boolval(noRecursive_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "patchCache"); if (notAllowEmpty) { @@ -1561,7 +1482,7 @@ PHP_METHOD(Phalcon_Http_Request, getPatch) } else { ZVAL_BOOL(&_2, 0); } - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getpatchput", NULL, 339, &_0, &name, filters, defaultValue, &_1, &_2); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getpatchput", NULL, 340, &_0, &name, filters, defaultValue, &_1, &_2); zephir_check_call_status(); RETURN_MM(); } @@ -1586,9 +1507,8 @@ PHP_METHOD(Phalcon_Http_Request, getPort) ZVAL_UNDEF(&_3$$4); ZVAL_UNDEF(&_4$$5); ZVAL_UNDEF(&_5$$5); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "HTTP_HOST"); @@ -1604,7 +1524,7 @@ PHP_METHOD(Phalcon_Http_Request, getPort) if (zephir_memnstr_str(&host, SL(":"), "phalcon/Http/Request.zep", 686)) { ZEPHIR_INIT_VAR(&_3$$4); ZVAL_STRING(&_3$$4, ":"); - ZEPHIR_CALL_FUNCTION(&pos, "strrpos", NULL, 241, &host, &_3$$4); + ZEPHIR_CALL_FUNCTION(&pos, "strrpos", NULL, 242, &host, &_3$$4); zephir_check_call_status(); if (!ZEPHIR_IS_FALSE_IDENTICAL(&pos)) { ZVAL_LONG(&_4$$5, (zephir_get_numberval(&pos) + 1)); @@ -1619,8 +1539,10 @@ PHP_METHOD(Phalcon_Http_Request, getPort) ZEPHIR_INIT_VAR(&_7); ZVAL_STRING(&_7, "https"); if (ZEPHIR_IS_IDENTICAL(&_7, &_6)) { + ZEPHIR_INIT_NVAR(&_0); ZVAL_LONG(&_0, 443); } else { + ZEPHIR_INIT_NVAR(&_0); ZVAL_LONG(&_0, 80); } RETURN_CCTOR(&_0); @@ -1654,7 +1576,6 @@ PHP_METHOD(Phalcon_Http_Request, getPost) ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 5) Z_PARAM_OPTIONAL @@ -1664,10 +1585,8 @@ PHP_METHOD(Phalcon_Http_Request, getPost) Z_PARAM_BOOL(notAllowEmpty) Z_PARAM_BOOL(noRecursive) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_get_global(&_POST, SL("_POST")); zephir_fetch_params(1, 0, 5, &name_param, &filters, &defaultValue, ¬AllowEmpty_param, &noRecursive_param); if (!name_param) { @@ -1694,15 +1613,11 @@ PHP_METHOD(Phalcon_Http_Request, getPost) if (!notAllowEmpty_param) { notAllowEmpty = 0; } else { - notAllowEmpty = zephir_get_boolval(notAllowEmpty_param); - } + } if (!noRecursive_param) { noRecursive = 0; } else { - noRecursive = zephir_get_boolval(noRecursive_param); - } - - + } if (notAllowEmpty) { ZVAL_BOOL(&_0, 1); } else { @@ -1713,7 +1628,7 @@ PHP_METHOD(Phalcon_Http_Request, getPost) } else { ZVAL_BOOL(&_1, 0); } - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "gethelper", NULL, 332, &_POST, &name, filters, defaultValue, &_0, &_1); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "gethelper", NULL, 333, &_POST, &name, filters, defaultValue, &_0, &_1); zephir_check_call_status(); RETURN_MM(); } @@ -1745,7 +1660,6 @@ PHP_METHOD(Phalcon_Http_Request, getPut) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 5) Z_PARAM_OPTIONAL @@ -1755,10 +1669,8 @@ PHP_METHOD(Phalcon_Http_Request, getPut) Z_PARAM_BOOL(notAllowEmpty) Z_PARAM_BOOL(noRecursive) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 5, &name_param, &filters, &defaultValue, ¬AllowEmpty_param, &noRecursive_param); if (!name_param) { ZEPHIR_INIT_VAR(&name); @@ -1784,15 +1696,11 @@ PHP_METHOD(Phalcon_Http_Request, getPut) if (!notAllowEmpty_param) { notAllowEmpty = 0; } else { - notAllowEmpty = zephir_get_boolval(notAllowEmpty_param); - } + } if (!noRecursive_param) { noRecursive = 0; } else { - noRecursive = zephir_get_boolval(noRecursive_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "putCache"); if (notAllowEmpty) { @@ -1805,7 +1713,7 @@ PHP_METHOD(Phalcon_Http_Request, getPut) } else { ZVAL_BOOL(&_2, 0); } - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getpatchput", NULL, 339, &_0, &name, filters, defaultValue, &_1, &_2); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getpatchput", NULL, 340, &_0, &name, filters, defaultValue, &_1, &_2); zephir_check_call_status(); RETURN_MM(); } @@ -1841,7 +1749,6 @@ PHP_METHOD(Phalcon_Http_Request, getQuery) ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 5) Z_PARAM_OPTIONAL @@ -1851,10 +1758,8 @@ PHP_METHOD(Phalcon_Http_Request, getQuery) Z_PARAM_BOOL(notAllowEmpty) Z_PARAM_BOOL(noRecursive) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_get_global(&_GET, SL("_GET")); zephir_fetch_params(1, 0, 5, &name_param, &filters, &defaultValue, ¬AllowEmpty_param, &noRecursive_param); if (!name_param) { @@ -1881,15 +1786,11 @@ PHP_METHOD(Phalcon_Http_Request, getQuery) if (!notAllowEmpty_param) { notAllowEmpty = 0; } else { - notAllowEmpty = zephir_get_boolval(notAllowEmpty_param); - } + } if (!noRecursive_param) { noRecursive = 0; } else { - noRecursive = zephir_get_boolval(noRecursive_param); - } - - + } if (notAllowEmpty) { ZVAL_BOOL(&_0, 1); } else { @@ -1900,7 +1801,7 @@ PHP_METHOD(Phalcon_Http_Request, getQuery) } else { ZVAL_BOOL(&_1, 0); } - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "gethelper", NULL, 332, &_GET, &name, filters, defaultValue, &_0, &_1); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "gethelper", NULL, 333, &_GET, &name, filters, defaultValue, &_0, &_1); zephir_check_call_status(); RETURN_MM(); } @@ -1918,9 +1819,8 @@ PHP_METHOD(Phalcon_Http_Request, getRawBody) ZVAL_UNDEF(&contents); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("rawBody"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&rawBody, &_0); @@ -1948,9 +1848,8 @@ PHP_METHOD(Phalcon_Http_Request, getScheme) ZVAL_UNDEF(&https); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "HTTPS"); @@ -1980,15 +1879,11 @@ PHP_METHOD(Phalcon_Http_Request, getServer) ZVAL_UNDEF(&name); ZVAL_UNDEF(&serverValue); ZVAL_UNDEF(&server); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -1999,9 +1894,7 @@ PHP_METHOD(Phalcon_Http_Request, getServer) } else { ZEPHIR_INIT_VAR(&name); } - - - ZEPHIR_CALL_METHOD(&server, this_ptr, "getserverarray", NULL, 336); + ZEPHIR_CALL_METHOD(&server, this_ptr, "getserverarray", NULL, 337); zephir_check_call_status(); if (!(zephir_array_isset_fetch(&serverValue, &server, &name, 1))) { RETURN_MM_NULL(); @@ -2022,9 +1915,8 @@ PHP_METHOD(Phalcon_Http_Request, getServerAddress) ZVAL_UNDEF(&serverAddr); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "SERVER_ADDR"); @@ -2033,7 +1925,7 @@ PHP_METHOD(Phalcon_Http_Request, getServerAddress) if (Z_TYPE_P(&serverAddr) == IS_NULL) { ZEPHIR_INIT_VAR(&_1$$3); ZVAL_STRING(&_1$$3, "localhost"); - ZEPHIR_RETURN_CALL_FUNCTION("gethostbyname", NULL, 340, &_1$$3); + ZEPHIR_RETURN_CALL_FUNCTION("gethostbyname", NULL, 341, &_1$$3); zephir_check_call_status(); RETURN_MM(); } @@ -2052,9 +1944,8 @@ PHP_METHOD(Phalcon_Http_Request, getServerName) ZVAL_UNDEF(&serverName); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "SERVER_NAME"); @@ -2141,31 +2032,23 @@ PHP_METHOD(Phalcon_Http_Request, getUploadedFiles) ZVAL_UNDEF(&_63$$30); ZVAL_UNDEF(&_64$$31); ZVAL_UNDEF(&files); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_BOOL(onlySuccessful) Z_PARAM_BOOL(namedKeys) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_get_global(&_FILES, SL("_FILES")); zephir_fetch_params(1, 0, 2, &onlySuccessful_param, &namedKeys_param); if (!onlySuccessful_param) { onlySuccessful = 0; } else { - onlySuccessful = zephir_get_boolval(onlySuccessful_param); - } + } if (!namedKeys_param) { namedKeys = 0; } else { - namedKeys = zephir_get_boolval(namedKeys_param); - } - - + } ZEPHIR_INIT_VAR(&files); array_init(&files); ZEPHIR_CPY_WRT(&superFiles, &_FILES); @@ -2190,7 +2073,7 @@ PHP_METHOD(Phalcon_Http_Request, getUploadedFiles) zephir_array_fetch_string(&_7$$5, &input, SL("tmp_name"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 891); zephir_array_fetch_string(&_8$$5, &input, SL("size"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 892); zephir_array_fetch_string(&_9$$5, &input, SL("error"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 893); - ZEPHIR_CALL_METHOD(&smoothInput, this_ptr, "smoothfiles", &_10, 341, &_5$$5, &_6$$5, &_7$$5, &_8$$5, &_9$$5, &prefix); + ZEPHIR_CALL_METHOD(&smoothInput, this_ptr, "smoothfiles", &_10, 342, &_5$$5, &_6$$5, &_7$$5, &_8$$5, &_9$$5, &prefix); zephir_check_call_status(); zephir_is_iterable(&smoothInput, 0, "phalcon/Http/Request.zep", 920); if (Z_TYPE_P(&smoothInput) == IS_ARRAY) { @@ -2225,7 +2108,7 @@ PHP_METHOD(Phalcon_Http_Request, getUploadedFiles) ZEPHIR_INIT_NVAR(&_16$$8); object_init_ex(&_16$$8, phalcon_http_request_file_ce); zephir_array_fetch_string(&_17$$8, &file, SL("key"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 911); - ZEPHIR_CALL_METHOD(NULL, &_16$$8, "__construct", &_18, 342, &dataFile, &_17$$8); + ZEPHIR_CALL_METHOD(NULL, &_16$$8, "__construct", &_18, 343, &dataFile, &_17$$8); zephir_check_call_status(); ZEPHIR_OBS_NVAR(&_19$$8); zephir_array_fetch_string(&_19$$8, &file, SL("key"), PH_NOISY, "phalcon/Http/Request.zep", 908); @@ -2234,7 +2117,7 @@ PHP_METHOD(Phalcon_Http_Request, getUploadedFiles) ZEPHIR_INIT_NVAR(&_20$$9); object_init_ex(&_20$$9, phalcon_http_request_file_ce); zephir_array_fetch_string(&_21$$9, &file, SL("key"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 916); - ZEPHIR_CALL_METHOD(NULL, &_20$$9, "__construct", &_18, 342, &dataFile, &_21$$9); + ZEPHIR_CALL_METHOD(NULL, &_20$$9, "__construct", &_18, 343, &dataFile, &_21$$9); zephir_check_call_status(); zephir_array_append(&files, &_20$$9, PH_SEPARATE, "phalcon/Http/Request.zep", 916); } @@ -2279,7 +2162,7 @@ PHP_METHOD(Phalcon_Http_Request, getUploadedFiles) ZEPHIR_INIT_NVAR(&_26$$12); object_init_ex(&_26$$12, phalcon_http_request_file_ce); zephir_array_fetch_string(&_27$$12, &file, SL("key"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 911); - ZEPHIR_CALL_METHOD(NULL, &_26$$12, "__construct", &_18, 342, &dataFile, &_27$$12); + ZEPHIR_CALL_METHOD(NULL, &_26$$12, "__construct", &_18, 343, &dataFile, &_27$$12); zephir_check_call_status(); ZEPHIR_OBS_NVAR(&_28$$12); zephir_array_fetch_string(&_28$$12, &file, SL("key"), PH_NOISY, "phalcon/Http/Request.zep", 908); @@ -2288,7 +2171,7 @@ PHP_METHOD(Phalcon_Http_Request, getUploadedFiles) ZEPHIR_INIT_NVAR(&_29$$13); object_init_ex(&_29$$13, phalcon_http_request_file_ce); zephir_array_fetch_string(&_30$$13, &file, SL("key"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 916); - ZEPHIR_CALL_METHOD(NULL, &_29$$13, "__construct", &_18, 342, &dataFile, &_30$$13); + ZEPHIR_CALL_METHOD(NULL, &_29$$13, "__construct", &_18, 343, &dataFile, &_30$$13); zephir_check_call_status(); zephir_array_append(&files, &_29$$13, PH_SEPARATE, "phalcon/Http/Request.zep", 916); } @@ -2308,13 +2191,13 @@ PHP_METHOD(Phalcon_Http_Request, getUploadedFiles) if (namedKeys == 1) { ZEPHIR_INIT_NVAR(&_33$$16); object_init_ex(&_33$$16, phalcon_http_request_file_ce); - ZEPHIR_CALL_METHOD(NULL, &_33$$16, "__construct", &_18, 342, &input, &prefix); + ZEPHIR_CALL_METHOD(NULL, &_33$$16, "__construct", &_18, 343, &input, &prefix); zephir_check_call_status(); zephir_array_update_zval(&files, &prefix, &_33$$16, PH_COPY | PH_SEPARATE); } else { ZEPHIR_INIT_NVAR(&_34$$17); object_init_ex(&_34$$17, phalcon_http_request_file_ce); - ZEPHIR_CALL_METHOD(NULL, &_34$$17, "__construct", &_18, 342, &input, &prefix); + ZEPHIR_CALL_METHOD(NULL, &_34$$17, "__construct", &_18, 343, &input, &prefix); zephir_check_call_status(); zephir_array_append(&files, &_34$$17, PH_SEPARATE, "phalcon/Http/Request.zep", 925); } @@ -2342,7 +2225,7 @@ PHP_METHOD(Phalcon_Http_Request, getUploadedFiles) zephir_array_fetch_string(&_38$$19, &input, SL("tmp_name"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 891); zephir_array_fetch_string(&_39$$19, &input, SL("size"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 892); zephir_array_fetch_string(&_40$$19, &input, SL("error"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 893); - ZEPHIR_CALL_METHOD(&smoothInput, this_ptr, "smoothfiles", &_10, 341, &_36$$19, &_37$$19, &_38$$19, &_39$$19, &_40$$19, &prefix); + ZEPHIR_CALL_METHOD(&smoothInput, this_ptr, "smoothfiles", &_10, 342, &_36$$19, &_37$$19, &_38$$19, &_39$$19, &_40$$19, &prefix); zephir_check_call_status(); zephir_is_iterable(&smoothInput, 0, "phalcon/Http/Request.zep", 920); if (Z_TYPE_P(&smoothInput) == IS_ARRAY) { @@ -2378,7 +2261,7 @@ PHP_METHOD(Phalcon_Http_Request, getUploadedFiles) ZEPHIR_INIT_NVAR(&_47$$22); object_init_ex(&_47$$22, phalcon_http_request_file_ce); zephir_array_fetch_string(&_48$$22, &file, SL("key"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 911); - ZEPHIR_CALL_METHOD(NULL, &_47$$22, "__construct", &_18, 342, &dataFile, &_48$$22); + ZEPHIR_CALL_METHOD(NULL, &_47$$22, "__construct", &_18, 343, &dataFile, &_48$$22); zephir_check_call_status(); ZEPHIR_OBS_NVAR(&_49$$22); zephir_array_fetch_string(&_49$$22, &file, SL("key"), PH_NOISY, "phalcon/Http/Request.zep", 908); @@ -2387,7 +2270,7 @@ PHP_METHOD(Phalcon_Http_Request, getUploadedFiles) ZEPHIR_INIT_NVAR(&_50$$23); object_init_ex(&_50$$23, phalcon_http_request_file_ce); zephir_array_fetch_string(&_51$$23, &file, SL("key"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 916); - ZEPHIR_CALL_METHOD(NULL, &_50$$23, "__construct", &_18, 342, &dataFile, &_51$$23); + ZEPHIR_CALL_METHOD(NULL, &_50$$23, "__construct", &_18, 343, &dataFile, &_51$$23); zephir_check_call_status(); zephir_array_append(&files, &_50$$23, PH_SEPARATE, "phalcon/Http/Request.zep", 916); } @@ -2432,7 +2315,7 @@ PHP_METHOD(Phalcon_Http_Request, getUploadedFiles) ZEPHIR_INIT_NVAR(&_56$$26); object_init_ex(&_56$$26, phalcon_http_request_file_ce); zephir_array_fetch_string(&_57$$26, &file, SL("key"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 911); - ZEPHIR_CALL_METHOD(NULL, &_56$$26, "__construct", &_18, 342, &dataFile, &_57$$26); + ZEPHIR_CALL_METHOD(NULL, &_56$$26, "__construct", &_18, 343, &dataFile, &_57$$26); zephir_check_call_status(); ZEPHIR_OBS_NVAR(&_58$$26); zephir_array_fetch_string(&_58$$26, &file, SL("key"), PH_NOISY, "phalcon/Http/Request.zep", 908); @@ -2441,7 +2324,7 @@ PHP_METHOD(Phalcon_Http_Request, getUploadedFiles) ZEPHIR_INIT_NVAR(&_59$$27); object_init_ex(&_59$$27, phalcon_http_request_file_ce); zephir_array_fetch_string(&_60$$27, &file, SL("key"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 916); - ZEPHIR_CALL_METHOD(NULL, &_59$$27, "__construct", &_18, 342, &dataFile, &_60$$27); + ZEPHIR_CALL_METHOD(NULL, &_59$$27, "__construct", &_18, 343, &dataFile, &_60$$27); zephir_check_call_status(); zephir_array_append(&files, &_59$$27, PH_SEPARATE, "phalcon/Http/Request.zep", 916); } @@ -2461,13 +2344,13 @@ PHP_METHOD(Phalcon_Http_Request, getUploadedFiles) if (namedKeys == 1) { ZEPHIR_INIT_NVAR(&_63$$30); object_init_ex(&_63$$30, phalcon_http_request_file_ce); - ZEPHIR_CALL_METHOD(NULL, &_63$$30, "__construct", &_18, 342, &input, &prefix); + ZEPHIR_CALL_METHOD(NULL, &_63$$30, "__construct", &_18, 343, &input, &prefix); zephir_check_call_status(); zephir_array_update_zval(&files, &prefix, &_63$$30, PH_COPY | PH_SEPARATE); } else { ZEPHIR_INIT_NVAR(&_64$$31); object_init_ex(&_64$$31, phalcon_http_request_file_ce); - ZEPHIR_CALL_METHOD(NULL, &_64$$31, "__construct", &_18, 342, &input, &prefix); + ZEPHIR_CALL_METHOD(NULL, &_64$$31, "__construct", &_18, 343, &input, &prefix); zephir_check_call_status(); zephir_array_append(&files, &_64$$31, PH_SEPARATE, "phalcon/Http/Request.zep", 925); } @@ -2510,24 +2393,17 @@ PHP_METHOD(Phalcon_Http_Request, getURI) ZVAL_UNDEF(&_1$$4); ZVAL_UNDEF(&_2$$4); ZVAL_UNDEF(&_3$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_BOOL(onlyPath) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &onlyPath_param); if (!onlyPath_param) { onlyPath = 0; } else { - onlyPath = zephir_get_boolval(onlyPath_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "REQUEST_URI"); ZEPHIR_CALL_METHOD(&requestURI, this_ptr, "getserver", NULL, 0, &_0); @@ -2558,9 +2434,8 @@ PHP_METHOD(Phalcon_Http_Request, getUserAgent) ZVAL_UNDEF(&userAgent); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "HTTP_USER_AGENT"); @@ -2580,19 +2455,14 @@ PHP_METHOD(Phalcon_Http_Request, has) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *name_param = NULL, _REQUEST; zval name; - zval *this_ptr = getThis(); ZVAL_UNDEF(&name); ZVAL_UNDEF(&_REQUEST); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_get_global(&_REQUEST, SL("_REQUEST")); zephir_fetch_params(1, 1, 0, &name_param); if (UNEXPECTED(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) { @@ -2604,8 +2474,6 @@ PHP_METHOD(Phalcon_Http_Request, has) } else { ZEPHIR_INIT_VAR(&name); } - - RETURN_MM_BOOL(zephir_array_isset(&_REQUEST, &name)); } @@ -2621,9 +2489,8 @@ PHP_METHOD(Phalcon_Http_Request, hasFiles) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZVAL_BOOL(&_1, 1); ZEPHIR_CALL_METHOD(&_0, this_ptr, "numfiles", NULL, 0, &_1); @@ -2651,15 +2518,11 @@ PHP_METHOD(Phalcon_Http_Request, hasHeader) ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(header) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &header_param); if (UNEXPECTED(Z_TYPE_P(header_param) != IS_STRING && Z_TYPE_P(header_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'header' must be of the type string")); @@ -2670,8 +2533,6 @@ PHP_METHOD(Phalcon_Http_Request, hasHeader) } else { ZEPHIR_INIT_VAR(&header); } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "-"); ZEPHIR_INIT_VAR(&_1); @@ -2680,13 +2541,13 @@ PHP_METHOD(Phalcon_Http_Request, hasHeader) zephir_check_call_status(); ZEPHIR_INIT_VAR(&name); zephir_fast_strtoupper(&name, &_2); - ZEPHIR_CALL_METHOD(&_3, this_ptr, "hasserver", NULL, 334, &name); + ZEPHIR_CALL_METHOD(&_3, this_ptr, "hasserver", NULL, 335, &name); zephir_check_call_status(); _4 = zephir_is_true(&_3); if (!(_4)) { ZEPHIR_INIT_VAR(&_6); ZEPHIR_CONCAT_SV(&_6, "HTTP_", &name); - ZEPHIR_CALL_METHOD(&_5, this_ptr, "hasserver", NULL, 334, &_6); + ZEPHIR_CALL_METHOD(&_5, this_ptr, "hasserver", NULL, 335, &_6); zephir_check_call_status(); _4 = zephir_is_true(&_5); } @@ -2706,15 +2567,11 @@ PHP_METHOD(Phalcon_Http_Request, hasPatch) ZVAL_UNDEF(&name); ZVAL_UNDEF(&patch); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -2725,8 +2582,6 @@ PHP_METHOD(Phalcon_Http_Request, hasPatch) } else { ZEPHIR_INIT_VAR(&name); } - - ZEPHIR_CALL_METHOD(&patch, this_ptr, "getpatch", NULL, 0); zephir_check_call_status(); RETURN_MM_BOOL(zephir_array_isset(&patch, &name)); @@ -2740,19 +2595,14 @@ PHP_METHOD(Phalcon_Http_Request, hasPost) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *name_param = NULL, _POST; zval name; - zval *this_ptr = getThis(); ZVAL_UNDEF(&name); ZVAL_UNDEF(&_POST); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_get_global(&_POST, SL("_POST")); zephir_fetch_params(1, 1, 0, &name_param); if (UNEXPECTED(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) { @@ -2764,8 +2614,6 @@ PHP_METHOD(Phalcon_Http_Request, hasPost) } else { ZEPHIR_INIT_VAR(&name); } - - RETURN_MM_BOOL(zephir_array_isset(&_POST, &name)); } @@ -2782,15 +2630,11 @@ PHP_METHOD(Phalcon_Http_Request, hasPut) ZVAL_UNDEF(&name); ZVAL_UNDEF(&put); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -2801,8 +2645,6 @@ PHP_METHOD(Phalcon_Http_Request, hasPut) } else { ZEPHIR_INIT_VAR(&name); } - - ZEPHIR_CALL_METHOD(&put, this_ptr, "getput", NULL, 0); zephir_check_call_status(); RETURN_MM_BOOL(zephir_array_isset(&put, &name)); @@ -2816,19 +2658,14 @@ PHP_METHOD(Phalcon_Http_Request, hasQuery) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *name_param = NULL, _GET; zval name; - zval *this_ptr = getThis(); ZVAL_UNDEF(&name); ZVAL_UNDEF(&_GET); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_get_global(&_GET, SL("_GET")); zephir_fetch_params(1, 1, 0, &name_param); if (UNEXPECTED(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) { @@ -2840,8 +2677,6 @@ PHP_METHOD(Phalcon_Http_Request, hasQuery) } else { ZEPHIR_INIT_VAR(&name); } - - RETURN_MM_BOOL(zephir_array_isset(&_GET, &name)); } @@ -2858,15 +2693,11 @@ PHP_METHOD(Phalcon_Http_Request, hasServer) ZVAL_UNDEF(&name); ZVAL_UNDEF(&server); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -2877,9 +2708,7 @@ PHP_METHOD(Phalcon_Http_Request, hasServer) } else { ZEPHIR_INIT_VAR(&name); } - - - ZEPHIR_CALL_METHOD(&server, this_ptr, "getserverarray", NULL, 336); + ZEPHIR_CALL_METHOD(&server, this_ptr, "getserverarray", NULL, 337); zephir_check_call_status(); RETURN_MM_BOOL(zephir_array_isset(&server, &name)); } @@ -2898,13 +2727,12 @@ PHP_METHOD(Phalcon_Http_Request, isAjax) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "HTTP_X_REQUESTED_WITH"); - ZEPHIR_CALL_METHOD(&_0, this_ptr, "hasserver", NULL, 334, &_1); + ZEPHIR_CALL_METHOD(&_0, this_ptr, "hasserver", NULL, 335, &_1); zephir_check_call_status(); _2 = zephir_is_true(&_0); if (_2) { @@ -2929,11 +2757,10 @@ PHP_METHOD(Phalcon_Http_Request, isConnect) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "getmethod", NULL, 343); + ZEPHIR_CALL_METHOD(&_0, this_ptr, "getmethod", NULL, 344); zephir_check_call_status(); RETURN_MM_BOOL(ZEPHIR_IS_STRING_IDENTICAL(&_0, "CONNECT")); } @@ -2950,11 +2777,10 @@ PHP_METHOD(Phalcon_Http_Request, isDelete) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "getmethod", NULL, 343); + ZEPHIR_CALL_METHOD(&_0, this_ptr, "getmethod", NULL, 344); zephir_check_call_status(); RETURN_MM_BOOL(ZEPHIR_IS_STRING_IDENTICAL(&_0, "DELETE")); } @@ -2971,11 +2797,10 @@ PHP_METHOD(Phalcon_Http_Request, isGet) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "getmethod", NULL, 343); + ZEPHIR_CALL_METHOD(&_0, this_ptr, "getmethod", NULL, 344); zephir_check_call_status(); RETURN_MM_BOOL(ZEPHIR_IS_STRING_IDENTICAL(&_0, "GET")); } @@ -2992,11 +2817,10 @@ PHP_METHOD(Phalcon_Http_Request, isHead) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "getmethod", NULL, 343); + ZEPHIR_CALL_METHOD(&_0, this_ptr, "getmethod", NULL, 344); zephir_check_call_status(); RETURN_MM_BOOL(ZEPHIR_IS_STRING_IDENTICAL(&_0, "HEAD")); } @@ -3025,26 +2849,19 @@ PHP_METHOD(Phalcon_Http_Request, isMethod) ZVAL_UNDEF(&_7$$6); ZVAL_UNDEF(&_9$$8); ZVAL_UNDEF(&_10$$8); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ZVAL(methods) Z_PARAM_OPTIONAL Z_PARAM_BOOL(strict) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &methods, &strict_param); if (!strict_param) { strict = 0; } else { - strict = zephir_get_boolval(strict_param); - } - - - ZEPHIR_CALL_METHOD(&httpMethod, this_ptr, "getmethod", NULL, 343); + } + ZEPHIR_CALL_METHOD(&httpMethod, this_ptr, "getmethod", NULL, 344); zephir_check_call_status(); if (Z_TYPE_P(methods) == IS_STRING) { _0$$3 = strict; @@ -3058,7 +2875,7 @@ PHP_METHOD(Phalcon_Http_Request, isMethod) object_init_ex(&_2$$4, phalcon_http_request_exception_ce); ZEPHIR_INIT_VAR(&_3$$4); ZEPHIR_CONCAT_SV(&_3$$4, "Invalid HTTP method: ", methods); - ZEPHIR_CALL_METHOD(NULL, &_2$$4, "__construct", NULL, 32, &_3$$4); + ZEPHIR_CALL_METHOD(NULL, &_2$$4, "__construct", NULL, 33, &_3$$4); zephir_check_call_status(); zephir_throw_exception_debug(&_2$$4, "phalcon/Http/Request.zep", 1117); ZEPHIR_MM_RESTORE(); @@ -3078,7 +2895,7 @@ PHP_METHOD(Phalcon_Http_Request, isMethod) } else { ZVAL_BOOL(&_7$$6, 0); } - ZEPHIR_CALL_METHOD(&_6$$6, this_ptr, "ismethod", &_8, 344, &method, &_7$$6); + ZEPHIR_CALL_METHOD(&_6$$6, this_ptr, "ismethod", &_8, 345, &method, &_7$$6); zephir_check_call_status(); if (zephir_is_true(&_6$$6)) { RETURN_MM_BOOL(1); @@ -3100,7 +2917,7 @@ PHP_METHOD(Phalcon_Http_Request, isMethod) } else { ZVAL_BOOL(&_10$$8, 0); } - ZEPHIR_CALL_METHOD(&_9$$8, this_ptr, "ismethod", &_8, 344, &method, &_10$$8); + ZEPHIR_CALL_METHOD(&_9$$8, this_ptr, "ismethod", &_8, 345, &method, &_10$$8); zephir_check_call_status(); if (zephir_is_true(&_9$$8)) { RETURN_MM_BOOL(1); @@ -3131,11 +2948,10 @@ PHP_METHOD(Phalcon_Http_Request, isOptions) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "getmethod", NULL, 343); + ZEPHIR_CALL_METHOD(&_0, this_ptr, "getmethod", NULL, 344); zephir_check_call_status(); RETURN_MM_BOOL(ZEPHIR_IS_STRING_IDENTICAL(&_0, "OPTIONS")); } @@ -3152,11 +2968,10 @@ PHP_METHOD(Phalcon_Http_Request, isPatch) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "getmethod", NULL, 343); + ZEPHIR_CALL_METHOD(&_0, this_ptr, "getmethod", NULL, 344); zephir_check_call_status(); RETURN_MM_BOOL(ZEPHIR_IS_STRING_IDENTICAL(&_0, "PATCH")); } @@ -3173,11 +2988,10 @@ PHP_METHOD(Phalcon_Http_Request, isPost) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "getmethod", NULL, 343); + ZEPHIR_CALL_METHOD(&_0, this_ptr, "getmethod", NULL, 344); zephir_check_call_status(); RETURN_MM_BOOL(ZEPHIR_IS_STRING_IDENTICAL(&_0, "POST")); } @@ -3194,11 +3008,10 @@ PHP_METHOD(Phalcon_Http_Request, isPut) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "getmethod", NULL, 343); + ZEPHIR_CALL_METHOD(&_0, this_ptr, "getmethod", NULL, 344); zephir_check_call_status(); RETURN_MM_BOOL(ZEPHIR_IS_STRING_IDENTICAL(&_0, "PUT")); } @@ -3215,11 +3028,10 @@ PHP_METHOD(Phalcon_Http_Request, isPurge) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "getmethod", NULL, 343); + ZEPHIR_CALL_METHOD(&_0, this_ptr, "getmethod", NULL, 344); zephir_check_call_status(); RETURN_MM_BOOL(ZEPHIR_IS_STRING_IDENTICAL(&_0, "PURGE")); } @@ -3235,9 +3047,8 @@ PHP_METHOD(Phalcon_Http_Request, isSecure) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&_0, this_ptr, "getscheme", NULL, 0); zephir_check_call_status(); @@ -3250,9 +3061,6 @@ PHP_METHOD(Phalcon_Http_Request, isSecure) */ PHP_METHOD(Phalcon_Http_Request, isStrictHostCheck) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "strictHostCheck"); } @@ -3270,13 +3078,12 @@ PHP_METHOD(Phalcon_Http_Request, isSoap) ZVAL_UNDEF(&contentType); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "HTTP_SOAPACTION"); - ZEPHIR_CALL_METHOD(&_0, this_ptr, "hasserver", NULL, 334, &_1); + ZEPHIR_CALL_METHOD(&_0, this_ptr, "hasserver", NULL, 335, &_1); zephir_check_call_status(); if (zephir_is_true(&_0)) { RETURN_MM_BOOL(1); @@ -3301,11 +3108,10 @@ PHP_METHOD(Phalcon_Http_Request, isTrace) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "getmethod", NULL, 343); + ZEPHIR_CALL_METHOD(&_0, this_ptr, "getmethod", NULL, 344); zephir_check_call_status(); RETURN_MM_BOOL(ZEPHIR_IS_STRING_IDENTICAL(&_0, "TRACE")); } @@ -3318,23 +3124,16 @@ PHP_METHOD(Phalcon_Http_Request, isValidHttpMethod) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *method_param = NULL, _0; zval method; - zval *this_ptr = getThis(); ZVAL_UNDEF(&method); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(method) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &method_param); zephir_get_strval(&method, method_param); - - ZEPHIR_INIT_VAR(&_0); zephir_fast_strtoupper(&_0, &method); do { @@ -3367,25 +3166,18 @@ PHP_METHOD(Phalcon_Http_Request, numFiles) ZVAL_UNDEF(&_4$$8); ZVAL_UNDEF(&_7$$13); ZVAL_UNDEF(&_8$$13); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_BOOL(onlySuccessful) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_get_global(&_FILES, SL("_FILES")); zephir_fetch_params(1, 0, 1, &onlySuccessful_param); if (!onlySuccessful_param) { onlySuccessful = 0; } else { - onlySuccessful = zephir_get_boolval(onlySuccessful_param); - } - - + } numberFiles = 0; ZEPHIR_CPY_WRT(&files, &_FILES); if (Z_TYPE_P(&files) != IS_ARRAY) { @@ -3414,7 +3206,7 @@ PHP_METHOD(Phalcon_Http_Request, numFiles) } else { ZVAL_BOOL(&_4$$8, 0); } - ZEPHIR_CALL_METHOD(&_3$$8, this_ptr, "hasfilehelper", &_5, 345, &error, &_4$$8); + ZEPHIR_CALL_METHOD(&_3$$8, this_ptr, "hasfilehelper", &_5, 346, &error, &_4$$8); zephir_check_call_status(); numberFiles += zephir_get_numberval(&_3$$8); } @@ -3448,7 +3240,7 @@ PHP_METHOD(Phalcon_Http_Request, numFiles) } else { ZVAL_BOOL(&_8$$13, 0); } - ZEPHIR_CALL_METHOD(&_7$$13, this_ptr, "hasfilehelper", &_5, 345, &error, &_8$$13); + ZEPHIR_CALL_METHOD(&_7$$13, this_ptr, "hasfilehelper", &_5, 346, &error, &_8$$13); zephir_check_call_status(); numberFiles += zephir_get_numberval(&_7$$13); } @@ -3476,18 +3268,10 @@ PHP_METHOD(Phalcon_Http_Request, setHttpMethodParameterOverride) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(override) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &override_param); - override = zephir_get_boolval(override_param); - - if (override) { zephir_update_property_zval(this_ptr, ZEND_STRL("httpMethodParameterOverride"), &__$true); } else { @@ -3530,18 +3314,14 @@ PHP_METHOD(Phalcon_Http_Request, setParameterFilters) ZVAL_UNDEF(&_16$$11); ZVAL_UNDEF(&filters); ZVAL_UNDEF(&scope); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(name) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(filters) Z_PARAM_ARRAY(scope) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &name_param, &filters_param, &scope_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")); @@ -3564,20 +3344,18 @@ PHP_METHOD(Phalcon_Http_Request, setParameterFilters) } else { zephir_get_arrval(&scope, scope_param); } - - if (UNEXPECTED(zephir_fast_count_int(&filters) < 1)) { ZEPHIR_INIT_VAR(&_0$$3); object_init_ex(&_0$$3, phalcon_http_request_exception_ce); ZEPHIR_INIT_VAR(&_1$$3); ZEPHIR_CONCAT_SVS(&_1$$3, "Filters have not been defined for '", &name, "'"); - ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 32, &_1$$3); + ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 33, &_1$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_0$$3, "phalcon/Http/Request.zep", 1315); ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_CALL_METHOD(&filterService, this_ptr, "getfilterservice", NULL, 346); + ZEPHIR_CALL_METHOD(&filterService, this_ptr, "getfilterservice", NULL, 347); zephir_check_call_status(); zephir_is_iterable(&filters, 0, "phalcon/Http/Request.zep", 1328); if (Z_TYPE_P(&filters) == IS_ARRAY) { @@ -3592,7 +3370,7 @@ PHP_METHOD(Phalcon_Http_Request, setParameterFilters) object_init_ex(&_6$$5, phalcon_http_request_exception_ce); ZEPHIR_INIT_NVAR(&_7$$5); ZEPHIR_CONCAT_SVS(&_7$$5, "Sanitizer '", &sanitizer, "' does not exist in the filter locator"); - ZEPHIR_CALL_METHOD(NULL, &_6$$5, "__construct", NULL, 32, &_7$$5); + ZEPHIR_CALL_METHOD(NULL, &_6$$5, "__construct", NULL, 33, &_7$$5); zephir_check_call_status(); zephir_throw_exception_debug(&_6$$5, "phalcon/Http/Request.zep", 1324); ZEPHIR_MM_RESTORE(); @@ -3617,7 +3395,7 @@ PHP_METHOD(Phalcon_Http_Request, setParameterFilters) object_init_ex(&_10$$7, phalcon_http_request_exception_ce); ZEPHIR_INIT_NVAR(&_11$$7); ZEPHIR_CONCAT_SVS(&_11$$7, "Sanitizer '", &sanitizer, "' does not exist in the filter locator"); - ZEPHIR_CALL_METHOD(NULL, &_10$$7, "__construct", NULL, 32, &_11$$7); + ZEPHIR_CALL_METHOD(NULL, &_10$$7, "__construct", NULL, 33, &_11$$7); zephir_check_call_status(); zephir_throw_exception_debug(&_10$$7, "phalcon/Http/Request.zep", 1324); ZEPHIR_MM_RESTORE(); @@ -3690,23 +3468,15 @@ PHP_METHOD(Phalcon_Http_Request, setStrictHostCheck) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_BOOL(flag) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(0, 1, &flag_param); if (!flag_param) { flag = 1; } else { - flag = zephir_get_boolval(flag_param); - } - - + } if (flag) { zephir_update_property_zval(this_ptr, ZEND_STRL("strictHostCheck"), &__$true); } else { @@ -3726,7 +3496,6 @@ PHP_METHOD(Phalcon_Http_Request, getBestQuality) zval name; zval *qualityParts_param = NULL, *name_param = NULL, selectedName, accept, *_0, _1, _2$$4, _3$$5, _4$$8, _5$$9; zval qualityParts; - zval *this_ptr = getThis(); ZVAL_UNDEF(&qualityParts); ZVAL_UNDEF(&selectedName); @@ -3737,16 +3506,12 @@ PHP_METHOD(Phalcon_Http_Request, getBestQuality) ZVAL_UNDEF(&_4$$8); ZVAL_UNDEF(&_5$$9); ZVAL_UNDEF(&name); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ARRAY(qualityParts) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &qualityParts_param, &name_param); zephir_get_arrval(&qualityParts, qualityParts_param); if (UNEXPECTED(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) { @@ -3758,10 +3523,8 @@ PHP_METHOD(Phalcon_Http_Request, getBestQuality) } else { ZEPHIR_INIT_VAR(&name); } - - i = 0; - quality = 0.0; + quality = (0.0); ZEPHIR_INIT_VAR(&selectedName); ZVAL_STRING(&selectedName, ""); zephir_is_iterable(&qualityParts, 0, "phalcon/Http/Request.zep", 1386); @@ -3773,15 +3536,15 @@ PHP_METHOD(Phalcon_Http_Request, getBestQuality) if (i == 0) { ZEPHIR_OBS_NVAR(&_2$$4); zephir_array_fetch_string(&_2$$4, &accept, SL("quality"), PH_NOISY, "phalcon/Http/Request.zep", 1372); - quality = zephir_get_doubleval(&_2$$4); + quality = (zephir_get_doubleval(&_2$$4)); ZEPHIR_OBS_NVAR(&selectedName); zephir_array_fetch(&selectedName, &accept, &name, PH_NOISY, "phalcon/Http/Request.zep", 1373); } else { ZEPHIR_OBS_NVAR(&_3$$5); zephir_array_fetch_string(&_3$$5, &accept, SL("quality"), PH_NOISY, "phalcon/Http/Request.zep", 1375); - acceptQuality = zephir_get_doubleval(&_3$$5); + acceptQuality = (zephir_get_doubleval(&_3$$5)); if (acceptQuality > quality) { - quality = acceptQuality; + quality = acceptQuality; ZEPHIR_OBS_NVAR(&selectedName); zephir_array_fetch(&selectedName, &accept, &name, PH_NOISY, "phalcon/Http/Request.zep", 1379); } @@ -3802,15 +3565,15 @@ PHP_METHOD(Phalcon_Http_Request, getBestQuality) if (i == 0) { ZEPHIR_OBS_NVAR(&_4$$8); zephir_array_fetch_string(&_4$$8, &accept, SL("quality"), PH_NOISY, "phalcon/Http/Request.zep", 1372); - quality = zephir_get_doubleval(&_4$$8); + quality = (zephir_get_doubleval(&_4$$8)); ZEPHIR_OBS_NVAR(&selectedName); zephir_array_fetch(&selectedName, &accept, &name, PH_NOISY, "phalcon/Http/Request.zep", 1373); } else { ZEPHIR_OBS_NVAR(&_5$$9); zephir_array_fetch_string(&_5$$9, &accept, SL("quality"), PH_NOISY, "phalcon/Http/Request.zep", 1375); - acceptQuality = zephir_get_doubleval(&_5$$9); + acceptQuality = (zephir_get_doubleval(&_5$$9)); if (acceptQuality > quality) { - quality = acceptQuality; + quality = acceptQuality; ZEPHIR_OBS_NVAR(&selectedName); zephir_array_fetch(&selectedName, &accept, &name, PH_NOISY, "phalcon/Http/Request.zep", 1379); } @@ -3847,7 +3610,6 @@ PHP_METHOD(Phalcon_Http_Request, getHelper) ZVAL_UNDEF(&_2$$6); ZVAL_UNDEF(&_3$$6); ZVAL_UNDEF(&name); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 6) Z_PARAM_ARRAY(source) @@ -3858,10 +3620,8 @@ PHP_METHOD(Phalcon_Http_Request, getHelper) Z_PARAM_BOOL(notAllowEmpty) Z_PARAM_BOOL(noRecursive) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 5, &source_param, &name_param, &filters, &defaultValue, ¬AllowEmpty_param, &noRecursive_param); zephir_get_arrval(&source, source_param); if (!name_param) { @@ -3888,19 +3648,15 @@ PHP_METHOD(Phalcon_Http_Request, getHelper) if (!notAllowEmpty_param) { notAllowEmpty = 0; } else { - notAllowEmpty = zephir_get_boolval(notAllowEmpty_param); - } + } if (!noRecursive_param) { noRecursive = 0; } else { - noRecursive = zephir_get_boolval(noRecursive_param); - } - - + } if (ZEPHIR_IS_NULL(&name)) { RETURN_CTOR(&source); } - ZEPHIR_OBS_VAR(&value); + zephir_memory_observe(&value); if (!(zephir_array_isset_fetch(&value, &source, &name, 0))) { RETVAL_ZVAL(defaultValue, 1, 0); RETURN_MM(); @@ -3918,7 +3674,7 @@ PHP_METHOD(Phalcon_Http_Request, getHelper) RETURN_MM(); } if (Z_TYPE_P(filters) != IS_NULL) { - ZEPHIR_CALL_METHOD(&filterService, this_ptr, "getfilterservice", NULL, 346); + ZEPHIR_CALL_METHOD(&filterService, this_ptr, "getfilterservice", NULL, 347); zephir_check_call_status(); if (noRecursive) { ZVAL_BOOL(&_3$$6, 1); @@ -3955,20 +3711,13 @@ PHP_METHOD(Phalcon_Http_Request, hasFileHelper) ZVAL_UNDEF(&_4$$7); ZVAL_UNDEF(&_7$$11); ZVAL_UNDEF(&_8$$11); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ZVAL(data) Z_PARAM_BOOL(onlySuccessful) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &data, &onlySuccessful_param); - onlySuccessful = zephir_get_boolval(onlySuccessful_param); - - numberFiles = 0; if (Z_TYPE_P(data) != IS_ARRAY) { RETURN_MM_LONG(1); @@ -3994,7 +3743,7 @@ PHP_METHOD(Phalcon_Http_Request, hasFileHelper) } else { ZVAL_BOOL(&_4$$7, 0); } - ZEPHIR_CALL_METHOD(&_3$$7, this_ptr, "hasfilehelper", &_5, 345, &value, &_4$$7); + ZEPHIR_CALL_METHOD(&_3$$7, this_ptr, "hasfilehelper", &_5, 346, &value, &_4$$7); zephir_check_call_status(); numberFiles += zephir_get_numberval(&_3$$7); } @@ -4025,7 +3774,7 @@ PHP_METHOD(Phalcon_Http_Request, hasFileHelper) } else { ZVAL_BOOL(&_8$$11, 0); } - ZEPHIR_CALL_METHOD(&_7$$11, this_ptr, "hasfilehelper", &_5, 345, &value, &_8$$11); + ZEPHIR_CALL_METHOD(&_7$$11, this_ptr, "hasfilehelper", &_5, 346, &value, &_8$$11); zephir_check_call_status(); numberFiles += zephir_get_numberval(&_7$$11); } @@ -4105,16 +3854,12 @@ PHP_METHOD(Phalcon_Http_Request, getQualityHeader) ZVAL_UNDEF(&_47$$23); ZVAL_UNDEF(&_48$$23); ZVAL_UNDEF(&_49$$24); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(serverIndex) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &serverIndex_param, &name_param); if (UNEXPECTED(Z_TYPE_P(serverIndex_param) != IS_STRING && Z_TYPE_P(serverIndex_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'serverIndex' must be of the type string")); @@ -4134,8 +3879,6 @@ PHP_METHOD(Phalcon_Http_Request, getQualityHeader) } else { ZEPHIR_INIT_VAR(&name); } - - ZEPHIR_INIT_VAR(&returnedParts); array_init(&returnedParts); ZEPHIR_CALL_METHOD(&serverValue, this_ptr, "getserver", NULL, 0, &serverIndex); @@ -4152,7 +3895,7 @@ PHP_METHOD(Phalcon_Http_Request, getQualityHeader) ZVAL_STRING(&_1, "/,\\s*/"); ZVAL_LONG(&_2, -1); ZVAL_LONG(&_3, 1); - ZEPHIR_CALL_FUNCTION(&parts, "preg_split", NULL, 70, &_1, &serverValue, &_2, &_3); + ZEPHIR_CALL_FUNCTION(&parts, "preg_split", NULL, 71, &_1, &serverValue, &_2, &_3); zephir_check_call_status(); zephir_is_iterable(&parts, 0, "phalcon/Http/Request.zep", 1499); if (Z_TYPE_P(&parts) == IS_ARRAY) { @@ -4168,7 +3911,7 @@ PHP_METHOD(Phalcon_Http_Request, getQualityHeader) ZVAL_STRING(&_7$$3, "/\\s*;\\s*/"); ZVAL_LONG(&_8$$3, -1); ZVAL_LONG(&_9$$3, 1); - ZEPHIR_CALL_FUNCTION(&headerSplit, "preg_split", NULL, 70, &_7$$3, &_6$$3, &_8$$3, &_9$$3); + ZEPHIR_CALL_FUNCTION(&headerSplit, "preg_split", NULL, 71, &_7$$3, &_6$$3, &_8$$3, &_9$$3); zephir_check_call_status(); zephir_is_iterable(&headerSplit, 0, "phalcon/Http/Request.zep", 1496); if (Z_TYPE_P(&headerSplit) == IS_ARRAY) { @@ -4266,7 +4009,7 @@ PHP_METHOD(Phalcon_Http_Request, getQualityHeader) ZVAL_STRING(&_29$$14, "/\\s*;\\s*/"); ZVAL_LONG(&_30$$14, -1); ZVAL_LONG(&_31$$14, 1); - ZEPHIR_CALL_FUNCTION(&headerSplit, "preg_split", NULL, 70, &_29$$14, &_28$$14, &_30$$14, &_31$$14); + ZEPHIR_CALL_FUNCTION(&headerSplit, "preg_split", NULL, 71, &_29$$14, &_28$$14, &_30$$14, &_31$$14); zephir_check_call_status(); zephir_is_iterable(&headerSplit, 0, "phalcon/Http/Request.zep", 1496); if (Z_TYPE_P(&headerSplit) == IS_ARRAY) { @@ -4408,9 +4151,8 @@ PHP_METHOD(Phalcon_Http_Request, resolveAuthorizationHeaders) ZVAL_UNDEF(&headers); ZVAL_UNDEF(&_5$$5); ZVAL_UNDEF(&_36$$19); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&authHeader); ZVAL_NULL(&authHeader); @@ -4419,7 +4161,7 @@ PHP_METHOD(Phalcon_Http_Request, resolveAuthorizationHeaders) ZEPHIR_CALL_METHOD(&_0, this_ptr, "getdi", NULL, 0); zephir_check_call_status(); ZEPHIR_CPY_WRT(&container, &_0); - ZEPHIR_CALL_METHOD(&server, this_ptr, "getserverarray", NULL, 336); + ZEPHIR_CALL_METHOD(&server, this_ptr, "getserverarray", NULL, 337); zephir_check_call_status(); if (Z_TYPE_P(&container) != IS_NULL) { ZEPHIR_INIT_VAR(&_1$$3); @@ -4454,13 +4196,13 @@ PHP_METHOD(Phalcon_Http_Request, resolveAuthorizationHeaders) } ZEPHIR_INIT_VAR(&_8); ZVAL_STRING(&_8, "PHP_AUTH_USER"); - ZEPHIR_CALL_METHOD(&_0, this_ptr, "hasserver", NULL, 334, &_8); + ZEPHIR_CALL_METHOD(&_0, this_ptr, "hasserver", NULL, 335, &_8); zephir_check_call_status(); _9 = zephir_is_true(&_0); if (_9) { ZEPHIR_INIT_NVAR(&_8); ZVAL_STRING(&_8, "PHP_AUTH_PW"); - ZEPHIR_CALL_METHOD(&_10, this_ptr, "hasserver", NULL, 334, &_8); + ZEPHIR_CALL_METHOD(&_10, this_ptr, "hasserver", NULL, 335, &_8); zephir_check_call_status(); _9 = zephir_is_true(&_10); } @@ -4478,11 +4220,11 @@ PHP_METHOD(Phalcon_Http_Request, resolveAuthorizationHeaders) } else { ZEPHIR_INIT_VAR(&_15$$8); ZVAL_STRING(&_15$$8, "HTTP_AUTHORIZATION"); - ZEPHIR_CALL_METHOD(&_14$$8, this_ptr, "hasserver", NULL, 334, &_15$$8); + ZEPHIR_CALL_METHOD(&_14$$8, this_ptr, "hasserver", NULL, 335, &_15$$8); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_15$$8); ZVAL_STRING(&_15$$8, "REDIRECT_HTTP_AUTHORIZATION"); - ZEPHIR_CALL_METHOD(&_16$$8, this_ptr, "hasserver", NULL, 334, &_15$$8); + ZEPHIR_CALL_METHOD(&_16$$8, this_ptr, "hasserver", NULL, 335, &_15$$8); zephir_check_call_status(); if (zephir_is_true(&_14$$8)) { ZEPHIR_INIT_VAR(&_17$$9); @@ -4498,29 +4240,29 @@ PHP_METHOD(Phalcon_Http_Request, resolveAuthorizationHeaders) if (zephir_is_true(&authHeader)) { ZEPHIR_INIT_VAR(&_19$$11); ZVAL_STRING(&_19$$11, "basic "); - ZEPHIR_CALL_FUNCTION(&_20$$11, "stripos", NULL, 347, &authHeader, &_19$$11); + ZEPHIR_CALL_FUNCTION(&_20$$11, "stripos", NULL, 348, &authHeader, &_19$$11); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_19$$11); ZVAL_STRING(&_19$$11, "digest "); - ZEPHIR_CALL_FUNCTION(&_21$$11, "stripos", NULL, 347, &authHeader, &_19$$11); + ZEPHIR_CALL_FUNCTION(&_21$$11, "stripos", NULL, 348, &authHeader, &_19$$11); zephir_check_call_status(); _22$$11 = ZEPHIR_IS_LONG_IDENTICAL(&_21$$11, 0); if (_22$$11) { ZEPHIR_INIT_NVAR(&_19$$11); ZVAL_STRING(&_19$$11, "PHP_AUTH_DIGEST"); - ZEPHIR_CALL_METHOD(&_23$$11, this_ptr, "hasserver", NULL, 334, &_19$$11); + ZEPHIR_CALL_METHOD(&_23$$11, this_ptr, "hasserver", NULL, 335, &_19$$11); zephir_check_call_status(); _22$$11 = !zephir_is_true(&_23$$11); } ZEPHIR_INIT_NVAR(&_19$$11); ZVAL_STRING(&_19$$11, "bearer "); - ZEPHIR_CALL_FUNCTION(&_24$$11, "stripos", NULL, 347, &authHeader, &_19$$11); + ZEPHIR_CALL_FUNCTION(&_24$$11, "stripos", NULL, 348, &authHeader, &_19$$11); zephir_check_call_status(); if (ZEPHIR_IS_LONG_IDENTICAL(&_20$$11, 0)) { ZVAL_LONG(&_25$$12, 6); ZEPHIR_INIT_VAR(&_26$$12); zephir_substr(&_26$$12, &authHeader, 6 , 0, ZEPHIR_SUBSTR_NO_LENGTH); - ZEPHIR_CALL_FUNCTION(&_27$$12, "base64_decode", NULL, 229, &_26$$12); + ZEPHIR_CALL_FUNCTION(&_27$$12, "base64_decode", NULL, 230, &_26$$12); zephir_check_call_status(); ZEPHIR_INIT_VAR(&exploded); zephir_fast_explode_str(&exploded, SL(":"), &_27$$12, 2 ); @@ -4538,13 +4280,13 @@ PHP_METHOD(Phalcon_Http_Request, resolveAuthorizationHeaders) } } if (!(zephir_array_isset_string(&headers, SL("Authorization")))) { - ZEPHIR_OBS_VAR(&digest); + zephir_memory_observe(&digest); if (zephir_array_isset_string(&headers, SL("Php-Auth-User"))) { zephir_array_fetch_string(&_30$$17, &headers, SL("Php-Auth-User"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1571); zephir_array_fetch_string(&_31$$17, &headers, SL("Php-Auth-Pw"), PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1571); ZEPHIR_INIT_VAR(&_32$$17); ZEPHIR_CONCAT_VSV(&_32$$17, &_30$$17, ":", &_31$$17); - ZEPHIR_CALL_FUNCTION(&_33$$17, "base64_encode", NULL, 230, &_32$$17); + ZEPHIR_CALL_FUNCTION(&_33$$17, "base64_encode", NULL, 231, &_32$$17); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_34$$17); ZEPHIR_CONCAT_SV(&_34$$17, "Basic ", &_33$$17); @@ -4619,8 +4361,6 @@ PHP_METHOD(Phalcon_Http_Request, smoothFiles) ZVAL_UNDEF(&_20$$10); ZVAL_UNDEF(&_22$$10); ZVAL_UNDEF(&prefix); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(6, 6) Z_PARAM_ARRAY(names) Z_PARAM_ARRAY(types) @@ -4629,10 +4369,8 @@ PHP_METHOD(Phalcon_Http_Request, smoothFiles) Z_PARAM_ARRAY(errors) Z_PARAM_STR(prefix) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 6, 0, &names_param, &types_param, &tmp_names_param, &sizes_param, &errors_param, &prefix_param); ZEPHIR_OBS_COPY_OR_DUP(&names, names_param); ZEPHIR_OBS_COPY_OR_DUP(&types, types_param); @@ -4640,8 +4378,6 @@ PHP_METHOD(Phalcon_Http_Request, smoothFiles) ZEPHIR_OBS_COPY_OR_DUP(&sizes, sizes_param); ZEPHIR_OBS_COPY_OR_DUP(&errors, errors_param); zephir_get_strval(&prefix, prefix_param); - - ZEPHIR_INIT_VAR(&files); array_init(&files); zephir_is_iterable(&names, 0, "phalcon/Http/Request.zep", 1635); @@ -4683,7 +4419,7 @@ PHP_METHOD(Phalcon_Http_Request, smoothFiles) zephir_array_fetch(&_8$$5, &tmp_names, &idx, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1623); zephir_array_fetch(&_9$$5, &sizes, &idx, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1624); zephir_array_fetch(&_10$$5, &errors, &idx, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1625); - ZEPHIR_CALL_METHOD(&parentFiles, this_ptr, "smoothfiles", &_11, 341, &_6$$5, &_7$$5, &_8$$5, &_9$$5, &_10$$5, &p); + ZEPHIR_CALL_METHOD(&parentFiles, this_ptr, "smoothfiles", &_11, 342, &_6$$5, &_7$$5, &_8$$5, &_9$$5, &_10$$5, &p); zephir_check_call_status(); zephir_is_iterable(&parentFiles, 0, "phalcon/Http/Request.zep", 1632); if (Z_TYPE_P(&parentFiles) == IS_ARRAY) { @@ -4752,7 +4488,7 @@ PHP_METHOD(Phalcon_Http_Request, smoothFiles) zephir_array_fetch(&_18$$10, &tmp_names, &idx, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1623); zephir_array_fetch(&_19$$10, &sizes, &idx, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1624); zephir_array_fetch(&_20$$10, &errors, &idx, PH_NOISY | PH_READONLY, "phalcon/Http/Request.zep", 1625); - ZEPHIR_CALL_METHOD(&parentFiles, this_ptr, "smoothfiles", &_11, 341, &_16$$10, &_17$$10, &_18$$10, &_19$$10, &_20$$10, &p); + ZEPHIR_CALL_METHOD(&parentFiles, this_ptr, "smoothfiles", &_11, 342, &_16$$10, &_17$$10, &_18$$10, &_19$$10, &_20$$10, &p); zephir_check_call_status(); zephir_is_iterable(&parentFiles, 0, "phalcon/Http/Request.zep", 1632); if (Z_TYPE_P(&parentFiles) == IS_ARRAY) { @@ -4805,9 +4541,8 @@ PHP_METHOD(Phalcon_Http_Request, getFilterService) ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("filterService"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&filterService, &_0); @@ -4831,11 +4566,8 @@ PHP_METHOD(Phalcon_Http_Request, getFilterService) PHP_METHOD(Phalcon_Http_Request, getServerArray) { zval _SERVER; - zval *this_ptr = getThis(); ZVAL_UNDEF(&_SERVER); - - zephir_get_global(&_SERVER, SL("_SERVER")); if (zephir_is_true(&_SERVER)) { @@ -4868,7 +4600,6 @@ PHP_METHOD(Phalcon_Http_Request, getFilteredData) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 6) Z_PARAM_STR(methodKey) @@ -4879,10 +4610,8 @@ PHP_METHOD(Phalcon_Http_Request, getFilteredData) Z_PARAM_BOOL(notAllowEmpty) Z_PARAM_BOOL(noRecursive) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 4, &methodKey_param, &method_param, &name_param, &defaultValue, ¬AllowEmpty_param, &noRecursive_param); zephir_get_strval(&methodKey, methodKey_param); zephir_get_strval(&method, method_param); @@ -4898,16 +4627,12 @@ PHP_METHOD(Phalcon_Http_Request, getFilteredData) if (!notAllowEmpty_param) { notAllowEmpty = 0; } else { - notAllowEmpty = zephir_get_boolval(notAllowEmpty_param); - } + } if (!noRecursive_param) { noRecursive = 0; } else { - noRecursive = zephir_get_boolval(noRecursive_param); - } - - - ZEPHIR_OBS_VAR(&filters); + } + zephir_memory_observe(&filters); zephir_read_property(&_0, this_ptr, ZEND_STRL("queryFilters"), PH_NOISY_CC | PH_READONLY); zephir_array_fetch(&_1, &_0, &methodKey, PH_READONLY, "phalcon/Http/Request.zep", 1685); if (!(zephir_array_isset_fetch(&filters, &_1, &name, 0))) { @@ -4963,7 +4688,6 @@ PHP_METHOD(Phalcon_Http_Request, getPatchPut) ZVAL_UNDEF(&_3$$4); ZVAL_UNDEF(&_2$$5); ZVAL_UNDEF(&_4$$8); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 6) Z_PARAM_STR(collection) @@ -4974,10 +4698,8 @@ PHP_METHOD(Phalcon_Http_Request, getPatchPut) Z_PARAM_BOOL(notAllowEmpty) Z_PARAM_BOOL(noRecursive) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 5, &collection_param, &name_param, &filters, &defaultValue, ¬AllowEmpty_param, &noRecursive_param); zephir_get_strval(&collection, collection_param); if (!name_param) { @@ -4996,16 +4718,12 @@ PHP_METHOD(Phalcon_Http_Request, getPatchPut) if (!notAllowEmpty_param) { notAllowEmpty = 0; } else { - notAllowEmpty = zephir_get_boolval(notAllowEmpty_param); - } + } if (!noRecursive_param) { noRecursive = 0; } else { - noRecursive = zephir_get_boolval(noRecursive_param); - } - - - ZEPHIR_OBS_VAR(&cached); + } + zephir_memory_observe(&cached); zephir_read_property_zval(&cached, this_ptr, &collection, PH_NOISY_CC); if (Z_TYPE_P(&cached) == IS_NULL) { ZEPHIR_CALL_METHOD(&contentType, this_ptr, "getcontenttype", NULL, 0); @@ -5013,7 +4731,7 @@ PHP_METHOD(Phalcon_Http_Request, getPatchPut) if (Z_TYPE_P(&contentType) == IS_STRING) { ZEPHIR_INIT_VAR(&_0$$4); ZVAL_STRING(&_0$$4, "json"); - ZEPHIR_CALL_FUNCTION(&_1$$4, "stripos", NULL, 347, &contentType, &_0$$4); + ZEPHIR_CALL_FUNCTION(&_1$$4, "stripos", NULL, 348, &contentType, &_0$$4); zephir_check_call_status(); if (!ZEPHIR_IS_FALSE(&_1$$4)) { ZVAL_BOOL(&_2$$5, 1); @@ -5022,10 +4740,10 @@ PHP_METHOD(Phalcon_Http_Request, getPatchPut) } ZEPHIR_INIT_NVAR(&_0$$4); ZVAL_STRING(&_0$$4, "multipart/form-data"); - ZEPHIR_CALL_FUNCTION(&_3$$4, "stripos", NULL, 347, &contentType, &_0$$4); + ZEPHIR_CALL_FUNCTION(&_3$$4, "stripos", NULL, 348, &contentType, &_0$$4); zephir_check_call_status(); if (!ZEPHIR_IS_FALSE_IDENTICAL(&_3$$4)) { - ZEPHIR_CALL_METHOD(&cached, this_ptr, "getformdata", NULL, 348); + ZEPHIR_CALL_METHOD(&cached, this_ptr, "getformdata", NULL, 349); zephir_check_call_status(); } if (Z_TYPE_P(&cached) != IS_ARRAY) { @@ -5038,7 +4756,7 @@ PHP_METHOD(Phalcon_Http_Request, getPatchPut) ZEPHIR_CALL_METHOD(&_4$$8, this_ptr, "getrawbody", NULL, 0); zephir_check_call_status(); ZEPHIR_MAKE_REF(&cached); - ZEPHIR_CALL_FUNCTION(NULL, "parse_str", NULL, 349, &_4$$8, &cached); + ZEPHIR_CALL_FUNCTION(NULL, "parse_str", NULL, 350, &_4$$8, &cached); ZEPHIR_UNREF(&cached); zephir_check_call_status(); } @@ -5054,7 +4772,7 @@ PHP_METHOD(Phalcon_Http_Request, getPatchPut) } else { ZVAL_BOOL(&_6, 0); } - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "gethelper", NULL, 332, &cached, &name, filters, defaultValue, &_5, &_6); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "gethelper", NULL, 333, &cached, &name, filters, defaultValue, &_5, &_6); zephir_check_call_status(); RETURN_MM(); } @@ -5249,9 +4967,8 @@ PHP_METHOD(Phalcon_Http_Request, getFormData) ZVAL_UNDEF(&dataset); ZVAL_UNDEF(&headers$$3); ZVAL_UNDEF(&headers$$25); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&_0, this_ptr, "getcontenttype", NULL, 0); zephir_check_call_status(); @@ -5261,20 +4978,20 @@ PHP_METHOD(Phalcon_Http_Request, getFormData) ZEPHIR_INIT_VAR(&_3); ZVAL_STRING(&_3, "/boundary=(.*)$/is"); zephir_preg_match(&_2, &_3, &_0, &matches, 0, 0 , 0 ); - ZEPHIR_OBS_VAR(&boundary); + zephir_memory_observe(&boundary); zephir_array_fetch_long(&boundary, &matches, 1, PH_NOISY, "phalcon/Http/Request.zep", 1766); ZEPHIR_INIT_VAR(&_4); ZVAL_STRING(&_4, "/"); - ZEPHIR_CALL_FUNCTION(&_5, "preg_quote", NULL, 350, &boundary, &_4); + ZEPHIR_CALL_FUNCTION(&_5, "preg_quote", NULL, 351, &boundary, &_4); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_6); ZEPHIR_CONCAT_SVS(&_6, "/\\R?-+", &_5, "/s"); ZEPHIR_CALL_METHOD(&_7, this_ptr, "getrawbody", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&bodyParts, "preg_split", NULL, 70, &_6, &_7); + ZEPHIR_CALL_FUNCTION(&bodyParts, "preg_split", NULL, 71, &_6, &_7); zephir_check_call_status(); ZEPHIR_MAKE_REF(&bodyParts); - ZEPHIR_CALL_FUNCTION(NULL, "array_pop", NULL, 351, &bodyParts); + ZEPHIR_CALL_FUNCTION(NULL, "array_pop", NULL, 352, &bodyParts); ZEPHIR_UNREF(&bodyParts); zephir_check_call_status(); ZEPHIR_INIT_VAR(&dataset); @@ -5291,7 +5008,7 @@ PHP_METHOD(Phalcon_Http_Request, getFormData) ZEPHIR_INIT_NVAR(&_10$$3); ZVAL_STRING(&_10$$3, "/\\R\\R/"); ZVAL_LONG(&_11$$3, 2); - ZEPHIR_CALL_FUNCTION(&splited$$3, "preg_split", NULL, 70, &_10$$3, &bodyPart, &_11$$3); + ZEPHIR_CALL_FUNCTION(&splited$$3, "preg_split", NULL, 71, &_10$$3, &bodyPart, &_11$$3); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&headers$$3); array_init(&headers$$3); @@ -5300,7 +5017,7 @@ PHP_METHOD(Phalcon_Http_Request, getFormData) ZVAL_STRING(&_10$$3, "/\\R/s"); ZVAL_LONG(&_11$$3, -1); ZVAL_LONG(&_13$$3, 1); - ZEPHIR_CALL_FUNCTION(&headerParts$$3, "preg_split", NULL, 70, &_10$$3, &_12$$3, &_11$$3, &_13$$3); + ZEPHIR_CALL_FUNCTION(&headerParts$$3, "preg_split", NULL, 71, &_10$$3, &_12$$3, &_11$$3, &_13$$3); zephir_check_call_status(); zephir_is_iterable(&headerParts$$3, 0, "phalcon/Http/Request.zep", 1824); if (Z_TYPE_P(&headerParts$$3) == IS_ARRAY) { @@ -5344,7 +5061,7 @@ PHP_METHOD(Phalcon_Http_Request, getFormData) ZVAL_STRING(&_26$$8, "/\"/"); ZEPHIR_INIT_NVAR(&_27$$8); ZVAL_STRING(&_27$$8, ""); - ZEPHIR_CALL_FUNCTION(&part$$7, "preg_replace", &_28, 40, &_26$$8, &_27$$8, &_25$$8); + ZEPHIR_CALL_FUNCTION(&part$$7, "preg_replace", &_28, 41, &_26$$8, &_27$$8, &_25$$8); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_26$$8); ZVAL_STRING(&_26$$8, "="); @@ -5387,7 +5104,7 @@ PHP_METHOD(Phalcon_Http_Request, getFormData) ZVAL_STRING(&_35$$11, "/\"/"); ZEPHIR_INIT_NVAR(&_36$$11); ZVAL_STRING(&_36$$11, ""); - ZEPHIR_CALL_FUNCTION(&part$$7, "preg_replace", &_28, 40, &_35$$11, &_36$$11, &_34$$11); + ZEPHIR_CALL_FUNCTION(&part$$7, "preg_replace", &_28, 41, &_35$$11, &_36$$11, &_34$$11); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_35$$11); ZVAL_STRING(&_35$$11, "="); @@ -5468,7 +5185,7 @@ PHP_METHOD(Phalcon_Http_Request, getFormData) ZVAL_STRING(&_52$$18, "/\"/"); ZEPHIR_INIT_NVAR(&_53$$18); ZVAL_STRING(&_53$$18, ""); - ZEPHIR_CALL_FUNCTION(&part$$17, "preg_replace", &_28, 40, &_52$$18, &_53$$18, &_51$$18); + ZEPHIR_CALL_FUNCTION(&part$$17, "preg_replace", &_28, 41, &_52$$18, &_53$$18, &_51$$18); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_52$$18); ZVAL_STRING(&_52$$18, "="); @@ -5511,7 +5228,7 @@ PHP_METHOD(Phalcon_Http_Request, getFormData) ZVAL_STRING(&_60$$21, "/\"/"); ZEPHIR_INIT_NVAR(&_61$$21); ZVAL_STRING(&_61$$21, ""); - ZEPHIR_CALL_FUNCTION(&part$$17, "preg_replace", &_28, 40, &_60$$21, &_61$$21, &_59$$21); + ZEPHIR_CALL_FUNCTION(&part$$17, "preg_replace", &_28, 41, &_60$$21, &_61$$21, &_59$$21); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_60$$21); ZVAL_STRING(&_60$$21, "="); @@ -5572,7 +5289,7 @@ PHP_METHOD(Phalcon_Http_Request, getFormData) ZEPHIR_INIT_NVAR(&_70$$25); ZVAL_STRING(&_70$$25, "/\\R\\R/"); ZVAL_LONG(&_71$$25, 2); - ZEPHIR_CALL_FUNCTION(&splited$$25, "preg_split", NULL, 70, &_70$$25, &bodyPart, &_71$$25); + ZEPHIR_CALL_FUNCTION(&splited$$25, "preg_split", NULL, 71, &_70$$25, &bodyPart, &_71$$25); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&headers$$25); array_init(&headers$$25); @@ -5581,7 +5298,7 @@ PHP_METHOD(Phalcon_Http_Request, getFormData) ZVAL_STRING(&_70$$25, "/\\R/s"); ZVAL_LONG(&_71$$25, -1); ZVAL_LONG(&_73$$25, 1); - ZEPHIR_CALL_FUNCTION(&headerParts$$25, "preg_split", NULL, 70, &_70$$25, &_72$$25, &_71$$25, &_73$$25); + ZEPHIR_CALL_FUNCTION(&headerParts$$25, "preg_split", NULL, 71, &_70$$25, &_72$$25, &_71$$25, &_73$$25); zephir_check_call_status(); zephir_is_iterable(&headerParts$$25, 0, "phalcon/Http/Request.zep", 1824); if (Z_TYPE_P(&headerParts$$25) == IS_ARRAY) { @@ -5625,7 +5342,7 @@ PHP_METHOD(Phalcon_Http_Request, getFormData) ZVAL_STRING(&_86$$30, "/\"/"); ZEPHIR_INIT_NVAR(&_87$$30); ZVAL_STRING(&_87$$30, ""); - ZEPHIR_CALL_FUNCTION(&part$$29, "preg_replace", &_28, 40, &_86$$30, &_87$$30, &_85$$30); + ZEPHIR_CALL_FUNCTION(&part$$29, "preg_replace", &_28, 41, &_86$$30, &_87$$30, &_85$$30); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_86$$30); ZVAL_STRING(&_86$$30, "="); @@ -5668,7 +5385,7 @@ PHP_METHOD(Phalcon_Http_Request, getFormData) ZVAL_STRING(&_94$$33, "/\"/"); ZEPHIR_INIT_NVAR(&_95$$33); ZVAL_STRING(&_95$$33, ""); - ZEPHIR_CALL_FUNCTION(&part$$29, "preg_replace", &_28, 40, &_94$$33, &_95$$33, &_93$$33); + ZEPHIR_CALL_FUNCTION(&part$$29, "preg_replace", &_28, 41, &_94$$33, &_95$$33, &_93$$33); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_94$$33); ZVAL_STRING(&_94$$33, "="); @@ -5749,7 +5466,7 @@ PHP_METHOD(Phalcon_Http_Request, getFormData) ZVAL_STRING(&_111$$40, "/\"/"); ZEPHIR_INIT_NVAR(&_112$$40); ZVAL_STRING(&_112$$40, ""); - ZEPHIR_CALL_FUNCTION(&part$$39, "preg_replace", &_28, 40, &_111$$40, &_112$$40, &_110$$40); + ZEPHIR_CALL_FUNCTION(&part$$39, "preg_replace", &_28, 41, &_111$$40, &_112$$40, &_110$$40); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_111$$40); ZVAL_STRING(&_111$$40, "="); @@ -5792,7 +5509,7 @@ PHP_METHOD(Phalcon_Http_Request, getFormData) ZVAL_STRING(&_119$$43, "/\"/"); ZEPHIR_INIT_NVAR(&_120$$43); ZVAL_STRING(&_120$$43, ""); - ZEPHIR_CALL_FUNCTION(&part$$39, "preg_replace", &_28, 40, &_119$$43, &_120$$43, &_118$$43); + ZEPHIR_CALL_FUNCTION(&part$$39, "preg_replace", &_28, 41, &_119$$43, &_120$$43, &_118$$43); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_119$$43); ZVAL_STRING(&_119$$43, "="); @@ -5851,7 +5568,8 @@ zend_object *zephir_init_properties_Phalcon_Http_Request(zend_class_entry *class ZVAL_UNDEF(&_1$$3); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/http/request.zep.h b/ext/phalcon/http/request.zep.h index 638ddbd1454..880095e6bdb 100644 --- a/ext/phalcon/http/request.zep.h +++ b/ext/phalcon/http/request.zep.h @@ -328,16 +328,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_http_request_setparameterfilters, 0, 1, Phalcon\\Http\\RequestInterface, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, filters, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, filters, 0) -#endif -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, scope, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, scope, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, filters, IS_ARRAY, 0, "[]") +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, scope, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_http_request_setstricthostcheck, 0, 0, Phalcon\\Http\\RequestInterface, 0) diff --git a/ext/phalcon/http/request/file.zep.c b/ext/phalcon/http/request/file.zep.c index d369d8645f3..0c905bd37bc 100644 --- a/ext/phalcon/http/request/file.zep.c +++ b/ext/phalcon/http/request/file.zep.c @@ -116,57 +116,52 @@ PHP_METHOD(Phalcon_Http_Request_File, __construct) ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$4); ZVAL_UNDEF(&_3$$4); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(file) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &file_param, &key); ZEPHIR_OBS_COPY_OR_DUP(&file, file_param); if (!key) { key = &key_sub; key = &__$null; } - - - ZEPHIR_OBS_VAR(&name); + zephir_memory_observe(&name); if (zephir_array_isset_string_fetch(&name, &file, SL("name"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("name"), &name); ZEPHIR_INIT_VAR(&_0$$3); ZVAL_STRING(&_0$$3, "PATHINFO_EXTENSION"); - ZEPHIR_CALL_FUNCTION(&_1$$3, "defined", NULL, 117, &_0$$3); + ZEPHIR_CALL_FUNCTION(&_1$$3, "defined", NULL, 118, &_0$$3); zephir_check_call_status(); if (zephir_is_true(&_1$$3)) { ZVAL_LONG(&_2$$4, 4); - ZEPHIR_CALL_FUNCTION(&_3$$4, "pathinfo", NULL, 88, &name, &_2$$4); + ZEPHIR_CALL_FUNCTION(&_3$$4, "pathinfo", NULL, 89, &name, &_2$$4); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("extension"), &_3$$4); } } ZEPHIR_INIT_VAR(&_5); ZVAL_STRING(&_5, "tmp_name"); - ZEPHIR_CALL_METHOD(&_4, this_ptr, "getarrval", NULL, 352, &file, &_5); + ZEPHIR_CALL_METHOD(&_4, this_ptr, "getarrval", NULL, 353, &file, &_5); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("tmp"), &_4); ZEPHIR_INIT_NVAR(&_5); ZVAL_STRING(&_5, "size"); - ZEPHIR_CALL_METHOD(&_6, this_ptr, "getarrval", NULL, 352, &file, &_5); + ZEPHIR_CALL_METHOD(&_6, this_ptr, "getarrval", NULL, 353, &file, &_5); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("size"), &_6); ZEPHIR_INIT_NVAR(&_5); ZVAL_STRING(&_5, "type"); - ZEPHIR_CALL_METHOD(&_7, this_ptr, "getarrval", NULL, 352, &file, &_5); + ZEPHIR_CALL_METHOD(&_7, this_ptr, "getarrval", NULL, 353, &file, &_5); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("type"), &_7); ZEPHIR_INIT_NVAR(&_5); ZVAL_STRING(&_5, "error"); - ZEPHIR_CALL_METHOD(&_8, this_ptr, "getarrval", NULL, 352, &file, &_5); + ZEPHIR_CALL_METHOD(&_8, this_ptr, "getarrval", NULL, 353, &file, &_5); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("error"), &_8); if (zephir_is_true(key)) { @@ -180,9 +175,6 @@ PHP_METHOD(Phalcon_Http_Request_File, __construct) */ PHP_METHOD(Phalcon_Http_Request_File, getError) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "error"); } @@ -192,9 +184,6 @@ PHP_METHOD(Phalcon_Http_Request_File, getError) */ PHP_METHOD(Phalcon_Http_Request_File, getExtension) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "extension"); } @@ -204,9 +193,6 @@ PHP_METHOD(Phalcon_Http_Request_File, getExtension) */ PHP_METHOD(Phalcon_Http_Request_File, getKey) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "key"); } @@ -216,9 +202,6 @@ PHP_METHOD(Phalcon_Http_Request_File, getKey) */ PHP_METHOD(Phalcon_Http_Request_File, getName) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "name"); } @@ -236,20 +219,19 @@ PHP_METHOD(Phalcon_Http_Request_File, getRealType) ZVAL_UNDEF(&finfo); ZVAL_UNDEF(&mime); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZVAL_LONG(&_0, 16); - ZEPHIR_CALL_FUNCTION(&finfo, "finfo_open", NULL, 307, &_0); + ZEPHIR_CALL_FUNCTION(&finfo, "finfo_open", NULL, 308, &_0); zephir_check_call_status(); if (ZEPHIR_IS_FALSE_IDENTICAL(&finfo)) { RETURN_MM_STRING(""); } zephir_read_property(&_0, this_ptr, ZEND_STRL("tmp"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&mime, "finfo_file", NULL, 308, &finfo, &_0); + ZEPHIR_CALL_FUNCTION(&mime, "finfo_file", NULL, 309, &finfo, &_0); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(NULL, "finfo_close", NULL, 309, &finfo); + ZEPHIR_CALL_FUNCTION(NULL, "finfo_close", NULL, 310, &finfo); zephir_check_call_status(); RETURN_CCTOR(&mime); } @@ -259,9 +241,6 @@ PHP_METHOD(Phalcon_Http_Request_File, getRealType) */ PHP_METHOD(Phalcon_Http_Request_File, getSize) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "size"); } @@ -271,9 +250,6 @@ PHP_METHOD(Phalcon_Http_Request_File, getSize) */ PHP_METHOD(Phalcon_Http_Request_File, getTempName) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "tmp"); } @@ -284,9 +260,6 @@ PHP_METHOD(Phalcon_Http_Request_File, getTempName) */ PHP_METHOD(Phalcon_Http_Request_File, getType) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "type"); } @@ -304,15 +277,14 @@ PHP_METHOD(Phalcon_Http_Request_File, isUploadedFile) ZVAL_UNDEF(&tmp); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&tmp, this_ptr, "gettempname", NULL, 0); zephir_check_call_status(); _0 = Z_TYPE_P(&tmp) == IS_STRING; if (_0) { - ZEPHIR_CALL_FUNCTION(&_1, "is_uploaded_file", NULL, 19, &tmp); + ZEPHIR_CALL_FUNCTION(&_1, "is_uploaded_file", NULL, 20, &tmp); zephir_check_call_status(); _0 = zephir_is_true(&_1); } @@ -332,15 +304,11 @@ PHP_METHOD(Phalcon_Http_Request_File, moveTo) ZVAL_UNDEF(&destination); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(destination) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &destination_param); if (UNEXPECTED(Z_TYPE_P(destination_param) != IS_STRING && Z_TYPE_P(destination_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'destination' must be of the type string")); @@ -351,10 +319,8 @@ PHP_METHOD(Phalcon_Http_Request_File, moveTo) } else { ZEPHIR_INIT_VAR(&destination); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("tmp"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_RETURN_CALL_FUNCTION("move_uploaded_file", NULL, 353, &_0, &destination); + ZEPHIR_RETURN_CALL_FUNCTION("move_uploaded_file", NULL, 354, &_0, &destination); zephir_check_call_status(); RETURN_MM(); } @@ -367,14 +333,12 @@ PHP_METHOD(Phalcon_Http_Request_File, getArrVal) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *collection_param = NULL, *index, index_sub, *defaultValue = NULL, defaultValue_sub, __$null, value; zval collection; - zval *this_ptr = getThis(); ZVAL_UNDEF(&collection); ZVAL_UNDEF(&index_sub); ZVAL_UNDEF(&defaultValue_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&value); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_ARRAY(collection) @@ -382,22 +346,19 @@ PHP_METHOD(Phalcon_Http_Request_File, getArrVal) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(defaultValue) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &collection_param, &index, &defaultValue); ZEPHIR_OBS_COPY_OR_DUP(&collection, collection_param); if (!defaultValue) { defaultValue = &defaultValue_sub; defaultValue = &__$null; } - - - if (UNEXPECTED(!(zephir_array_isset_fetch(&value, &collection, index, 1)))) { + zephir_memory_observe(&value); + if (UNEXPECTED(!(zephir_array_isset_fetch(&value, &collection, index, 0)))) { RETVAL_ZVAL(defaultValue, 1, 0); RETURN_MM(); } - RETURN_CTOR(&value); + RETURN_CCTOR(&value); } diff --git a/ext/phalcon/http/response.zep.c b/ext/phalcon/http/response.zep.c index fce91bab047..7c674eb6160 100644 --- a/ext/phalcon/http/response.zep.c +++ b/ext/phalcon/http/response.zep.c @@ -112,7 +112,6 @@ PHP_METHOD(Phalcon_Http_Response, __construct) ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 3) Z_PARAM_OPTIONAL @@ -120,10 +119,8 @@ PHP_METHOD(Phalcon_Http_Response, __construct) Z_PARAM_ZVAL_OR_NULL(code) Z_PARAM_ZVAL_OR_NULL(status) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 3, &content_param, &code, &status); if (!content_param) { ZEPHIR_INIT_VAR(&content); @@ -146,8 +143,6 @@ PHP_METHOD(Phalcon_Http_Response, __construct) status = &status_sub; status = &__$null; } - - ZEPHIR_INIT_VAR(&_0); object_init_ex(&_0, phalcon_http_response_headers_ce); if (zephir_has_constructor(&_0)) { @@ -188,18 +183,12 @@ PHP_METHOD(Phalcon_Http_Response, appendContent) ZVAL_UNDEF(&content_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(content) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &content); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "getcontent", NULL, 0); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_1); @@ -220,11 +209,10 @@ PHP_METHOD(Phalcon_Http_Response, getContent) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_OBS_VAR(&_0); + zephir_memory_observe(&_0); zephir_read_property(&_0, this_ptr, ZEND_STRL("content"), PH_NOISY_CC); zephir_cast_to_string(&_1, &_0); RETURN_CTOR(&_1); @@ -235,9 +223,6 @@ PHP_METHOD(Phalcon_Http_Response, getContent) */ PHP_METHOD(Phalcon_Http_Response, getCookies) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "cookies"); } @@ -250,19 +235,17 @@ PHP_METHOD(Phalcon_Http_Response, getDI) zval container, _0; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_1 = NULL; zval *this_ptr = getThis(); ZVAL_UNDEF(&container); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("container"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&container, &_0); if (Z_TYPE_P(&container) == IS_NULL) { - ZEPHIR_CALL_CE_STATIC(&container, phalcon_di_di_ce, "getdefault", &_1, 0); + ZEPHIR_CALL_CE_STATIC(&container, phalcon_di_di_ce, "getdefault", NULL, 0); zephir_check_call_status(); if (Z_TYPE_P(&container) == IS_NULL) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_http_response_exception_ce, "A dependency injection container is required to access the 'url' service", "phalcon/Http/Response.zep", 153); @@ -278,9 +261,6 @@ PHP_METHOD(Phalcon_Http_Response, getDI) */ PHP_METHOD(Phalcon_Http_Response, getEventsManager) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "eventsManager"); } @@ -290,9 +270,6 @@ PHP_METHOD(Phalcon_Http_Response, getEventsManager) */ PHP_METHOD(Phalcon_Http_Response, getHeaders) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "headers"); } @@ -316,9 +293,8 @@ PHP_METHOD(Phalcon_Http_Response, getReasonPhrase) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("headers"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_2); @@ -332,6 +308,7 @@ PHP_METHOD(Phalcon_Http_Response, getReasonPhrase) if (zephir_is_true(&statusReasonPhrase)) { ZEPHIR_CPY_WRT(&_2, &statusReasonPhrase); } else { + ZEPHIR_INIT_NVAR(&_2); ZVAL_NULL(&_2); } RETURN_CCTOR(&_2); @@ -357,9 +334,8 @@ PHP_METHOD(Phalcon_Http_Response, getStatusCode) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("headers"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_2); @@ -372,8 +348,10 @@ PHP_METHOD(Phalcon_Http_Response, getStatusCode) zephir_substr(&statusCode, &_1, 0 , 3 , 0); ZEPHIR_INIT_NVAR(&_2); if (zephir_is_true(&statusCode)) { + ZEPHIR_INIT_NVAR(&_2); ZVAL_LONG(&_2, zephir_get_intval(&statusCode)); } else { + ZEPHIR_INIT_NVAR(&_2); ZVAL_NULL(&_2); } RETURN_CCTOR(&_2); @@ -396,19 +374,13 @@ PHP_METHOD(Phalcon_Http_Response, hasHeader) ZVAL_UNDEF(&name); ZVAL_UNDEF(&headers); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &name_param); zephir_get_strval(&name, name_param); - - ZEPHIR_CALL_METHOD(&headers, this_ptr, "getheaders", NULL, 0); zephir_check_call_status(); ZEPHIR_RETURN_CALL_METHOD(&headers, "has", NULL, 0, &name); @@ -421,9 +393,6 @@ PHP_METHOD(Phalcon_Http_Response, hasHeader) */ PHP_METHOD(Phalcon_Http_Response, isSent) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "sent"); } @@ -473,7 +442,6 @@ PHP_METHOD(Phalcon_Http_Response, redirect) ZVAL_UNDEF(&_6$$10); ZVAL_UNDEF(&_7$$10); ZVAL_UNDEF(&_10$$11); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 3) Z_PARAM_OPTIONAL @@ -481,10 +449,8 @@ PHP_METHOD(Phalcon_Http_Response, redirect) Z_PARAM_BOOL(externalRedirect) Z_PARAM_LONG(statusCode) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 3, &location, &externalRedirect_param, &statusCode_param); if (!location) { location = &location_sub; @@ -495,15 +461,11 @@ PHP_METHOD(Phalcon_Http_Response, redirect) if (!externalRedirect_param) { externalRedirect = 0; } else { - externalRedirect = zephir_get_boolval(externalRedirect_param); - } + } if (!statusCode_param) { statusCode = 302; } else { - statusCode = zephir_get_intval(statusCode_param); - } - - + } if (!(zephir_is_true(location))) { ZEPHIR_INIT_NVAR(location); ZVAL_STRING(location, ""); @@ -515,7 +477,7 @@ PHP_METHOD(Phalcon_Http_Response, redirect) if (_0$$5) { ZEPHIR_INIT_VAR(&_1$$5); ZVAL_STRING(&_1$$5, "://"); - ZEPHIR_CALL_FUNCTION(&_2$$5, "strstr", NULL, 354, location, &_1$$5); + ZEPHIR_CALL_FUNCTION(&_2$$5, "strstr", NULL, 355, location, &_1$$5); zephir_check_call_status(); _0$$5 = zephir_is_true(&_2$$5); } @@ -597,19 +559,13 @@ PHP_METHOD(Phalcon_Http_Response, removeHeader) ZVAL_UNDEF(&name); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &name_param); zephir_get_strval(&name, name_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("headers"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(NULL, &_0, "remove", NULL, 0, &name); zephir_check_call_status(); @@ -627,9 +583,8 @@ PHP_METHOD(Phalcon_Http_Response, resetHeaders) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("headers"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(NULL, &_0, "reset", NULL, 0); @@ -655,9 +610,8 @@ PHP_METHOD(Phalcon_Http_Response, send) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2$$5); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("sent"), PH_NOISY_CC | PH_READONLY); if (UNEXPECTED(zephir_is_true(&_0))) { @@ -680,7 +634,7 @@ PHP_METHOD(Phalcon_Http_Response, send) _3$$5 = ((zephir_fast_strlen_ev(&file)) ? 1 : 0); } if (_3$$5) { - ZEPHIR_CALL_FUNCTION(NULL, "readfile", NULL, 355, &file); + ZEPHIR_CALL_FUNCTION(NULL, "readfile", NULL, 356, &file); zephir_check_call_status(); } } @@ -704,9 +658,8 @@ PHP_METHOD(Phalcon_Http_Response, sendCookies) ZVAL_UNDEF(&cookies); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("cookies"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&cookies, &_0); @@ -735,9 +688,8 @@ PHP_METHOD(Phalcon_Http_Response, sendHeaders) ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_4$$5); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("headers"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&headers, &_0); @@ -788,23 +740,17 @@ PHP_METHOD(Phalcon_Http_Response, setCache) ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(minutes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &minutes_param); if (UNEXPECTED(Z_TYPE_P(minutes_param) != IS_LONG)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'minutes' must be of the type int")); RETURN_MM_NULL(); } minutes = Z_LVAL_P(minutes_param); - - ZEPHIR_INIT_VAR(&date); object_init_ex(&date, php_date_get_date_ce()); ZEPHIR_CALL_METHOD(NULL, &date, "__construct", NULL, 0); @@ -843,19 +789,13 @@ PHP_METHOD(Phalcon_Http_Response, setContent) zval *this_ptr = getThis(); ZVAL_UNDEF(&content); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(content) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &content_param); zephir_get_strval(&content, content_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("content"), &content); RETURN_THIS(); } @@ -876,19 +816,12 @@ PHP_METHOD(Phalcon_Http_Response, setContentLength) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(contentLength) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &contentLength_param); - contentLength = zephir_get_intval(contentLength_param); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "Content-Length"); ZVAL_LONG(&_1, contentLength); @@ -918,25 +851,20 @@ PHP_METHOD(Phalcon_Http_Response, setContentType) ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(contentType) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(charset) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &contentType_param, &charset); zephir_get_strval(&contentType, contentType_param); if (!charset) { charset = &charset_sub; charset = &__$null; } - - if (Z_TYPE_P(charset) != IS_NULL) { ZEPHIR_INIT_VAR(&_0$$3); ZEPHIR_CONCAT_SV(&_0$$3, "; charset=", charset); @@ -958,17 +886,10 @@ PHP_METHOD(Phalcon_Http_Response, setCookies) zval *this_ptr = getThis(); ZVAL_UNDEF(&cookies_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(cookies, phalcon_http_response_cookiesinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &cookies); - - zephir_update_property_zval(this_ptr, ZEND_STRL("cookies"), cookies); RETURN_THISW(); } @@ -982,17 +903,10 @@ PHP_METHOD(Phalcon_Http_Response, setDI) zval *this_ptr = getThis(); ZVAL_UNDEF(&container_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(container, phalcon_di_diinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &container); - - zephir_update_property_zval(this_ptr, ZEND_STRL("container"), container); } @@ -1017,19 +931,13 @@ PHP_METHOD(Phalcon_Http_Response, setEtag) ZVAL_UNDEF(&etag); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(etag) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &etag_param); zephir_get_strval(&etag, etag_param); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "Etag"); ZEPHIR_CALL_METHOD(NULL, this_ptr, "setheader", NULL, 0, &_0, &etag); @@ -1059,18 +967,12 @@ PHP_METHOD(Phalcon_Http_Response, setExpires) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(datetime, php_date_get_date_ce()) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &datetime); - - ZEPHIR_INIT_VAR(&date); if (zephir_clone(&date, datetime) == FAILURE) { RETURN_MM(); @@ -1105,17 +1007,10 @@ PHP_METHOD(Phalcon_Http_Response, setEventsManager) zval *this_ptr = getThis(); ZVAL_UNDEF(&eventsManager_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(eventsManager, phalcon_events_managerinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &eventsManager); - - zephir_update_property_zval(this_ptr, ZEND_STRL("eventsManager"), eventsManager); } @@ -1145,7 +1040,6 @@ PHP_METHOD(Phalcon_Http_Response, setFileToSend) ZVAL_UNDEF(&_5$$8); ZVAL_UNDEF(&_6$$8); ZVAL_UNDEF(&_7$$8); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(filePath) @@ -1153,10 +1047,8 @@ PHP_METHOD(Phalcon_Http_Response, setFileToSend) Z_PARAM_ZVAL_OR_NULL(attachmentName) Z_PARAM_ZVAL(attachment) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &filePath_param, &attachmentName, &attachment); zephir_get_strval(&filePath, filePath_param); if (!attachmentName) { @@ -1167,21 +1059,19 @@ PHP_METHOD(Phalcon_Http_Response, setFileToSend) attachment = &attachment_sub; attachment = &__$true; } - - ZEPHIR_INIT_VAR(&basePathEncoding); ZVAL_STRING(&basePathEncoding, "ASCII"); if (Z_TYPE_P(attachmentName) != IS_STRING) { - ZEPHIR_CALL_METHOD(&basePath, this_ptr, "getbasename", NULL, 356, &filePath); + ZEPHIR_CALL_METHOD(&basePath, this_ptr, "getbasename", NULL, 357, &filePath); zephir_check_call_status(); } else { ZEPHIR_CPY_WRT(&basePath, attachmentName); } if (zephir_is_true(attachment)) { if ((zephir_function_exists_ex(ZEND_STRL("mb_detect_encoding")) == SUCCESS)) { - ZEPHIR_CALL_FUNCTION(&_0$$6, "mb_detect_order", NULL, 357); + ZEPHIR_CALL_FUNCTION(&_0$$6, "mb_detect_order", NULL, 358); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&basePathEncoding, "mb_detect_encoding", NULL, 322, &basePath, &_0$$6, &__$true); + ZEPHIR_CALL_FUNCTION(&basePathEncoding, "mb_detect_encoding", NULL, 323, &basePath, &_0$$6, &__$true); zephir_check_call_status(); } ZEPHIR_INIT_VAR(&_1$$5); @@ -1197,7 +1087,7 @@ PHP_METHOD(Phalcon_Http_Response, setFileToSend) ZEPHIR_CALL_METHOD(NULL, this_ptr, "setrawheader", NULL, 0, &_1$$5); zephir_check_call_status(); if (!ZEPHIR_IS_STRING(&basePathEncoding, "ASCII")) { - ZEPHIR_CALL_FUNCTION(&_2$$7, "rawurlencode", NULL, 326, &basePath); + ZEPHIR_CALL_FUNCTION(&_2$$7, "rawurlencode", NULL, 327, &basePath); zephir_check_call_status(); ZEPHIR_CPY_WRT(&basePath, &_2$$7); ZEPHIR_INIT_VAR(&_3$$7); @@ -1209,7 +1099,7 @@ PHP_METHOD(Phalcon_Http_Response, setFileToSend) } else { ZEPHIR_INIT_VAR(&_5$$8); ZVAL_STRING(&_5$$8, "\15\17\\\""); - ZEPHIR_CALL_FUNCTION(&_6$$8, "addcslashes", NULL, 214, &basePath, &_5$$8); + ZEPHIR_CALL_FUNCTION(&_6$$8, "addcslashes", NULL, 215, &basePath, &_5$$8); zephir_check_call_status(); ZEPHIR_CPY_WRT(&basePath, &_6$$8); ZEPHIR_INIT_VAR(&_7$$8); @@ -1240,20 +1130,14 @@ PHP_METHOD(Phalcon_Http_Response, setHeader) ZVAL_UNDEF(&name); ZVAL_UNDEF(&value_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(name) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &name_param, &value); zephir_get_strval(&name, name_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("headers"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(NULL, &_0, "set", NULL, 0, &name, value); zephir_check_call_status(); @@ -1279,18 +1163,12 @@ PHP_METHOD(Phalcon_Http_Response, setHeaders) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_4$$3); ZVAL_UNDEF(&_5$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(headers, phalcon_http_response_headersinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &headers); - - ZEPHIR_CALL_METHOD(&data, headers, "toarray", NULL, 0); zephir_check_call_status(); zephir_is_iterable(&data, 0, "phalcon/Http/Response.zep", 628); @@ -1359,31 +1237,23 @@ PHP_METHOD(Phalcon_Http_Response, setJsonContent) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_ZVAL(content) Z_PARAM_OPTIONAL Z_PARAM_LONG(jsonOptions) Z_PARAM_LONG(depth) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &content, &jsonOptions_param, &depth_param); if (!jsonOptions_param) { jsonOptions = 0; } else { - jsonOptions = zephir_get_intval(jsonOptions_param); - } + } if (!depth_param) { depth = 512; } else { - depth = zephir_get_intval(depth_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "application/json"); ZEPHIR_CALL_METHOD(NULL, this_ptr, "setcontenttype", NULL, 0, &_0); @@ -1420,18 +1290,12 @@ PHP_METHOD(Phalcon_Http_Response, setLastModified) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(datetime, php_date_get_date_ce()) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &datetime); - - ZEPHIR_INIT_VAR(&date); if (zephir_clone(&date, datetime) == FAILURE) { RETURN_MM(); @@ -1469,9 +1333,8 @@ PHP_METHOD(Phalcon_Http_Response, setNotModified) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZVAL_LONG(&_0, 304); ZEPHIR_INIT_VAR(&_1); @@ -1521,26 +1384,20 @@ PHP_METHOD(Phalcon_Http_Response, setStatusCode) ZVAL_UNDEF(&message); ZVAL_UNDEF(&_17); ZVAL_UNDEF(&_20); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_LONG(code) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(message) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &code_param, &message_param); - code = zephir_get_intval(code_param); if (!message_param) { ZEPHIR_INIT_VAR(&message); } else { zephir_get_strval(&message, message_param); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("headers"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(¤tHeadersRaw, &_0, "toarray", NULL, 0); zephir_check_call_status(); @@ -1561,7 +1418,7 @@ PHP_METHOD(Phalcon_Http_Response, setStatusCode) if (_6$$3) { ZEPHIR_INIT_NVAR(&_7$$3); ZVAL_STRING(&_7$$3, "HTTP/"); - ZEPHIR_CALL_FUNCTION(&_8$$3, "strstr", &_9, 354, &key, &_7$$3); + ZEPHIR_CALL_FUNCTION(&_8$$3, "strstr", &_9, 355, &key, &_7$$3); zephir_check_call_status(); _6$$3 = zephir_is_true(&_8$$3); } @@ -1588,7 +1445,7 @@ PHP_METHOD(Phalcon_Http_Response, setStatusCode) if (_11$$5) { ZEPHIR_INIT_NVAR(&_12$$5); ZVAL_STRING(&_12$$5, "HTTP/"); - ZEPHIR_CALL_FUNCTION(&_13$$5, "strstr", &_9, 354, &key, &_12$$5); + ZEPHIR_CALL_FUNCTION(&_13$$5, "strstr", &_9, 355, &key, &_12$$5); zephir_check_call_status(); _11$$5 = zephir_is_true(&_13$$5); } @@ -1698,7 +1555,7 @@ PHP_METHOD(Phalcon_Http_Response, setStatusCode) ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_http_response_exception_ce, "Non-standard statuscode given without a message", "phalcon/Http/Response.zep", 824); return; } - ZEPHIR_OBS_VAR(&defaultMessage); + zephir_memory_observe(&defaultMessage); zephir_array_fetch_long(&defaultMessage, &statusCodes, code, PH_NOISY, "phalcon/Http/Response.zep", 827); zephir_get_strval(&message, &defaultMessage); } @@ -1738,19 +1595,13 @@ PHP_METHOD(Phalcon_Http_Response, setRawHeader) ZVAL_UNDEF(&header); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(header) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &header_param); zephir_get_strval(&header, header_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("headers"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(NULL, &_0, "setraw", NULL, 0, &header); zephir_check_call_status(); @@ -1766,7 +1617,6 @@ PHP_METHOD(Phalcon_Http_Response, getBasename) zend_long ZEPHIR_LAST_CALL_STATUS; zval *uri_param = NULL, *suffix = NULL, suffix_sub, __$null, filename, matches, _0, _1, _2, _3, _4, _5, _6$$3, _7$$3, _8$$3, _9$$3; zval uri; - zval *this_ptr = getThis(); ZVAL_UNDEF(&uri); ZVAL_UNDEF(&suffix_sub); @@ -1783,17 +1633,14 @@ PHP_METHOD(Phalcon_Http_Response, getBasename) ZVAL_UNDEF(&_7$$3); ZVAL_UNDEF(&_8$$3); ZVAL_UNDEF(&_9$$3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(uri) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(suffix) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &uri_param, &suffix); if (UNEXPECTED(Z_TYPE_P(uri_param) != IS_STRING && Z_TYPE_P(uri_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'uri' must be of the type string")); @@ -1808,8 +1655,6 @@ PHP_METHOD(Phalcon_Http_Response, getBasename) suffix = &suffix_sub; suffix = &__$null; } - - ZEPHIR_INIT_VAR(&_0); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "/"); @@ -1819,14 +1664,14 @@ PHP_METHOD(Phalcon_Http_Response, getBasename) ZVAL_STRING(&_2, "/"); ZEPHIR_INIT_VAR(&_3); ZVAL_STRING(&_3, "@"); - ZEPHIR_CALL_FUNCTION(&_4, "preg_quote", NULL, 350, &_2, &_3); + ZEPHIR_CALL_FUNCTION(&_4, "preg_quote", NULL, 351, &_2, &_3); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_5); ZEPHIR_CONCAT_SVS(&_5, "@[^", &_4, "]+$@"); ZEPHIR_INIT_NVAR(&_2); zephir_preg_match(&_2, &_5, &uri, &matches, 0, 0 , 0 ); if (zephir_is_true(&_2)) { - ZEPHIR_OBS_VAR(&filename); + zephir_memory_observe(&filename); zephir_array_fetch_long(&filename, &matches, 0, PH_NOISY, "phalcon/Http/Response.zep", 867); } else { ZEPHIR_INIT_NVAR(&filename); @@ -1835,13 +1680,13 @@ PHP_METHOD(Phalcon_Http_Response, getBasename) if (zephir_is_true(suffix)) { ZEPHIR_INIT_VAR(&_6$$3); ZVAL_STRING(&_6$$3, "@"); - ZEPHIR_CALL_FUNCTION(&_7$$3, "preg_quote", NULL, 350, suffix, &_6$$3); + ZEPHIR_CALL_FUNCTION(&_7$$3, "preg_quote", NULL, 351, suffix, &_6$$3); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_8$$3); ZEPHIR_CONCAT_SVS(&_8$$3, "@", &_7$$3, "$@"); ZEPHIR_INIT_NVAR(&_6$$3); ZVAL_STRING(&_6$$3, ""); - ZEPHIR_CALL_FUNCTION(&_9$$3, "preg_replace", NULL, 40, &_8$$3, &_6$$3, &filename); + ZEPHIR_CALL_FUNCTION(&_9$$3, "preg_replace", NULL, 41, &_8$$3, &_6$$3, &filename); zephir_check_call_status(); ZEPHIR_CPY_WRT(&filename, &_9$$3); } @@ -1856,7 +1701,8 @@ zend_object *zephir_init_properties_Phalcon_Http_Response(zend_class_entry *clas ZVAL_UNDEF(&_1$$3); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/http/response.zep.h b/ext/phalcon/http/response.zep.h index 041faf4b8d9..464c2dae311 100644 --- a/ext/phalcon/http/response.zep.h +++ b/ext/phalcon/http/response.zep.h @@ -201,11 +201,7 @@ ZEPHIR_INIT_FUNCS(phalcon_http_response_method_entry) { PHP_ME(Phalcon_Http_Response, resetHeaders, arginfo_phalcon_http_response_resetheaders, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Response, send, arginfo_phalcon_http_response_send, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Response, sendCookies, arginfo_phalcon_http_response_sendcookies, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Http_Response, sendHeaders, arginfo_phalcon_http_response_sendheaders, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Http_Response, sendHeaders, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Http_Response, sendHeaders, arginfo_phalcon_http_response_sendheaders, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Response, setCache, arginfo_phalcon_http_response_setcache, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Response, setContent, arginfo_phalcon_http_response_setcontent, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Response, setContentLength, arginfo_phalcon_http_response_setcontentlength, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/http/response/cookies.zep.c b/ext/phalcon/http/response/cookies.zep.c index aa91b423e96..d1b86410b1c 100644 --- a/ext/phalcon/http/response/cookies.zep.c +++ b/ext/phalcon/http/response/cookies.zep.c @@ -123,30 +123,24 @@ PHP_METHOD(Phalcon_Http_Response_Cookies, __construct) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); ZVAL_UNDEF(&signKey); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_BOOL(useEncryption) Z_PARAM_STR_OR_NULL(signKey) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 2, &useEncryption_param, &signKey_param); if (!useEncryption_param) { useEncryption = 1; } else { - useEncryption = zephir_get_boolval(useEncryption_param); - } + } if (!signKey_param) { ZEPHIR_INIT_VAR(&signKey); } else { zephir_get_strval(&signKey, signKey_param); } - - if (useEncryption) { zephir_update_property_zval(this_ptr, ZEND_STRL("useEncryption"), &__$true); } else { @@ -172,15 +166,11 @@ PHP_METHOD(Phalcon_Http_Response_Cookies, delete) ZVAL_UNDEF(&name); ZVAL_UNDEF(&cookie); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -191,9 +181,7 @@ PHP_METHOD(Phalcon_Http_Response_Cookies, delete) } else { ZEPHIR_INIT_VAR(&name); } - - - ZEPHIR_OBS_VAR(&cookie); + zephir_memory_observe(&cookie); zephir_read_property(&_0, this_ptr, ZEND_STRL("cookies"), PH_NOISY_CC | PH_READONLY); if (!(zephir_array_isset_fetch(&cookie, &_0, &name, 0))) { RETURN_MM_BOOL(0); @@ -226,15 +214,11 @@ PHP_METHOD(Phalcon_Http_Response_Cookies, get) ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_6$$5); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -245,9 +229,7 @@ PHP_METHOD(Phalcon_Http_Response_Cookies, get) } else { ZEPHIR_INIT_VAR(&name); } - - - ZEPHIR_OBS_VAR(&cookie); + zephir_memory_observe(&cookie); zephir_read_property(&_0, this_ptr, ZEND_STRL("cookies"), PH_NOISY_CC | PH_READONLY); if (zephir_array_isset_fetch(&cookie, &_0, &name, 0)) { RETURN_CCTOR(&cookie); @@ -266,7 +248,7 @@ PHP_METHOD(Phalcon_Http_Response_Cookies, get) if (Z_TYPE_P(&container) == IS_OBJECT) { ZEPHIR_CALL_METHOD(NULL, &cookie, "setdi", NULL, 0, &container); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&encryption); + zephir_memory_observe(&encryption); zephir_read_property(&encryption, this_ptr, ZEND_STRL("useEncryption"), PH_NOISY_CC); if (zephir_is_true(&encryption)) { ZEPHIR_CALL_METHOD(NULL, &cookie, "useencryption", NULL, 0, &encryption); @@ -284,9 +266,6 @@ PHP_METHOD(Phalcon_Http_Response_Cookies, get) */ PHP_METHOD(Phalcon_Http_Response_Cookies, getCookies) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "cookies"); } @@ -306,15 +285,11 @@ PHP_METHOD(Phalcon_Http_Response_Cookies, has) ZVAL_UNDEF(&name); ZVAL_UNDEF(&_COOKIE); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_get_global(&_COOKIE, SL("_COOKIE")); zephir_fetch_params(1, 1, 0, &name_param); if (UNEXPECTED(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) { @@ -326,8 +301,6 @@ PHP_METHOD(Phalcon_Http_Response_Cookies, has) } else { ZEPHIR_INIT_VAR(&name); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("cookies"), PH_NOISY_CC | PH_READONLY); _1 = zephir_array_isset(&_0, &name); if (!(_1)) { @@ -341,9 +314,6 @@ PHP_METHOD(Phalcon_Http_Response_Cookies, has) */ PHP_METHOD(Phalcon_Http_Response_Cookies, isSent) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "isSent"); } @@ -353,9 +323,6 @@ PHP_METHOD(Phalcon_Http_Response_Cookies, isSent) */ PHP_METHOD(Phalcon_Http_Response_Cookies, isUsingEncryption) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "useEncryption"); } @@ -370,9 +337,8 @@ PHP_METHOD(Phalcon_Http_Response_Cookies, reset) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); array_init(&_0); @@ -399,11 +365,10 @@ PHP_METHOD(Phalcon_Http_Response_Cookies, send) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_5); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_CALL_FUNCTION(&_0, "headers_sent", NULL, 358); + ZEPHIR_CALL_FUNCTION(&_0, "headers_sent", NULL, 359); zephir_check_call_status(); _1 = ZEPHIR_IS_TRUE_IDENTICAL(&_0); if (!(_1)) { @@ -504,7 +469,6 @@ PHP_METHOD(Phalcon_Http_Response_Cookies, set) ZVAL_UNDEF(&_12$$6); ZVAL_UNDEF(&options); ZVAL_UNDEF(&_3$$3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 8) Z_PARAM_STR(name) @@ -517,10 +481,8 @@ PHP_METHOD(Phalcon_Http_Response_Cookies, set) Z_PARAM_BOOL_OR_NULL(httpOnly, is_null_true) Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 7, &name_param, &value, &expire_param, &path_param, &secure_param, &domain_param, &httpOnly_param, &options_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")); @@ -538,8 +500,7 @@ PHP_METHOD(Phalcon_Http_Response_Cookies, set) if (!expire_param) { expire = 0; } else { - expire = zephir_get_intval(expire_param); - } + } if (!path_param) { ZEPHIR_INIT_VAR(&path); ZVAL_STRING(&path, "/"); @@ -549,8 +510,7 @@ PHP_METHOD(Phalcon_Http_Response_Cookies, set) if (!secure_param) { secure = 0; } else { - secure = zephir_get_boolval(secure_param); - } + } if (!domain_param) { ZEPHIR_INIT_VAR(&domain); } else { @@ -567,19 +527,16 @@ PHP_METHOD(Phalcon_Http_Response_Cookies, set) if (!httpOnly_param) { httpOnly = 0; } else { - httpOnly = zephir_get_boolval(httpOnly_param); - } + } if (!options_param) { ZEPHIR_INIT_VAR(&options); array_init(&options); } else { zephir_get_arrval(&options, options_param); } - - - ZEPHIR_OBS_VAR(&encryption); + zephir_memory_observe(&encryption); zephir_read_property(&encryption, this_ptr, ZEND_STRL("useEncryption"), PH_NOISY_CC); - ZEPHIR_OBS_VAR(&cookie); + zephir_memory_observe(&cookie); zephir_read_property(&_0, this_ptr, ZEND_STRL("cookies"), PH_NOISY_CC | PH_READONLY); if (!(zephir_array_isset_fetch(&cookie, &_0, &name, 0))) { zephir_read_property(&_1$$3, this_ptr, ZEND_STRL("container"), PH_NOISY_CC | PH_READONLY); @@ -686,24 +643,19 @@ PHP_METHOD(Phalcon_Http_Response_Cookies, setSignKey) zval *this_ptr = getThis(); ZVAL_UNDEF(&signKey); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(signKey) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &signKey_param); if (!signKey_param) { ZEPHIR_INIT_VAR(&signKey); } else { zephir_get_strval(&signKey, signKey_param); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("signKey"), &signKey); RETURN_THIS(); } @@ -719,18 +671,10 @@ PHP_METHOD(Phalcon_Http_Response_Cookies, useEncryption) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(useEncryption) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &useEncryption_param); - useEncryption = zephir_get_boolval(useEncryption_param); - - if (useEncryption) { zephir_update_property_zval(this_ptr, ZEND_STRL("useEncryption"), &__$true); } else { @@ -747,7 +691,8 @@ zend_object *zephir_init_properties_Phalcon_Http_Response_Cookies(zend_class_ent ZVAL_UNDEF(&_1$$3); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/http/response/cookies.zep.h b/ext/phalcon/http/response/cookies.zep.h index 1a8d8776c37..1221cf554b3 100644 --- a/ext/phalcon/http/response/cookies.zep.h +++ b/ext/phalcon/http/response/cookies.zep.h @@ -57,11 +57,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_http_response_cookies_set ZEND_ARG_TYPE_INFO(0, secure, _IS_BOOL, 1) ZEND_ARG_TYPE_INFO(0, domain, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, httpOnly, _IS_BOOL, 1) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_http_response_cookies_setsignkey, 0, 0, Phalcon\\Http\\Response\\CookiesInterface, 0) diff --git a/ext/phalcon/http/response/cookiesinterface.zep.h b/ext/phalcon/http/response/cookiesinterface.zep.h index 45661720c7b..57cad9a1445 100644 --- a/ext/phalcon/http/response/cookiesinterface.zep.h +++ b/ext/phalcon/http/response/cookiesinterface.zep.h @@ -32,11 +32,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_http_response_cookiesinte ZEND_ARG_TYPE_INFO(0, secure, _IS_BOOL, 1) ZEND_ARG_TYPE_INFO(0, domain, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, httpOnly, _IS_BOOL, 1) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_http_response_cookiesinterface_useencryption, 0, 1, Phalcon\\Http\\Response\\CookiesInterface, 0) diff --git a/ext/phalcon/http/response/headers.zep.c b/ext/phalcon/http/response/headers.zep.c index 5bb17f54715..4869bc81efa 100644 --- a/ext/phalcon/http/response/headers.zep.c +++ b/ext/phalcon/http/response/headers.zep.c @@ -14,8 +14,8 @@ #include "kernel/main.h" #include "kernel/object.h" #include "kernel/array.h" -#include "kernel/operators.h" #include "kernel/memory.h" +#include "kernel/operators.h" #include "kernel/fcall.h" #include "kernel/concat.h" #include "kernel/string.h" @@ -66,25 +66,20 @@ PHP_METHOD(Phalcon_Http_Response_Headers, get) ZVAL_UNDEF(&headers); ZVAL_UNDEF(&headerValue); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &name_param); zephir_get_strval(&name, name_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("headers"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&headers, &_0); - if (!(zephir_array_isset_fetch(&headerValue, &headers, &name, 1))) { + zephir_memory_observe(&headerValue); + if (!(zephir_array_isset_fetch(&headerValue, &headers, &name, 0))) { RETURN_MM_BOOL(0); } - RETURN_CTOR(&headerValue); + RETURN_CCTOR(&headerValue); } /** @@ -99,19 +94,13 @@ PHP_METHOD(Phalcon_Http_Response_Headers, has) ZVAL_UNDEF(&name); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &name_param); zephir_get_strval(&name, name_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("headers"), PH_NOISY_CC | PH_READONLY); RETURN_MM_BOOL(zephir_array_key_exists(&_0, &name)); } @@ -121,9 +110,6 @@ PHP_METHOD(Phalcon_Http_Response_Headers, has) */ PHP_METHOD(Phalcon_Http_Response_Headers, isSent) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "isSent"); } @@ -141,19 +127,13 @@ PHP_METHOD(Phalcon_Http_Response_Headers, remove) ZVAL_UNDEF(&header); ZVAL_UNDEF(&headers); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(header) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &header_param); zephir_get_strval(&header, header_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("headers"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&headers, &_0); zephir_array_unset(&headers, &header, PH_SEPARATE); @@ -171,9 +151,8 @@ PHP_METHOD(Phalcon_Http_Response_Headers, reset) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); array_init(&_0); @@ -213,11 +192,10 @@ PHP_METHOD(Phalcon_Http_Response_Headers, send) ZVAL_UNDEF(&_18$$11); ZVAL_UNDEF(&_19$$11); ZVAL_UNDEF(&_20$$13); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_CALL_FUNCTION(&_0, "headers_sent", NULL, 358); + ZEPHIR_CALL_FUNCTION(&_0, "headers_sent", NULL, 359); zephir_check_call_status(); _1 = ZEPHIR_IS_TRUE_IDENTICAL(&_0); if (!(_1)) { @@ -243,7 +221,7 @@ PHP_METHOD(Phalcon_Http_Response_Headers, send) if (Z_TYPE_P(&value) != IS_NULL) { ZEPHIR_INIT_NVAR(&_8$$5); ZEPHIR_CONCAT_VSV(&_8$$5, &header, ": ", &value); - ZEPHIR_CALL_FUNCTION(NULL, "header", &_9, 359, &_8$$5, &__$true); + ZEPHIR_CALL_FUNCTION(NULL, "header", &_9, 360, &_8$$5, &__$true); zephir_check_call_status(); } else { _10$$6 = zephir_memnstr_str(&header, SL(":"), "phalcon/Http/Response/Headers.zep", 99); @@ -255,12 +233,12 @@ PHP_METHOD(Phalcon_Http_Response_Headers, send) _10$$6 = ZEPHIR_IS_STRING(&_13$$6, "HTTP/"); } if (_10$$6) { - ZEPHIR_CALL_FUNCTION(NULL, "header", &_9, 359, &header, &__$true); + ZEPHIR_CALL_FUNCTION(NULL, "header", &_9, 360, &header, &__$true); zephir_check_call_status(); } else { ZEPHIR_INIT_NVAR(&_14$$8); ZEPHIR_CONCAT_VS(&_14$$8, &header, ": "); - ZEPHIR_CALL_FUNCTION(NULL, "header", &_9, 359, &_14$$8, &__$true); + ZEPHIR_CALL_FUNCTION(NULL, "header", &_9, 360, &_14$$8, &__$true); zephir_check_call_status(); } } @@ -281,7 +259,7 @@ PHP_METHOD(Phalcon_Http_Response_Headers, send) if (Z_TYPE_P(&value) != IS_NULL) { ZEPHIR_INIT_NVAR(&_15$$10); ZEPHIR_CONCAT_VSV(&_15$$10, &header, ": ", &value); - ZEPHIR_CALL_FUNCTION(NULL, "header", &_9, 359, &_15$$10, &__$true); + ZEPHIR_CALL_FUNCTION(NULL, "header", &_9, 360, &_15$$10, &__$true); zephir_check_call_status(); } else { _16$$11 = zephir_memnstr_str(&header, SL(":"), "phalcon/Http/Response/Headers.zep", 99); @@ -293,12 +271,12 @@ PHP_METHOD(Phalcon_Http_Response_Headers, send) _16$$11 = ZEPHIR_IS_STRING(&_19$$11, "HTTP/"); } if (_16$$11) { - ZEPHIR_CALL_FUNCTION(NULL, "header", &_9, 359, &header, &__$true); + ZEPHIR_CALL_FUNCTION(NULL, "header", &_9, 360, &header, &__$true); zephir_check_call_status(); } else { ZEPHIR_INIT_NVAR(&_20$$13); ZEPHIR_CONCAT_VS(&_20$$13, &header, ": "); - ZEPHIR_CALL_FUNCTION(NULL, "header", &_9, 359, &_20$$13, &__$true); + ZEPHIR_CALL_FUNCTION(NULL, "header", &_9, 360, &_20$$13, &__$true); zephir_check_call_status(); } } @@ -328,21 +306,15 @@ PHP_METHOD(Phalcon_Http_Response_Headers, set) ZVAL_UNDEF(&name); ZVAL_UNDEF(&value); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(name) Z_PARAM_STR(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &name_param, &value_param); zephir_get_strval(&name, name_param); zephir_get_strval(&value, value_param); - - zephir_update_property_array(this_ptr, SL("headers"), &name, &value); RETURN_THIS(); } @@ -359,19 +331,13 @@ PHP_METHOD(Phalcon_Http_Response_Headers, setRaw) ZVAL_UNDEF(&header); ZVAL_NULL(&__$null); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(header) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &header_param); zephir_get_strval(&header, header_param); - - zephir_update_property_array(this_ptr, SL("headers"), &header, &__$null); RETURN_THIS(); } @@ -381,9 +347,6 @@ PHP_METHOD(Phalcon_Http_Response_Headers, setRaw) */ PHP_METHOD(Phalcon_Http_Response_Headers, toArray) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "headers"); } @@ -396,7 +359,8 @@ zend_object *zephir_init_properties_Phalcon_Http_Response_Headers(zend_class_ent ZVAL_UNDEF(&_1$$3); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/http/response/headers.zep.h b/ext/phalcon/http/response/headers.zep.h index 50642948b40..41203146969 100644 --- a/ext/phalcon/http/response/headers.zep.h +++ b/ext/phalcon/http/response/headers.zep.h @@ -55,11 +55,7 @@ ZEPHIR_INIT_FUNCS(phalcon_http_response_headers_method_entry) { PHP_ME(Phalcon_Http_Response_Headers, has, arginfo_phalcon_http_response_headers_has, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Response_Headers, isSent, arginfo_phalcon_http_response_headers_issent, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Response_Headers, remove, arginfo_phalcon_http_response_headers_remove, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Http_Response_Headers, reset, arginfo_phalcon_http_response_headers_reset, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Http_Response_Headers, reset, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Http_Response_Headers, reset, arginfo_phalcon_http_response_headers_reset, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Response_Headers, send, arginfo_phalcon_http_response_headers_send, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Response_Headers, set, arginfo_phalcon_http_response_headers_set, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Http_Response_Headers, setRaw, arginfo_phalcon_http_response_headers_setraw, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/image/adapter/abstractadapter.zep.c b/ext/phalcon/image/adapter/abstractadapter.zep.c index 1f2defd5390..c9f4d5a669c 100644 --- a/ext/phalcon/image/adapter/abstractadapter.zep.c +++ b/ext/phalcon/image/adapter/abstractadapter.zep.c @@ -112,26 +112,19 @@ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, background) ZVAL_UNDEF(&_6$$4); ZVAL_UNDEF(&_7$$4); ZVAL_UNDEF(&_8$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(color) Z_PARAM_OPTIONAL Z_PARAM_LONG(opacity) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &color_param, &opacity_param); zephir_get_strval(&color, color_param); if (!opacity_param) { opacity = 100; } else { - opacity = zephir_get_intval(opacity_param); - } - - + } _0 = zephir_fast_strlen_ev(&color) > 1; if (_0) { ZVAL_LONG(&_1, 0); @@ -151,16 +144,16 @@ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, background) ZVAL_STRING(&_6$$4, "/./"); ZEPHIR_INIT_VAR(&_7$$4); ZVAL_STRING(&_7$$4, "$0$0"); - ZEPHIR_CALL_FUNCTION(&_8$$4, "preg_replace", NULL, 40, &_6$$4, &_7$$4, &color); + ZEPHIR_CALL_FUNCTION(&_8$$4, "preg_replace", NULL, 41, &_6$$4, &_7$$4, &color); zephir_check_call_status(); zephir_get_strval(&color, &_8$$4); } ZVAL_LONG(&_9, 2); - ZEPHIR_CALL_FUNCTION(&_10, "str_split", NULL, 87, &color, &_9); + ZEPHIR_CALL_FUNCTION(&_10, "str_split", NULL, 88, &color, &_9); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_11); ZVAL_STRING(&_11, "hexdec"); - ZEPHIR_CALL_FUNCTION(&colors, "array_map", NULL, 69, &_11, &_10); + ZEPHIR_CALL_FUNCTION(&colors, "array_map", NULL, 70, &_11, &_10); zephir_check_call_status(); zephir_array_fetch_long(&_12, &colors, 0, PH_NOISY | PH_READONLY, "phalcon/Image/Adapter/AbstractAdapter.zep", 96); zephir_array_fetch_long(&_13, &colors, 1, PH_NOISY | PH_READONLY, "phalcon/Image/Adapter/AbstractAdapter.zep", 96); @@ -188,19 +181,12 @@ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, blur) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(radius) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &radius_param); - radius = zephir_get_intval(radius_param); - - ZVAL_LONG(&_1, radius); ZVAL_LONG(&_2, 1); ZEPHIR_CALL_METHOD(&_0, this_ptr, "checkhighlow", NULL, 0, &_1, &_2); @@ -247,7 +233,6 @@ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, crop) ZVAL_UNDEF(&_17); ZVAL_UNDEF(&_11$$7); ZVAL_UNDEF(&_13$$8); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 4) Z_PARAM_LONG(width) @@ -256,25 +241,17 @@ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, crop) Z_PARAM_LONG_OR_NULL(offsetX, is_null_true) Z_PARAM_LONG_OR_NULL(offsetY, is_null_true) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 2, &width_param, &height_param, &offsetX_param, &offsetY_param); - width = zephir_get_intval(width_param); - height = zephir_get_intval(height_param); if (!offsetX_param) { offsetX = 0; } else { - offsetX = zephir_get_intval(offsetX_param); - } + } if (!offsetY_param) { offsetY = 0; } else { - offsetY = zephir_get_intval(offsetY_param); - } - - + } if (0 == offsetX) { zephir_read_property(&_0$$3, this_ptr, ZEND_STRL("width"), PH_NOISY_CC | PH_READONLY); offsetX = (long) ((zephir_safe_div_long_long(((zephir_get_numberval(&_0$$3) - width)), 2))); @@ -360,19 +337,12 @@ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, flip) zval *this_ptr = getThis(); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(direction) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &direction_param); - direction = zephir_get_intval(direction_param); - - _0 = direction != 11; if (_0) { _0 = direction != 12; @@ -391,9 +361,6 @@ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, flip) */ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, getHeight) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "height"); } @@ -403,9 +370,6 @@ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, getHeight) */ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, getImage) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "image"); } @@ -415,9 +379,6 @@ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, getImage) */ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, getMime) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "mime"); } @@ -427,9 +388,6 @@ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, getMime) */ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, getRealpath) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "realpath"); } @@ -439,9 +397,6 @@ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, getRealpath) */ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, getType) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "type"); } @@ -451,9 +406,6 @@ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, getType) */ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, getWidth) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "width"); } @@ -473,18 +425,12 @@ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, mask) zval *this_ptr = getThis(); ZVAL_UNDEF(&mask_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(mask, phalcon_image_adapter_adapterinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &mask); - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "processmask", NULL, 0, mask); zephir_check_call_status(); RETURN_THIS(); @@ -505,19 +451,12 @@ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, pixelate) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(amount) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &amount_param); - amount = zephir_get_intval(amount_param); - - if (amount < 2) { amount = 2; } @@ -550,32 +489,23 @@ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, reflection) ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_6); ZVAL_UNDEF(&_2$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_LONG(height) Z_PARAM_OPTIONAL Z_PARAM_LONG(opacity) Z_PARAM_BOOL(fadeIn) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &height_param, &opacity_param, &fadeIn_param); - height = zephir_get_intval(height_param); if (!opacity_param) { opacity = 100; } else { - opacity = zephir_get_intval(opacity_param); - } + } if (!fadeIn_param) { fadeIn = 0; } else { - fadeIn = zephir_get_boolval(fadeIn_param); - } - - + } _0 = height <= 0; if (!(_0)) { zephir_read_property(&_1, this_ptr, ZEND_STRL("height"), PH_NOISY_CC | PH_READONLY); @@ -625,17 +555,14 @@ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, render) ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_6); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(extension) Z_PARAM_LONG(quality) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 2, &extension_param, &quality_param); if (!extension_param) { ZEPHIR_INIT_VAR(&extension); @@ -645,14 +572,11 @@ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, render) if (!quality_param) { quality = 100; } else { - quality = zephir_get_intval(quality_param); - } - - + } if (Z_TYPE_P(&extension) == IS_NULL) { zephir_read_property(&_0$$3, this_ptr, ZEND_STRL("file"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_1$$3, 4); - ZEPHIR_CALL_FUNCTION(&_2$$3, "pathinfo", NULL, 88, &_0$$3, &_1$$3); + ZEPHIR_CALL_FUNCTION(&_2$$3, "pathinfo", NULL, 89, &_0$$3, &_1$$3); zephir_check_call_status(); zephir_cast_to_string(&_3$$3, &_2$$3); ZEPHIR_CPY_WRT(&extension, &_3$$3); @@ -718,7 +642,6 @@ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, resize) ZVAL_UNDEF(&_17$$16); ZVAL_UNDEF(&_18$$17); ZVAL_UNDEF(&_19$$17); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 3) Z_PARAM_OPTIONAL @@ -726,28 +649,21 @@ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, resize) Z_PARAM_LONG_OR_NULL(height, is_null_true) Z_PARAM_LONG(master) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 3, &width_param, &height_param, &master_param); if (!width_param) { width = 0; } else { - width = zephir_get_intval(width_param); - } + } if (!height_param) { height = 0; } else { - height = zephir_get_intval(height_param); - } + } if (!master_param) { master = 4; } else { - master = zephir_get_intval(master_param); - } - - + } do { if (master == 7 || master == 4 || master == 5 || master == 6) { _0$$3 = 0 == width; @@ -861,14 +777,14 @@ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, resize) ZVAL_LONG(&_21, width); zephir_round(&_20, &_21, NULL, NULL); ZVAL_LONG(&_22, 1); - ZEPHIR_CALL_FUNCTION(&_23, "max", NULL, 89, &_20, &_22); + ZEPHIR_CALL_FUNCTION(&_23, "max", NULL, 90, &_20, &_22); zephir_check_call_status(); width = zephir_get_intval(&_23); ZEPHIR_INIT_VAR(&_24); ZVAL_LONG(&_22, height); zephir_round(&_24, &_22, NULL, NULL); ZVAL_LONG(&_25, 1); - ZEPHIR_CALL_FUNCTION(&_26, "max", NULL, 89, &_24, &_25); + ZEPHIR_CALL_FUNCTION(&_26, "max", NULL, 90, &_24, &_25); zephir_check_call_status(); height = zephir_get_intval(&_26); ZVAL_LONG(&_25, width); @@ -893,19 +809,12 @@ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, rotate) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(degrees) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, °rees_param); - degrees = zephir_get_intval(degrees_param); - - if (degrees > 180) { degrees %= 360; if (degrees > 180) { @@ -945,17 +854,14 @@ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, save) ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(file) Z_PARAM_LONG(quality) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 2, &file_param, &quality_param); if (!file_param) { ZEPHIR_INIT_VAR(&file); @@ -965,12 +871,9 @@ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, save) if (!quality_param) { quality = -1; } else { - quality = zephir_get_intval(quality_param); - } - - + } if (Z_TYPE_P(&file) == IS_NULL) { - ZEPHIR_OBS_VAR(&_0$$3); + zephir_memory_observe(&_0$$3); zephir_read_property(&_0$$3, this_ptr, ZEND_STRL("realpath"), PH_NOISY_CC); zephir_cast_to_string(&_1$$3, &_0$$3); ZEPHIR_CPY_WRT(&file, &_1$$3); @@ -998,19 +901,12 @@ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, sharpen) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(amount) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &amount_param); - amount = zephir_get_intval(amount_param); - - ZVAL_LONG(&_1, amount); ZVAL_LONG(&_2, 1); ZEPHIR_CALL_METHOD(&_0, this_ptr, "checkhighlow", NULL, 0, &_1, &_2); @@ -1067,7 +963,6 @@ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, text) ZVAL_UNDEF(&_7$$4); ZVAL_UNDEF(&_8$$4); ZVAL_UNDEF(&_9$$4); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 7) Z_PARAM_STR(text) @@ -1079,10 +974,8 @@ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, text) Z_PARAM_LONG(size) Z_PARAM_STR_OR_NULL(fontFile) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 6, &text_param, &offsetX, &offsetY, &opacity_param, &color_param, &size_param, &fontFile_param); zephir_get_strval(&text, text_param); if (!offsetX) { @@ -1096,8 +989,7 @@ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, text) if (!opacity_param) { opacity = 100; } else { - opacity = zephir_get_intval(opacity_param); - } + } if (!color_param) { ZEPHIR_INIT_VAR(&color); ZVAL_STRING(&color, "000000"); @@ -1107,15 +999,12 @@ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, text) if (!size_param) { size = 12; } else { - size = zephir_get_intval(size_param); - } + } if (!fontFile_param) { ZEPHIR_INIT_VAR(&fontFile); } else { zephir_get_strval(&fontFile, fontFile_param); } - - ZVAL_LONG(&_1, opacity); ZEPHIR_CALL_METHOD(&_0, this_ptr, "checkhighlow", NULL, 0, &_1); zephir_check_call_status(); @@ -1139,16 +1028,16 @@ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, text) ZVAL_STRING(&_7$$4, "/./"); ZEPHIR_INIT_VAR(&_8$$4); ZVAL_STRING(&_8$$4, "$0$0"); - ZEPHIR_CALL_FUNCTION(&_9$$4, "preg_replace", NULL, 40, &_7$$4, &_8$$4, &color); + ZEPHIR_CALL_FUNCTION(&_9$$4, "preg_replace", NULL, 41, &_7$$4, &_8$$4, &color); zephir_check_call_status(); zephir_get_strval(&color, &_9$$4); } ZVAL_LONG(&_10, 2); - ZEPHIR_CALL_FUNCTION(&_11, "str_split", NULL, 87, &color, &_10); + ZEPHIR_CALL_FUNCTION(&_11, "str_split", NULL, 88, &color, &_10); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_12); ZVAL_STRING(&_12, "hexdec"); - ZEPHIR_CALL_FUNCTION(&colors, "array_map", NULL, 69, &_12, &_11); + ZEPHIR_CALL_FUNCTION(&colors, "array_map", NULL, 70, &_12, &_11); zephir_check_call_status(); zephir_array_fetch_long(&_13, &colors, 0, PH_NOISY | PH_READONLY, "phalcon/Image/Adapter/AbstractAdapter.zep", 495); zephir_array_fetch_long(&_14, &colors, 1, PH_NOISY | PH_READONLY, "phalcon/Image/Adapter/AbstractAdapter.zep", 496); @@ -1186,8 +1075,6 @@ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, watermark) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 4) Z_PARAM_OBJECT_OF_CLASS(watermark, phalcon_image_adapter_adapterinterface_ce) Z_PARAM_OPTIONAL @@ -1195,28 +1082,21 @@ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, watermark) Z_PARAM_LONG(offsetY) Z_PARAM_LONG(opacity) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 3, &watermark, &offsetX_param, &offsetY_param, &opacity_param); if (!offsetX_param) { offsetX = 0; } else { - offsetX = zephir_get_intval(offsetX_param); - } + } if (!offsetY_param) { offsetY = 0; } else { - offsetY = zephir_get_intval(offsetY_param); - } + } if (!opacity_param) { opacity = 100; } else { - opacity = zephir_get_intval(opacity_param); - } - - + } zephir_read_property(&_0, this_ptr, ZEND_STRL("width"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&_1, watermark, "getwidth", NULL, 0); zephir_check_call_status(); @@ -1256,43 +1136,33 @@ PHP_METHOD(Phalcon_Image_Adapter_AbstractAdapter, checkHighLow) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *value_param = NULL, *min_param = NULL, *max_param = NULL, _0, _1, _2; zend_long value, min, max, ZEPHIR_LAST_CALL_STATUS; - zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_LONG(value) Z_PARAM_OPTIONAL Z_PARAM_LONG(min) Z_PARAM_LONG(max) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &value_param, &min_param, &max_param); - value = zephir_get_intval(value_param); if (!min_param) { min = 0; } else { - min = zephir_get_intval(min_param); - } + } if (!max_param) { max = 100; } else { - max = zephir_get_intval(max_param); - } - - + } ZVAL_LONG(&_0, value); ZVAL_LONG(&_1, min); - ZEPHIR_CALL_FUNCTION(&_2, "max", NULL, 89, &_0, &_1); + ZEPHIR_CALL_FUNCTION(&_2, "max", NULL, 90, &_0, &_1); zephir_check_call_status(); ZVAL_LONG(&_0, max); - ZEPHIR_RETURN_CALL_FUNCTION("min", NULL, 90, &_0, &_2); + ZEPHIR_RETURN_CALL_FUNCTION("min", NULL, 91, &_0, &_2); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/image/adapter/abstractadapter.zep.h b/ext/phalcon/image/adapter/abstractadapter.zep.h index e2ef672b275..0554ada1a0d 100644 --- a/ext/phalcon/image/adapter/abstractadapter.zep.h +++ b/ext/phalcon/image/adapter/abstractadapter.zep.h @@ -130,11 +130,7 @@ ZEPHIR_INIT_FUNCS(phalcon_image_adapter_abstractadapter_method_entry) { PHP_ME(Phalcon_Image_Adapter_AbstractAdapter, crop, arginfo_phalcon_image_adapter_abstractadapter_crop, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Image_Adapter_AbstractAdapter, flip, arginfo_phalcon_image_adapter_abstractadapter_flip, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Image_Adapter_AbstractAdapter, getHeight, arginfo_phalcon_image_adapter_abstractadapter_getheight, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Image_Adapter_AbstractAdapter, getImage, arginfo_phalcon_image_adapter_abstractadapter_getimage, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Image_Adapter_AbstractAdapter, getImage, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Image_Adapter_AbstractAdapter, getImage, arginfo_phalcon_image_adapter_abstractadapter_getimage, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Image_Adapter_AbstractAdapter, getMime, arginfo_phalcon_image_adapter_abstractadapter_getmime, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Image_Adapter_AbstractAdapter, getRealpath, arginfo_phalcon_image_adapter_abstractadapter_getrealpath, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Image_Adapter_AbstractAdapter, getType, arginfo_phalcon_image_adapter_abstractadapter_gettype, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/image/adapter/gd.zep.c b/ext/phalcon/image/adapter/gd.zep.c index f529f8eaaeb..f92f530812f 100644 --- a/ext/phalcon/image/adapter/gd.zep.c +++ b/ext/phalcon/image/adapter/gd.zep.c @@ -14,8 +14,8 @@ #include "kernel/main.h" #include "kernel/fcall.h" #include "kernel/object.h" -#include "kernel/memory.h" #include "kernel/file.h" +#include "kernel/memory.h" #include "kernel/operators.h" #include "kernel/array.h" #include "kernel/exception.h" @@ -93,7 +93,6 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, __construct) ZVAL_UNDEF(&_27$$14); ZVAL_UNDEF(&_28$$14); ZVAL_UNDEF(&_29$$14); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(file) @@ -101,38 +100,32 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, __construct) Z_PARAM_LONG_OR_NULL(width, is_null_true) Z_PARAM_LONG_OR_NULL(height, is_null_true) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &file_param, &width_param, &height_param); zephir_get_strval(&file, file_param); if (!width_param) { width = 0; } else { - width = zephir_get_intval(width_param); - } + } if (!height_param) { height = 0; } else { - height = zephir_get_intval(height_param); - } - - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "check", NULL, 360); + } + ZEPHIR_CALL_METHOD(NULL, this_ptr, "check", NULL, 361); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("file"), &file); - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, 0); zephir_update_property_zval(this_ptr, ZEND_STRL("type"), &_0); zephir_read_property(&_0, this_ptr, ZEND_STRL("file"), PH_NOISY_CC | PH_READONLY); if (1 == (zephir_file_exists(&_0) == SUCCESS)) { zephir_read_property(&_1$$3, this_ptr, ZEND_STRL("file"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&_2$$3, "realpath", NULL, 74, &_1$$3); + ZEPHIR_CALL_FUNCTION(&_2$$3, "realpath", NULL, 75, &_1$$3); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("realpath"), &_2$$3); zephir_read_property(&_3$$3, this_ptr, ZEND_STRL("file"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&imageInfo, "getimagesize", NULL, 310, &_3$$3); + ZEPHIR_CALL_FUNCTION(&imageInfo, "getimagesize", NULL, 311, &_3$$3); zephir_check_call_status(); if (!ZEPHIR_IS_FALSE_IDENTICAL(&imageInfo)) { zephir_array_fetch_long(&_4$$4, &imageInfo, 0, PH_NOISY | PH_READONLY, "phalcon/Image/Adapter/Gd.zep", 42); @@ -144,47 +137,47 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, __construct) zephir_array_fetch_string(&_7$$4, &imageInfo, SL("mime"), PH_NOISY | PH_READONLY, "phalcon/Image/Adapter/Gd.zep", 45); zephir_update_property_zval(this_ptr, ZEND_STRL("mime"), &_7$$4); } - ZEPHIR_OBS_VAR(&_8$$3); + zephir_memory_observe(&_8$$3); zephir_read_property(&_8$$3, this_ptr, ZEND_STRL("type"), PH_NOISY_CC); do { if (ZEPHIR_IS_LONG(&_8$$3, 1)) { zephir_read_property(&_9$$5, this_ptr, ZEND_STRL("file"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&_10$$5, "imagecreatefromgif", NULL, 361, &_9$$5); + ZEPHIR_CALL_FUNCTION(&_10$$5, "imagecreatefromgif", NULL, 362, &_9$$5); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("image"), &_10$$5); break; } if (ZEPHIR_IS_LONG(&_8$$3, 2) || ZEPHIR_IS_LONG(&_8$$3, 9)) { zephir_read_property(&_11$$6, this_ptr, ZEND_STRL("file"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&_12$$6, "imagecreatefromjpeg", NULL, 362, &_11$$6); + ZEPHIR_CALL_FUNCTION(&_12$$6, "imagecreatefromjpeg", NULL, 363, &_11$$6); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("image"), &_12$$6); break; } if (ZEPHIR_IS_LONG(&_8$$3, 3)) { zephir_read_property(&_13$$7, this_ptr, ZEND_STRL("file"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&_14$$7, "imagecreatefrompng", NULL, 363, &_13$$7); + ZEPHIR_CALL_FUNCTION(&_14$$7, "imagecreatefrompng", NULL, 364, &_13$$7); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("image"), &_14$$7); break; } if (ZEPHIR_IS_LONG(&_8$$3, 18)) { zephir_read_property(&_15$$8, this_ptr, ZEND_STRL("file"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&_16$$8, "imagecreatefromwebp", NULL, 364, &_15$$8); + ZEPHIR_CALL_FUNCTION(&_16$$8, "imagecreatefromwebp", NULL, 365, &_15$$8); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("image"), &_16$$8); break; } if (ZEPHIR_IS_LONG(&_8$$3, 15)) { zephir_read_property(&_17$$9, this_ptr, ZEND_STRL("file"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&_18$$9, "imagecreatefromwbmp", NULL, 365, &_17$$9); + ZEPHIR_CALL_FUNCTION(&_18$$9, "imagecreatefromwbmp", NULL, 366, &_17$$9); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("image"), &_18$$9); break; } if (ZEPHIR_IS_LONG(&_8$$3, 16)) { zephir_read_property(&_19$$10, this_ptr, ZEND_STRL("file"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&_20$$10, "imagecreatefromxbm", NULL, 366, &_19$$10); + ZEPHIR_CALL_FUNCTION(&_20$$10, "imagecreatefromxbm", NULL, 367, &_19$$10); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("image"), &_20$$10); break; @@ -196,7 +189,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, __construct) zephir_read_property(&_23$$12, this_ptr, ZEND_STRL("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, &_22$$12, "__construct", NULL, 32, &_24$$12); + ZEPHIR_CALL_METHOD(NULL, &_22$$12, "__construct", NULL, 33, &_24$$12); zephir_check_call_status(); zephir_throw_exception_debug(&_22$$12, "phalcon/Image/Adapter/Gd.zep", 78); ZEPHIR_MM_RESTORE(); @@ -207,7 +200,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, __construct) } while(0); zephir_read_property(&_25$$3, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagesavealpha", NULL, 367, &_25$$3, &__$true); + ZEPHIR_CALL_FUNCTION(NULL, "imagesavealpha", NULL, 368, &_25$$3, &__$true); zephir_check_call_status(); } else { _26$$13 = 0 == width; @@ -220,7 +213,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, __construct) zephir_read_property(&_28$$14, this_ptr, ZEND_STRL("file"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_29$$14); ZEPHIR_CONCAT_SV(&_29$$14, "Failed to create image from file ", &_28$$14); - ZEPHIR_CALL_METHOD(NULL, &_27$$14, "__construct", NULL, 32, &_29$$14); + ZEPHIR_CALL_METHOD(NULL, &_27$$14, "__construct", NULL, 33, &_29$$14); zephir_check_call_status(); zephir_throw_exception_debug(&_27$$14, "phalcon/Image/Adapter/Gd.zep", 91); ZEPHIR_MM_RESTORE(); @@ -228,24 +221,24 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, __construct) } ZVAL_LONG(&_30$$13, width); ZVAL_LONG(&_31$$13, height); - ZEPHIR_CALL_FUNCTION(&_32$$13, "imagecreatetruecolor", NULL, 368, &_30$$13, &_31$$13); + ZEPHIR_CALL_FUNCTION(&_32$$13, "imagecreatetruecolor", NULL, 369, &_30$$13, &_31$$13); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("image"), &_32$$13); zephir_read_property(&_30$$13, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagealphablending", NULL, 369, &_30$$13, &__$true); + ZEPHIR_CALL_FUNCTION(NULL, "imagealphablending", NULL, 370, &_30$$13, &__$true); zephir_check_call_status(); zephir_read_property(&_31$$13, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagesavealpha", NULL, 367, &_31$$13, &__$true); + ZEPHIR_CALL_FUNCTION(NULL, "imagesavealpha", NULL, 368, &_31$$13, &__$true); zephir_check_call_status(); zephir_read_property(&_33$$13, this_ptr, ZEND_STRL("file"), PH_NOISY_CC | PH_READONLY); zephir_update_property_zval(this_ptr, ZEND_STRL("realpath"), &_33$$13); - ZEPHIR_INIT_ZVAL_NREF(_34$$13); + ZVAL_UNDEF(&_34$$13); ZVAL_LONG(&_34$$13, width); zephir_update_property_zval(this_ptr, ZEND_STRL("width"), &_34$$13); - ZEPHIR_INIT_ZVAL_NREF(_34$$13); + ZVAL_UNDEF(&_34$$13); ZVAL_LONG(&_34$$13, height); zephir_update_property_zval(this_ptr, ZEND_STRL("height"), &_34$$13); - ZEPHIR_INIT_ZVAL_NREF(_34$$13); + ZVAL_UNDEF(&_34$$13); ZVAL_LONG(&_34$$13, 3); zephir_update_property_zval(this_ptr, ZEND_STRL("type"), &_34$$13); ZEPHIR_INIT_VAR(&_35$$13); @@ -269,14 +262,13 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, __destruct) ZVAL_NULL(&__$null); ZVAL_UNDEF(&image); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&image, &_0); if (Z_TYPE_P(&image) != IS_NULL) { - ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 370, &image); + ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 371, &image); zephir_check_call_status(); } zephir_update_property_zval(this_ptr, ZEND_STRL("image"), &__$null); @@ -292,7 +284,6 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, getVersion) zval info, matches, version, _0, _1, _2$$5, _3$$5, _4$$5, _5$$5; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *this_ptr = getThis(); ZVAL_UNDEF(&info); ZVAL_UNDEF(&matches); @@ -303,9 +294,8 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, getVersion) ZVAL_UNDEF(&_3$$5); ZVAL_UNDEF(&_4$$5); ZVAL_UNDEF(&_5$$5); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); if (1 != (zephir_function_exists_ex(ZEND_STRL("gd_info")) == SUCCESS)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_image_exception_ce, "GD is either not installed or not enabled, check your configuration", "phalcon/Image/Adapter/Gd.zep", 134); @@ -315,13 +305,13 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, getVersion) ZVAL_NULL(&version); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "GD_VERSION"); - ZEPHIR_CALL_FUNCTION(&_1, "defined", NULL, 117, &_0); + ZEPHIR_CALL_FUNCTION(&_1, "defined", NULL, 118, &_0); zephir_check_call_status(); if (zephir_is_true(&_1)) { ZEPHIR_INIT_NVAR(&version); ZEPHIR_GET_CONSTANT(&version, "GD_VERSION"); } else { - ZEPHIR_CALL_FUNCTION(&info, "gd_info", NULL, 371); + ZEPHIR_CALL_FUNCTION(&info, "gd_info", NULL, 372); zephir_check_call_status(); ZEPHIR_INIT_VAR(&matches); ZVAL_NULL(&matches); @@ -370,28 +360,18 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processBackground) ZVAL_UNDEF(&_7); ZVAL_UNDEF(&_8); ZVAL_UNDEF(&_9); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(4, 4) Z_PARAM_LONG(red) Z_PARAM_LONG(green) Z_PARAM_LONG(blue) Z_PARAM_LONG(opacity) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 4, 0, &red_param, &green_param, &blue_param, &opacity_param); - red = zephir_get_intval(red_param); - green = zephir_get_intval(green_param); - blue = zephir_get_intval(blue_param); - opacity = zephir_get_intval(opacity_param); - - ZEPHIR_INIT_VAR(&_0); ZVAL_DOUBLE(&_1, ((zephir_safe_div_long_long((opacity * 127), 100)) - (double) (127))); - ZEPHIR_CALL_FUNCTION(&_2, "abs", NULL, 283, &_1); + ZEPHIR_CALL_FUNCTION(&_2, "abs", NULL, 284, &_1); zephir_check_call_status(); zephir_round(&_0, &_2, NULL, NULL); opacity = zephir_get_intval(&_0); @@ -405,9 +385,9 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processBackground) ZVAL_LONG(&_5, green); ZVAL_LONG(&_6, blue); ZVAL_LONG(&_7, opacity); - ZEPHIR_CALL_FUNCTION(&color, "imagecolorallocatealpha", NULL, 372, &background, &_4, &_5, &_6, &_7); + ZEPHIR_CALL_FUNCTION(&color, "imagecolorallocatealpha", NULL, 373, &background, &_4, &_5, &_6, &_7); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(NULL, "imagealphablending", NULL, 369, &background, &__$true); + ZEPHIR_CALL_FUNCTION(NULL, "imagealphablending", NULL, 370, &background, &__$true); zephir_check_call_status(); zephir_read_property(&_4, this_ptr, ZEND_STRL("width"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_5, this_ptr, ZEND_STRL("height"), PH_NOISY_CC | PH_READONLY); @@ -415,10 +395,10 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processBackground) ZVAL_LONG(&_7, 0); ZVAL_LONG(&_8, 0); ZVAL_LONG(&_9, 0); - ZEPHIR_CALL_FUNCTION(©, "imagecopy", NULL, 373, &background, &image, &_6, &_7, &_8, &_9, &_4, &_5); + ZEPHIR_CALL_FUNCTION(©, "imagecopy", NULL, 374, &background, &image, &_6, &_7, &_8, &_9, &_4, &_5); zephir_check_call_status(); if (!ZEPHIR_IS_FALSE_IDENTICAL(©)) { - ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 370, &image); + ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 371, &image); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("image"), &background); } @@ -440,19 +420,12 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processBlur) ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(radius) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &radius_param); - radius = zephir_get_intval(radius_param); - - counter = 0; while (1) { if (!(counter < radius)) { @@ -460,7 +433,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processBlur) } zephir_read_property(&_0$$3, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_1$$3, 7); - ZEPHIR_CALL_FUNCTION(NULL, "imagefilter", &_2, 374, &_0$$3, &_1$$3); + ZEPHIR_CALL_FUNCTION(NULL, "imagefilter", &_2, 375, &_0$$3, &_1$$3); zephir_check_call_status(); counter++; } @@ -478,35 +451,26 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processCreate) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *width_param = NULL, *height_param = NULL, __$false, __$true, image, _0, _1; zend_long width, height, ZEPHIR_LAST_CALL_STATUS; - zval *this_ptr = getThis(); ZVAL_BOOL(&__$false, 0); ZVAL_BOOL(&__$true, 1); ZVAL_UNDEF(&image); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_LONG(width) Z_PARAM_LONG(height) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &width_param, &height_param); - width = zephir_get_intval(width_param); - height = zephir_get_intval(height_param); - - ZVAL_LONG(&_0, width); ZVAL_LONG(&_1, height); - ZEPHIR_CALL_FUNCTION(&image, "imagecreatetruecolor", NULL, 368, &_0, &_1); + ZEPHIR_CALL_FUNCTION(&image, "imagecreatetruecolor", NULL, 369, &_0, &_1); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(NULL, "imagealphablending", NULL, 369, &image, &__$false); + ZEPHIR_CALL_FUNCTION(NULL, "imagealphablending", NULL, 370, &image, &__$false); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(NULL, "imagesavealpha", NULL, 367, &image, &__$true); + ZEPHIR_CALL_FUNCTION(NULL, "imagesavealpha", NULL, 368, &image, &__$true); zephir_check_call_status(); RETURN_CCTOR(&image); } @@ -534,25 +498,15 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processCrop) ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); ZVAL_UNDEF(&rect); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(4, 4) Z_PARAM_LONG(width) Z_PARAM_LONG(height) Z_PARAM_LONG(offsetX) Z_PARAM_LONG(offsetY) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 4, 0, &width_param, &height_param, &offsetX_param, &offsetY_param); - width = zephir_get_intval(width_param); - height = zephir_get_intval(height_param); - offsetX = zephir_get_intval(offsetX_param); - offsetY = zephir_get_intval(offsetY_param); - - ZEPHIR_INIT_VAR(&rect); zephir_create_array(&rect, 4, 0); ZEPHIR_INIT_VAR(&_0); @@ -568,16 +522,16 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processCrop) ZVAL_LONG(&_0, height); zephir_array_update_string(&rect, SL("height"), &_0, PH_COPY | PH_SEPARATE); zephir_read_property(&_1, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&image, "imagecrop", NULL, 375, &_1, &rect); + ZEPHIR_CALL_FUNCTION(&image, "imagecrop", NULL, 376, &_1, &rect); zephir_check_call_status(); zephir_read_property(&_2, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 370, &_2); + ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 371, &_2); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("image"), &image); - ZEPHIR_CALL_FUNCTION(&_3, "imagesx", NULL, 376, &image); + ZEPHIR_CALL_FUNCTION(&_3, "imagesx", NULL, 377, &image); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("width"), &_3); - ZEPHIR_CALL_FUNCTION(&_4, "imagesy", NULL, 377, &image); + ZEPHIR_CALL_FUNCTION(&_4, "imagesy", NULL, 378, &image); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("height"), &_4); ZEPHIR_MM_RESTORE(); @@ -599,28 +553,21 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processFlip) ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$4); ZVAL_UNDEF(&_3$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(direction) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &direction_param); - direction = zephir_get_intval(direction_param); - - if (direction == 11) { zephir_read_property(&_0$$3, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_1$$3, 1); - ZEPHIR_CALL_FUNCTION(NULL, "imageflip", NULL, 378, &_0$$3, &_1$$3); + ZEPHIR_CALL_FUNCTION(NULL, "imageflip", NULL, 379, &_0$$3, &_1$$3); zephir_check_call_status(); } else { zephir_read_property(&_2$$4, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_3$$4, 2); - ZEPHIR_CALL_FUNCTION(NULL, "imageflip", NULL, 378, &_2$$4, &_3$$4); + ZEPHIR_CALL_FUNCTION(NULL, "imageflip", NULL, 379, &_2$$4, &_3$$4); zephir_check_call_status(); } ZEPHIR_MM_RESTORE(); @@ -676,46 +623,40 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processMask) ZVAL_UNDEF(&_28$$5); ZVAL_UNDEF(&_25$$6); ZVAL_UNDEF(&_26$$6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(mask, phalcon_image_adapter_adapterinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &mask); - - ZEPHIR_CALL_METHOD(&_0, mask, "render", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&maskImage, "imagecreatefromstring", NULL, 379, &_0); + ZEPHIR_CALL_FUNCTION(&maskImage, "imagecreatefromstring", NULL, 380, &_0); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&_1, "imagesx", NULL, 376, &maskImage); + ZEPHIR_CALL_FUNCTION(&_1, "imagesx", NULL, 377, &maskImage); zephir_check_call_status(); maskWidth = zephir_get_intval(&_1); - ZEPHIR_CALL_FUNCTION(&_2, "imagesy", NULL, 377, &maskImage); + ZEPHIR_CALL_FUNCTION(&_2, "imagesy", NULL, 378, &maskImage); zephir_check_call_status(); maskHeight = zephir_get_intval(&_2); alpha = 127; - ZEPHIR_CALL_FUNCTION(NULL, "imagesavealpha", NULL, 367, &maskImage, &__$true); + ZEPHIR_CALL_FUNCTION(NULL, "imagesavealpha", NULL, 368, &maskImage, &__$true); zephir_check_call_status(); zephir_read_property(&_3, this_ptr, ZEND_STRL("width"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_4, this_ptr, ZEND_STRL("height"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&newImage, this_ptr, "processcreate", NULL, 0, &_3, &_4); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(NULL, "imagesavealpha", NULL, 367, &newImage, &__$true); + ZEPHIR_CALL_FUNCTION(NULL, "imagesavealpha", NULL, 368, &newImage, &__$true); zephir_check_call_status(); ZVAL_LONG(&_5, 0); ZVAL_LONG(&_6, 0); ZVAL_LONG(&_7, 0); ZVAL_LONG(&_8, alpha); - ZEPHIR_CALL_FUNCTION(&color, "imagecolorallocatealpha", NULL, 372, &newImage, &_5, &_6, &_7, &_8); + ZEPHIR_CALL_FUNCTION(&color, "imagecolorallocatealpha", NULL, 373, &newImage, &_5, &_6, &_7, &_8); zephir_check_call_status(); ZVAL_LONG(&_5, 0); ZVAL_LONG(&_6, 0); - ZEPHIR_CALL_FUNCTION(NULL, "imagefill", NULL, 380, &newImage, &_5, &_6, &color); + ZEPHIR_CALL_FUNCTION(NULL, "imagefill", NULL, 381, &newImage, &_5, &_6, &color); zephir_check_call_status(); zephir_read_property(&_5, this_ptr, ZEND_STRL("width"), PH_NOISY_CC | PH_READONLY); _9 = !ZEPHIR_IS_LONG_IDENTICAL(&_5, maskWidth); @@ -726,7 +667,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processMask) if (_9) { zephir_read_property(&_10$$3, this_ptr, ZEND_STRL("width"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_11$$3, this_ptr, ZEND_STRL("height"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&tempImage, "imagecreatetruecolor", NULL, 368, &_10$$3, &_11$$3); + ZEPHIR_CALL_FUNCTION(&tempImage, "imagecreatetruecolor", NULL, 369, &_10$$3, &_11$$3); zephir_check_call_status(); zephir_read_property(&_12$$3, this_ptr, ZEND_STRL("width"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_13$$3, this_ptr, ZEND_STRL("height"), PH_NOISY_CC | PH_READONLY); @@ -736,9 +677,9 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processMask) ZVAL_LONG(&_17$$3, 0); ZVAL_LONG(&_18$$3, maskWidth); ZVAL_LONG(&_19$$3, maskHeight); - ZEPHIR_CALL_FUNCTION(NULL, "imagecopyresampled", NULL, 381, &tempImage, &maskImage, &_14$$3, &_15$$3, &_16$$3, &_17$$3, &_12$$3, &_13$$3, &_18$$3, &_19$$3); + ZEPHIR_CALL_FUNCTION(NULL, "imagecopyresampled", NULL, 382, &tempImage, &maskImage, &_14$$3, &_15$$3, &_16$$3, &_17$$3, &_12$$3, &_13$$3, &_18$$3, &_19$$3); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 370, &maskImage); + ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 371, &maskImage); zephir_check_call_status(); ZEPHIR_CPY_WRT(&maskImage, &tempImage); } @@ -756,9 +697,9 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processMask) } ZVAL_LONG(&_21$$5, x); ZVAL_LONG(&_22$$5, y); - ZEPHIR_CALL_FUNCTION(&index, "imagecolorat", &_23, 382, &maskImage, &_21$$5, &_22$$5); + ZEPHIR_CALL_FUNCTION(&index, "imagecolorat", &_23, 383, &maskImage, &_21$$5, &_22$$5); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&color, "imagecolorsforindex", &_24, 383, &maskImage, &index); + ZEPHIR_CALL_FUNCTION(&color, "imagecolorsforindex", &_24, 384, &maskImage, &index); zephir_check_call_status(); if (1 == zephir_array_isset_string(&color, SL("red"))) { zephir_array_fetch_string(&_25$$6, &color, SL("red"), PH_NOISY | PH_READONLY, "phalcon/Image/Adapter/Gd.zep", 348); @@ -768,10 +709,10 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processMask) zephir_read_property(&_21$$5, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_22$$5, x); ZVAL_LONG(&_27$$5, y); - ZEPHIR_CALL_FUNCTION(&index, "imagecolorat", &_23, 382, &_21$$5, &_22$$5, &_27$$5); + ZEPHIR_CALL_FUNCTION(&index, "imagecolorat", &_23, 383, &_21$$5, &_22$$5, &_27$$5); zephir_check_call_status(); zephir_read_property(&_22$$5, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&color, "imagecolorsforindex", &_24, 383, &_22$$5, &index); + ZEPHIR_CALL_FUNCTION(&color, "imagecolorsforindex", &_24, 384, &_22$$5, &index); zephir_check_call_status(); ZEPHIR_OBS_NVAR(&red); zephir_array_fetch_string(&red, &color, SL("red"), PH_NOISY, "phalcon/Image/Adapter/Gd.zep", 353); @@ -780,20 +721,20 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processMask) ZEPHIR_OBS_NVAR(&blue); zephir_array_fetch_string(&blue, &color, SL("blue"), PH_NOISY, "phalcon/Image/Adapter/Gd.zep", 355); ZVAL_LONG(&_27$$5, alpha); - ZEPHIR_CALL_FUNCTION(&color, "imagecolorallocatealpha", NULL, 372, &newImage, &red, &green, &blue, &_27$$5); + ZEPHIR_CALL_FUNCTION(&color, "imagecolorallocatealpha", NULL, 373, &newImage, &red, &green, &blue, &_27$$5); zephir_check_call_status(); ZVAL_LONG(&_27$$5, x); ZVAL_LONG(&_28$$5, y); - ZEPHIR_CALL_FUNCTION(NULL, "imagesetpixel", &_29, 384, &newImage, &_27$$5, &_28$$5, &color); + ZEPHIR_CALL_FUNCTION(NULL, "imagesetpixel", &_29, 385, &newImage, &_27$$5, &_28$$5, &color); zephir_check_call_status(); y++; } x++; } zephir_read_property(&_8, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 370, &_8); + ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 371, &_8); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 370, &maskImage); + ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 371, &maskImage); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("image"), &newImage); ZEPHIR_MM_RESTORE(); @@ -824,19 +765,12 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processPixelate) ZVAL_UNDEF(&_6$$4); ZVAL_UNDEF(&_7$$4); ZVAL_UNDEF(&_9$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(amount) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &amount_param); - amount = zephir_get_intval(amount_param); - - x = 0; while (1) { zephir_read_property(&_0, this_ptr, ZEND_STRL("width"), PH_NOISY_CC | PH_READONLY); @@ -863,7 +797,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processPixelate) zephir_read_property(&_5$$4, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_6$$4, x1); ZVAL_LONG(&_7$$4, y1); - ZEPHIR_CALL_FUNCTION(&color, "imagecolorat", &_8, 382, &_5$$4, &_6$$4, &_7$$4); + ZEPHIR_CALL_FUNCTION(&color, "imagecolorat", &_8, 383, &_5$$4, &_6$$4, &_7$$4); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&x2); ZVAL_LONG(&x2, (x + amount)); @@ -872,7 +806,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processPixelate) zephir_read_property(&_6$$4, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_7$$4, x); ZVAL_LONG(&_9$$4, y); - ZEPHIR_CALL_FUNCTION(NULL, "imagefilledrectangle", &_10, 385, &_6$$4, &_7$$4, &_9$$4, &x2, &y2, &color); + ZEPHIR_CALL_FUNCTION(NULL, "imagefilledrectangle", &_10, 386, &_6$$4, &_7$$4, &_9$$4, &x2, &y2, &color); zephir_check_call_status(); y += amount; } @@ -927,26 +861,17 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processReflection) ZVAL_UNDEF(&_14$$6); ZVAL_UNDEF(&_15$$7); ZVAL_UNDEF(&_16$$7); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_LONG(height) Z_PARAM_LONG(opacity) Z_PARAM_BOOL(fadeIn) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &height_param, &opacity_param, &fadeIn_param); - height = zephir_get_intval(height_param); - opacity = zephir_get_intval(opacity_param); - fadeIn = zephir_get_boolval(fadeIn_param); - - ZEPHIR_INIT_VAR(&_0); ZVAL_DOUBLE(&_1, ((zephir_safe_div_long_long((opacity * 127), 100)) - (double) (127))); - ZEPHIR_CALL_FUNCTION(&_2, "abs", NULL, 283, &_1); + ZEPHIR_CALL_FUNCTION(&_2, "abs", NULL, 284, &_1); zephir_check_call_status(); zephir_round(&_0, &_2, NULL, NULL); opacity = zephir_get_intval(&_0); @@ -967,7 +892,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processReflection) ZVAL_LONG(&_8, 0); ZVAL_LONG(&_9, 0); ZVAL_LONG(&_10, 0); - ZEPHIR_CALL_FUNCTION(NULL, "imagecopy", NULL, 373, &reflection, &_4, &_7, &_8, &_9, &_10, &_5, &_6); + ZEPHIR_CALL_FUNCTION(NULL, "imagecopy", NULL, 374, &reflection, &_4, &_7, &_8, &_9, &_10, &_5, &_6); zephir_check_call_status(); offset = 0; while (1) { @@ -1000,14 +925,14 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processReflection) ZVAL_LONG(&_22$$5, 0); ZVAL_LONG(&_23$$5, sourceY); ZVAL_LONG(&_24$$5, 1); - ZEPHIR_CALL_FUNCTION(NULL, "imagecopy", NULL, 373, &line, &_18$$5, &_20$$5, &_21$$5, &_22$$5, &_23$$5, &_19$$5, &_24$$5); + ZEPHIR_CALL_FUNCTION(NULL, "imagecopy", NULL, 374, &line, &_18$$5, &_20$$5, &_21$$5, &_22$$5, &_23$$5, &_19$$5, &_24$$5); zephir_check_call_status(); ZVAL_LONG(&_20$$5, 4); ZVAL_LONG(&_21$$5, 0); ZVAL_LONG(&_22$$5, 0); ZVAL_LONG(&_23$$5, 0); ZVAL_LONG(&_24$$5, destinationOpacity); - ZEPHIR_CALL_FUNCTION(NULL, "imagefilter", &_25, 374, &line, &_20$$5, &_21$$5, &_22$$5, &_23$$5, &_24$$5); + ZEPHIR_CALL_FUNCTION(NULL, "imagefilter", &_25, 375, &line, &_20$$5, &_21$$5, &_22$$5, &_23$$5, &_24$$5); zephir_check_call_status(); zephir_read_property(&_20$$5, this_ptr, ZEND_STRL("width"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_21$$5, 0); @@ -1015,18 +940,18 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processReflection) ZVAL_LONG(&_23$$5, 0); ZVAL_LONG(&_24$$5, 0); ZVAL_LONG(&_26$$5, 1); - ZEPHIR_CALL_FUNCTION(NULL, "imagecopy", NULL, 373, &reflection, &line, &_21$$5, &_22$$5, &_23$$5, &_24$$5, &_20$$5, &_26$$5); + ZEPHIR_CALL_FUNCTION(NULL, "imagecopy", NULL, 374, &reflection, &line, &_21$$5, &_22$$5, &_23$$5, &_24$$5, &_20$$5, &_26$$5); zephir_check_call_status(); offset++; } zephir_read_property(&_7, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 370, &_7); + ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 371, &_7); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("image"), &reflection); - ZEPHIR_CALL_FUNCTION(&_27, "imagesx", NULL, 376, &reflection); + ZEPHIR_CALL_FUNCTION(&_27, "imagesx", NULL, 377, &reflection); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("width"), &_27); - ZEPHIR_CALL_FUNCTION(&_28, "imagesy", NULL, 377, &reflection); + ZEPHIR_CALL_FUNCTION(&_28, "imagesy", NULL, 378, &reflection); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("height"), &_28); ZEPHIR_MM_RESTORE(); @@ -1059,61 +984,54 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processRender) ZVAL_UNDEF(&_6$$7); ZVAL_UNDEF(&_7$$8); ZVAL_UNDEF(&_8$$9); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(extension) Z_PARAM_LONG(quality) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &extension_param, &quality_param); zephir_get_strval(&extension, extension_param); - quality = zephir_get_intval(quality_param); - - ZEPHIR_INIT_VAR(&_0); zephir_fast_strtolower(&_0, &extension); zephir_get_strval(&extension, &_0); - ZEPHIR_CALL_FUNCTION(NULL, "ob_start", NULL, 386); + ZEPHIR_CALL_FUNCTION(NULL, "ob_start", NULL, 387); zephir_check_call_status(); do { if (ZEPHIR_IS_STRING(&extension, "gif")) { zephir_read_property(&_1$$3, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagegif", NULL, 387, &_1$$3); + ZEPHIR_CALL_FUNCTION(NULL, "imagegif", NULL, 388, &_1$$3); zephir_check_call_status(); break; } if (ZEPHIR_IS_STRING(&extension, "jpg") || ZEPHIR_IS_STRING(&extension, "jpeg")) { zephir_read_property(&_2$$4, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_3$$4, quality); - ZEPHIR_CALL_FUNCTION(NULL, "imagejpeg", NULL, 388, &_2$$4, &__$null, &_3$$4); + ZEPHIR_CALL_FUNCTION(NULL, "imagejpeg", NULL, 389, &_2$$4, &__$null, &_3$$4); zephir_check_call_status(); break; } if (ZEPHIR_IS_STRING(&extension, "png")) { zephir_read_property(&_4$$5, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagepng", NULL, 389, &_4$$5); + ZEPHIR_CALL_FUNCTION(NULL, "imagepng", NULL, 390, &_4$$5); zephir_check_call_status(); break; } if (ZEPHIR_IS_STRING(&extension, "wbmp")) { zephir_read_property(&_5$$6, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagewbmp", NULL, 390, &_5$$6); + ZEPHIR_CALL_FUNCTION(NULL, "imagewbmp", NULL, 391, &_5$$6); zephir_check_call_status(); break; } if (ZEPHIR_IS_STRING(&extension, "webp")) { zephir_read_property(&_6$$7, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagewebp", NULL, 391, &_6$$7); + ZEPHIR_CALL_FUNCTION(NULL, "imagewebp", NULL, 392, &_6$$7); zephir_check_call_status(); break; } if (ZEPHIR_IS_STRING(&extension, "xbm")) { zephir_read_property(&_7$$8, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagexbm", NULL, 392, &_7$$8, &__$null); + ZEPHIR_CALL_FUNCTION(NULL, "imagexbm", NULL, 393, &_7$$8, &__$null); zephir_check_call_status(); break; } @@ -1121,14 +1039,14 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processRender) object_init_ex(&_8$$9, phalcon_image_exception_ce); ZEPHIR_INIT_VAR(&_9$$9); ZEPHIR_CONCAT_SVS(&_9$$9, "Installed GD does not support '", &extension, "' images"); - ZEPHIR_CALL_METHOD(NULL, &_8$$9, "__construct", NULL, 32, &_9$$9); + ZEPHIR_CALL_METHOD(NULL, &_8$$9, "__construct", NULL, 33, &_9$$9); zephir_check_call_status(); zephir_throw_exception_debug(&_8$$9, "phalcon/Image/Adapter/Gd.zep", 552); ZEPHIR_MM_RESTORE(); return; } while(0); - ZEPHIR_RETURN_CALL_FUNCTION("ob_get_clean", NULL, 393); + ZEPHIR_RETURN_CALL_FUNCTION("ob_get_clean", NULL, 394); zephir_check_call_status(); RETURN_MM(); } @@ -1152,34 +1070,26 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processResize) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_LONG(width) Z_PARAM_LONG(height) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &width_param, &height_param); - width = zephir_get_intval(width_param); - height = zephir_get_intval(height_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_1, width); ZVAL_LONG(&_2, height); - ZEPHIR_CALL_FUNCTION(&image, "imagescale", NULL, 394, &_0, &_1, &_2); + ZEPHIR_CALL_FUNCTION(&image, "imagescale", NULL, 395, &_0, &_1, &_2); zephir_check_call_status(); zephir_read_property(&_1, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 370, &_1); + ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 371, &_1); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("image"), &image); - ZEPHIR_CALL_FUNCTION(&_3, "imagesx", NULL, 376, &image); + ZEPHIR_CALL_FUNCTION(&_3, "imagesx", NULL, 377, &image); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("width"), &_3); - ZEPHIR_CALL_FUNCTION(&_4, "imagesy", NULL, 377, &image); + ZEPHIR_CALL_FUNCTION(&_4, "imagesy", NULL, 378, &image); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("height"), &_4); ZEPHIR_MM_RESTORE(); @@ -1212,35 +1122,28 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processRotate) ZVAL_UNDEF(&_6); ZVAL_UNDEF(&_7); ZVAL_UNDEF(&_8$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(degrees) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, °rees_param); - degrees = zephir_get_intval(degrees_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_1, 0); ZVAL_LONG(&_2, 0); ZVAL_LONG(&_3, 0); ZVAL_LONG(&_4, 127); - ZEPHIR_CALL_FUNCTION(&transparent, "imagecolorallocatealpha", NULL, 372, &_0, &_1, &_2, &_3, &_4); + ZEPHIR_CALL_FUNCTION(&transparent, "imagecolorallocatealpha", NULL, 373, &_0, &_1, &_2, &_3, &_4); zephir_check_call_status(); zephir_read_property(&_1, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_2, (360 - degrees)); - ZEPHIR_CALL_FUNCTION(&image, "imagerotate", NULL, 395, &_1, &_2, &transparent); + ZEPHIR_CALL_FUNCTION(&image, "imagerotate", NULL, 396, &_1, &_2, &transparent); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(NULL, "imagesavealpha", NULL, 367, &image, &__$true); + ZEPHIR_CALL_FUNCTION(NULL, "imagesavealpha", NULL, 368, &image, &__$true); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&width, "imagesx", NULL, 376, &image); + ZEPHIR_CALL_FUNCTION(&width, "imagesx", NULL, 377, &image); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&height, "imagesy", NULL, 377, &image); + ZEPHIR_CALL_FUNCTION(&height, "imagesy", NULL, 378, &image); zephir_check_call_status(); zephir_read_property(&_2, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_3, 0); @@ -1248,11 +1151,11 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processRotate) ZVAL_LONG(&_5, 0); ZVAL_LONG(&_6, 0); ZVAL_LONG(&_7, 100); - ZEPHIR_CALL_FUNCTION(©, "imagecopymerge", NULL, 396, &_2, &image, &_3, &_4, &_5, &_6, &width, &height, &_7); + ZEPHIR_CALL_FUNCTION(©, "imagecopymerge", NULL, 397, &_2, &image, &_3, &_4, &_5, &_6, &width, &height, &_7); zephir_check_call_status(); if (!ZEPHIR_IS_FALSE_IDENTICAL(©)) { zephir_read_property(&_8$$3, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 370, &_8$$3); + ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 371, &_8$$3); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("image"), &image); zephir_update_property_zval(this_ptr, ZEND_STRL("width"), &width); @@ -1295,27 +1198,20 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processSave) ZVAL_UNDEF(&_12$$11); ZVAL_UNDEF(&_13$$12); ZVAL_UNDEF(&_14$$12); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(file) Z_PARAM_LONG(quality) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &file_param, &quality_param); zephir_get_strval(&file, file_param); - quality = zephir_get_intval(quality_param); - - ZVAL_LONG(&_0, 4); - ZEPHIR_CALL_FUNCTION(&extension, "pathinfo", NULL, 88, &file, &_0); + ZEPHIR_CALL_FUNCTION(&extension, "pathinfo", NULL, 89, &file, &_0); zephir_check_call_status(); if (1 == ZEPHIR_IS_EMPTY(&extension)) { zephir_read_property(&_1$$3, this_ptr, ZEND_STRL("type"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&extension, "image_type_to_extension", NULL, 397, &_1$$3, &__$false); + ZEPHIR_CALL_FUNCTION(&extension, "image_type_to_extension", NULL, 398, &_1$$3, &__$false); zephir_check_call_status(); } ZEPHIR_INIT_VAR(&_2); @@ -1323,16 +1219,16 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processSave) ZEPHIR_CPY_WRT(&extension, &_2); do { if (ZEPHIR_IS_STRING(&extension, "gif")) { - ZEPHIR_INIT_ZVAL_NREF(_3$$4); + ZVAL_UNDEF(&_3$$4); ZVAL_LONG(&_3$$4, 1); zephir_update_property_zval(this_ptr, ZEND_STRL("type"), &_3$$4); zephir_read_property(&_3$$4, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagegif", NULL, 387, &_3$$4, &file); + ZEPHIR_CALL_FUNCTION(NULL, "imagegif", NULL, 388, &_3$$4, &file); zephir_check_call_status(); break; } if (ZEPHIR_IS_STRING(&extension, "jpg") || ZEPHIR_IS_STRING(&extension, "jpeg")) { - ZEPHIR_INIT_ZVAL_NREF(_4$$5); + ZVAL_UNDEF(&_4$$5); ZVAL_LONG(&_4$$5, 2); zephir_update_property_zval(this_ptr, ZEND_STRL("type"), &_4$$5); if (quality >= 0) { @@ -1343,48 +1239,48 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processSave) quality = zephir_get_numberval(&_5$$6); zephir_read_property(&_6$$6, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_7$$6, quality); - ZEPHIR_CALL_FUNCTION(NULL, "imagejpeg", NULL, 388, &_6$$6, &file, &_7$$6); + ZEPHIR_CALL_FUNCTION(NULL, "imagejpeg", NULL, 389, &_6$$6, &file, &_7$$6); zephir_check_call_status(); } else { zephir_read_property(&_8$$7, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagejpeg", NULL, 388, &_8$$7, &file); + ZEPHIR_CALL_FUNCTION(NULL, "imagejpeg", NULL, 389, &_8$$7, &file); zephir_check_call_status(); } break; } if (ZEPHIR_IS_STRING(&extension, "png")) { - ZEPHIR_INIT_ZVAL_NREF(_9$$8); + ZVAL_UNDEF(&_9$$8); ZVAL_LONG(&_9$$8, 3); zephir_update_property_zval(this_ptr, ZEND_STRL("type"), &_9$$8); zephir_read_property(&_9$$8, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagepng", NULL, 389, &_9$$8, &file); + ZEPHIR_CALL_FUNCTION(NULL, "imagepng", NULL, 390, &_9$$8, &file); zephir_check_call_status(); break; } if (ZEPHIR_IS_STRING(&extension, "wbmp")) { - ZEPHIR_INIT_ZVAL_NREF(_10$$9); + ZVAL_UNDEF(&_10$$9); ZVAL_LONG(&_10$$9, 15); zephir_update_property_zval(this_ptr, ZEND_STRL("type"), &_10$$9); zephir_read_property(&_10$$9, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagewbmp", NULL, 390, &_10$$9, &file); + ZEPHIR_CALL_FUNCTION(NULL, "imagewbmp", NULL, 391, &_10$$9, &file); zephir_check_call_status(); break; } if (ZEPHIR_IS_STRING(&extension, "webp")) { - ZEPHIR_INIT_ZVAL_NREF(_11$$10); + ZVAL_UNDEF(&_11$$10); ZVAL_LONG(&_11$$10, 18); zephir_update_property_zval(this_ptr, ZEND_STRL("type"), &_11$$10); zephir_read_property(&_11$$10, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagewebp", NULL, 391, &_11$$10, &file); + ZEPHIR_CALL_FUNCTION(NULL, "imagewebp", NULL, 392, &_11$$10, &file); zephir_check_call_status(); break; } if (ZEPHIR_IS_STRING(&extension, "xbm")) { - ZEPHIR_INIT_ZVAL_NREF(_12$$11); + ZVAL_UNDEF(&_12$$11); ZVAL_LONG(&_12$$11, 16); zephir_update_property_zval(this_ptr, ZEND_STRL("type"), &_12$$11); zephir_read_property(&_12$$11, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagexbm", NULL, 392, &_12$$11, &file); + ZEPHIR_CALL_FUNCTION(NULL, "imagexbm", NULL, 393, &_12$$11, &file); zephir_check_call_status(); break; } @@ -1392,7 +1288,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processSave) object_init_ex(&_13$$12, phalcon_image_exception_ce); ZEPHIR_INIT_VAR(&_14$$12); ZEPHIR_CONCAT_SVS(&_14$$12, "Installed GD does not support '", &extension, "' images"); - ZEPHIR_CALL_METHOD(NULL, &_13$$12, "__construct", NULL, 32, &_14$$12); + ZEPHIR_CALL_METHOD(NULL, &_13$$12, "__construct", NULL, 33, &_14$$12); zephir_check_call_status(); zephir_throw_exception_debug(&_13$$12, "phalcon/Image/Adapter/Gd.zep", 679); ZEPHIR_MM_RESTORE(); @@ -1400,7 +1296,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processSave) } while(0); zephir_read_property(&_0, this_ptr, ZEND_STRL("type"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&_15, "image_type_to_mime_type", NULL, 398, &_0); + ZEPHIR_CALL_FUNCTION(&_15, "image_type_to_mime_type", NULL, 399, &_0); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("mime"), &_15); RETURN_MM_BOOL(1); @@ -1433,22 +1329,15 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processSharpen) ZVAL_UNDEF(&_11$$3); ZVAL_UNDEF(&matrix); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(amount) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &amount_param); - amount = zephir_get_intval(amount_param); - - ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_1, (-18 + ((amount * 0.08)))); - ZEPHIR_CALL_FUNCTION(&_2, "abs", NULL, 283, &_1); + ZEPHIR_CALL_FUNCTION(&_2, "abs", NULL, 284, &_1); zephir_check_call_status(); ZVAL_LONG(&_1, 2); zephir_round(&_0, &_2, &_1, NULL); @@ -1494,15 +1383,15 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processSharpen) zephir_read_property(&_5, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_6, (amount - 8)); ZVAL_LONG(&_7, 0); - ZEPHIR_CALL_FUNCTION(&result, "imageconvolution", NULL, 399, &_5, &matrix, &_6, &_7); + ZEPHIR_CALL_FUNCTION(&result, "imageconvolution", NULL, 400, &_5, &matrix, &_6, &_7); zephir_check_call_status(); if (ZEPHIR_IS_TRUE_IDENTICAL(&result)) { zephir_read_property(&_8$$3, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&_9$$3, "imagesx", NULL, 376, &_8$$3); + ZEPHIR_CALL_FUNCTION(&_9$$3, "imagesx", NULL, 377, &_8$$3); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("width"), &_9$$3); zephir_read_property(&_10$$3, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&_11$$3, "imagesy", NULL, 377, &_10$$3); + ZEPHIR_CALL_FUNCTION(&_11$$3, "imagesy", NULL, 378, &_10$$3); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("height"), &_11$$3); } @@ -1571,7 +1460,6 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processText) ZVAL_UNDEF(&_27$$10); ZVAL_UNDEF(&_28$$10); ZVAL_UNDEF(&_29$$10); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(8, 9) Z_PARAM_STR(text) @@ -1585,26 +1473,17 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processText) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(fontFile) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 8, 1, &text_param, &offsetX, &offsetY, &opacity_param, &red_param, &green_param, &blue_param, &size_param, &fontFile_param); zephir_get_strval(&text, text_param); ZEPHIR_SEPARATE_PARAM(offsetX); ZEPHIR_SEPARATE_PARAM(offsetY); - opacity = zephir_get_intval(opacity_param); - red = zephir_get_intval(red_param); - green = zephir_get_intval(green_param); - blue = zephir_get_intval(blue_param); - size = zephir_get_intval(size_param); if (!fontFile_param) { ZEPHIR_INIT_VAR(&fontFile); } else { zephir_get_strval(&fontFile, fontFile_param); } - - bottomLeftX = 0; bottomLeftY = 0; topRightX = 0; @@ -1617,7 +1496,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processText) ZVAL_LONG(offsetY, _1); ZEPHIR_INIT_VAR(&_2); ZVAL_DOUBLE(&_3, ((zephir_safe_div_long_long((opacity * 127), 100)) - (double) (127))); - ZEPHIR_CALL_FUNCTION(&_4, "abs", NULL, 283, &_3); + ZEPHIR_CALL_FUNCTION(&_4, "abs", NULL, 284, &_3); zephir_check_call_status(); zephir_round(&_2, &_4, NULL, NULL); opacity = zephir_get_intval(&_2); @@ -1625,32 +1504,32 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processText) if (1 != ZEPHIR_IS_EMPTY(&fontFile)) { ZVAL_LONG(&_5$$3, size); ZVAL_LONG(&_6$$3, 0); - ZEPHIR_CALL_FUNCTION(&space, "imagettfbbox", NULL, 400, &_5$$3, &_6$$3, &fontFile, &text); + ZEPHIR_CALL_FUNCTION(&space, "imagettfbbox", NULL, 401, &_5$$3, &_6$$3, &fontFile, &text); zephir_check_call_status(); if (ZEPHIR_IS_FALSE_IDENTICAL(&space)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_image_exception_ce, "Call to imagettfbbox() failed", "phalcon/Image/Adapter/Gd.zep", 758); return; } if (1 == zephir_array_isset_long(&space, 0)) { - ZEPHIR_OBS_VAR(&_7$$5); + zephir_memory_observe(&_7$$5); zephir_array_fetch_long(&_7$$5, &space, 0, PH_NOISY, "phalcon/Image/Adapter/Gd.zep", 762); bottomLeftX = zephir_get_intval(&_7$$5); - ZEPHIR_OBS_VAR(&_8$$5); + zephir_memory_observe(&_8$$5); zephir_array_fetch_long(&_8$$5, &space, 1, PH_NOISY, "phalcon/Image/Adapter/Gd.zep", 763); bottomLeftY = zephir_get_intval(&_8$$5); - ZEPHIR_OBS_VAR(&_9$$5); + zephir_memory_observe(&_9$$5); zephir_array_fetch_long(&_9$$5, &space, 4, PH_NOISY, "phalcon/Image/Adapter/Gd.zep", 764); topRightX = zephir_get_intval(&_9$$5); - ZEPHIR_OBS_VAR(&_10$$5); + zephir_memory_observe(&_10$$5); zephir_array_fetch_long(&_10$$5, &space, 5, PH_NOISY, "phalcon/Image/Adapter/Gd.zep", 765); topRightY = zephir_get_intval(&_10$$5); } ZVAL_LONG(&_5$$3, (topRightX - bottomLeftX)); - ZEPHIR_CALL_FUNCTION(&_11$$3, "abs", NULL, 283, &_5$$3); + ZEPHIR_CALL_FUNCTION(&_11$$3, "abs", NULL, 284, &_5$$3); zephir_check_call_status(); ZVAL_LONG(&width, (zephir_get_numberval(&_11$$3) + 10)); ZVAL_LONG(&_5$$3, (topRightY - bottomLeftY)); - ZEPHIR_CALL_FUNCTION(&_12$$3, "abs", NULL, 283, &_5$$3); + ZEPHIR_CALL_FUNCTION(&_12$$3, "abs", NULL, 284, &_5$$3); zephir_check_call_status(); ZEPHIR_INIT_VAR(&height); ZVAL_LONG(&height, (zephir_get_numberval(&_12$$3) + 10)); @@ -1675,21 +1554,21 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processText) ZVAL_LONG(&_19$$3, green); ZVAL_LONG(&_20$$3, blue); ZVAL_LONG(&_21$$3, opacity); - ZEPHIR_CALL_FUNCTION(&color, "imagecolorallocatealpha", NULL, 372, &_5$$3, &_6$$3, &_19$$3, &_20$$3, &_21$$3); + ZEPHIR_CALL_FUNCTION(&color, "imagecolorallocatealpha", NULL, 373, &_5$$3, &_6$$3, &_19$$3, &_20$$3, &_21$$3); zephir_check_call_status(); angle = 0; zephir_read_property(&_6$$3, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_19$$3, size); ZVAL_LONG(&_20$$3, angle); - ZEPHIR_CALL_FUNCTION(NULL, "imagettftext", NULL, 401, &_6$$3, &_19$$3, &_20$$3, offsetX, offsetY, &color, &fontFile, &text); + ZEPHIR_CALL_FUNCTION(NULL, "imagettftext", NULL, 402, &_6$$3, &_19$$3, &_20$$3, offsetX, offsetY, &color, &fontFile, &text); zephir_check_call_status(); } else { ZVAL_LONG(&_22$$8, size); - ZEPHIR_CALL_FUNCTION(&_23$$8, "imagefontwidth", NULL, 402, &_22$$8); + ZEPHIR_CALL_FUNCTION(&_23$$8, "imagefontwidth", NULL, 403, &_22$$8); zephir_check_call_status(); ZVAL_LONG(&width, (zephir_get_numberval(&_23$$8) * zephir_fast_strlen_ev(&text))); ZVAL_LONG(&_22$$8, size); - ZEPHIR_CALL_FUNCTION(&height, "imagefontheight", NULL, 403, &_22$$8); + ZEPHIR_CALL_FUNCTION(&height, "imagefontheight", NULL, 404, &_22$$8); zephir_check_call_status(); if (ZEPHIR_LT_LONG(offsetX, 0)) { zephir_read_property(&_24$$9, this_ptr, ZEND_STRL("width"), PH_NOISY_CC | PH_READONLY); @@ -1712,11 +1591,11 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processText) ZVAL_LONG(&_31$$8, green); ZVAL_LONG(&_32$$8, blue); ZVAL_LONG(&_33$$8, opacity); - ZEPHIR_CALL_FUNCTION(&color, "imagecolorallocatealpha", NULL, 372, &_22$$8, &_30$$8, &_31$$8, &_32$$8, &_33$$8); + ZEPHIR_CALL_FUNCTION(&color, "imagecolorallocatealpha", NULL, 373, &_22$$8, &_30$$8, &_31$$8, &_32$$8, &_33$$8); zephir_check_call_status(); zephir_read_property(&_30$$8, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_31$$8, size); - ZEPHIR_CALL_FUNCTION(NULL, "imagestring", NULL, 404, &_30$$8, &_31$$8, offsetX, offsetY, &text, &color); + ZEPHIR_CALL_FUNCTION(NULL, "imagestring", NULL, 405, &_30$$8, &_31$$8, offsetX, offsetY, &text, &color); zephir_check_call_status(); } ZEPHIR_MM_RESTORE(); @@ -1751,40 +1630,31 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processWatermark) ZVAL_UNDEF(&_6$$3); ZVAL_UNDEF(&_7$$3); ZVAL_UNDEF(&_8$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(4, 4) Z_PARAM_OBJECT_OF_CLASS(watermark, phalcon_image_adapter_adapterinterface_ce) Z_PARAM_LONG(offsetX) Z_PARAM_LONG(offsetY) Z_PARAM_LONG(opacity) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 4, 0, &watermark, &offsetX_param, &offsetY_param, &opacity_param); - offsetX = zephir_get_intval(offsetX_param); - offsetY = zephir_get_intval(offsetY_param); - opacity = zephir_get_intval(opacity_param); - - ZEPHIR_CALL_METHOD(&_0, watermark, "render", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&overlay, "imagecreatefromstring", NULL, 379, &_0); + ZEPHIR_CALL_FUNCTION(&overlay, "imagecreatefromstring", NULL, 380, &_0); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(NULL, "imagesavealpha", NULL, 367, &overlay, &__$true); + ZEPHIR_CALL_FUNCTION(NULL, "imagesavealpha", NULL, 368, &overlay, &__$true); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&_1, "imagesx", NULL, 376, &overlay); + ZEPHIR_CALL_FUNCTION(&_1, "imagesx", NULL, 377, &overlay); zephir_check_call_status(); width = zephir_get_intval(&_1); - ZEPHIR_CALL_FUNCTION(&_2, "imagesy", NULL, 377, &overlay); + ZEPHIR_CALL_FUNCTION(&_2, "imagesy", NULL, 378, &overlay); zephir_check_call_status(); height = zephir_get_intval(&_2); if (opacity < 100) { ZEPHIR_INIT_VAR(&_3$$3); ZVAL_DOUBLE(&_4$$3, ((zephir_safe_div_long_long((opacity * 127), 100)) - (double) (127))); - ZEPHIR_CALL_FUNCTION(&_5$$3, "abs", NULL, 283, &_4$$3); + ZEPHIR_CALL_FUNCTION(&_5$$3, "abs", NULL, 284, &_4$$3); zephir_check_call_status(); zephir_round(&_3$$3, &_5$$3, NULL, NULL); opacity = zephir_get_intval(&_3$$3); @@ -1792,20 +1662,20 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processWatermark) ZVAL_LONG(&_6$$3, 127); ZVAL_LONG(&_7$$3, 127); ZVAL_LONG(&_8$$3, opacity); - ZEPHIR_CALL_FUNCTION(&color, "imagecolorallocatealpha", NULL, 372, &overlay, &_4$$3, &_6$$3, &_7$$3, &_8$$3); + ZEPHIR_CALL_FUNCTION(&color, "imagecolorallocatealpha", NULL, 373, &overlay, &_4$$3, &_6$$3, &_7$$3, &_8$$3); zephir_check_call_status(); ZVAL_LONG(&_4$$3, 3); - ZEPHIR_CALL_FUNCTION(NULL, "imagelayereffect", NULL, 405, &overlay, &_4$$3); + ZEPHIR_CALL_FUNCTION(NULL, "imagelayereffect", NULL, 406, &overlay, &_4$$3); zephir_check_call_status(); ZVAL_LONG(&_4$$3, 0); ZVAL_LONG(&_6$$3, 0); ZVAL_LONG(&_7$$3, width); ZVAL_LONG(&_8$$3, height); - ZEPHIR_CALL_FUNCTION(NULL, "imagefilledrectangle", NULL, 385, &overlay, &_4$$3, &_6$$3, &_7$$3, &_8$$3, &color); + ZEPHIR_CALL_FUNCTION(NULL, "imagefilledrectangle", NULL, 386, &overlay, &_4$$3, &_6$$3, &_7$$3, &_8$$3, &color); zephir_check_call_status(); } zephir_read_property(&_9, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(NULL, "imagealphablending", NULL, 369, &_9, &__$true); + ZEPHIR_CALL_FUNCTION(NULL, "imagealphablending", NULL, 370, &_9, &__$true); zephir_check_call_status(); zephir_read_property(&_10, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_11, offsetX); @@ -1814,10 +1684,10 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, processWatermark) ZVAL_LONG(&_14, 0); ZVAL_LONG(&_15, width); ZVAL_LONG(&_16, height); - ZEPHIR_CALL_FUNCTION(©, "imagecopy", NULL, 373, &_10, &overlay, &_11, &_12, &_13, &_14, &_15, &_16); + ZEPHIR_CALL_FUNCTION(©, "imagecopy", NULL, 374, &_10, &overlay, &_11, &_12, &_13, &_14, &_15, &_16); zephir_check_call_status(); if (ZEPHIR_IS_TRUE_IDENTICAL(©)) { - ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 370, &overlay); + ZEPHIR_CALL_FUNCTION(NULL, "imagedestroy", NULL, 371, &overlay); zephir_check_call_status(); } ZEPHIR_MM_RESTORE(); @@ -1842,9 +1712,8 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, check) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&version, this_ptr, "getversion", NULL, 0); zephir_check_call_status(); @@ -1852,14 +1721,14 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, check) ZVAL_STRING(&_0, "2.0.1"); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, ">="); - ZEPHIR_CALL_FUNCTION(&_2, "version_compare", NULL, 133, &version, &_0, &_1); + ZEPHIR_CALL_FUNCTION(&_2, "version_compare", NULL, 134, &version, &_0, &_1); zephir_check_call_status(); if (!ZEPHIR_IS_TRUE_IDENTICAL(&_2)) { ZEPHIR_INIT_VAR(&_3$$3); object_init_ex(&_3$$3, phalcon_image_exception_ce); ZEPHIR_INIT_VAR(&_4$$3); ZEPHIR_CONCAT_SSV(&_4$$3, "Phalcon\\Image\\Adapter\\GD requires GD ", "version '2.0.1' or greater, you have ", &version); - ZEPHIR_CALL_METHOD(NULL, &_3$$3, "__construct", NULL, 32, &_4$$3); + ZEPHIR_CALL_METHOD(NULL, &_3$$3, "__construct", NULL, 33, &_4$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_3$$3, "phalcon/Image/Adapter/Gd.zep", 898); ZEPHIR_MM_RESTORE(); diff --git a/ext/phalcon/image/adapter/gd.zep.h b/ext/phalcon/image/adapter/gd.zep.h index a2e5ac2069e..7c2a705fb9a 100644 --- a/ext/phalcon/image/adapter/gd.zep.h +++ b/ext/phalcon/image/adapter/gd.zep.h @@ -134,11 +134,7 @@ ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_image_adapter_gd_method_entry) { PHP_ME(Phalcon_Image_Adapter_Gd, __construct, arginfo_phalcon_image_adapter_gd___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Image_Adapter_Gd, __destruct, arginfo_phalcon_image_adapter_gd___destruct, ZEND_ACC_PUBLIC|ZEND_ACC_DTOR) -#else - PHP_ME(Phalcon_Image_Adapter_Gd, __destruct, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_DTOR) -#endif +PHP_ME(Phalcon_Image_Adapter_Gd, __destruct, arginfo_phalcon_image_adapter_gd___destruct, ZEND_ACC_PUBLIC|ZEND_ACC_DTOR) PHP_ME(Phalcon_Image_Adapter_Gd, getVersion, arginfo_phalcon_image_adapter_gd_getversion, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Image_Adapter_Gd, processBackground, arginfo_phalcon_image_adapter_gd_processbackground, ZEND_ACC_PROTECTED) PHP_ME(Phalcon_Image_Adapter_Gd, processBlur, arginfo_phalcon_image_adapter_gd_processblur, ZEND_ACC_PROTECTED) diff --git a/ext/phalcon/image/adapter/imagick.zep.c b/ext/phalcon/image/adapter/imagick.zep.c index f3031f42f1b..111411a48e9 100644 --- a/ext/phalcon/image/adapter/imagick.zep.c +++ b/ext/phalcon/image/adapter/imagick.zep.c @@ -117,7 +117,6 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, __construct) ZVAL_UNDEF(&_23$$8); ZVAL_UNDEF(&_24$$8); ZVAL_UNDEF(&_25$$8); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(file) @@ -125,25 +124,19 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, __construct) Z_PARAM_LONG_OR_NULL(width, is_null_true) Z_PARAM_LONG_OR_NULL(height, is_null_true) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &file_param, &width_param, &height_param); zephir_get_strval(&file, file_param); if (!width_param) { width = 0; } else { - width = zephir_get_intval(width_param); - } + } if (!height_param) { height = 0; } else { - height = zephir_get_intval(height_param); - } - - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "check", NULL, 406); + } + ZEPHIR_CALL_METHOD(NULL, this_ptr, "check", NULL, 407); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("file"), &file); ZEPHIR_INIT_VAR(&_0); @@ -154,7 +147,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, __construct) zephir_read_property(&_1, this_ptr, ZEND_STRL("file"), PH_NOISY_CC | PH_READONLY); if (1 == (zephir_file_exists(&_1) == SUCCESS)) { zephir_read_property(&_2$$3, this_ptr, ZEND_STRL("file"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&_3$$3, "realpath", NULL, 74, &_2$$3); + ZEPHIR_CALL_FUNCTION(&_3$$3, "realpath", NULL, 75, &_2$$3); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("realpath"), &_3$$3); zephir_read_property(&_4$$3, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); @@ -167,7 +160,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, __construct) zephir_read_property(&_8$$4, this_ptr, ZEND_STRL("file"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_9$$4); ZEPHIR_CONCAT_SVS(&_9$$4, "Imagick::readImage ", &_8$$4, " failed"); - ZEPHIR_CALL_METHOD(NULL, &_7$$4, "__construct", NULL, 32, &_9$$4); + ZEPHIR_CALL_METHOD(NULL, &_7$$4, "__construct", NULL, 33, &_9$$4); zephir_check_call_status(); zephir_throw_exception_debug(&_7$$4, "phalcon/Image/Adapter/Imagick.zep", 72); ZEPHIR_MM_RESTORE(); @@ -180,7 +173,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, __construct) zephir_read_property(&_12$$5, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_13$$5); ZVAL_STRING(&_13$$5, "Imagick::ALPHACHANNEL_SET"); - ZEPHIR_CALL_FUNCTION(&_14$$5, "constant", NULL, 118, &_13$$5); + ZEPHIR_CALL_FUNCTION(&_14$$5, "constant", NULL, 119, &_13$$5); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &_12$$5, "setimagealphachannel", NULL, 0, &_14$$5); zephir_check_call_status(); @@ -215,7 +208,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, __construct) zephir_read_property(&_24$$8, this_ptr, ZEND_STRL("file"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_25$$8); ZEPHIR_CONCAT_SV(&_25$$8, "Failed to create image from file ", &_24$$8); - ZEPHIR_CALL_METHOD(NULL, &_23$$8, "__construct", NULL, 32, &_25$$8); + ZEPHIR_CALL_METHOD(NULL, &_23$$8, "__construct", NULL, 33, &_25$$8); zephir_check_call_status(); zephir_throw_exception_debug(&_23$$8, "phalcon/Image/Adapter/Imagick.zep", 97); ZEPHIR_MM_RESTORE(); @@ -279,11 +272,10 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, __destruct) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_OBS_VAR(&_0); + zephir_memory_observe(&_0); zephir_read_property(&_0, this_ptr, ZEND_STRL("image"), PH_NOISY_CC); if (zephir_is_instance_of(&_0, SL("Imagick"))) { zephir_read_property(&_1$$3, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); @@ -329,8 +321,6 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, liquidRescale) ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$3); ZVAL_UNDEF(&_6$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 4) Z_PARAM_LONG(width) Z_PARAM_LONG(height) @@ -338,25 +328,17 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, liquidRescale) Z_PARAM_LONG(deltaX) Z_PARAM_LONG(rigidity) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 2, &width_param, &height_param, &deltaX_param, &rigidity_param); - width = zephir_get_intval(width_param); - height = zephir_get_intval(height_param); if (!deltaX_param) { deltaX = 0; } else { - deltaX = zephir_get_intval(deltaX_param); - } + } if (!rigidity_param) { rigidity = 0; } else { - rigidity = zephir_get_intval(rigidity_param); - } - - + } zephir_read_property(&_0, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&image, &_0); ZVAL_LONG(&_0, 0); @@ -414,21 +396,13 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, setResourceLimit) ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_LONG(type) Z_PARAM_LONG(limit) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &type_param, &limit_param); - type = zephir_get_intval(type_param); - limit = zephir_get_intval(limit_param); - - _0 = type >= 0; if (_0) { _0 = type <= 6; @@ -491,32 +465,22 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processBackground) ZVAL_UNDEF(&_26$$3); ZVAL_UNDEF(&_9$$4); ZVAL_UNDEF(&_10$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(4, 4) Z_PARAM_LONG(red) Z_PARAM_LONG(green) Z_PARAM_LONG(blue) Z_PARAM_LONG(opacity) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 4, 0, &red_param, &green_param, &blue_param, &opacity_param); - red = zephir_get_intval(red_param); - green = zephir_get_intval(green_param); - blue = zephir_get_intval(blue_param); - opacity = zephir_get_intval(opacity_param); - - opacity /= 100; ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "rgb(%d, %d, %d)"); ZVAL_LONG(&_1, red); ZVAL_LONG(&_2, green); ZVAL_LONG(&_3, blue); - ZEPHIR_CALL_FUNCTION(&color, "sprintf", NULL, 116, &_0, &_1, &_2, &_3); + ZEPHIR_CALL_FUNCTION(&color, "sprintf", NULL, 117, &_0, &_1, &_2, &_3); zephir_check_call_status(); ZEPHIR_INIT_VAR(&pixel1); object_init_ex(&pixel1, zephir_get_internal_ce(SL("imagickpixel"))); @@ -549,7 +513,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processBackground) if (!ZEPHIR_IS_TRUE_IDENTICAL(&_7$$3)) { ZEPHIR_INIT_NVAR(&_9$$4); ZVAL_STRING(&_9$$4, "Imagick::ALPHACHANNEL_SET"); - ZEPHIR_CALL_FUNCTION(&_10$$4, "constant", &_11, 118, &_9$$4); + ZEPHIR_CALL_FUNCTION(&_10$$4, "constant", &_11, 119, &_9$$4); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &background, "setimagealphachannel", &_12, 0, &_10$$4); zephir_check_call_status(); @@ -558,11 +522,11 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processBackground) zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_14$$3); ZVAL_STRING(&_14$$3, "Imagick::EVALUATE_MULTIPLY"); - ZEPHIR_CALL_FUNCTION(&_15$$3, "constant", &_11, 118, &_14$$3); + ZEPHIR_CALL_FUNCTION(&_15$$3, "constant", &_11, 119, &_14$$3); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_14$$3); ZVAL_STRING(&_14$$3, "Imagick::CHANNEL_ALPHA"); - ZEPHIR_CALL_FUNCTION(&_16$$3, "constant", &_11, 118, &_14$$3); + ZEPHIR_CALL_FUNCTION(&_16$$3, "constant", &_11, 119, &_14$$3); zephir_check_call_status(); ZVAL_LONG(&_17$$3, opacity); ZEPHIR_CALL_METHOD(NULL, &background, "evaluateimage", &_18, 0, &_15$$3, &_17$$3, &_16$$3); @@ -575,7 +539,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processBackground) zephir_read_property(&_21$$3, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_NVAR(&_14$$3); ZVAL_STRING(&_14$$3, "Imagick::COMPOSITE_DISSOLVE"); - ZEPHIR_CALL_FUNCTION(&_22$$3, "constant", &_11, 118, &_14$$3); + ZEPHIR_CALL_FUNCTION(&_22$$3, "constant", &_11, 119, &_14$$3); zephir_check_call_status(); ZVAL_LONG(&_23$$3, 0); ZVAL_LONG(&_24$$3, 0); @@ -623,19 +587,12 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processBlur) ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$3); ZVAL_UNDEF(&_5$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(radius) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &radius_param); - radius = zephir_get_intval(radius_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_1, 0); ZEPHIR_CALL_METHOD(NULL, &_0, "setiteratorindex", NULL, 0, &_1); @@ -687,25 +644,15 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processCrop) ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$3); ZVAL_UNDEF(&_7$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(4, 4) Z_PARAM_LONG(width) Z_PARAM_LONG(height) Z_PARAM_LONG(offsetX) Z_PARAM_LONG(offsetY) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 4, 0, &width_param, &height_param, &offsetX_param, &offsetY_param); - width = zephir_get_intval(width_param); - height = zephir_get_intval(height_param); - offsetX = zephir_get_intval(offsetX_param); - offsetY = zephir_get_intval(offsetY_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&image, &_0); ZVAL_LONG(&_0, 0); @@ -763,19 +710,12 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processFlip) ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(direction) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &direction_param); - direction = zephir_get_intval(direction_param); - - if (direction == 11) { ZEPHIR_INIT_VAR(&method); ZVAL_STRING(&method, "flipImage"); @@ -834,18 +774,12 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processMask) ZVAL_UNDEF(&_8$$3); ZVAL_UNDEF(&_9$$3); ZVAL_UNDEF(&_10$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(image, phalcon_image_adapter_adapterinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &image); - - ZEPHIR_INIT_VAR(&mask); object_init_ex(&mask, zephir_get_internal_ce(SL("imagick"))); ZEPHIR_CALL_METHOD(NULL, &mask, "__construct", NULL, 0); @@ -869,7 +803,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processMask) zephir_read_property(&_4$$3, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_NVAR(&_5$$3); ZVAL_STRING(&_5$$3, "Imagick::COMPOSITE_DSTIN"); - ZEPHIR_CALL_FUNCTION(&_6$$3, "constant", &_7, 118, &_5$$3); + ZEPHIR_CALL_FUNCTION(&_6$$3, "constant", &_7, 119, &_5$$3); zephir_check_call_status(); ZVAL_LONG(&_8$$3, 0); ZVAL_LONG(&_9$$3, 0); @@ -919,23 +853,16 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processPixelate) ZVAL_UNDEF(&_7$$3); ZVAL_UNDEF(&_8$$3); ZVAL_UNDEF(&_9$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(amount) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &amount_param); - amount = zephir_get_intval(amount_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("width"), PH_NOISY_CC | PH_READONLY); - width = zephir_safe_div_zval_long(&_0, amount); + width = (zephir_safe_div_zval_long(&_0, amount)); zephir_read_property(&_1, this_ptr, ZEND_STRL("height"), PH_NOISY_CC | PH_READONLY); - height = zephir_safe_div_zval_long(&_1, amount); + height = (zephir_safe_div_zval_long(&_1, amount)); zephir_read_property(&_2, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_3, 0); ZEPHIR_CALL_METHOD(NULL, &_2, "setiteratorindex", NULL, 0, &_3); @@ -1036,23 +963,14 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processReflection) ZVAL_UNDEF(&_51$$13); ZVAL_UNDEF(&_52$$13); ZVAL_UNDEF(&_55$$13); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_LONG(height) Z_PARAM_LONG(opacity) Z_PARAM_BOOL(fadeIn) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &height_param, &opacity_param, &fadeIn_param); - height = zephir_get_intval(height_param); - opacity = zephir_get_intval(opacity_param); - fadeIn = zephir_get_boolval(fadeIn_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("version"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&reflection); if (ZEPHIR_GE_LONG(&_0, 30100)) { @@ -1125,7 +1043,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processReflection) } ZEPHIR_INIT_NVAR(&_18$$7); ZVAL_STRING(&_18$$7, "Imagick::COMPOSITE_DSTOUT"); - ZEPHIR_CALL_FUNCTION(&_19$$7, "constant", &_20, 118, &_18$$7); + ZEPHIR_CALL_FUNCTION(&_19$$7, "constant", &_20, 119, &_18$$7); zephir_check_call_status(); ZVAL_LONG(&_21$$7, 0); ZVAL_LONG(&_22$$7, 0); @@ -1137,11 +1055,11 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processReflection) } ZEPHIR_INIT_NVAR(&_18$$7); ZVAL_STRING(&_18$$7, "Imagick::EVALUATE_MULTIPLY"); - ZEPHIR_CALL_FUNCTION(&_24$$7, "constant", &_20, 118, &_18$$7); + ZEPHIR_CALL_FUNCTION(&_24$$7, "constant", &_20, 119, &_18$$7); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_18$$7); ZVAL_STRING(&_18$$7, "Imagick::CHANNEL_ALPHA"); - ZEPHIR_CALL_FUNCTION(&_25$$7, "constant", &_20, 118, &_18$$7); + ZEPHIR_CALL_FUNCTION(&_25$$7, "constant", &_20, 119, &_18$$7); zephir_check_call_status(); ZVAL_LONG(&_21$$7, opacity); ZEPHIR_CALL_METHOD(NULL, &reflection, "evaluateimage", &_26, 0, &_24$$7, &_21$$7, &_25$$7); @@ -1181,7 +1099,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processReflection) zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_34$$10); ZVAL_STRING(&_34$$10, "Imagick::ALPHACHANNEL_SET"); - ZEPHIR_CALL_FUNCTION(&_35$$10, "constant", &_20, 118, &_34$$10); + ZEPHIR_CALL_FUNCTION(&_35$$10, "constant", &_20, 119, &_34$$10); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &image, "setimagealphachannel", &_36, 0, &_35$$10); zephir_check_call_status(); @@ -1198,7 +1116,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processReflection) zephir_read_property(&_42$$10, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_NVAR(&_34$$10); ZVAL_STRING(&_34$$10, "Imagick::COMPOSITE_SRC"); - ZEPHIR_CALL_FUNCTION(&_43$$10, "constant", &_20, 118, &_34$$10); + ZEPHIR_CALL_FUNCTION(&_43$$10, "constant", &_20, 119, &_34$$10); zephir_check_call_status(); ZVAL_LONG(&_44$$10, 0); ZVAL_LONG(&_45$$10, 0); @@ -1227,7 +1145,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processReflection) } ZEPHIR_INIT_NVAR(&_48$$13); ZVAL_STRING(&_48$$13, "Imagick::COMPOSITE_OVER"); - ZEPHIR_CALL_FUNCTION(&_49$$13, "constant", &_20, 118, &_48$$13); + ZEPHIR_CALL_FUNCTION(&_49$$13, "constant", &_20, 119, &_48$$13); zephir_check_call_status(); zephir_read_property(&_50$$13, this_ptr, ZEND_STRL("height"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_51$$13, 0); @@ -1296,21 +1214,14 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processRender) ZVAL_UNDEF(&_5$$4); ZVAL_UNDEF(&_6$$4); ZVAL_UNDEF(&_7$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(extension) Z_PARAM_LONG(quality) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &extension_param, &quality_param); zephir_get_strval(&extension, extension_param); - quality = zephir_get_intval(quality_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&image, &_0); ZEPHIR_CALL_METHOD(NULL, &image, "setformat", NULL, 0, &extension); @@ -1339,7 +1250,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processRender) if (ZEPHIR_IS_STRING(&extension, "jpg") || ZEPHIR_IS_STRING(&extension, "jpeg")) { ZEPHIR_INIT_VAR(&_5$$4); ZVAL_STRING(&_5$$4, "Imagick::COMPRESSION_JPEG"); - ZEPHIR_CALL_FUNCTION(&_6$$4, "constant", NULL, 118, &_5$$4); + ZEPHIR_CALL_FUNCTION(&_6$$4, "constant", NULL, 119, &_5$$4); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &image, "setimagecompression", NULL, 0, &_6$$4); zephir_check_call_status(); @@ -1378,21 +1289,13 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processResize) ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_4$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_LONG(width) Z_PARAM_LONG(height) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &width_param, &height_param); - width = zephir_get_intval(width_param); - height = zephir_get_intval(height_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&image, &_0); ZVAL_LONG(&_0, 0); @@ -1449,19 +1352,12 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processRotate) ZVAL_UNDEF(&_6$$3); ZVAL_UNDEF(&_7$$3); ZVAL_UNDEF(&_8$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(degrees) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, °rees_param); - degrees = zephir_get_intval(degrees_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_1, 0); ZEPHIR_CALL_METHOD(NULL, &_0, "setiteratorindex", NULL, 0, &_1); @@ -1541,23 +1437,16 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processSave) ZVAL_UNDEF(&_14$$5); ZVAL_UNDEF(&_15$$5); ZVAL_UNDEF(&_16$$5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(file) Z_PARAM_LONG(quality) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &file_param, &quality_param); zephir_get_strval(&file, file_param); - quality = zephir_get_intval(quality_param); - - ZVAL_LONG(&_0, 4); - ZEPHIR_CALL_FUNCTION(&extension, "pathinfo", NULL, 88, &file, &_0); + ZEPHIR_CALL_FUNCTION(&extension, "pathinfo", NULL, 89, &file, &_0); zephir_check_call_status(); zephir_read_property(&_0, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(NULL, &_0, "setformat", NULL, 0, &extension); @@ -1585,7 +1474,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processSave) zephir_check_call_status(); ZEPHIR_INIT_VAR(&_9$$3); ZVAL_STRING(&_9$$3, "w"); - ZEPHIR_CALL_FUNCTION(&fp, "fopen", NULL, 139, &file, &_9$$3); + ZEPHIR_CALL_FUNCTION(&fp, "fopen", NULL, 140, &file, &_9$$3); zephir_check_call_status(); zephir_read_property(&_10$$3, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(NULL, &_10$$3, "writeimagesfile", NULL, 0, &fp); @@ -1597,7 +1486,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processSave) zephir_read_property(&_11$$4, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_12$$4); ZVAL_STRING(&_12$$4, "Imagick::COMPRESSION_JPEG"); - ZEPHIR_CALL_FUNCTION(&_13$$4, "constant", NULL, 118, &_12$$4); + ZEPHIR_CALL_FUNCTION(&_13$$4, "constant", NULL, 119, &_12$$4); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &_11$$4, "setimagecompression", NULL, 0, &_13$$4); zephir_check_call_status(); @@ -1643,19 +1532,12 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processSharpen) ZVAL_UNDEF(&_4$$3); ZVAL_UNDEF(&_5$$3); ZVAL_UNDEF(&_6$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(amount) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &amount_param); - amount = zephir_get_intval(amount_param); - - ZEPHIR_INIT_VAR(&_0); if (amount < 5) { ZEPHIR_INIT_NVAR(&_0); @@ -1738,7 +1620,6 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processText) ZVAL_UNDEF(&_18$$14); ZVAL_UNDEF(&_19$$14); ZVAL_UNDEF(&_20$$14); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(8, 9) Z_PARAM_STR(text) @@ -1752,26 +1633,17 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processText) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(fontFile) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 8, 1, &text_param, &offsetX, &offsetY, &opacity_param, &red_param, &green_param, &blue_param, &size_param, &fontFile_param); zephir_get_strval(&text, text_param); ZEPHIR_SEPARATE_PARAM(offsetX); ZEPHIR_SEPARATE_PARAM(offsetY); - opacity = zephir_get_intval(opacity_param); - red = zephir_get_intval(red_param); - green = zephir_get_intval(green_param); - blue = zephir_get_intval(blue_param); - size = zephir_get_intval(size_param); if (!fontFile_param) { ZEPHIR_INIT_VAR(&fontFile); } else { zephir_get_strval(&fontFile, fontFile_param); } - - opacity = (long) (zephir_safe_div_long_long(opacity, 100)); ZEPHIR_INIT_VAR(&draw); object_init_ex(&draw, zephir_get_internal_ce(SL("imagickdraw"))); @@ -1782,7 +1654,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processText) ZVAL_LONG(&_1, red); ZVAL_LONG(&_2, green); ZVAL_LONG(&_3, blue); - ZEPHIR_CALL_FUNCTION(&color, "sprintf", NULL, 116, &_0, &_1, &_2, &_3); + ZEPHIR_CALL_FUNCTION(&color, "sprintf", NULL, 117, &_0, &_1, &_2, &_3); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_0); object_init_ex(&_0, zephir_get_internal_ce(SL("imagickpixel"))); @@ -1814,7 +1686,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processText) ZVAL_LONG(offsetY, 0); ZEPHIR_INIT_VAR(&_6$$7); ZVAL_STRING(&_6$$7, "Imagick::GRAVITY_CENTER"); - ZEPHIR_CALL_FUNCTION(&gravity, "constant", NULL, 118, &_6$$7); + ZEPHIR_CALL_FUNCTION(&gravity, "constant", NULL, 119, &_6$$7); zephir_check_call_status(); } else if (Z_TYPE_P(offsetY) == IS_LONG) { ZEPHIR_INIT_VAR(&y); @@ -1826,7 +1698,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processText) if (_7$$8) { ZEPHIR_INIT_VAR(&_8$$8); ZVAL_STRING(&_8$$8, "Imagick::GRAVITY_SOUTHEAST"); - ZEPHIR_CALL_FUNCTION(&gravity, "constant", NULL, 118, &_8$$8); + ZEPHIR_CALL_FUNCTION(&gravity, "constant", NULL, 119, &_8$$8); zephir_check_call_status(); } else { } @@ -1837,7 +1709,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processText) if (_9$$8) { ZEPHIR_INIT_NVAR(&_8$$8); ZVAL_STRING(&_8$$8, "Imagick::GRAVITY_NORTHEAST"); - ZEPHIR_CALL_FUNCTION(&gravity, "constant", NULL, 118, &_8$$8); + ZEPHIR_CALL_FUNCTION(&gravity, "constant", NULL, 119, &_8$$8); zephir_check_call_status(); } else { } @@ -1848,7 +1720,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processText) if (_10$$8) { ZEPHIR_INIT_NVAR(&_8$$8); ZVAL_STRING(&_8$$8, "Imagick::GRAVITY_SOUTH"); - ZEPHIR_CALL_FUNCTION(&gravity, "constant", NULL, 118, &_8$$8); + ZEPHIR_CALL_FUNCTION(&gravity, "constant", NULL, 119, &_8$$8); zephir_check_call_status(); } else { } @@ -1859,7 +1731,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processText) if (_11$$8) { ZEPHIR_INIT_NVAR(&_8$$8); ZVAL_STRING(&_8$$8, "Imagick::GRAVITY_NORTH"); - ZEPHIR_CALL_FUNCTION(&gravity, "constant", NULL, 118, &_8$$8); + ZEPHIR_CALL_FUNCTION(&gravity, "constant", NULL, 119, &_8$$8); zephir_check_call_status(); } else { } @@ -1883,7 +1755,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processText) if (_12$$11) { ZEPHIR_INIT_VAR(&_13$$11); ZVAL_STRING(&_13$$11, "Imagick::GRAVITY_SOUTHEAST"); - ZEPHIR_CALL_FUNCTION(&gravity, "constant", NULL, 118, &_13$$11); + ZEPHIR_CALL_FUNCTION(&gravity, "constant", NULL, 119, &_13$$11); zephir_check_call_status(); } else { } @@ -1894,7 +1766,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processText) if (_14$$11) { ZEPHIR_INIT_NVAR(&_13$$11); ZVAL_STRING(&_13$$11, "Imagick::GRAVITY_SOUTH"); - ZEPHIR_CALL_FUNCTION(&gravity, "constant", NULL, 118, &_13$$11); + ZEPHIR_CALL_FUNCTION(&gravity, "constant", NULL, 119, &_13$$11); zephir_check_call_status(); } else { } @@ -1905,7 +1777,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processText) if (_15$$11) { ZEPHIR_INIT_NVAR(&_13$$11); ZVAL_STRING(&_13$$11, "Imagick::GRAVITY_EAST"); - ZEPHIR_CALL_FUNCTION(&gravity, "constant", NULL, 118, &_13$$11); + ZEPHIR_CALL_FUNCTION(&gravity, "constant", NULL, 119, &_13$$11); zephir_check_call_status(); } else { } @@ -1916,7 +1788,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processText) if (_16$$11) { ZEPHIR_INIT_NVAR(&_13$$11); ZVAL_STRING(&_13$$11, "Imagick::GRAVITY_WEST"); - ZEPHIR_CALL_FUNCTION(&gravity, "constant", NULL, 118, &_13$$11); + ZEPHIR_CALL_FUNCTION(&gravity, "constant", NULL, 119, &_13$$11); zephir_check_call_status(); } else { } @@ -1945,14 +1817,14 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processText) if (ZEPHIR_LT_LONG(&y, 0)) { ZEPHIR_INIT_VAR(&_17$$12); ZVAL_STRING(&_17$$12, "Imagick::GRAVITY_SOUTHEAST"); - ZEPHIR_CALL_FUNCTION(&gravity, "constant", NULL, 118, &_17$$12); + ZEPHIR_CALL_FUNCTION(&gravity, "constant", NULL, 119, &_17$$12); zephir_check_call_status(); } else { } if (ZEPHIR_GE_LONG(&y, 0)) { ZEPHIR_INIT_NVAR(&_17$$12); ZVAL_STRING(&_17$$12, "Imagick::GRAVITY_NORTHEAST"); - ZEPHIR_CALL_FUNCTION(&gravity, "constant", NULL, 118, &_17$$12); + ZEPHIR_CALL_FUNCTION(&gravity, "constant", NULL, 119, &_17$$12); zephir_check_call_status(); } else { } @@ -2021,24 +1893,15 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processWatermark) ZVAL_UNDEF(&_9$$3); ZVAL_UNDEF(&_10$$3); ZVAL_UNDEF(&_11$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(4, 4) Z_PARAM_OBJECT_OF_CLASS(image, phalcon_image_adapter_adapterinterface_ce) Z_PARAM_LONG(offsetX) Z_PARAM_LONG(offsetY) Z_PARAM_LONG(opacity) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 4, 0, &image, &offsetX_param, &offsetY_param, &opacity_param); - offsetX = zephir_get_intval(offsetX_param); - offsetY = zephir_get_intval(offsetY_param); - opacity = zephir_get_intval(opacity_param); - - opacity = (long) (zephir_safe_div_long_long(opacity, 100)); ZEPHIR_INIT_VAR(&watermark); object_init_ex(&watermark, zephir_get_internal_ce(SL("imagick"))); @@ -2050,11 +1913,11 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processWatermark) zephir_check_call_status(); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "Imagick::EVALUATE_MULTIPLY"); - ZEPHIR_CALL_FUNCTION(&_2, "constant", NULL, 118, &_1); + ZEPHIR_CALL_FUNCTION(&_2, "constant", NULL, 119, &_1); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_1); ZVAL_STRING(&_1, "Imagick::CHANNEL_ALPHA"); - ZEPHIR_CALL_FUNCTION(&_3, "constant", NULL, 118, &_1); + ZEPHIR_CALL_FUNCTION(&_3, "constant", NULL, 119, &_1); zephir_check_call_status(); ZVAL_LONG(&_4, opacity); ZEPHIR_CALL_METHOD(NULL, &watermark, "evaluateimage", NULL, 0, &_2, &_4, &_3); @@ -2070,7 +1933,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, processWatermark) zephir_read_property(&_6$$3, this_ptr, ZEND_STRL("image"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_NVAR(&_7$$3); ZVAL_STRING(&_7$$3, "Imagick::COMPOSITE_OVER"); - ZEPHIR_CALL_FUNCTION(&_8$$3, "constant", NULL, 118, &_7$$3); + ZEPHIR_CALL_FUNCTION(&_8$$3, "constant", NULL, 119, &_7$$3); zephir_check_call_status(); ZVAL_LONG(&_9$$3, offsetX); ZVAL_LONG(&_10$$3, offsetY); @@ -2112,9 +1975,8 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, check) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3$$4); ZVAL_UNDEF(&_4$$4); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "imagick"); @@ -2124,12 +1986,12 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, check) } ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "Imagick::IMAGICK_EXTNUM"); - ZEPHIR_CALL_FUNCTION(&_2, "defined", NULL, 117, &_1); + ZEPHIR_CALL_FUNCTION(&_2, "defined", NULL, 118, &_1); zephir_check_call_status(); if (zephir_is_true(&_2)) { ZEPHIR_INIT_VAR(&_3$$4); ZVAL_STRING(&_3$$4, "Imagick::IMAGICK_EXTNUM"); - ZEPHIR_CALL_FUNCTION(&_4$$4, "constant", NULL, 118, &_3$$4); + ZEPHIR_CALL_FUNCTION(&_4$$4, "constant", NULL, 119, &_3$$4); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("version"), &_4$$4); } diff --git a/ext/phalcon/image/adapter/imagick.zep.h b/ext/phalcon/image/adapter/imagick.zep.h index 82291403353..cdcdf5bc6df 100644 --- a/ext/phalcon/image/adapter/imagick.zep.h +++ b/ext/phalcon/image/adapter/imagick.zep.h @@ -141,11 +141,7 @@ ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_image_adapter_imagick_method_entry) { PHP_ME(Phalcon_Image_Adapter_Imagick, __construct, arginfo_phalcon_image_adapter_imagick___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Image_Adapter_Imagick, __destruct, arginfo_phalcon_image_adapter_imagick___destruct, ZEND_ACC_PUBLIC|ZEND_ACC_DTOR) -#else - PHP_ME(Phalcon_Image_Adapter_Imagick, __destruct, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_DTOR) -#endif +PHP_ME(Phalcon_Image_Adapter_Imagick, __destruct, arginfo_phalcon_image_adapter_imagick___destruct, ZEND_ACC_PUBLIC|ZEND_ACC_DTOR) PHP_ME(Phalcon_Image_Adapter_Imagick, liquidRescale, arginfo_phalcon_image_adapter_imagick_liquidrescale, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Image_Adapter_Imagick, setResourceLimit, arginfo_phalcon_image_adapter_imagick_setresourcelimit, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Image_Adapter_Imagick, processBackground, arginfo_phalcon_image_adapter_imagick_processbackground, ZEND_ACC_PROTECTED) diff --git a/ext/phalcon/image/imagefactory.zep.c b/ext/phalcon/image/imagefactory.zep.c index 203beb42413..044df84dd38 100644 --- a/ext/phalcon/image/imagefactory.zep.c +++ b/ext/phalcon/image/imagefactory.zep.c @@ -48,16 +48,12 @@ PHP_METHOD(Phalcon_Image_ImageFactory, __construct) zval *this_ptr = getThis(); ZVAL_UNDEF(&services); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(services) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &services_param); if (!services_param) { ZEPHIR_INIT_VAR(&services); @@ -65,8 +61,6 @@ PHP_METHOD(Phalcon_Image_ImageFactory, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&services, services_param); } - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "init", NULL, 0, &services); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); @@ -97,19 +91,13 @@ PHP_METHOD(Phalcon_Image_ImageFactory, load) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(config) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &config); ZEPHIR_SEPARATE_PARAM(config); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "checkconfig", NULL, 0, config); zephir_check_call_status(); ZEPHIR_CPY_WRT(config, &_0); @@ -123,22 +111,22 @@ PHP_METHOD(Phalcon_Image_ImageFactory, load) ZEPHIR_CALL_METHOD(&_0, this_ptr, "checkconfigelement", NULL, 0, config, &_1); zephir_check_call_status(); ZEPHIR_CPY_WRT(config, &_0); - ZEPHIR_OBS_VAR(&name); + zephir_memory_observe(&name); zephir_array_fetch_string(&name, config, SL("adapter"), PH_NOISY, "phalcon/Image/ImageFactory.zep", 44); zephir_array_unset_string(config, SL("adapter"), PH_SEPARATE); ZEPHIR_INIT_NVAR(&_1); ZVAL_STRING(&_1, "file"); - ZEPHIR_CALL_METHOD(&file, this_ptr, "getarrval", NULL, 407, config, &_1); + ZEPHIR_CALL_METHOD(&file, this_ptr, "getarrval", NULL, 408, config, &_1); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_1); ZVAL_STRING(&_1, "height"); ZVAL_NULL(&_2); - ZEPHIR_CALL_METHOD(&height, this_ptr, "getarrval", NULL, 407, config, &_1, &_2); + ZEPHIR_CALL_METHOD(&height, this_ptr, "getarrval", NULL, 408, config, &_1, &_2); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_1); ZVAL_STRING(&_1, "width"); ZVAL_NULL(&_2); - ZEPHIR_CALL_METHOD(&width, this_ptr, "getarrval", NULL, 407, config, &_1, &_2); + ZEPHIR_CALL_METHOD(&width, this_ptr, "getarrval", NULL, 408, config, &_1, &_2); zephir_check_call_status(); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "newinstance", NULL, 0, &name, &file, &width, &height); zephir_check_call_status(); @@ -162,7 +150,6 @@ PHP_METHOD(Phalcon_Image_ImageFactory, newInstance) ZVAL_UNDEF(&definition); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 4) Z_PARAM_STR(name) @@ -171,10 +158,8 @@ PHP_METHOD(Phalcon_Image_ImageFactory, newInstance) Z_PARAM_LONG_OR_NULL(width, is_null_true) Z_PARAM_LONG_OR_NULL(height, is_null_true) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 2, &name_param, &file_param, &width_param, &height_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")); @@ -197,15 +182,11 @@ PHP_METHOD(Phalcon_Image_ImageFactory, newInstance) if (!width_param) { width = 0; } else { - width = zephir_get_intval(width_param); - } + } if (!height_param) { height = 0; } else { - height = zephir_get_intval(height_param); - } - - + } ZEPHIR_CALL_METHOD(&definition, this_ptr, "getservice", NULL, 0, &name); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_0); @@ -227,9 +208,6 @@ PHP_METHOD(Phalcon_Image_ImageFactory, newInstance) */ PHP_METHOD(Phalcon_Image_ImageFactory, getExceptionClass) { - zval *this_ptr = getThis(); - - RETURN_STRING("Phalcon\\Image\\Exception"); } @@ -241,9 +219,6 @@ PHP_METHOD(Phalcon_Image_ImageFactory, getExceptionClass) */ PHP_METHOD(Phalcon_Image_ImageFactory, getServices) { - zval *this_ptr = getThis(); - - zephir_create_array(return_value, 2, 0); add_assoc_stringl_ex(return_value, SL("gd"), SL("Phalcon\\Image\\Adapter\\Gd")); @@ -259,14 +234,12 @@ PHP_METHOD(Phalcon_Image_ImageFactory, getArrVal) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *collection_param = NULL, *index, index_sub, *defaultValue = NULL, defaultValue_sub, __$null, value; zval collection; - zval *this_ptr = getThis(); ZVAL_UNDEF(&collection); ZVAL_UNDEF(&index_sub); ZVAL_UNDEF(&defaultValue_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&value); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_ARRAY(collection) @@ -274,22 +247,19 @@ PHP_METHOD(Phalcon_Image_ImageFactory, getArrVal) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(defaultValue) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &collection_param, &index, &defaultValue); ZEPHIR_OBS_COPY_OR_DUP(&collection, collection_param); if (!defaultValue) { defaultValue = &defaultValue_sub; defaultValue = &__$null; } - - - if (UNEXPECTED(!(zephir_array_isset_fetch(&value, &collection, index, 1)))) { + zephir_memory_observe(&value); + if (UNEXPECTED(!(zephir_array_isset_fetch(&value, &collection, index, 0)))) { RETVAL_ZVAL(defaultValue, 1, 0); RETURN_MM(); } - RETURN_CTOR(&value); + RETURN_CCTOR(&value); } diff --git a/ext/phalcon/image/imagefactory.zep.h b/ext/phalcon/image/imagefactory.zep.h index b2f76560757..a505bbc3d5b 100644 --- a/ext/phalcon/image/imagefactory.zep.h +++ b/ext/phalcon/image/imagefactory.zep.h @@ -11,11 +11,7 @@ PHP_METHOD(Phalcon_Image_ImageFactory, getServices); PHP_METHOD(Phalcon_Image_ImageFactory, getArrVal); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_image_imagefactory___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, services, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, services, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, services, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_image_imagefactory_load, 0, 1, Phalcon\\Image\\Adapter\\AdapterInterface, 0) diff --git a/ext/phalcon/logger/abstractlogger.zep.c b/ext/phalcon/logger/abstractlogger.zep.c index 075fa5ecc8d..be64b308ba1 100644 --- a/ext/phalcon/logger/abstractlogger.zep.c +++ b/ext/phalcon/logger/abstractlogger.zep.c @@ -120,7 +120,6 @@ PHP_METHOD(Phalcon_Logger_AbstractLogger, __construct) ZVAL_NULL(&__$null); ZVAL_UNDEF(&defaultTimezone); ZVAL_UNDEF(&adapters); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(name) @@ -128,10 +127,8 @@ PHP_METHOD(Phalcon_Logger_AbstractLogger, __construct) Z_PARAM_ARRAY(adapters) Z_PARAM_OBJECT_OF_CLASS_OR_NULL(timezone, php_date_get_timezone_ce()) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &name_param, &adapters_param, &timezone); zephir_get_strval(&name, name_param); if (!adapters_param) { @@ -146,10 +143,8 @@ PHP_METHOD(Phalcon_Logger_AbstractLogger, __construct) } else { ZEPHIR_SEPARATE_PARAM(timezone); } - - if (Z_TYPE_P(timezone) == IS_NULL) { - ZEPHIR_CALL_FUNCTION(&defaultTimezone, "date_default_timezone_get", NULL, 96); + ZEPHIR_CALL_FUNCTION(&defaultTimezone, "date_default_timezone_get", NULL, 97); zephir_check_call_status(); if (UNEXPECTED(1 == ZEPHIR_IS_EMPTY(&defaultTimezone))) { ZEPHIR_INIT_NVAR(&defaultTimezone); @@ -184,20 +179,14 @@ PHP_METHOD(Phalcon_Logger_AbstractLogger, addAdapter) ZVAL_UNDEF(&name); ZVAL_UNDEF(&adapter_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(name) Z_PARAM_OBJECT_OF_CLASS(adapter, phalcon_logger_adapter_adapterinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &name_param, &adapter); zephir_get_strval(&name, name_param); - - zephir_update_property_array(this_ptr, SL("adapters"), &name, adapter); RETURN_THIS(); } @@ -222,16 +211,12 @@ PHP_METHOD(Phalcon_Logger_AbstractLogger, excludeAdapters) ZVAL_UNDEF(&adapter); ZVAL_UNDEF(®istered); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(adapters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &adapters_param); if (!adapters_param) { ZEPHIR_INIT_VAR(&adapters); @@ -239,9 +224,8 @@ PHP_METHOD(Phalcon_Logger_AbstractLogger, excludeAdapters) } else { zephir_get_arrval(&adapters, adapters_param); } - - - zephir_read_property(®istered, this_ptr, ZEND_STRL("adapters"), PH_NOISY_CC | PH_READONLY); + zephir_memory_observe(®istered); + zephir_read_property(®istered, this_ptr, ZEND_STRL("adapters"), PH_NOISY_CC); zephir_is_iterable(&adapters, 0, "phalcon/Logger/AbstractLogger.zep", 153); if (Z_TYPE_P(&adapters) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&adapters), _0) @@ -293,19 +277,13 @@ PHP_METHOD(Phalcon_Logger_AbstractLogger, getAdapter) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &name_param); zephir_get_strval(&name, name_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("adapters"), PH_NOISY_CC | PH_READONLY); if (1 != zephir_array_isset(&_0, &name)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_logger_exception_ce, "Adapter does not exist for this logger", "phalcon/Logger/AbstractLogger.zep", 169); @@ -323,9 +301,6 @@ PHP_METHOD(Phalcon_Logger_AbstractLogger, getAdapter) */ PHP_METHOD(Phalcon_Logger_AbstractLogger, getAdapters) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "adapters"); } @@ -335,9 +310,6 @@ PHP_METHOD(Phalcon_Logger_AbstractLogger, getAdapters) */ PHP_METHOD(Phalcon_Logger_AbstractLogger, getLogLevel) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "logLevel"); } @@ -347,9 +319,6 @@ PHP_METHOD(Phalcon_Logger_AbstractLogger, getLogLevel) */ PHP_METHOD(Phalcon_Logger_AbstractLogger, getName) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "name"); } @@ -372,19 +341,13 @@ PHP_METHOD(Phalcon_Logger_AbstractLogger, removeAdapter) ZVAL_UNDEF(&name); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &name_param); zephir_get_strval(&name, name_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("adapters"), PH_NOISY_CC | PH_READONLY); if (1 != zephir_array_isset(&_0, &name)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_logger_exception_ce, "Adapter does not exist for this logger", "phalcon/Logger/AbstractLogger.zep", 214); @@ -411,19 +374,13 @@ PHP_METHOD(Phalcon_Logger_AbstractLogger, setAdapters) zval *this_ptr = getThis(); ZVAL_UNDEF(&adapters); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(adapters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &adapters_param); zephir_get_arrval(&adapters, adapters_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("adapters"), &adapters); RETURN_THIS(); } @@ -444,19 +401,12 @@ PHP_METHOD(Phalcon_Logger_AbstractLogger, setLogLevel) ZVAL_UNDEF(&levels); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(level) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &level_param); - level = zephir_get_intval(level_param); - - ZEPHIR_CALL_METHOD(&levels, this_ptr, "getlevels", NULL, 0); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_0); @@ -509,20 +459,15 @@ PHP_METHOD(Phalcon_Logger_AbstractLogger, addMessage) ZVAL_UNDEF(&_10$$7); ZVAL_UNDEF(&message); ZVAL_UNDEF(&context); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_LONG(level) Z_PARAM_STR(message) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(context) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &level_param, &message_param, &context_param); - level = zephir_get_intval(level_param); zephir_get_strval(&message, message_param); if (!context_param) { ZEPHIR_INIT_VAR(&context); @@ -530,8 +475,6 @@ PHP_METHOD(Phalcon_Logger_AbstractLogger, addMessage) } else { zephir_get_arrval(&context, context_param); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("logLevel"), PH_NOISY_CC | PH_READONLY); if (ZEPHIR_GE_LONG(&_0, level)) { zephir_read_property(&_1$$3, this_ptr, ZEND_STRL("adapters"), PH_NOISY_CC | PH_READONLY); @@ -542,7 +485,7 @@ PHP_METHOD(Phalcon_Logger_AbstractLogger, addMessage) ZEPHIR_CALL_METHOD(&levels, this_ptr, "getlevels", NULL, 0); zephir_check_call_status(); if (1 == zephir_array_isset_long(&levels, level)) { - ZEPHIR_OBS_VAR(&levelName); + zephir_memory_observe(&levelName); zephir_array_fetch_long(&levelName, &levels, level, PH_NOISY, "phalcon/Logger/AbstractLogger.zep", 277); } else { ZEPHIR_OBS_NVAR(&levelName); @@ -558,11 +501,11 @@ PHP_METHOD(Phalcon_Logger_AbstractLogger, addMessage) ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 0, &_4$$3, &_3$$3); zephir_check_call_status(); ZVAL_LONG(&_5$$3, level); - ZEPHIR_CALL_METHOD(NULL, &item, "__construct", NULL, 97, &message, &levelName, &_5$$3, &_2$$3, &context); + ZEPHIR_CALL_METHOD(NULL, &item, "__construct", NULL, 98, &message, &levelName, &_5$$3, &_2$$3, &context); zephir_check_call_status(); zephir_read_property(&_5$$3, this_ptr, ZEND_STRL("adapters"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_6$$3, this_ptr, ZEND_STRL("excluded"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&collection, "array_diff_key", NULL, 98, &_5$$3, &_6$$3); + ZEPHIR_CALL_FUNCTION(&collection, "array_diff_key", NULL, 99, &_5$$3, &_6$$3); zephir_check_call_status(); zephir_is_iterable(&collection, 0, "phalcon/Logger/AbstractLogger.zep", 303); if (Z_TYPE_P(&collection) == IS_ARRAY) { @@ -633,24 +576,18 @@ PHP_METHOD(Phalcon_Logger_AbstractLogger, getLevelNumber) ZVAL_UNDEF(&levels); ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_1$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(level) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &level); - - if (Z_TYPE_P(level) == IS_STRING) { ZEPHIR_INIT_VAR(&levelName); zephir_fast_strtoupper(&levelName, level); ZEPHIR_CALL_METHOD(&_0$$3, this_ptr, "getlevels", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&levels, "array_flip", NULL, 99, &_0$$3); + ZEPHIR_CALL_FUNCTION(&levels, "array_flip", NULL, 100, &_0$$3); zephir_check_call_status(); if (zephir_array_isset(&levels, &levelName)) { zephir_array_fetch(&_1$$4, &levels, &levelName, PH_NOISY | PH_READONLY, "phalcon/Logger/AbstractLogger.zep", 328); @@ -673,9 +610,6 @@ PHP_METHOD(Phalcon_Logger_AbstractLogger, getLevelNumber) */ PHP_METHOD(Phalcon_Logger_AbstractLogger, getLevels) { - zval *this_ptr = getThis(); - - zephir_create_array(return_value, 9, 0); add_index_stringl(return_value, 2, SL("ALERT")); @@ -700,7 +634,8 @@ zend_object *zephir_init_properties_Phalcon_Logger_AbstractLogger(zend_class_ent ZVAL_UNDEF(&_3$$4); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/logger/abstractlogger.zep.h b/ext/phalcon/logger/abstractlogger.zep.h index ade5529fc17..9c9ecb09bf8 100644 --- a/ext/phalcon/logger/abstractlogger.zep.h +++ b/ext/phalcon/logger/abstractlogger.zep.h @@ -20,11 +20,7 @@ zend_object *zephir_init_properties_Phalcon_Logger_AbstractLogger(zend_class_ent ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_logger_abstractlogger___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, adapters, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, adapters, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, adapters, IS_ARRAY, 0, "[]") ZEND_ARG_OBJ_INFO(0, timezone, DateTimeZone, 1) ZEND_END_ARG_INFO() @@ -34,11 +30,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_logger_abstractlogger_add ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_logger_abstractlogger_excludeadapters, 0, 0, Phalcon\\Logger\\AbstractLogger, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, adapters, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, adapters, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, adapters, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_logger_abstractlogger_getadapter, 0, 1, Phalcon\\Logger\\Adapter\\AdapterInterface, 0) @@ -69,11 +61,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_logger_abstractlogger_addmessage, 0, 2, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, level, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, context, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_logger_abstractlogger_getlevelnumber, 0, 1, IS_LONG, 0) diff --git a/ext/phalcon/logger/adapter/abstractadapter.zep.c b/ext/phalcon/logger/adapter/abstractadapter.zep.c index 2059a8768b1..ec23dc93d77 100644 --- a/ext/phalcon/logger/adapter/abstractadapter.zep.c +++ b/ext/phalcon/logger/adapter/abstractadapter.zep.c @@ -82,9 +82,8 @@ PHP_METHOD(Phalcon_Logger_Adapter_AbstractAdapter, __destruct) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("inTransaction"), PH_NOISY_CC | PH_READONLY); if (zephir_is_true(&_0)) { @@ -101,9 +100,6 @@ PHP_METHOD(Phalcon_Logger_Adapter_AbstractAdapter, __destruct) */ PHP_METHOD(Phalcon_Logger_Adapter_AbstractAdapter, __serialize) { - zval *this_ptr = getThis(); - - ZEPHIR_THROW_EXCEPTION_DEBUG_STRW(phalcon_logger_exception_ce, "This object cannot be serialized", "phalcon/Logger/Adapter/AbstractAdapter.zep", 75); return; @@ -117,22 +113,15 @@ PHP_METHOD(Phalcon_Logger_Adapter_AbstractAdapter, __unserialize) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *data_param = NULL; zval data; - zval *this_ptr = getThis(); ZVAL_UNDEF(&data); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &data_param); zephir_get_arrval(&data, data_param); - - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_logger_exception_ce, "This object cannot be unserialized", "phalcon/Logger/Adapter/AbstractAdapter.zep", 83); return; } @@ -150,17 +139,10 @@ PHP_METHOD(Phalcon_Logger_Adapter_AbstractAdapter, add) zval *this_ptr = getThis(); ZVAL_UNDEF(&item_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(item, phalcon_logger_item_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &item); - - zephir_update_property_array_append(this_ptr, SL("queue"), item); RETURN_THISW(); } @@ -175,9 +157,6 @@ PHP_METHOD(Phalcon_Logger_Adapter_AbstractAdapter, begin) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); - - - if (1) { zephir_update_property_zval(this_ptr, ZEND_STRL("inTransaction"), &__$true); } else { @@ -204,11 +183,10 @@ PHP_METHOD(Phalcon_Logger_Adapter_AbstractAdapter, commit) ZVAL_UNDEF(&queue); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "checktransaction", NULL, 67); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "checktransaction", NULL, 68); zephir_check_call_status(); zephir_read_property(&_0, this_ptr, ZEND_STRL("queue"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&queue, &_0); @@ -239,7 +217,7 @@ PHP_METHOD(Phalcon_Logger_Adapter_AbstractAdapter, commit) } } ZEPHIR_INIT_NVAR(&item); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "resettransaction", NULL, 68); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "resettransaction", NULL, 69); zephir_check_call_status(); RETURN_THIS(); } @@ -257,9 +235,8 @@ PHP_METHOD(Phalcon_Logger_Adapter_AbstractAdapter, getFormatter) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("formatter"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_0) == IS_NULL) { @@ -278,9 +255,6 @@ PHP_METHOD(Phalcon_Logger_Adapter_AbstractAdapter, getFormatter) */ PHP_METHOD(Phalcon_Logger_Adapter_AbstractAdapter, inTransaction) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "inTransaction"); } @@ -305,14 +279,12 @@ PHP_METHOD(Phalcon_Logger_Adapter_AbstractAdapter, rollback) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *this_ptr = getThis(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - - ZEPHIR_MM_GROW(); - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "checktransaction", NULL, 67); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "checktransaction", NULL, 68); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "resettransaction", NULL, 68); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "resettransaction", NULL, 69); zephir_check_call_status(); RETURN_THIS(); } @@ -330,17 +302,10 @@ PHP_METHOD(Phalcon_Logger_Adapter_AbstractAdapter, setFormatter) zval *this_ptr = getThis(); ZVAL_UNDEF(&formatter_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(formatter, phalcon_logger_formatter_formatterinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &formatter); - - zephir_update_property_zval(this_ptr, ZEND_STRL("formatter"), formatter); RETURN_THISW(); } @@ -357,18 +322,12 @@ PHP_METHOD(Phalcon_Logger_Adapter_AbstractAdapter, getFormattedItem) ZVAL_UNDEF(&item_sub); ZVAL_UNDEF(&formatter); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(item, phalcon_logger_item_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &item); - - ZEPHIR_CALL_METHOD(&formatter, this_ptr, "getformatter", NULL, 0); zephir_check_call_status(); ZEPHIR_RETURN_CALL_METHOD(&formatter, "format", NULL, 0, item); @@ -387,9 +346,6 @@ PHP_METHOD(Phalcon_Logger_Adapter_AbstractAdapter, checkTransaction) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - zephir_read_property(&_0, this_ptr, ZEND_STRL("inTransaction"), PH_NOISY_CC | PH_READONLY); if (!ZEPHIR_IS_TRUE_IDENTICAL(&_0)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STRW(phalcon_logger_exception_ce, "There is no active transaction", "phalcon/Logger/Adapter/AbstractAdapter.zep", 213); @@ -409,9 +365,8 @@ PHP_METHOD(Phalcon_Logger_Adapter_AbstractAdapter, resetTransaction) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); array_init(&_0); @@ -432,7 +387,8 @@ zend_object *zephir_init_properties_Phalcon_Logger_Adapter_AbstractAdapter(zend_ ZVAL_UNDEF(&_1$$3); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/logger/adapter/abstractadapter.zep.h b/ext/phalcon/logger/adapter/abstractadapter.zep.h index 5527815ee57..23d31a0b41e 100644 --- a/ext/phalcon/logger/adapter/abstractadapter.zep.h +++ b/ext/phalcon/logger/adapter/abstractadapter.zep.h @@ -72,11 +72,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_logger_adapter_abstractadapter_zephir_ini ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_logger_adapter_abstractadapter_method_entry) { -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Logger_Adapter_AbstractAdapter, __destruct, arginfo_phalcon_logger_adapter_abstractadapter___destruct, ZEND_ACC_PUBLIC|ZEND_ACC_DTOR) -#else - PHP_ME(Phalcon_Logger_Adapter_AbstractAdapter, __destruct, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_DTOR) -#endif +PHP_ME(Phalcon_Logger_Adapter_AbstractAdapter, __destruct, arginfo_phalcon_logger_adapter_abstractadapter___destruct, ZEND_ACC_PUBLIC|ZEND_ACC_DTOR) PHP_ME(Phalcon_Logger_Adapter_AbstractAdapter, __serialize, arginfo_phalcon_logger_adapter_abstractadapter___serialize, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Logger_Adapter_AbstractAdapter, __unserialize, arginfo_phalcon_logger_adapter_abstractadapter___unserialize, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Logger_Adapter_AbstractAdapter, add, arginfo_phalcon_logger_adapter_abstractadapter_add, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/logger/adapter/noop.zep.c b/ext/phalcon/logger/adapter/noop.zep.c index a431439e895..180b0125788 100644 --- a/ext/phalcon/logger/adapter/noop.zep.c +++ b/ext/phalcon/logger/adapter/noop.zep.c @@ -41,9 +41,6 @@ ZEPHIR_INIT_CLASS(Phalcon_Logger_Adapter_Noop) */ PHP_METHOD(Phalcon_Logger_Adapter_Noop, close) { - zval *this_ptr = getThis(); - - RETURN_BOOL(1); } @@ -56,19 +53,11 @@ PHP_METHOD(Phalcon_Logger_Adapter_Noop, close) PHP_METHOD(Phalcon_Logger_Adapter_Noop, process) { zval *item, item_sub; - zval *this_ptr = getThis(); ZVAL_UNDEF(&item_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(item, phalcon_logger_item_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &item); - - } diff --git a/ext/phalcon/logger/adapter/stream.zep.c b/ext/phalcon/logger/adapter/stream.zep.c index 646e59ae3b1..161185ed2ee 100644 --- a/ext/phalcon/logger/adapter/stream.zep.c +++ b/ext/phalcon/logger/adapter/stream.zep.c @@ -97,17 +97,13 @@ PHP_METHOD(Phalcon_Logger_Adapter_Stream, __construct) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(name) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &name_param, &options_param); zephir_get_strval(&name, name_param); if (!options_param) { @@ -116,10 +112,8 @@ PHP_METHOD(Phalcon_Logger_Adapter_Stream, __construct) } else { zephir_get_arrval(&options, options_param); } - - if (1 == zephir_array_isset_string(&options, SL("mode"))) { - ZEPHIR_OBS_VAR(&mode); + zephir_memory_observe(&mode); zephir_array_fetch_string(&mode, &options, SL("mode"), PH_NOISY, "phalcon/Logger/Adapter/Stream.zep", 74); } else { ZEPHIR_INIT_NVAR(&mode); @@ -127,7 +121,7 @@ PHP_METHOD(Phalcon_Logger_Adapter_Stream, __construct) } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "r"); - ZEPHIR_CALL_FUNCTION(&_1, "mb_strpos", NULL, 85, &mode, &_0); + ZEPHIR_CALL_FUNCTION(&_1, "mb_strpos", NULL, 86, &mode, &_0); zephir_check_call_status(); if (!ZEPHIR_IS_FALSE_IDENTICAL(&_1)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_logger_exception_ce, "Adapter cannot be opened in read mode", "phalcon/Logger/Adapter/Stream.zep", 76); @@ -143,9 +137,6 @@ PHP_METHOD(Phalcon_Logger_Adapter_Stream, __construct) */ PHP_METHOD(Phalcon_Logger_Adapter_Stream, close) { - zval *this_ptr = getThis(); - - RETURN_BOOL(1); } @@ -157,9 +148,6 @@ PHP_METHOD(Phalcon_Logger_Adapter_Stream, close) */ PHP_METHOD(Phalcon_Logger_Adapter_Stream, getName) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "name"); } @@ -188,18 +176,12 @@ PHP_METHOD(Phalcon_Logger_Adapter_Stream, process) ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$3); ZVAL_UNDEF(&_5$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(item, phalcon_logger_item_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &item); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("name"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_1, this_ptr, ZEND_STRL("mode"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&handler, this_ptr, "phpfopen", NULL, 0, &_0, &_1); @@ -211,14 +193,14 @@ PHP_METHOD(Phalcon_Logger_Adapter_Stream, process) zephir_read_property(&_4$$3, this_ptr, ZEND_STRL("mode"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_5$$3); ZEPHIR_CONCAT_SVSVS(&_5$$3, "The file '", &_3$$3, "' cannot be opened with mode '", &_4$$3, "'"); - ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 408, &_5$$3); + ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 409, &_5$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_2$$3, "phalcon/Logger/Adapter/Stream.zep", 119); ZEPHIR_MM_RESTORE(); return; } ZVAL_LONG(&_6, 2); - ZEPHIR_CALL_FUNCTION(NULL, "flock", NULL, 131, &handler, &_6); + ZEPHIR_CALL_FUNCTION(NULL, "flock", NULL, 132, &handler, &_6); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_7, this_ptr, "getformatteditem", NULL, 0, item); zephir_check_call_status(); @@ -240,26 +222,19 @@ PHP_METHOD(Phalcon_Logger_Adapter_Stream, phpFopen) zend_long ZEPHIR_LAST_CALL_STATUS; zval *filename_param = NULL, *mode_param = NULL; zval filename, mode; - zval *this_ptr = getThis(); ZVAL_UNDEF(&filename); ZVAL_UNDEF(&mode); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(filename) Z_PARAM_STR(mode) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &filename_param, &mode_param); zephir_get_strval(&filename, filename_param); zephir_get_strval(&mode, mode_param); - - - ZEPHIR_RETURN_CALL_FUNCTION("fopen", NULL, 139, &filename, &mode); + ZEPHIR_RETURN_CALL_FUNCTION("fopen", NULL, 140, &filename, &mode); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/logger/adapter/stream.zep.h b/ext/phalcon/logger/adapter/stream.zep.h index 302796f3459..7ff0604779e 100644 --- a/ext/phalcon/logger/adapter/stream.zep.h +++ b/ext/phalcon/logger/adapter/stream.zep.h @@ -11,11 +11,7 @@ PHP_METHOD(Phalcon_Logger_Adapter_Stream, phpFopen); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_logger_adapter_stream___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_logger_adapter_stream_close, 0, 0, _IS_BOOL, 0) diff --git a/ext/phalcon/logger/adapter/syslog.zep.c b/ext/phalcon/logger/adapter/syslog.zep.c index 7be4c445f52..d09f55d2b5a 100644 --- a/ext/phalcon/logger/adapter/syslog.zep.c +++ b/ext/phalcon/logger/adapter/syslog.zep.c @@ -79,17 +79,13 @@ PHP_METHOD(Phalcon_Logger_Adapter_Syslog, __construct) ZVAL_UNDEF(&facility); ZVAL_UNDEF(&option); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(name) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &name_param, &options_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")); @@ -106,14 +102,12 @@ PHP_METHOD(Phalcon_Logger_Adapter_Syslog, __construct) } else { zephir_get_arrval(&options, options_param); } - - - ZEPHIR_OBS_VAR(&facility); + zephir_memory_observe(&facility); if (!(zephir_array_isset_string_fetch(&facility, &options, SL("facility"), 0))) { ZEPHIR_INIT_NVAR(&facility); ZVAL_LONG(&facility, 8); } - ZEPHIR_OBS_VAR(&option); + zephir_memory_observe(&option); if (!(zephir_array_isset_string_fetch(&option, &options, SL("option"), 0))) { ZEPHIR_INIT_NVAR(&option); ZVAL_LONG(&option, 4); @@ -135,15 +129,14 @@ PHP_METHOD(Phalcon_Logger_Adapter_Syslog, close) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("opened"), PH_NOISY_CC | PH_READONLY); if (!(zephir_is_true(&_0))) { RETURN_MM_BOOL(1); } - ZEPHIR_RETURN_CALL_FUNCTION("closelog", NULL, 409); + ZEPHIR_RETURN_CALL_FUNCTION("closelog", NULL, 410); zephir_check_call_status(); RETURN_MM(); } @@ -179,18 +172,12 @@ PHP_METHOD(Phalcon_Logger_Adapter_Syslog, process) ZVAL_UNDEF(&_7$$3); ZVAL_UNDEF(&_8$$3); ZVAL_UNDEF(&_6$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(item, phalcon_logger_item_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &item); - - ZEPHIR_CALL_METHOD(&message, this_ptr, "getformatteditem", NULL, 0, item); zephir_check_call_status(); zephir_read_property(&_0, this_ptr, ZEND_STRL("name"), PH_NOISY_CC | PH_READONLY); @@ -202,14 +189,14 @@ PHP_METHOD(Phalcon_Logger_Adapter_Syslog, process) ZEPHIR_INIT_VAR(&_3$$3); object_init_ex(&_3$$3, spl_ce_LogicException); zephir_read_property(&_4$$3, this_ptr, ZEND_STRL("name"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_OBS_VAR(&_5$$3); + zephir_memory_observe(&_5$$3); zephir_read_property(&_5$$3, this_ptr, ZEND_STRL("facility"), PH_NOISY_CC); zephir_cast_to_string(&_6$$3, &_5$$3); ZEPHIR_INIT_VAR(&_7$$3); ZVAL_STRING(&_7$$3, "Cannot open syslog for name [%s] and facility [%s]"); - ZEPHIR_CALL_FUNCTION(&_8$$3, "sprintf", NULL, 116, &_7$$3, &_4$$3, &_6$$3); + ZEPHIR_CALL_FUNCTION(&_8$$3, "sprintf", NULL, 117, &_7$$3, &_4$$3, &_6$$3); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &_3$$3, "__construct", NULL, 408, &_8$$3); + ZEPHIR_CALL_METHOD(NULL, &_3$$3, "__construct", NULL, 409, &_8$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_3$$3, "phalcon/Logger/Adapter/Syslog.zep", 106); ZEPHIR_MM_RESTORE(); @@ -222,9 +209,9 @@ PHP_METHOD(Phalcon_Logger_Adapter_Syslog, process) } ZEPHIR_CALL_METHOD(&_9, item, "getlevel", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&level, this_ptr, "logleveltosyslog", NULL, 410, &_9); + ZEPHIR_CALL_METHOD(&level, this_ptr, "logleveltosyslog", NULL, 411, &_9); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(NULL, "syslog", NULL, 411, &level, &message); + ZEPHIR_CALL_FUNCTION(NULL, "syslog", NULL, 412, &level, &message); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -246,31 +233,22 @@ PHP_METHOD(Phalcon_Logger_Adapter_Syslog, openlog) zend_long option, facility, ZEPHIR_LAST_CALL_STATUS; zval *ident_param = NULL, *option_param = NULL, *facility_param = NULL, _0, _1; zval ident; - zval *this_ptr = getThis(); ZVAL_UNDEF(&ident); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(ident) Z_PARAM_LONG(option) Z_PARAM_LONG(facility) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &ident_param, &option_param, &facility_param); zephir_get_strval(&ident, ident_param); - option = zephir_get_intval(option_param); - facility = zephir_get_intval(facility_param); - - ZVAL_LONG(&_0, option); ZVAL_LONG(&_1, facility); - ZEPHIR_RETURN_CALL_FUNCTION("openlog", NULL, 412, &ident, &_0, &_1); + ZEPHIR_RETURN_CALL_FUNCTION("openlog", NULL, 413, &ident, &_0, &_1); zephir_check_call_status(); RETURN_MM(); } @@ -288,23 +266,15 @@ PHP_METHOD(Phalcon_Logger_Adapter_Syslog, logLevelToSyslog) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *level_param = NULL, result; zend_long level; - zval *this_ptr = getThis(); ZVAL_UNDEF(&result); ZVAL_UNDEF(&levels); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(level) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &level_param); - level = zephir_get_intval(level_param); - - ZEPHIR_INIT_VAR(&levels); zephir_create_array(&levels, 9, 0); add_index_long(&levels, 2, 1); @@ -316,7 +286,7 @@ PHP_METHOD(Phalcon_Logger_Adapter_Syslog, logLevelToSyslog) add_index_long(&levels, 6, 6); add_index_long(&levels, 5, 5); add_index_long(&levels, 4, 4); - ZEPHIR_OBS_VAR(&result); + zephir_memory_observe(&result); if (!(zephir_array_isset_long_fetch(&result, &levels, level, 0))) { ZEPHIR_INIT_NVAR(&result); ZVAL_LONG(&result, 3); diff --git a/ext/phalcon/logger/adapter/syslog.zep.h b/ext/phalcon/logger/adapter/syslog.zep.h index 8f4f2d86078..e054c71bb7d 100644 --- a/ext/phalcon/logger/adapter/syslog.zep.h +++ b/ext/phalcon/logger/adapter/syslog.zep.h @@ -11,11 +11,7 @@ PHP_METHOD(Phalcon_Logger_Adapter_Syslog, logLevelToSyslog); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_logger_adapter_syslog___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_logger_adapter_syslog_close, 0, 0, _IS_BOOL, 0) diff --git a/ext/phalcon/logger/adapterfactory.zep.c b/ext/phalcon/logger/adapterfactory.zep.c index eaa36bfd1f7..164e2fd9034 100644 --- a/ext/phalcon/logger/adapterfactory.zep.c +++ b/ext/phalcon/logger/adapterfactory.zep.c @@ -53,16 +53,12 @@ PHP_METHOD(Phalcon_Logger_AdapterFactory, __construct) zval *this_ptr = getThis(); ZVAL_UNDEF(&services); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(services) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &services_param); if (!services_param) { ZEPHIR_INIT_VAR(&services); @@ -70,8 +66,6 @@ PHP_METHOD(Phalcon_Logger_AdapterFactory, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&services, services_param); } - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "init", NULL, 0, &services); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); @@ -101,18 +95,14 @@ PHP_METHOD(Phalcon_Logger_AdapterFactory, newInstance) ZVAL_UNDEF(&definition); ZVAL_UNDEF(&options); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(name) Z_PARAM_STR(fileName) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &name_param, &fileName_param, &options_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")); @@ -138,8 +128,6 @@ PHP_METHOD(Phalcon_Logger_AdapterFactory, newInstance) } else { zephir_get_arrval(&options, options_param); } - - ZEPHIR_CALL_METHOD(&definition, this_ptr, "getservice", NULL, 0, &name); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_0); @@ -156,9 +144,6 @@ PHP_METHOD(Phalcon_Logger_AdapterFactory, newInstance) */ PHP_METHOD(Phalcon_Logger_AdapterFactory, getExceptionClass) { - zval *this_ptr = getThis(); - - RETURN_STRING("Phalcon\\Logger\\Exception"); } @@ -170,9 +155,6 @@ PHP_METHOD(Phalcon_Logger_AdapterFactory, getExceptionClass) */ PHP_METHOD(Phalcon_Logger_AdapterFactory, getServices) { - zval *this_ptr = getThis(); - - zephir_create_array(return_value, 3, 0); add_assoc_stringl_ex(return_value, SL("noop"), SL("Phalcon\\Logger\\Adapter\\Noop")); diff --git a/ext/phalcon/logger/adapterfactory.zep.h b/ext/phalcon/logger/adapterfactory.zep.h index c1599f29e64..784f6ce0265 100644 --- a/ext/phalcon/logger/adapterfactory.zep.h +++ b/ext/phalcon/logger/adapterfactory.zep.h @@ -9,21 +9,13 @@ PHP_METHOD(Phalcon_Logger_AdapterFactory, getExceptionClass); PHP_METHOD(Phalcon_Logger_AdapterFactory, getServices); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_logger_adapterfactory___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, services, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, services, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, services, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_logger_adapterfactory_newinstance, 0, 2, Phalcon\\Logger\\Adapter\\AdapterInterface, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, fileName, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_logger_adapterfactory_getexceptionclass, 0, 0, IS_STRING, 0) diff --git a/ext/phalcon/logger/formatter/abstractformatter.zep.c b/ext/phalcon/logger/formatter/abstractformatter.zep.c index 63c05c381c6..d08af14b270 100644 --- a/ext/phalcon/logger/formatter/abstractformatter.zep.c +++ b/ext/phalcon/logger/formatter/abstractformatter.zep.c @@ -56,9 +56,6 @@ ZEPHIR_INIT_CLASS(Phalcon_Logger_Formatter_AbstractFormatter) */ PHP_METHOD(Phalcon_Logger_Formatter_AbstractFormatter, getDateFormat) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "dateFormat"); } @@ -74,19 +71,13 @@ PHP_METHOD(Phalcon_Logger_Formatter_AbstractFormatter, setDateFormat) zval *this_ptr = getThis(); ZVAL_UNDEF(&format); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(format) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &format_param); zephir_get_strval(&format, format_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("dateFormat"), &format); ZEPHIR_MM_RESTORE(); } @@ -108,18 +99,12 @@ PHP_METHOD(Phalcon_Logger_Formatter_AbstractFormatter, getFormattedDate) ZVAL_UNDEF(&item_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(item, phalcon_logger_item_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &item); - - ZEPHIR_CALL_METHOD(&_0, item, "getdatetime", NULL, 0); zephir_check_call_status(); zephir_read_property(&_1, this_ptr, ZEND_STRL("dateFormat"), PH_NOISY_CC | PH_READONLY); @@ -147,20 +132,14 @@ PHP_METHOD(Phalcon_Logger_Formatter_AbstractFormatter, getInterpolatedMessage) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&message); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(item, phalcon_logger_item_ce) Z_PARAM_STR(message) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &item, &message_param); zephir_get_strval(&message, message_param); - - ZEPHIR_CALL_METHOD(&_0, item, "getcontext", NULL, 0); zephir_check_call_status(); zephir_read_property(&_1, this_ptr, ZEND_STRL("interpolatorLeft"), PH_NOISY_CC | PH_READONLY); diff --git a/ext/phalcon/logger/formatter/json.zep.c b/ext/phalcon/logger/formatter/json.zep.c index 4d9c2c88598..120fc23ce8e 100644 --- a/ext/phalcon/logger/formatter/json.zep.c +++ b/ext/phalcon/logger/formatter/json.zep.c @@ -55,18 +55,14 @@ PHP_METHOD(Phalcon_Logger_Formatter_Json, __construct) ZVAL_UNDEF(&dateFormat); ZVAL_UNDEF(&interpolatorLeft); ZVAL_UNDEF(&interpolatorRight); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 3) Z_PARAM_OPTIONAL Z_PARAM_STR(dateFormat) Z_PARAM_STR(interpolatorLeft) Z_PARAM_STR(interpolatorRight) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 3, &dateFormat_param, &interpolatorLeft_param, &interpolatorRight_param); if (!dateFormat_param) { ZEPHIR_INIT_VAR(&dateFormat); @@ -86,8 +82,6 @@ PHP_METHOD(Phalcon_Logger_Formatter_Json, __construct) } else { zephir_get_strval(&interpolatorRight, interpolatorRight_param); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("dateFormat"), &dateFormat); zephir_update_property_zval(this_ptr, ZEND_STRL("interpolatorLeft"), &interpolatorLeft); zephir_update_property_zval(this_ptr, ZEND_STRL("interpolatorRight"), &interpolatorRight); @@ -116,18 +110,12 @@ PHP_METHOD(Phalcon_Logger_Formatter_Json, format) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(item, phalcon_logger_item_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &item); - - ZEPHIR_CALL_METHOD(&_0, item, "getmessage", NULL, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&message, this_ptr, "getinterpolatedmessage", NULL, 0, item, &_0); diff --git a/ext/phalcon/logger/formatter/line.zep.c b/ext/phalcon/logger/formatter/line.zep.c index b1f21ace255..0c72978a82e 100644 --- a/ext/phalcon/logger/formatter/line.zep.c +++ b/ext/phalcon/logger/formatter/line.zep.c @@ -63,8 +63,6 @@ PHP_METHOD(Phalcon_Logger_Formatter_Line, __construct) ZVAL_UNDEF(&dateFormat); ZVAL_UNDEF(&interpolatorLeft); ZVAL_UNDEF(&interpolatorRight); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 4) Z_PARAM_OPTIONAL Z_PARAM_STR(format) @@ -72,10 +70,8 @@ PHP_METHOD(Phalcon_Logger_Formatter_Line, __construct) Z_PARAM_STR(interpolatorLeft) Z_PARAM_STR(interpolatorRight) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 4, &format_param, &dateFormat_param, &interpolatorLeft_param, &interpolatorRight_param); if (!format_param) { ZEPHIR_INIT_VAR(&format); @@ -101,8 +97,6 @@ PHP_METHOD(Phalcon_Logger_Formatter_Line, __construct) } else { zephir_get_strval(&interpolatorRight, interpolatorRight_param); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("format"), &format); zephir_update_property_zval(this_ptr, ZEND_STRL("dateFormat"), &dateFormat); zephir_update_property_zval(this_ptr, ZEND_STRL("interpolatorLeft"), &interpolatorLeft); @@ -140,18 +134,12 @@ PHP_METHOD(Phalcon_Logger_Formatter_Line, format) ZVAL_UNDEF(&_10); ZVAL_UNDEF(&_11); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(item, phalcon_logger_item_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &item); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("format"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_1); zephir_create_array(&_1, 3, 0); @@ -190,9 +178,6 @@ PHP_METHOD(Phalcon_Logger_Formatter_Line, format) */ PHP_METHOD(Phalcon_Logger_Formatter_Line, getFormat) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "format"); } @@ -212,19 +197,13 @@ PHP_METHOD(Phalcon_Logger_Formatter_Line, setFormat) zval *this_ptr = getThis(); ZVAL_UNDEF(&format); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(format) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &format_param); zephir_get_strval(&format, format_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("format"), &format); RETURN_THIS(); } diff --git a/ext/phalcon/logger/item.zep.c b/ext/phalcon/logger/item.zep.c index 9cc303b0ab2..0ca951f1fcf 100644 --- a/ext/phalcon/logger/item.zep.c +++ b/ext/phalcon/logger/item.zep.c @@ -13,8 +13,8 @@ #include "kernel/main.h" #include "kernel/object.h" -#include "kernel/memory.h" #include "kernel/operators.h" +#include "kernel/memory.h" #include "ext/date/php_date.h" @@ -89,8 +89,6 @@ PHP_METHOD(Phalcon_Logger_Item, __construct) ZVAL_UNDEF(&dateTime_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&context); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(4, 5) Z_PARAM_STR(message) Z_PARAM_STR(levelName) @@ -99,25 +97,20 @@ PHP_METHOD(Phalcon_Logger_Item, __construct) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(context) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 4, 1, &message_param, &levelName_param, &level_param, &dateTime, &context_param); zephir_get_strval(&message, message_param); zephir_get_strval(&levelName, levelName_param); - level = zephir_get_intval(level_param); if (!context_param) { ZEPHIR_INIT_VAR(&context); array_init(&context); } else { zephir_get_arrval(&context, context_param); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("message"), &message); zephir_update_property_zval(this_ptr, ZEND_STRL("levelName"), &levelName); - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, level); zephir_update_property_zval(this_ptr, ZEND_STRL("level"), &_0); zephir_update_property_zval(this_ptr, ZEND_STRL("dateTime"), dateTime); @@ -130,9 +123,6 @@ PHP_METHOD(Phalcon_Logger_Item, __construct) */ PHP_METHOD(Phalcon_Logger_Item, getContext) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "context"); } @@ -142,9 +132,6 @@ PHP_METHOD(Phalcon_Logger_Item, getContext) */ PHP_METHOD(Phalcon_Logger_Item, getDateTime) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "dateTime"); } @@ -154,9 +141,6 @@ PHP_METHOD(Phalcon_Logger_Item, getDateTime) */ PHP_METHOD(Phalcon_Logger_Item, getMessage) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "message"); } @@ -166,9 +150,6 @@ PHP_METHOD(Phalcon_Logger_Item, getMessage) */ PHP_METHOD(Phalcon_Logger_Item, getLevel) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "level"); } @@ -178,9 +159,6 @@ PHP_METHOD(Phalcon_Logger_Item, getLevel) */ PHP_METHOD(Phalcon_Logger_Item, getLevelName) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "levelName"); } @@ -193,7 +171,8 @@ zend_object *zephir_init_properties_Phalcon_Logger_Item(zend_class_entry *class_ ZVAL_UNDEF(&_1$$3); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/logger/item.zep.h b/ext/phalcon/logger/item.zep.h index f72be18a5c7..705ea823a15 100644 --- a/ext/phalcon/logger/item.zep.h +++ b/ext/phalcon/logger/item.zep.h @@ -16,11 +16,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_logger_item___construct, 0, 0, 4) ZEND_ARG_TYPE_INFO(0, levelName, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, level, IS_LONG, 0) ZEND_ARG_OBJ_INFO(0, dateTime, DateTimeImmutable, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, context, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_logger_item_getcontext, 0, 0, IS_ARRAY, 0) diff --git a/ext/phalcon/logger/logger.zep.c b/ext/phalcon/logger/logger.zep.c index f3c5cc739c9..a018d92f75b 100644 --- a/ext/phalcon/logger/logger.zep.c +++ b/ext/phalcon/logger/logger.zep.c @@ -68,17 +68,13 @@ PHP_METHOD(Phalcon_Logger_Logger, alert) ZVAL_UNDEF(&message); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&context); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(message) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(context) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &message_param, &context_param); zephir_get_strval(&message, message_param); if (!context_param) { @@ -87,8 +83,6 @@ PHP_METHOD(Phalcon_Logger_Logger, alert) } else { zephir_get_arrval(&context, context_param); } - - ZVAL_LONG(&_0, 2); ZEPHIR_CALL_METHOD(NULL, this_ptr, "addmessage", NULL, 0, &_0, &message, &context); zephir_check_call_status(); @@ -119,17 +113,13 @@ PHP_METHOD(Phalcon_Logger_Logger, critical) ZVAL_UNDEF(&message); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&context); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(message) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(context) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &message_param, &context_param); zephir_get_strval(&message, message_param); if (!context_param) { @@ -138,8 +128,6 @@ PHP_METHOD(Phalcon_Logger_Logger, critical) } else { zephir_get_arrval(&context, context_param); } - - ZVAL_LONG(&_0, 1); ZEPHIR_CALL_METHOD(NULL, this_ptr, "addmessage", NULL, 0, &_0, &message, &context); zephir_check_call_status(); @@ -168,17 +156,13 @@ PHP_METHOD(Phalcon_Logger_Logger, debug) ZVAL_UNDEF(&message); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&context); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(message) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(context) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &message_param, &context_param); zephir_get_strval(&message, message_param); if (!context_param) { @@ -187,8 +171,6 @@ PHP_METHOD(Phalcon_Logger_Logger, debug) } else { zephir_get_arrval(&context, context_param); } - - ZVAL_LONG(&_0, 7); ZEPHIR_CALL_METHOD(NULL, this_ptr, "addmessage", NULL, 0, &_0, &message, &context); zephir_check_call_status(); @@ -217,17 +199,13 @@ PHP_METHOD(Phalcon_Logger_Logger, emergency) ZVAL_UNDEF(&message); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&context); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(message) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(context) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &message_param, &context_param); zephir_get_strval(&message, message_param); if (!context_param) { @@ -236,8 +214,6 @@ PHP_METHOD(Phalcon_Logger_Logger, emergency) } else { zephir_get_arrval(&context, context_param); } - - ZVAL_LONG(&_0, 0); ZEPHIR_CALL_METHOD(NULL, this_ptr, "addmessage", NULL, 0, &_0, &message, &context); zephir_check_call_status(); @@ -267,17 +243,13 @@ PHP_METHOD(Phalcon_Logger_Logger, error) ZVAL_UNDEF(&message); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&context); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(message) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(context) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &message_param, &context_param); zephir_get_strval(&message, message_param); if (!context_param) { @@ -286,8 +258,6 @@ PHP_METHOD(Phalcon_Logger_Logger, error) } else { zephir_get_arrval(&context, context_param); } - - ZVAL_LONG(&_0, 3); ZEPHIR_CALL_METHOD(NULL, this_ptr, "addmessage", NULL, 0, &_0, &message, &context); zephir_check_call_status(); @@ -318,17 +288,13 @@ PHP_METHOD(Phalcon_Logger_Logger, info) ZVAL_UNDEF(&message); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&context); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(message) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(context) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &message_param, &context_param); zephir_get_strval(&message, message_param); if (!context_param) { @@ -337,8 +303,6 @@ PHP_METHOD(Phalcon_Logger_Logger, info) } else { zephir_get_arrval(&context, context_param); } - - ZVAL_LONG(&_0, 6); ZEPHIR_CALL_METHOD(NULL, this_ptr, "addmessage", NULL, 0, &_0, &message, &context); zephir_check_call_status(); @@ -370,18 +334,14 @@ PHP_METHOD(Phalcon_Logger_Logger, log) ZVAL_UNDEF(&message); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&context); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_ZVAL(level) Z_PARAM_STR(message) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(context) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &level, &message_param, &context_param); zephir_get_strval(&message, message_param); if (!context_param) { @@ -390,8 +350,6 @@ PHP_METHOD(Phalcon_Logger_Logger, log) } else { zephir_get_arrval(&context, context_param); } - - ZEPHIR_CALL_METHOD(&intLevel, this_ptr, "getlevelnumber", NULL, 0, level); zephir_check_call_status(); zephir_cast_to_string(&_0, &message); @@ -422,17 +380,13 @@ PHP_METHOD(Phalcon_Logger_Logger, notice) ZVAL_UNDEF(&message); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&context); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(message) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(context) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &message_param, &context_param); zephir_get_strval(&message, message_param); if (!context_param) { @@ -441,8 +395,6 @@ PHP_METHOD(Phalcon_Logger_Logger, notice) } else { zephir_get_arrval(&context, context_param); } - - ZVAL_LONG(&_0, 5); ZEPHIR_CALL_METHOD(NULL, this_ptr, "addmessage", NULL, 0, &_0, &message, &context); zephir_check_call_status(); @@ -474,17 +426,13 @@ PHP_METHOD(Phalcon_Logger_Logger, warning) ZVAL_UNDEF(&message); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&context); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(message) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(context) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &message_param, &context_param); zephir_get_strval(&message, message_param); if (!context_param) { @@ -493,8 +441,6 @@ PHP_METHOD(Phalcon_Logger_Logger, warning) } else { zephir_get_arrval(&context, context_param); } - - ZVAL_LONG(&_0, 4); ZEPHIR_CALL_METHOD(NULL, this_ptr, "addmessage", NULL, 0, &_0, &message, &context); zephir_check_call_status(); diff --git a/ext/phalcon/logger/logger.zep.h b/ext/phalcon/logger/logger.zep.h index 70bf381c8a2..b0aff2c2881 100644 --- a/ext/phalcon/logger/logger.zep.h +++ b/ext/phalcon/logger/logger.zep.h @@ -16,92 +16,56 @@ PHP_METHOD(Phalcon_Logger_Logger, warning); ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_logger_logger_alert, 0, 1, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, context, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_logger_logger_critical, 0, 1, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, context, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_logger_logger_debug, 0, 1, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, context, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_logger_logger_emergency, 0, 1, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, context, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_logger_logger_error, 0, 1, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, context, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_logger_logger_info, 0, 1, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, context, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_logger_logger_log, 0, 2, IS_VOID, 0) ZEND_ARG_INFO(0, level) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, context, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_logger_logger_notice, 0, 1, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, context, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_logger_logger_warning, 0, 1, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, context, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_logger_logger_method_entry) { diff --git a/ext/phalcon/logger/loggerfactory.zep.c b/ext/phalcon/logger/loggerfactory.zep.c index ce01692519b..d8c1fe50d52 100644 --- a/ext/phalcon/logger/loggerfactory.zep.c +++ b/ext/phalcon/logger/loggerfactory.zep.c @@ -53,17 +53,10 @@ PHP_METHOD(Phalcon_Logger_LoggerFactory, __construct) zval *this_ptr = getThis(); ZVAL_UNDEF(&factory_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(factory, phalcon_logger_adapterfactory_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &factory); - - zephir_update_property_zval(this_ptr, ZEND_STRL("adapterFactory"), factory); } @@ -119,19 +112,13 @@ PHP_METHOD(Phalcon_Logger_LoggerFactory, load) ZVAL_UNDEF(&_14$$4); ZVAL_UNDEF(&_15$$4); ZVAL_UNDEF(&data); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(config) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &config); ZEPHIR_SEPARATE_PARAM(config); - - ZEPHIR_INIT_VAR(&data); array_init(&data); ZEPHIR_CALL_METHOD(&_0, this_ptr, "checkconfig", NULL, 0, config); @@ -142,7 +129,7 @@ PHP_METHOD(Phalcon_Logger_LoggerFactory, load) ZEPHIR_CALL_METHOD(&_0, this_ptr, "checkconfigelement", NULL, 0, config, &_1); zephir_check_call_status(); ZEPHIR_CPY_WRT(config, &_0); - ZEPHIR_OBS_VAR(&name); + zephir_memory_observe(&name); zephir_array_fetch_string(&name, config, SL("name"), PH_NOISY, "phalcon/Logger/LoggerFactory.zep", 62); ZEPHIR_INIT_NVAR(&_1); ZVAL_STRING(&_1, "timezone"); @@ -249,13 +236,11 @@ PHP_METHOD(Phalcon_Logger_LoggerFactory, newInstance) zval adapters; zval *name_param = NULL, *adapters_param = NULL, *timezone = NULL, timezone_sub, __$null; zval name; - zval *this_ptr = getThis(); ZVAL_UNDEF(&name); ZVAL_UNDEF(&timezone_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&adapters); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(name) @@ -263,10 +248,8 @@ PHP_METHOD(Phalcon_Logger_LoggerFactory, newInstance) Z_PARAM_ARRAY(adapters) Z_PARAM_OBJECT_OF_CLASS_OR_NULL(timezone, php_date_get_timezone_ce()) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &name_param, &adapters_param, &timezone); zephir_get_strval(&name, name_param); if (!adapters_param) { @@ -279,10 +262,8 @@ PHP_METHOD(Phalcon_Logger_LoggerFactory, newInstance) timezone = &timezone_sub; timezone = &__$null; } - - object_init_ex(return_value, phalcon_logger_logger_ce); - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 413, &name, &adapters, timezone); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 414, &name, &adapters, timezone); zephir_check_call_status(); RETURN_MM(); } @@ -295,14 +276,12 @@ PHP_METHOD(Phalcon_Logger_LoggerFactory, getArrVal) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *collection_param = NULL, *index, index_sub, *defaultValue = NULL, defaultValue_sub, __$null, value; zval collection; - zval *this_ptr = getThis(); ZVAL_UNDEF(&collection); ZVAL_UNDEF(&index_sub); ZVAL_UNDEF(&defaultValue_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&value); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_ARRAY(collection) @@ -310,23 +289,20 @@ PHP_METHOD(Phalcon_Logger_LoggerFactory, getArrVal) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(defaultValue) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &collection_param, &index, &defaultValue); ZEPHIR_OBS_COPY_OR_DUP(&collection, collection_param); if (!defaultValue) { defaultValue = &defaultValue_sub; defaultValue = &__$null; } - - - if (UNEXPECTED(!(zephir_array_isset_fetch(&value, &collection, index, 1)))) { + zephir_memory_observe(&value); + if (UNEXPECTED(!(zephir_array_isset_fetch(&value, &collection, index, 0)))) { RETVAL_ZVAL(defaultValue, 1, 0); RETURN_MM(); } - RETURN_CTOR(&value); + RETURN_CCTOR(&value); } /** @@ -334,9 +310,6 @@ PHP_METHOD(Phalcon_Logger_LoggerFactory, getArrVal) */ PHP_METHOD(Phalcon_Logger_LoggerFactory, getExceptionClass) { - zval *this_ptr = getThis(); - - RETURN_STRING("Phalcon\\Logger\\Exception"); } diff --git a/ext/phalcon/logger/loggerfactory.zep.h b/ext/phalcon/logger/loggerfactory.zep.h index fab301ba457..5958df853aa 100644 --- a/ext/phalcon/logger/loggerfactory.zep.h +++ b/ext/phalcon/logger/loggerfactory.zep.h @@ -19,11 +19,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_logger_loggerfactory_newinstance, 0, 1, Phalcon\\Logger\\Logger, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, adapters, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, adapters, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, adapters, IS_ARRAY, 0, "[]") ZEND_ARG_OBJ_INFO(0, timezone, DateTimeZone, 1) ZEND_END_ARG_INFO() diff --git a/ext/phalcon/logger/loggerinterface.zep.h b/ext/phalcon/logger/loggerinterface.zep.h index 3dfecf6a698..6a0a66a6d1e 100644 --- a/ext/phalcon/logger/loggerinterface.zep.h +++ b/ext/phalcon/logger/loggerinterface.zep.h @@ -6,51 +6,31 @@ ZEPHIR_INIT_CLASS(Phalcon_Logger_LoggerInterface); ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_logger_loggerinterface_alert, 0, 1, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, context, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_logger_loggerinterface_critical, 0, 1, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, context, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_logger_loggerinterface_debug, 0, 1, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, context, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_logger_loggerinterface_emergency, 0, 1, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, context, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_logger_loggerinterface_error, 0, 1, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, context, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_logger_loggerinterface_getadapter, 0, 1, Phalcon\\Logger\\Adapter\\AdapterInterface, 0) @@ -69,42 +49,26 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_logger_loggerinterface_info, 0, 1, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, context, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_logger_loggerinterface_log, 0, 2, IS_VOID, 0) ZEND_ARG_INFO(0, level) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, context, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_logger_loggerinterface_notice, 0, 1, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, context, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_logger_loggerinterface_warning, 0, 1, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, context, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_logger_loggerinterface_method_entry) { diff --git a/ext/phalcon/messages/message.zep.c b/ext/phalcon/messages/message.zep.c index 12cb9e113c3..f0f8c9d72f8 100644 --- a/ext/phalcon/messages/message.zep.c +++ b/ext/phalcon/messages/message.zep.c @@ -14,10 +14,10 @@ #include "kernel/main.h" #include "ext/json/php_json.h" #include "kernel/object.h" -#include "kernel/memory.h" #include "ext/spl/spl_exceptions.h" #include "kernel/exception.h" #include "kernel/operators.h" +#include "kernel/memory.h" #include "kernel/array.h" @@ -82,8 +82,6 @@ PHP_METHOD(Phalcon_Messages_Message, __construct) ZVAL_UNDEF(&field_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&metaData); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 5) Z_PARAM_STR(message) Z_PARAM_OPTIONAL @@ -92,10 +90,8 @@ PHP_METHOD(Phalcon_Messages_Message, __construct) Z_PARAM_LONG(code) Z_PARAM_ARRAY(metaData) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 4, &message_param, &field, &type_param, &code_param, &metaData_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")); @@ -120,20 +116,17 @@ PHP_METHOD(Phalcon_Messages_Message, __construct) if (!code_param) { code = 0; } else { - code = zephir_get_intval(code_param); - } + } if (!metaData_param) { ZEPHIR_INIT_VAR(&metaData); array_init(&metaData); } else { zephir_get_arrval(&metaData, metaData_param); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("message"), &message); zephir_update_property_zval(this_ptr, ZEND_STRL("field"), field); zephir_update_property_zval(this_ptr, ZEND_STRL("type"), &type); - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, code); zephir_update_property_zval(this_ptr, ZEND_STRL("code"), &_0); zephir_update_property_zval(this_ptr, ZEND_STRL("metaData"), &metaData); @@ -145,9 +138,6 @@ PHP_METHOD(Phalcon_Messages_Message, __construct) */ PHP_METHOD(Phalcon_Messages_Message, __toString) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "message"); } @@ -157,9 +147,6 @@ PHP_METHOD(Phalcon_Messages_Message, __toString) */ PHP_METHOD(Phalcon_Messages_Message, getCode) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "code"); } @@ -169,9 +156,6 @@ PHP_METHOD(Phalcon_Messages_Message, getCode) */ PHP_METHOD(Phalcon_Messages_Message, getField) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "field"); } @@ -181,9 +165,6 @@ PHP_METHOD(Phalcon_Messages_Message, getField) */ PHP_METHOD(Phalcon_Messages_Message, getMessage) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "message"); } @@ -193,9 +174,6 @@ PHP_METHOD(Phalcon_Messages_Message, getMessage) */ PHP_METHOD(Phalcon_Messages_Message, getType) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "type"); } @@ -205,9 +183,6 @@ PHP_METHOD(Phalcon_Messages_Message, getType) */ PHP_METHOD(Phalcon_Messages_Message, getMetaData) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "metaData"); } @@ -222,12 +197,11 @@ PHP_METHOD(Phalcon_Messages_Message, jsonSerialize) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_create_array(return_value, 5, 0); - ZEPHIR_OBS_VAR(&_0); + zephir_memory_observe(&_0); zephir_read_property(&_0, this_ptr, ZEND_STRL("field"), PH_NOISY_CC); zephir_array_update_string(return_value, SL("field"), &_0, PH_COPY | PH_SEPARATE); ZEPHIR_OBS_NVAR(&_0); @@ -255,19 +229,11 @@ PHP_METHOD(Phalcon_Messages_Message, setCode) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(code) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &code_param); - code = zephir_get_intval(code_param); - - - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, code); zephir_update_property_zval(this_ptr, ZEND_STRL("code"), &_0); RETURN_THISW(); @@ -282,17 +248,10 @@ PHP_METHOD(Phalcon_Messages_Message, setField) zval *this_ptr = getThis(); ZVAL_UNDEF(&field_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(field) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &field); - - zephir_update_property_zval(this_ptr, ZEND_STRL("field"), field); RETURN_THISW(); } @@ -308,15 +267,11 @@ PHP_METHOD(Phalcon_Messages_Message, setMessage) zval *this_ptr = getThis(); ZVAL_UNDEF(&message); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(message) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -327,8 +282,6 @@ PHP_METHOD(Phalcon_Messages_Message, setMessage) } else { ZEPHIR_INIT_VAR(&message); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("message"), &message); RETURN_THIS(); } @@ -344,19 +297,13 @@ PHP_METHOD(Phalcon_Messages_Message, setMetaData) zval *this_ptr = getThis(); ZVAL_UNDEF(&metaData); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(metaData) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &metaData_param); ZEPHIR_OBS_COPY_OR_DUP(&metaData, metaData_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("metaData"), &metaData); RETURN_THIS(); } @@ -372,15 +319,11 @@ PHP_METHOD(Phalcon_Messages_Message, setType) zval *this_ptr = getThis(); ZVAL_UNDEF(&type); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &type_param); if (UNEXPECTED(Z_TYPE_P(type_param) != IS_STRING && Z_TYPE_P(type_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'type' must be of the type string")); @@ -391,8 +334,6 @@ PHP_METHOD(Phalcon_Messages_Message, setType) } else { ZEPHIR_INIT_VAR(&type); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("type"), &type); RETURN_THIS(); } @@ -405,7 +346,8 @@ zend_object *zephir_init_properties_Phalcon_Messages_Message(zend_class_entry *c ZVAL_UNDEF(&_1$$3); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/messages/message.zep.h b/ext/phalcon/messages/message.zep.h index 79aa9ef6fe5..3844c54f315 100644 --- a/ext/phalcon/messages/message.zep.h +++ b/ext/phalcon/messages/message.zep.h @@ -23,11 +23,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_messages_message___construct, 0, 0, 1) ZEND_ARG_INFO(0, field) ZEND_ARG_TYPE_INFO(0, type, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, code, IS_LONG, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, metaData, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, metaData, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, metaData, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_messages_message___tostring, 0, 0, IS_STRING, 0) diff --git a/ext/phalcon/messages/messages.zep.c b/ext/phalcon/messages/messages.zep.c index 8c951ad2994..05bd0d940ca 100644 --- a/ext/phalcon/messages/messages.zep.c +++ b/ext/phalcon/messages/messages.zep.c @@ -63,16 +63,12 @@ PHP_METHOD(Phalcon_Messages_Messages, __construct) zval *this_ptr = getThis(); ZVAL_UNDEF(&messages); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(messages) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &messages_param); if (!messages_param) { ZEPHIR_INIT_VAR(&messages); @@ -80,8 +76,6 @@ PHP_METHOD(Phalcon_Messages_Messages, __construct) } else { zephir_get_arrval(&messages, messages_param); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("messages"), &messages); ZEPHIR_MM_RESTORE(); } @@ -101,17 +95,10 @@ PHP_METHOD(Phalcon_Messages_Messages, appendMessage) zval *this_ptr = getThis(); ZVAL_UNDEF(&message_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(message, phalcon_messages_messageinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &message); - - zephir_update_property_array_append(this_ptr, SL("messages"), message); } @@ -138,18 +125,12 @@ PHP_METHOD(Phalcon_Messages_Messages, appendMessages) ZVAL_UNDEF(&finalMessages); ZVAL_UNDEF(&message); ZVAL_UNDEF(&_1$$7); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(messages) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &messages); - - _0 = Z_TYPE_P(messages) != IS_ARRAY; if (_0) { _0 = Z_TYPE_P(messages) != IS_OBJECT; @@ -158,7 +139,7 @@ PHP_METHOD(Phalcon_Messages_Messages, appendMessages) ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_messages_exception_ce, "The messages must be iterable", "phalcon/Messages/Messages.zep", 69); return; } - ZEPHIR_OBS_VAR(¤tMessages); + zephir_memory_observe(¤tMessages); zephir_read_property(¤tMessages, this_ptr, ZEND_STRL("messages"), PH_NOISY_CC); if (Z_TYPE_P(messages) == IS_ARRAY) { if (Z_TYPE_P(¤tMessages) == IS_ARRAY) { @@ -197,9 +178,6 @@ PHP_METHOD(Phalcon_Messages_Messages, count) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - zephir_read_property(&_0, this_ptr, ZEND_STRL("messages"), PH_NOISY_CC | PH_READONLY); RETURN_LONG(zephir_fast_count_int(&_0)); } @@ -216,12 +194,11 @@ PHP_METHOD(Phalcon_Messages_Messages, current) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("messages"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_OBS_VAR(&_2); + zephir_memory_observe(&_2); zephir_read_property(&_2, this_ptr, ZEND_STRL("position"), PH_NOISY_CC); zephir_array_fetch(&_1, &_0, &_2, PH_NOISY | PH_READONLY, "phalcon/Messages/Messages.zep", 117); RETURN_CTOR(&_1); @@ -246,15 +223,11 @@ PHP_METHOD(Phalcon_Messages_Messages, filter) ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$5); ZVAL_UNDEF(&_4$$8); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(fieldName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &fieldName_param); if (UNEXPECTED(Z_TYPE_P(fieldName_param) != IS_STRING && Z_TYPE_P(fieldName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'fieldName' must be of the type string")); @@ -265,8 +238,6 @@ PHP_METHOD(Phalcon_Messages_Messages, filter) } else { ZEPHIR_INIT_VAR(&fieldName); } - - ZEPHIR_INIT_VAR(&filtered); array_init(&filtered); zephir_read_property(&_0, this_ptr, ZEND_STRL("messages"), PH_NOISY_CC | PH_READONLY); @@ -337,9 +308,8 @@ PHP_METHOD(Phalcon_Messages_Messages, jsonSerialize) ZVAL_UNDEF(&_4$$4); ZVAL_UNDEF(&_6$$7); ZVAL_UNDEF(&records); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&records); array_init(&records); @@ -397,9 +367,6 @@ PHP_METHOD(Phalcon_Messages_Messages, jsonSerialize) */ PHP_METHOD(Phalcon_Messages_Messages, key) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "position"); } @@ -410,9 +377,6 @@ PHP_METHOD(Phalcon_Messages_Messages, key) PHP_METHOD(Phalcon_Messages_Messages, next) { zval *this_ptr = getThis(); - - - RETURN_ON_FAILURE(zephir_property_incr(this_ptr, SL("position"))); } @@ -435,17 +399,10 @@ PHP_METHOD(Phalcon_Messages_Messages, offsetExists) ZVAL_UNDEF(&index_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(index) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &index); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("messages"), PH_NOISY_CC | PH_READONLY); RETURN_BOOL(zephir_array_isset(&_0, index)); } @@ -470,22 +427,17 @@ PHP_METHOD(Phalcon_Messages_Messages, offsetGet) ZVAL_UNDEF(&message); ZVAL_UNDEF(&returnValue); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(index) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &index); - - ZEPHIR_INIT_VAR(&returnValue); ZVAL_NULL(&returnValue); + zephir_memory_observe(&message); zephir_read_property(&_0, this_ptr, ZEND_STRL("messages"), PH_NOISY_CC | PH_READONLY); - if (zephir_array_isset_fetch(&message, &_0, index, 1)) { + if (zephir_array_isset_fetch(&message, &_0, index, 0)) { ZEPHIR_CPY_WRT(&returnValue, &message); } RETURN_CCTOR(&returnValue); @@ -503,33 +455,27 @@ PHP_METHOD(Phalcon_Messages_Messages, offsetGet) PHP_METHOD(Phalcon_Messages_Messages, offsetSet) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zval index_sub, message_sub, _0; - zval *index, *message; + zval offset_sub, value_sub, _0; + zval *offset, *value; zval *this_ptr = getThis(); - ZVAL_UNDEF(&index_sub); - ZVAL_UNDEF(&message_sub); + ZVAL_UNDEF(&offset_sub); + ZVAL_UNDEF(&value_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) - Z_PARAM_ZVAL(index) - Z_PARAM_ZVAL(message) + Z_PARAM_ZVAL(offset) + Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); - zephir_fetch_params(1, 2, 0, &index, &message); - - + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); + zephir_fetch_params(1, 2, 0, &offset, &value); ZEPHIR_INIT_VAR(&_0); - zephir_gettype(&_0, message); - if (!ZEPHIR_IS_STRING(&_0, "object")) { + zephir_gettype(&_0, value); + if (!ZEPHIR_IS_STRING_IDENTICAL(&_0, "object")) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_messages_exception_ce, "The message must be an object", "phalcon/Messages/Messages.zep", 241); return; } - zephir_update_property_array(this_ptr, SL("messages"), index, message); + zephir_update_property_array(this_ptr, SL("messages"), offset, value); ZEPHIR_MM_RESTORE(); } @@ -552,24 +498,18 @@ PHP_METHOD(Phalcon_Messages_Messages, offsetUnset) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(index) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &index); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("messages"), PH_NOISY_CC | PH_READONLY); if (zephir_array_isset(&_0, index)) { zephir_read_property(&_1$$3, this_ptr, ZEND_STRL("messages"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_2$$3, 1); ZEPHIR_MAKE_REF(&_1$$3); - ZEPHIR_CALL_FUNCTION(NULL, "array_splice", NULL, 414, &_1$$3, index, &_2$$3); + ZEPHIR_CALL_FUNCTION(NULL, "array_splice", NULL, 415, &_1$$3, index, &_2$$3); ZEPHIR_UNREF(&_1$$3); zephir_check_call_status(); } @@ -585,10 +525,7 @@ PHP_METHOD(Phalcon_Messages_Messages, rewind) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, 0); zephir_update_property_zval(this_ptr, ZEND_STRL("position"), &_0); } @@ -603,9 +540,6 @@ PHP_METHOD(Phalcon_Messages_Messages, valid) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - zephir_read_property(&_0, this_ptr, ZEND_STRL("messages"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_1, this_ptr, ZEND_STRL("position"), PH_NOISY_CC | PH_READONLY); RETURN_BOOL(zephir_array_isset(&_0, &_1)); diff --git a/ext/phalcon/messages/messages.zep.h b/ext/phalcon/messages/messages.zep.h index 4c24cc42012..78e6be10b75 100644 --- a/ext/phalcon/messages/messages.zep.h +++ b/ext/phalcon/messages/messages.zep.h @@ -20,11 +20,7 @@ PHP_METHOD(Phalcon_Messages_Messages, rewind); PHP_METHOD(Phalcon_Messages_Messages, valid); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_messages_messages___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, messages, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, messages, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, messages, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_messages_messages_appendmessage, 0, 0, 1) @@ -58,18 +54,14 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_messages_messages_offset ZEND_ARG_INFO(0, index) ZEND_END_ARG_INFO() -#if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_messages_messages_offsetget, 0, 1, IS_MIXED, 0) -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_messages_messages_offsetget, 0, 0, 1) -#endif ZEND_ARG_INFO(0, index) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_messages_messages_offsetset, 0, 2, IS_VOID, 0) - ZEND_ARG_INFO(0, index) - ZEND_ARG_INFO(0, message) + ZEND_ARG_INFO(0, offset) + ZEND_ARG_INFO(0, value) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_messages_messages_offsetunset, 0, 1, IS_VOID, 0) diff --git a/ext/phalcon/mvc/application.zep.c b/ext/phalcon/mvc/application.zep.c index 33a26c21fcf..a6488644837 100644 --- a/ext/phalcon/mvc/application.zep.c +++ b/ext/phalcon/mvc/application.zep.c @@ -167,15 +167,11 @@ PHP_METHOD(Phalcon_Mvc_Application, handle) ZVAL_UNDEF(&_39$$39); ZVAL_UNDEF(&_40$$40); ZVAL_UNDEF(&_17$$20); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(uri) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &uri_param); if (UNEXPECTED(Z_TYPE_P(uri_param) != IS_STRING && Z_TYPE_P(uri_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'uri' must be of the type string")); @@ -186,8 +182,6 @@ PHP_METHOD(Phalcon_Mvc_Application, handle) } else { ZEPHIR_INIT_VAR(&uri); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("container"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&container, &_0); if (Z_TYPE_P(&container) == IS_NULL) { @@ -283,19 +277,19 @@ PHP_METHOD(Phalcon_Mvc_Application, handle) return; } if (Z_TYPE_P(&module) == IS_ARRAY) { - ZEPHIR_OBS_VAR(&className); + zephir_memory_observe(&className); if (!(zephir_array_isset_string_fetch(&className, &module, SL("className"), 0))) { ZEPHIR_INIT_NVAR(&className); ZVAL_STRING(&className, "Module"); } - ZEPHIR_OBS_VAR(&path); + zephir_memory_observe(&path); if (zephir_array_isset_string_fetch(&path, &module, SL("path"), 0)) { if (UNEXPECTED(!((zephir_file_exists(&path) == SUCCESS)))) { ZEPHIR_INIT_VAR(&_14$$18); object_init_ex(&_14$$18, phalcon_mvc_application_exception_ce); ZEPHIR_INIT_VAR(&_15$$18); ZEPHIR_CONCAT_SVS(&_15$$18, "Module definition path '", &path, "' doesn't exist"); - ZEPHIR_CALL_METHOD(NULL, &_14$$18, "__construct", NULL, 32, &_15$$18); + ZEPHIR_CALL_METHOD(NULL, &_14$$18, "__construct", NULL, 33, &_15$$18); zephir_check_call_status(); zephir_throw_exception_debug(&_14$$18, "phalcon/Mvc/Application.zep", 218); ZEPHIR_MM_RESTORE(); @@ -486,18 +480,10 @@ PHP_METHOD(Phalcon_Mvc_Application, sendCookiesOnHandleRequest) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(sendCookies) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &sendCookies_param); - sendCookies = zephir_get_boolval(sendCookies_param); - - if (sendCookies) { zephir_update_property_zval(this_ptr, ZEND_STRL("sendCookies"), &__$true); } else { @@ -517,18 +503,10 @@ PHP_METHOD(Phalcon_Mvc_Application, sendHeadersOnHandleRequest) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(sendHeaders) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &sendHeaders_param); - sendHeaders = zephir_get_boolval(sendHeaders_param); - - if (sendHeaders) { zephir_update_property_zval(this_ptr, ZEND_STRL("sendHeaders"), &__$true); } else { @@ -549,18 +527,10 @@ PHP_METHOD(Phalcon_Mvc_Application, useImplicitView) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(implicitView) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &implicitView_param); - implicitView = zephir_get_boolval(implicitView_param); - - if (implicitView) { zephir_update_property_zval(this_ptr, ZEND_STRL("implicitView"), &__$true); } else { diff --git a/ext/phalcon/mvc/controller.zep.c b/ext/phalcon/mvc/controller.zep.c index 9d28c3a5d96..ec1f806d320 100644 --- a/ext/phalcon/mvc/controller.zep.c +++ b/ext/phalcon/mvc/controller.zep.c @@ -81,10 +81,8 @@ PHP_METHOD(Phalcon_Mvc_Controller, __construct) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *this_ptr = getThis(); - - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); if ((zephir_method_exists_ex(this_ptr, ZEND_STRL("onconstruct")) == SUCCESS)) { ZEPHIR_CALL_METHOD(NULL, this_ptr, "onconstruct", NULL, 0); diff --git a/ext/phalcon/mvc/controller.zep.h b/ext/phalcon/mvc/controller.zep.h index fa373b2fd0b..e7e843944a6 100644 --- a/ext/phalcon/mvc/controller.zep.h +++ b/ext/phalcon/mvc/controller.zep.h @@ -9,10 +9,6 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_controller___construct, 0, 0, 0) ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_mvc_controller_method_entry) { -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Mvc_Controller, __construct, arginfo_phalcon_mvc_controller___construct, ZEND_ACC_FINAL|ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) -#else - PHP_ME(Phalcon_Mvc_Controller, __construct, NULL, ZEND_ACC_FINAL|ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) -#endif +PHP_ME(Phalcon_Mvc_Controller, __construct, arginfo_phalcon_mvc_controller___construct, ZEND_ACC_FINAL|ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) PHP_FE_END }; diff --git a/ext/phalcon/mvc/dispatcher.zep.c b/ext/phalcon/mvc/dispatcher.zep.c index e9bf16c95ca..e4dd45b717b 100644 --- a/ext/phalcon/mvc/dispatcher.zep.c +++ b/ext/phalcon/mvc/dispatcher.zep.c @@ -121,7 +121,6 @@ ZEPHIR_INIT_CLASS(Phalcon_Mvc_Dispatcher) PHP_METHOD(Phalcon_Mvc_Dispatcher, forward) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zephir_fcall_cache_entry *_2 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *forward_param = NULL, eventsManager, _0, _1$$3; zval forward; @@ -131,19 +130,13 @@ PHP_METHOD(Phalcon_Mvc_Dispatcher, forward) ZVAL_UNDEF(&eventsManager); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(forward) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &forward_param); zephir_get_arrval(&forward, forward_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("eventsManager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&eventsManager, &_0); if (Z_TYPE_P(&eventsManager) == IS_OBJECT) { @@ -152,7 +145,7 @@ PHP_METHOD(Phalcon_Mvc_Dispatcher, forward) ZEPHIR_CALL_METHOD(NULL, &eventsManager, "fire", NULL, 0, &_1$$3, this_ptr, &forward); zephir_check_call_status(); } - ZEPHIR_CALL_PARENT(NULL, phalcon_mvc_dispatcher_ce, getThis(), "forward", &_2, 0, &forward); + ZEPHIR_CALL_PARENT(NULL, phalcon_mvc_dispatcher_ce, getThis(), "forward", NULL, 0, &forward); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -162,9 +155,6 @@ PHP_METHOD(Phalcon_Mvc_Dispatcher, forward) */ PHP_METHOD(Phalcon_Mvc_Dispatcher, getActiveController) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "activeHandler"); } @@ -178,10 +168,8 @@ PHP_METHOD(Phalcon_Mvc_Dispatcher, getControllerClass) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *this_ptr = getThis(); - - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "gethandlerclass", NULL, 0); zephir_check_call_status(); @@ -193,9 +181,6 @@ PHP_METHOD(Phalcon_Mvc_Dispatcher, getControllerClass) */ PHP_METHOD(Phalcon_Mvc_Dispatcher, getControllerName) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "handlerName"); } @@ -205,9 +190,6 @@ PHP_METHOD(Phalcon_Mvc_Dispatcher, getControllerName) */ PHP_METHOD(Phalcon_Mvc_Dispatcher, getLastController) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "lastHandler"); } @@ -217,9 +199,6 @@ PHP_METHOD(Phalcon_Mvc_Dispatcher, getLastController) */ PHP_METHOD(Phalcon_Mvc_Dispatcher, getPreviousActionName) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "previousActionName"); } @@ -229,9 +208,6 @@ PHP_METHOD(Phalcon_Mvc_Dispatcher, getPreviousActionName) */ PHP_METHOD(Phalcon_Mvc_Dispatcher, getPreviousControllerName) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "previousHandlerName"); } @@ -241,9 +217,6 @@ PHP_METHOD(Phalcon_Mvc_Dispatcher, getPreviousControllerName) */ PHP_METHOD(Phalcon_Mvc_Dispatcher, getPreviousNamespaceName) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "previousNamespaceName"); } @@ -259,15 +232,11 @@ PHP_METHOD(Phalcon_Mvc_Dispatcher, setControllerName) zval *this_ptr = getThis(); ZVAL_UNDEF(&controllerName); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(controllerName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &controllerName_param); if (UNEXPECTED(Z_TYPE_P(controllerName_param) != IS_STRING && Z_TYPE_P(controllerName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'controllerName' must be of the type string")); @@ -278,8 +247,6 @@ PHP_METHOD(Phalcon_Mvc_Dispatcher, setControllerName) } else { ZEPHIR_INIT_VAR(&controllerName); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("handlerName"), &controllerName); ZEPHIR_MM_RESTORE(); } @@ -295,15 +262,11 @@ PHP_METHOD(Phalcon_Mvc_Dispatcher, setControllerSuffix) zval *this_ptr = getThis(); ZVAL_UNDEF(&controllerSuffix); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(controllerSuffix) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &controllerSuffix_param); if (UNEXPECTED(Z_TYPE_P(controllerSuffix_param) != IS_STRING && Z_TYPE_P(controllerSuffix_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'controllerSuffix' must be of the type string")); @@ -314,8 +277,6 @@ PHP_METHOD(Phalcon_Mvc_Dispatcher, setControllerSuffix) } else { ZEPHIR_INIT_VAR(&controllerSuffix); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("handlerSuffix"), &controllerSuffix); ZEPHIR_MM_RESTORE(); } @@ -331,15 +292,11 @@ PHP_METHOD(Phalcon_Mvc_Dispatcher, setDefaultController) zval *this_ptr = getThis(); ZVAL_UNDEF(&controllerName); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(controllerName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &controllerName_param); if (UNEXPECTED(Z_TYPE_P(controllerName_param) != IS_STRING && Z_TYPE_P(controllerName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'controllerName' must be of the type string")); @@ -350,8 +307,6 @@ PHP_METHOD(Phalcon_Mvc_Dispatcher, setDefaultController) } else { ZEPHIR_INIT_VAR(&controllerName); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("defaultHandler"), &controllerName); ZEPHIR_MM_RESTORE(); } @@ -371,18 +326,12 @@ PHP_METHOD(Phalcon_Mvc_Dispatcher, handleException) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(exception, zend_ce_exception) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &exception); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("eventsManager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&eventsManager, &_0); if (Z_TYPE_P(&eventsManager) == IS_OBJECT) { @@ -418,17 +367,13 @@ PHP_METHOD(Phalcon_Mvc_Dispatcher, throwDispatchException) ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(message) Z_PARAM_OPTIONAL Z_PARAM_LONG(exceptionCode) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &message_param, &exceptionCode_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")); @@ -442,10 +387,7 @@ PHP_METHOD(Phalcon_Mvc_Dispatcher, throwDispatchException) if (!exceptionCode_param) { exceptionCode = 0; } else { - exceptionCode = zephir_get_intval(exceptionCode_param); - } - - + } zephir_read_property(&_0, this_ptr, ZEND_STRL("container"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&container, &_0); if (Z_TYPE_P(&container) == IS_NULL) { @@ -454,7 +396,7 @@ PHP_METHOD(Phalcon_Mvc_Dispatcher, throwDispatchException) ZEPHIR_INIT_VAR(&_2$$3); ZVAL_STRING(&_2$$3, "A dependency injection container is required to access the 'response' service"); ZVAL_LONG(&_3$$3, 0); - ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 32, &_2$$3, &_3$$3); + ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 33, &_2$$3, &_3$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_1$$3, "phalcon/Mvc/Dispatcher.zep", 228); ZEPHIR_MM_RESTORE(); @@ -473,7 +415,7 @@ PHP_METHOD(Phalcon_Mvc_Dispatcher, throwDispatchException) ZEPHIR_INIT_VAR(&exception); object_init_ex(&exception, phalcon_mvc_dispatcher_exception_ce); ZVAL_LONG(&_0, exceptionCode); - ZEPHIR_CALL_METHOD(NULL, &exception, "__construct", NULL, 32, &message, &_0); + ZEPHIR_CALL_METHOD(NULL, &exception, "__construct", NULL, 33, &message, &_0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_4, this_ptr, "handleexception", NULL, 0, &exception); zephir_check_call_status(); diff --git a/ext/phalcon/mvc/micro.zep.c b/ext/phalcon/mvc/micro.zep.c index 7af9afb1414..a105fec1176 100644 --- a/ext/phalcon/mvc/micro.zep.c +++ b/ext/phalcon/mvc/micro.zep.c @@ -135,23 +135,18 @@ PHP_METHOD(Phalcon_Mvc_Micro, __construct) ZVAL_UNDEF(&container_sub); ZVAL_NULL(&__$null); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_OBJECT_OF_CLASS_OR_NULL(container, phalcon_di_diinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &container); if (!container) { container = &container_sub; container = &__$null; } - - if (Z_TYPE_P(container) != IS_NULL) { ZEPHIR_CALL_METHOD(NULL, this_ptr, "setdi", NULL, 0, container); zephir_check_call_status(); @@ -170,17 +165,10 @@ PHP_METHOD(Phalcon_Mvc_Micro, after) zval *this_ptr = getThis(); ZVAL_UNDEF(&handler_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(handler) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &handler); - - zephir_update_property_array_append(this_ptr, SL("afterHandlers"), handler); RETURN_THISW(); } @@ -196,17 +184,10 @@ PHP_METHOD(Phalcon_Mvc_Micro, afterBinding) zval *this_ptr = getThis(); ZVAL_UNDEF(&handler_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(handler) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &handler); - - zephir_update_property_array_append(this_ptr, SL("afterBindingHandlers"), handler); RETURN_THISW(); } @@ -222,17 +203,10 @@ PHP_METHOD(Phalcon_Mvc_Micro, before) zval *this_ptr = getThis(); ZVAL_UNDEF(&handler_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(handler) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &handler); - - zephir_update_property_array_append(this_ptr, SL("beforeHandlers"), handler); RETURN_THISW(); } @@ -255,16 +229,12 @@ PHP_METHOD(Phalcon_Mvc_Micro, delete) ZVAL_UNDEF(&router); ZVAL_UNDEF(&route); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(routePattern) Z_PARAM_ZVAL(handler) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &routePattern_param, &handler); if (UNEXPECTED(Z_TYPE_P(routePattern_param) != IS_STRING && Z_TYPE_P(routePattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'routePattern' must be of the type string")); @@ -275,8 +245,6 @@ PHP_METHOD(Phalcon_Mvc_Micro, delete) } else { ZEPHIR_INIT_VAR(&routePattern); } - - ZEPHIR_CALL_METHOD(&router, this_ptr, "getrouter", NULL, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&route, &router, "adddelete", NULL, 0, &routePattern); @@ -299,17 +267,10 @@ PHP_METHOD(Phalcon_Mvc_Micro, error) zval *this_ptr = getThis(); ZVAL_UNDEF(&handler_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(handler) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &handler); - - zephir_update_property_zval(this_ptr, ZEND_STRL("errorHandler"), handler); RETURN_THISW(); } @@ -325,17 +286,10 @@ PHP_METHOD(Phalcon_Mvc_Micro, finish) zval *this_ptr = getThis(); ZVAL_UNDEF(&handler_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(handler) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &handler); - - zephir_update_property_array_append(this_ptr, SL("finishHandlers"), handler); RETURN_THISW(); } @@ -358,16 +312,12 @@ PHP_METHOD(Phalcon_Mvc_Micro, get) ZVAL_UNDEF(&router); ZVAL_UNDEF(&route); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(routePattern) Z_PARAM_ZVAL(handler) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &routePattern_param, &handler); if (UNEXPECTED(Z_TYPE_P(routePattern_param) != IS_STRING && Z_TYPE_P(routePattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'routePattern' must be of the type string")); @@ -378,8 +328,6 @@ PHP_METHOD(Phalcon_Mvc_Micro, get) } else { ZEPHIR_INIT_VAR(&routePattern); } - - ZEPHIR_CALL_METHOD(&router, this_ptr, "getrouter", NULL, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&route, &router, "addget", NULL, 0, &routePattern); @@ -397,9 +345,6 @@ PHP_METHOD(Phalcon_Mvc_Micro, get) */ PHP_METHOD(Phalcon_Mvc_Micro, getActiveHandler) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "activeHandler"); } @@ -416,9 +361,8 @@ PHP_METHOD(Phalcon_Mvc_Micro, getBoundModels) ZVAL_UNDEF(&modelBinder); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("modelBinder"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&modelBinder, &_0); @@ -436,9 +380,6 @@ PHP_METHOD(Phalcon_Mvc_Micro, getBoundModels) */ PHP_METHOD(Phalcon_Mvc_Micro, getEventsManager) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "eventsManager"); } @@ -452,17 +393,10 @@ PHP_METHOD(Phalcon_Mvc_Micro, setEventsManager) zval *this_ptr = getThis(); ZVAL_UNDEF(&eventsManager_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(eventsManager, phalcon_events_managerinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &eventsManager); - - zephir_update_property_zval(this_ptr, ZEND_STRL("eventsManager"), eventsManager); } @@ -471,9 +405,6 @@ PHP_METHOD(Phalcon_Mvc_Micro, setEventsManager) */ PHP_METHOD(Phalcon_Mvc_Micro, getHandlers) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "handlers"); } @@ -483,9 +414,6 @@ PHP_METHOD(Phalcon_Mvc_Micro, getHandlers) */ PHP_METHOD(Phalcon_Mvc_Micro, getModelBinder) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "modelBinder"); } @@ -497,9 +425,6 @@ PHP_METHOD(Phalcon_Mvc_Micro, getModelBinder) */ PHP_METHOD(Phalcon_Mvc_Micro, getReturnedValue) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "returnedValue"); } @@ -520,9 +445,8 @@ PHP_METHOD(Phalcon_Mvc_Micro, getRouter) ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$3); ZVAL_UNDEF(&_5$$3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("router"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_0) == IS_NULL) { @@ -559,15 +483,11 @@ PHP_METHOD(Phalcon_Mvc_Micro, getService) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(serviceName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &serviceName_param); if (UNEXPECTED(Z_TYPE_P(serviceName_param) != IS_STRING && Z_TYPE_P(serviceName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'serviceName' must be of the type string")); @@ -578,13 +498,11 @@ PHP_METHOD(Phalcon_Mvc_Micro, getService) } else { ZEPHIR_INIT_VAR(&serviceName); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("container"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_0) == IS_NULL) { ZEPHIR_INIT_VAR(&_1$$3); object_init_ex(&_1$$3, phalcon_di_factorydefault_ce); - ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 415); + ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 416); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("container"), &_1$$3); } @@ -611,15 +529,11 @@ PHP_METHOD(Phalcon_Mvc_Micro, getSharedService) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(serviceName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &serviceName_param); if (UNEXPECTED(Z_TYPE_P(serviceName_param) != IS_STRING && Z_TYPE_P(serviceName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'serviceName' must be of the type string")); @@ -630,13 +544,11 @@ PHP_METHOD(Phalcon_Mvc_Micro, getSharedService) } else { ZEPHIR_INIT_VAR(&serviceName); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("container"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_0) == IS_NULL) { ZEPHIR_INIT_VAR(&_1$$3); object_init_ex(&_1$$3, phalcon_di_factorydefault_ce); - ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 415); + ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 416); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("container"), &_1$$3); } @@ -775,15 +687,11 @@ PHP_METHOD(Phalcon_Mvc_Micro, handle) ZVAL_UNDEF(&_81$$59); ZVAL_UNDEF(&_86$$64); ZVAL_UNDEF(&_95$$69); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(uri) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &uri_param); if (UNEXPECTED(Z_TYPE_P(uri_param) != IS_STRING && Z_TYPE_P(uri_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'uri' must be of the type string")); @@ -794,8 +702,6 @@ PHP_METHOD(Phalcon_Mvc_Micro, handle) } else { ZEPHIR_INIT_VAR(&uri); } - - ZEPHIR_INIT_VAR(&status); ZVAL_NULL(&status); ZEPHIR_INIT_VAR(&realHandler); @@ -832,7 +738,7 @@ PHP_METHOD(Phalcon_Mvc_Micro, handle) ZEPHIR_CALL_METHOD(&matchedRoute, &router, "getmatchedroute", NULL, 0); zephir_check_call_status_or_jump(try_end_1); if (Z_TYPE_P(&matchedRoute) != IS_NULL) { - ZEPHIR_OBS_VAR(&handler); + zephir_memory_observe(&handler); zephir_read_property(&_7$$7, this_ptr, ZEND_STRL("handlers"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&_8$$7, &matchedRoute, "getrouteid", NULL, 0); zephir_check_call_status_or_jump(try_end_1); @@ -841,7 +747,7 @@ PHP_METHOD(Phalcon_Mvc_Micro, handle) object_init_ex(&_9$$8, phalcon_mvc_micro_exception_ce); ZEPHIR_INIT_VAR(&_10$$8); ZVAL_STRING(&_10$$8, "Matched route doesn't have an associated handler"); - ZEPHIR_CALL_METHOD(NULL, &_9$$8, "__construct", NULL, 32, &_10$$8); + ZEPHIR_CALL_METHOD(NULL, &_9$$8, "__construct", NULL, 33, &_10$$8); zephir_check_call_status_or_jump(try_end_1); zephir_throw_exception_debug(&_9$$8, "phalcon/Mvc/Micro.zep", 432); goto try_end_1; @@ -887,7 +793,7 @@ PHP_METHOD(Phalcon_Mvc_Micro, handle) object_init_ex(&_19$$14, phalcon_mvc_micro_exception_ce); ZEPHIR_INIT_NVAR(&_20$$14); ZVAL_STRING(&_20$$14, "'before' handler is not callable"); - ZEPHIR_CALL_METHOD(NULL, &_19$$14, "__construct", NULL, 32, &_20$$14); + ZEPHIR_CALL_METHOD(NULL, &_19$$14, "__construct", NULL, 33, &_20$$14); zephir_check_call_status_or_jump(try_end_1); zephir_throw_exception_debug(&_19$$14, "phalcon/Mvc/Micro.zep", 467); goto try_end_1; @@ -926,7 +832,7 @@ PHP_METHOD(Phalcon_Mvc_Micro, handle) object_init_ex(&_23$$19, phalcon_mvc_micro_exception_ce); ZEPHIR_INIT_NVAR(&_24$$19); ZVAL_STRING(&_24$$19, "'before' handler is not callable"); - ZEPHIR_CALL_METHOD(NULL, &_23$$19, "__construct", NULL, 32, &_24$$19); + ZEPHIR_CALL_METHOD(NULL, &_23$$19, "__construct", NULL, 33, &_24$$19); zephir_check_call_status_or_jump(try_end_1); zephir_throw_exception_debug(&_23$$19, "phalcon/Mvc/Micro.zep", 467); goto try_end_1; @@ -985,7 +891,7 @@ PHP_METHOD(Phalcon_Mvc_Micro, handle) _33$$25 = Z_TYPE_P(&modelBinder) != IS_NULL; } if (_33$$25) { - ZEPHIR_OBS_VAR(&methodName); + zephir_memory_observe(&methodName); zephir_array_fetch_long(&methodName, &handler, 1, PH_NOISY, "phalcon/Mvc/Micro.zep", 518); ZEPHIR_INIT_VAR(&_34$$26); zephir_get_class(&_34$$26, &realHandler, 0); @@ -1049,7 +955,7 @@ PHP_METHOD(Phalcon_Mvc_Micro, handle) object_init_ex(&_45$$34, phalcon_mvc_micro_exception_ce); ZEPHIR_INIT_NVAR(&_46$$34); ZVAL_STRING(&_46$$34, "'afterBinding' handler is not callable"); - ZEPHIR_CALL_METHOD(NULL, &_45$$34, "__construct", NULL, 32, &_46$$34); + ZEPHIR_CALL_METHOD(NULL, &_45$$34, "__construct", NULL, 33, &_46$$34); zephir_check_call_status_or_jump(try_end_1); zephir_throw_exception_debug(&_45$$34, "phalcon/Mvc/Micro.zep", 578); goto try_end_1; @@ -1088,7 +994,7 @@ PHP_METHOD(Phalcon_Mvc_Micro, handle) object_init_ex(&_49$$39, phalcon_mvc_micro_exception_ce); ZEPHIR_INIT_NVAR(&_50$$39); ZVAL_STRING(&_50$$39, "'afterBinding' handler is not callable"); - ZEPHIR_CALL_METHOD(NULL, &_49$$39, "__construct", NULL, 32, &_50$$39); + ZEPHIR_CALL_METHOD(NULL, &_49$$39, "__construct", NULL, 33, &_50$$39); zephir_check_call_status_or_jump(try_end_1); zephir_throw_exception_debug(&_49$$39, "phalcon/Mvc/Micro.zep", 578); goto try_end_1; @@ -1142,7 +1048,7 @@ PHP_METHOD(Phalcon_Mvc_Micro, handle) object_init_ex(&_58$$45, phalcon_mvc_micro_exception_ce); ZEPHIR_INIT_NVAR(&_59$$45); ZVAL_STRING(&_59$$45, "One of the 'after' handlers is not callable"); - ZEPHIR_CALL_METHOD(NULL, &_58$$45, "__construct", NULL, 32, &_59$$45); + ZEPHIR_CALL_METHOD(NULL, &_58$$45, "__construct", NULL, 33, &_59$$45); zephir_check_call_status_or_jump(try_end_1); zephir_throw_exception_debug(&_58$$45, "phalcon/Mvc/Micro.zep", 624); goto try_end_1; @@ -1181,7 +1087,7 @@ PHP_METHOD(Phalcon_Mvc_Micro, handle) object_init_ex(&_62$$50, phalcon_mvc_micro_exception_ce); ZEPHIR_INIT_NVAR(&_63$$50); ZVAL_STRING(&_63$$50, "One of the 'after' handlers is not callable"); - ZEPHIR_CALL_METHOD(NULL, &_62$$50, "__construct", NULL, 32, &_63$$50); + ZEPHIR_CALL_METHOD(NULL, &_62$$50, "__construct", NULL, 33, &_63$$50); zephir_check_call_status_or_jump(try_end_1); zephir_throw_exception_debug(&_62$$50, "phalcon/Mvc/Micro.zep", 624); goto try_end_1; @@ -1219,7 +1125,7 @@ PHP_METHOD(Phalcon_Mvc_Micro, handle) object_init_ex(&_70$$55, phalcon_mvc_micro_exception_ce); ZEPHIR_INIT_VAR(&_71$$55); ZVAL_STRING(&_71$$55, "Not-Found handler is not callable or is not defined"); - ZEPHIR_CALL_METHOD(NULL, &_70$$55, "__construct", NULL, 32, &_71$$55); + ZEPHIR_CALL_METHOD(NULL, &_70$$55, "__construct", NULL, 33, &_71$$55); zephir_check_call_status_or_jump(try_end_1); zephir_throw_exception_debug(&_70$$55, "phalcon/Mvc/Micro.zep", 655); goto try_end_1; @@ -1263,7 +1169,7 @@ PHP_METHOD(Phalcon_Mvc_Micro, handle) object_init_ex(&_79$$60, phalcon_mvc_micro_exception_ce); ZEPHIR_INIT_NVAR(&_80$$60); ZVAL_STRING(&_80$$60, "One of the 'finish' handlers is not callable"); - ZEPHIR_CALL_METHOD(NULL, &_79$$60, "__construct", NULL, 32, &_80$$60); + ZEPHIR_CALL_METHOD(NULL, &_79$$60, "__construct", NULL, 33, &_80$$60); zephir_check_call_status_or_jump(try_end_1); zephir_throw_exception_debug(&_79$$60, "phalcon/Mvc/Micro.zep", 690); goto try_end_1; @@ -1305,7 +1211,7 @@ PHP_METHOD(Phalcon_Mvc_Micro, handle) object_init_ex(&_84$$65, phalcon_mvc_micro_exception_ce); ZEPHIR_INIT_NVAR(&_85$$65); ZVAL_STRING(&_85$$65, "One of the 'finish' handlers is not callable"); - ZEPHIR_CALL_METHOD(NULL, &_84$$65, "__construct", NULL, 32, &_85$$65); + ZEPHIR_CALL_METHOD(NULL, &_84$$65, "__construct", NULL, 33, &_85$$65); zephir_check_call_status_or_jump(try_end_1); zephir_throw_exception_debug(&_84$$65, "phalcon/Mvc/Micro.zep", 690); goto try_end_1; @@ -1441,15 +1347,11 @@ PHP_METHOD(Phalcon_Mvc_Micro, hasService) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(serviceName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &serviceName_param); if (UNEXPECTED(Z_TYPE_P(serviceName_param) != IS_STRING && Z_TYPE_P(serviceName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'serviceName' must be of the type string")); @@ -1460,13 +1362,11 @@ PHP_METHOD(Phalcon_Mvc_Micro, hasService) } else { ZEPHIR_INIT_VAR(&serviceName); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("container"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_0) == IS_NULL) { ZEPHIR_INIT_VAR(&_1$$3); object_init_ex(&_1$$3, phalcon_di_factorydefault_ce); - ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 415); + ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 416); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("container"), &_1$$3); } @@ -1494,16 +1394,12 @@ PHP_METHOD(Phalcon_Mvc_Micro, head) ZVAL_UNDEF(&router); ZVAL_UNDEF(&route); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(routePattern) Z_PARAM_ZVAL(handler) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &routePattern_param, &handler); if (UNEXPECTED(Z_TYPE_P(routePattern_param) != IS_STRING && Z_TYPE_P(routePattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'routePattern' must be of the type string")); @@ -1514,8 +1410,6 @@ PHP_METHOD(Phalcon_Mvc_Micro, head) } else { ZEPHIR_INIT_VAR(&routePattern); } - - ZEPHIR_CALL_METHOD(&router, this_ptr, "getrouter", NULL, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&route, &router, "addhead", NULL, 0, &routePattern); @@ -1544,16 +1438,12 @@ PHP_METHOD(Phalcon_Mvc_Micro, map) ZVAL_UNDEF(&router); ZVAL_UNDEF(&route); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(routePattern) Z_PARAM_ZVAL(handler) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &routePattern_param, &handler); if (UNEXPECTED(Z_TYPE_P(routePattern_param) != IS_STRING && Z_TYPE_P(routePattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'routePattern' must be of the type string")); @@ -1564,8 +1454,6 @@ PHP_METHOD(Phalcon_Mvc_Micro, map) } else { ZEPHIR_INIT_VAR(&routePattern); } - - ZEPHIR_CALL_METHOD(&router, this_ptr, "getrouter", NULL, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&route, &router, "add", NULL, 0, &routePattern); @@ -1604,18 +1492,12 @@ PHP_METHOD(Phalcon_Mvc_Micro, mount) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_6$$15); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(collection, phalcon_mvc_micro_collectioninterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &collection); - - ZEPHIR_CALL_METHOD(&mainHandler, collection, "gethandler", NULL, 0); zephir_check_call_status(); if (UNEXPECTED(ZEPHIR_IS_EMPTY(&mainHandler))) { @@ -1633,7 +1515,7 @@ PHP_METHOD(Phalcon_Mvc_Micro, mount) if (zephir_is_true(&_0)) { ZEPHIR_INIT_VAR(&lazyHandler); object_init_ex(&lazyHandler, phalcon_mvc_micro_lazyloader_ce); - ZEPHIR_CALL_METHOD(NULL, &lazyHandler, "__construct", NULL, 416, &mainHandler); + ZEPHIR_CALL_METHOD(NULL, &lazyHandler, "__construct", NULL, 417, &mainHandler); zephir_check_call_status(); } else { ZEPHIR_CPY_WRT(&lazyHandler, &mainHandler); @@ -1767,17 +1649,10 @@ PHP_METHOD(Phalcon_Mvc_Micro, notFound) zval *this_ptr = getThis(); ZVAL_UNDEF(&handler_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(handler) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &handler); - - zephir_update_property_zval(this_ptr, ZEND_STRL("notFoundHandler"), handler); RETURN_THISW(); } @@ -1797,18 +1672,12 @@ PHP_METHOD(Phalcon_Mvc_Micro, offsetExists) zval *this_ptr = getThis(); ZVAL_UNDEF(&offset_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(offset) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &offset); - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "hasservice", NULL, 0, offset); zephir_check_call_status(); RETURN_MM(); @@ -1835,18 +1704,12 @@ PHP_METHOD(Phalcon_Mvc_Micro, offsetGet) zval *this_ptr = getThis(); ZVAL_UNDEF(&offset_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(offset) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &offset); - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getservice", NULL, 0, offset); zephir_check_call_status(); RETURN_MM(); @@ -1870,19 +1733,13 @@ PHP_METHOD(Phalcon_Mvc_Micro, offsetSet) ZVAL_UNDEF(&offset_sub); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ZVAL(offset) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &offset, &value); - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "setservice", NULL, 0, offset, value); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); @@ -1904,23 +1761,17 @@ PHP_METHOD(Phalcon_Mvc_Micro, offsetUnset) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(offset) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &offset); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("container"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_0) == IS_NULL) { ZEPHIR_INIT_VAR(&_1$$3); object_init_ex(&_1$$3, phalcon_di_factorydefault_ce); - ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 415); + ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 416); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("container"), &_1$$3); } @@ -1948,16 +1799,12 @@ PHP_METHOD(Phalcon_Mvc_Micro, options) ZVAL_UNDEF(&router); ZVAL_UNDEF(&route); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(routePattern) Z_PARAM_ZVAL(handler) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &routePattern_param, &handler); if (UNEXPECTED(Z_TYPE_P(routePattern_param) != IS_STRING && Z_TYPE_P(routePattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'routePattern' must be of the type string")); @@ -1968,8 +1815,6 @@ PHP_METHOD(Phalcon_Mvc_Micro, options) } else { ZEPHIR_INIT_VAR(&routePattern); } - - ZEPHIR_CALL_METHOD(&router, this_ptr, "getrouter", NULL, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&route, &router, "addoptions", NULL, 0, &routePattern); @@ -1998,16 +1843,12 @@ PHP_METHOD(Phalcon_Mvc_Micro, patch) ZVAL_UNDEF(&router); ZVAL_UNDEF(&route); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(routePattern) Z_PARAM_ZVAL(handler) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &routePattern_param, &handler); if (UNEXPECTED(Z_TYPE_P(routePattern_param) != IS_STRING && Z_TYPE_P(routePattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'routePattern' must be of the type string")); @@ -2018,8 +1859,6 @@ PHP_METHOD(Phalcon_Mvc_Micro, patch) } else { ZEPHIR_INIT_VAR(&routePattern); } - - ZEPHIR_CALL_METHOD(&router, this_ptr, "getrouter", NULL, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&route, &router, "addpatch", NULL, 0, &routePattern); @@ -2048,16 +1887,12 @@ PHP_METHOD(Phalcon_Mvc_Micro, post) ZVAL_UNDEF(&router); ZVAL_UNDEF(&route); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(routePattern) Z_PARAM_ZVAL(handler) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &routePattern_param, &handler); if (UNEXPECTED(Z_TYPE_P(routePattern_param) != IS_STRING && Z_TYPE_P(routePattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'routePattern' must be of the type string")); @@ -2068,8 +1903,6 @@ PHP_METHOD(Phalcon_Mvc_Micro, post) } else { ZEPHIR_INIT_VAR(&routePattern); } - - ZEPHIR_CALL_METHOD(&router, this_ptr, "getrouter", NULL, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&route, &router, "addpost", NULL, 0, &routePattern); @@ -2098,16 +1931,12 @@ PHP_METHOD(Phalcon_Mvc_Micro, put) ZVAL_UNDEF(&router); ZVAL_UNDEF(&route); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(routePattern) Z_PARAM_ZVAL(handler) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &routePattern_param, &handler); if (UNEXPECTED(Z_TYPE_P(routePattern_param) != IS_STRING && Z_TYPE_P(routePattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'routePattern' must be of the type string")); @@ -2118,8 +1947,6 @@ PHP_METHOD(Phalcon_Mvc_Micro, put) } else { ZEPHIR_INIT_VAR(&routePattern); } - - ZEPHIR_CALL_METHOD(&router, this_ptr, "getrouter", NULL, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&route, &router, "addput", NULL, 0, &routePattern); @@ -2141,17 +1968,10 @@ PHP_METHOD(Phalcon_Mvc_Micro, setActiveHandler) zval *this_ptr = getThis(); ZVAL_UNDEF(&activeHandler_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(activeHandler) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &activeHandler); - - zephir_update_property_zval(this_ptr, ZEND_STRL("activeHandler"), activeHandler); } @@ -2164,17 +1984,10 @@ PHP_METHOD(Phalcon_Mvc_Micro, setDI) zval *this_ptr = getThis(); ZVAL_UNDEF(&container_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(container, phalcon_di_diinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &container); - - zephir_update_property_zval(this_ptr, ZEND_STRL("container"), container); } @@ -2201,17 +2014,14 @@ PHP_METHOD(Phalcon_Mvc_Micro, setModelBinder) ZVAL_UNDEF(&cache_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0$$3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_OBJECT_OF_CLASS(modelBinder, phalcon_mvc_model_binderinterface_ce) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(cache) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &modelBinder, &cache); if (!cache) { cache = &cache_sub; @@ -2219,8 +2029,6 @@ PHP_METHOD(Phalcon_Mvc_Micro, setModelBinder) } else { ZEPHIR_SEPARATE_PARAM(cache); } - - if (Z_TYPE_P(cache) == IS_STRING) { ZEPHIR_CALL_METHOD(&_0$$3, this_ptr, "getservice", NULL, 0, cache); zephir_check_call_status(); @@ -2246,17 +2054,10 @@ PHP_METHOD(Phalcon_Mvc_Micro, setResponseHandler) zval *this_ptr = getThis(); ZVAL_UNDEF(&handler_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(handler) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &handler); - - zephir_update_property_zval(this_ptr, ZEND_STRL("responseHandler"), handler); RETURN_THISW(); } @@ -2279,18 +2080,14 @@ PHP_METHOD(Phalcon_Mvc_Micro, setService) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(serviceName) Z_PARAM_ZVAL(definition) Z_PARAM_OPTIONAL Z_PARAM_BOOL(shared) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &serviceName_param, &definition, &shared_param); if (UNEXPECTED(Z_TYPE_P(serviceName_param) != IS_STRING && Z_TYPE_P(serviceName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'serviceName' must be of the type string")); @@ -2304,15 +2101,12 @@ PHP_METHOD(Phalcon_Mvc_Micro, setService) if (!shared_param) { shared = 0; } else { - shared = zephir_get_boolval(shared_param); - } - - + } zephir_read_property(&_0, this_ptr, ZEND_STRL("container"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_0) == IS_NULL) { ZEPHIR_INIT_VAR(&_1$$3); object_init_ex(&_1$$3, phalcon_di_factorydefault_ce); - ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 415); + ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 416); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("container"), &_1$$3); } @@ -2338,9 +2132,6 @@ PHP_METHOD(Phalcon_Mvc_Micro, stop) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); - - - if (1) { zephir_update_property_zval(this_ptr, ZEND_STRL("stopped"), &__$true); } else { @@ -2364,7 +2155,8 @@ zend_object *zephir_init_properties_Phalcon_Mvc_Micro(zend_class_entry *class_ty ZVAL_UNDEF(&_9$$7); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/mvc/micro.zep.h b/ext/phalcon/mvc/micro.zep.h index c5d46102210..4cf6a523cc7 100644 --- a/ext/phalcon/mvc/micro.zep.h +++ b/ext/phalcon/mvc/micro.zep.h @@ -141,11 +141,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_micro_offsetexists, ZEND_ARG_INFO(0, offset) ZEND_END_ARG_INFO() -#if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_micro_offsetget, 0, 1, IS_MIXED, 0) -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_micro_offsetget, 0, 0, 1) -#endif ZEND_ARG_INFO(0, offset) ZEND_END_ARG_INFO() @@ -219,21 +215,13 @@ ZEPHIR_INIT_FUNCS(phalcon_mvc_micro_method_entry) { PHP_ME(Phalcon_Mvc_Micro, error, arginfo_phalcon_mvc_micro_error, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Micro, finish, arginfo_phalcon_mvc_micro_finish, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Micro, get, arginfo_phalcon_mvc_micro_get, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Mvc_Micro, getActiveHandler, arginfo_phalcon_mvc_micro_getactivehandler, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Mvc_Micro, getActiveHandler, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Mvc_Micro, getActiveHandler, arginfo_phalcon_mvc_micro_getactivehandler, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Micro, getBoundModels, arginfo_phalcon_mvc_micro_getboundmodels, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Micro, getEventsManager, arginfo_phalcon_mvc_micro_geteventsmanager, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Micro, setEventsManager, arginfo_phalcon_mvc_micro_seteventsmanager, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Micro, getHandlers, arginfo_phalcon_mvc_micro_gethandlers, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Micro, getModelBinder, arginfo_phalcon_mvc_micro_getmodelbinder, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Mvc_Micro, getReturnedValue, arginfo_phalcon_mvc_micro_getreturnedvalue, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Mvc_Micro, getReturnedValue, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Mvc_Micro, getReturnedValue, arginfo_phalcon_mvc_micro_getreturnedvalue, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Micro, getRouter, arginfo_phalcon_mvc_micro_getrouter, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Micro, getService, arginfo_phalcon_mvc_micro_getservice, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Micro, getSharedService, arginfo_phalcon_mvc_micro_getsharedservice, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/mvc/micro/collection.zep.c b/ext/phalcon/mvc/micro/collection.zep.c index a938b2e0f67..fb3ed18624d 100644 --- a/ext/phalcon/mvc/micro/collection.zep.c +++ b/ext/phalcon/mvc/micro/collection.zep.c @@ -95,7 +95,6 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, delete) ZVAL_UNDEF(&name); ZVAL_UNDEF(&handler_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(routePattern) @@ -103,10 +102,8 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, delete) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &routePattern_param, &handler, &name_param); if (UNEXPECTED(Z_TYPE_P(routePattern_param) != IS_STRING && Z_TYPE_P(routePattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'routePattern' must be of the type string")); @@ -122,8 +119,6 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, delete) } else { zephir_get_strval(&name, name_param); } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "DELETE"); ZEPHIR_CALL_METHOD(NULL, this_ptr, "addmap", NULL, 0, &_0, &routePattern, handler, &name); @@ -152,7 +147,6 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, get) ZVAL_UNDEF(&name); ZVAL_UNDEF(&handler_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(routePattern) @@ -160,10 +154,8 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, get) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &routePattern_param, &handler, &name_param); if (UNEXPECTED(Z_TYPE_P(routePattern_param) != IS_STRING && Z_TYPE_P(routePattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'routePattern' must be of the type string")); @@ -179,8 +171,6 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, get) } else { zephir_get_strval(&name, name_param); } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "GET"); ZEPHIR_CALL_METHOD(NULL, this_ptr, "addmap", NULL, 0, &_0, &routePattern, handler, &name); @@ -195,9 +185,6 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, get) */ PHP_METHOD(Phalcon_Mvc_Micro_Collection, getHandler) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "handler"); } @@ -207,9 +194,6 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, getHandler) */ PHP_METHOD(Phalcon_Mvc_Micro_Collection, getHandlers) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "handlers"); } @@ -219,9 +203,6 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, getHandlers) */ PHP_METHOD(Phalcon_Mvc_Micro_Collection, getPrefix) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "prefix"); } @@ -247,7 +228,6 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, head) ZVAL_UNDEF(&name); ZVAL_UNDEF(&handler_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(routePattern) @@ -255,10 +235,8 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, head) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &routePattern_param, &handler, &name_param); if (UNEXPECTED(Z_TYPE_P(routePattern_param) != IS_STRING && Z_TYPE_P(routePattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'routePattern' must be of the type string")); @@ -274,8 +252,6 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, head) } else { zephir_get_strval(&name, name_param); } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "HEAD"); ZEPHIR_CALL_METHOD(NULL, this_ptr, "addmap", NULL, 0, &_0, &routePattern, handler, &name); @@ -288,9 +264,6 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, head) */ PHP_METHOD(Phalcon_Mvc_Micro_Collection, isLazy) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "lazy"); } @@ -316,7 +289,6 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, map) ZVAL_UNDEF(&name); ZVAL_UNDEF(&handler_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(routePattern) @@ -324,10 +296,8 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, map) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &routePattern_param, &handler, &name_param); if (UNEXPECTED(Z_TYPE_P(routePattern_param) != IS_STRING && Z_TYPE_P(routePattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'routePattern' must be of the type string")); @@ -343,8 +313,6 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, map) } else { zephir_get_strval(&name, name_param); } - - ZVAL_NULL(&_0); ZEPHIR_CALL_METHOD(NULL, this_ptr, "addmap", NULL, 0, &_0, &routePattern, handler, &name); zephir_check_call_status(); @@ -382,7 +350,6 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, mapVia) ZVAL_UNDEF(&name); ZVAL_UNDEF(&handler_sub); ZVAL_UNDEF(&method_sub); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 4) Z_PARAM_STR(routePattern) @@ -391,10 +358,8 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, mapVia) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 1, &routePattern_param, &handler, &method, &name_param); if (UNEXPECTED(Z_TYPE_P(routePattern_param) != IS_STRING && Z_TYPE_P(routePattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'routePattern' must be of the type string")); @@ -410,8 +375,6 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, mapVia) } else { zephir_get_strval(&name, name_param); } - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "addmap", NULL, 0, method, &routePattern, handler, &name); zephir_check_call_status(); RETURN_THIS(); @@ -439,7 +402,6 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, options) ZVAL_UNDEF(&name); ZVAL_UNDEF(&handler_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(routePattern) @@ -447,10 +409,8 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, options) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &routePattern_param, &handler, &name_param); if (UNEXPECTED(Z_TYPE_P(routePattern_param) != IS_STRING && Z_TYPE_P(routePattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'routePattern' must be of the type string")); @@ -466,8 +426,6 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, options) } else { zephir_get_strval(&name, name_param); } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "OPTIONS"); ZEPHIR_CALL_METHOD(NULL, this_ptr, "addmap", NULL, 0, &_0, &routePattern, handler, &name); @@ -496,7 +454,6 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, patch) ZVAL_UNDEF(&name); ZVAL_UNDEF(&handler_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(routePattern) @@ -504,10 +461,8 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, patch) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &routePattern_param, &handler, &name_param); if (UNEXPECTED(Z_TYPE_P(routePattern_param) != IS_STRING && Z_TYPE_P(routePattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'routePattern' must be of the type string")); @@ -523,8 +478,6 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, patch) } else { zephir_get_strval(&name, name_param); } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "PATCH"); ZEPHIR_CALL_METHOD(NULL, this_ptr, "addmap", NULL, 0, &_0, &routePattern, handler, &name); @@ -553,7 +506,6 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, post) ZVAL_UNDEF(&name); ZVAL_UNDEF(&handler_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(routePattern) @@ -561,10 +513,8 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, post) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &routePattern_param, &handler, &name_param); if (UNEXPECTED(Z_TYPE_P(routePattern_param) != IS_STRING && Z_TYPE_P(routePattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'routePattern' must be of the type string")); @@ -580,8 +530,6 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, post) } else { zephir_get_strval(&name, name_param); } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "POST"); ZEPHIR_CALL_METHOD(NULL, this_ptr, "addmap", NULL, 0, &_0, &routePattern, handler, &name); @@ -610,7 +558,6 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, put) ZVAL_UNDEF(&name); ZVAL_UNDEF(&handler_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(routePattern) @@ -618,10 +565,8 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, put) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &routePattern_param, &handler, &name_param); if (UNEXPECTED(Z_TYPE_P(routePattern_param) != IS_STRING && Z_TYPE_P(routePattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'routePattern' must be of the type string")); @@ -637,8 +582,6 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, put) } else { zephir_get_strval(&name, name_param); } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "PUT"); ZEPHIR_CALL_METHOD(NULL, this_ptr, "addmap", NULL, 0, &_0, &routePattern, handler, &name); @@ -663,24 +606,16 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, setHandler) ZVAL_UNDEF(&handler_sub); ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ZVAL(handler) Z_PARAM_OPTIONAL Z_PARAM_BOOL(lazy) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 1, &handler, &lazy_param); if (!lazy_param) { lazy = 0; } else { - lazy = zephir_get_boolval(lazy_param); - } - - + } zephir_update_property_zval(this_ptr, ZEND_STRL("handler"), handler); if (lazy) { zephir_update_property_zval(this_ptr, ZEND_STRL("lazy"), &__$true); @@ -705,22 +640,15 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, setLazy) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(lazy) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &lazy_param); if (UNEXPECTED(Z_TYPE_P(lazy_param) != IS_TRUE && Z_TYPE_P(lazy_param) != IS_FALSE)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'lazy' must be of the type bool")); RETURN_NULL(); } lazy = (Z_TYPE_P(lazy_param) == IS_TRUE); - - if (lazy) { zephir_update_property_zval(this_ptr, ZEND_STRL("lazy"), &__$true); } else { @@ -744,15 +672,11 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, setPrefix) zval *this_ptr = getThis(); ZVAL_UNDEF(&prefix); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(prefix) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &prefix_param); if (UNEXPECTED(Z_TYPE_P(prefix_param) != IS_STRING && Z_TYPE_P(prefix_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'prefix' must be of the type string")); @@ -763,8 +687,6 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, setPrefix) } else { ZEPHIR_INIT_VAR(&prefix); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("prefix"), &prefix); RETURN_THIS(); } @@ -790,7 +712,6 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, addMap) ZVAL_UNDEF(&routePattern); ZVAL_UNDEF(&name); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 4) Z_PARAM_ZVAL(method) @@ -799,10 +720,8 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, addMap) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 1, &method, &routePattern_param, &handler, &name_param); if (UNEXPECTED(Z_TYPE_P(routePattern_param) != IS_STRING && Z_TYPE_P(routePattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'routePattern' must be of the type string")); @@ -818,8 +737,6 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, addMap) } else { zephir_get_strval(&name, name_param); } - - ZEPHIR_INIT_VAR(&_0); zephir_create_array(&_0, 4, 0); zephir_array_fast_append(&_0, method); @@ -838,7 +755,8 @@ zend_object *zephir_init_properties_Phalcon_Mvc_Micro_Collection(zend_class_entr ZVAL_UNDEF(&_1$$3); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/mvc/micro/collection.zep.h b/ext/phalcon/mvc/micro/collection.zep.h index 04eda9a7d75..e8e77a1cd1f 100644 --- a/ext/phalcon/mvc/micro/collection.zep.h +++ b/ext/phalcon/mvc/micro/collection.zep.h @@ -116,11 +116,7 @@ ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_mvc_micro_collection_method_entry) { PHP_ME(Phalcon_Mvc_Micro_Collection, delete, arginfo_phalcon_mvc_micro_collection_delete, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Micro_Collection, get, arginfo_phalcon_mvc_micro_collection_get, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Mvc_Micro_Collection, getHandler, arginfo_phalcon_mvc_micro_collection_gethandler, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Mvc_Micro_Collection, getHandler, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Mvc_Micro_Collection, getHandler, arginfo_phalcon_mvc_micro_collection_gethandler, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Micro_Collection, getHandlers, arginfo_phalcon_mvc_micro_collection_gethandlers, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Micro_Collection, getPrefix, arginfo_phalcon_mvc_micro_collection_getprefix, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Micro_Collection, head, arginfo_phalcon_mvc_micro_collection_head, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/mvc/micro/lazyloader.zep.c b/ext/phalcon/mvc/micro/lazyloader.zep.c index 5e201606cbb..ce64977709e 100644 --- a/ext/phalcon/mvc/micro/lazyloader.zep.c +++ b/ext/phalcon/mvc/micro/lazyloader.zep.c @@ -61,15 +61,11 @@ PHP_METHOD(Phalcon_Mvc_Micro_LazyLoader, __construct) zval *this_ptr = getThis(); ZVAL_UNDEF(&definition); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(definition) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &definition_param); if (UNEXPECTED(Z_TYPE_P(definition_param) != IS_STRING && Z_TYPE_P(definition_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'definition' must be of the type string")); @@ -80,8 +76,6 @@ PHP_METHOD(Phalcon_Mvc_Micro_LazyLoader, __construct) } else { ZEPHIR_INIT_VAR(&definition); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("definition"), &definition); ZEPHIR_MM_RESTORE(); } @@ -113,7 +107,6 @@ PHP_METHOD(Phalcon_Mvc_Micro_LazyLoader, callMethod) ZVAL_UNDEF(&_2$$4); ZVAL_UNDEF(&_3$$5); ZVAL_UNDEF(&_4); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(method) @@ -121,10 +114,8 @@ PHP_METHOD(Phalcon_Mvc_Micro_LazyLoader, callMethod) Z_PARAM_OPTIONAL Z_PARAM_OBJECT_OF_CLASS_OR_NULL(modelBinder, phalcon_mvc_model_binderinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &method_param, &arguments, &modelBinder); if (UNEXPECTED(Z_TYPE_P(method_param) != IS_STRING && Z_TYPE_P(method_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'method' must be of the type string")); @@ -140,8 +131,6 @@ PHP_METHOD(Phalcon_Mvc_Micro_LazyLoader, callMethod) modelBinder = &modelBinder_sub; modelBinder = &__$null; } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("handler"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&handler, &_0); zephir_read_property(&_0, this_ptr, ZEND_STRL("definition"), PH_NOISY_CC | PH_READONLY); @@ -152,7 +141,7 @@ PHP_METHOD(Phalcon_Mvc_Micro_LazyLoader, callMethod) object_init_ex(&_1$$4, phalcon_mvc_micro_exception_ce); ZEPHIR_INIT_VAR(&_2$$4); ZEPHIR_CONCAT_SVS(&_2$$4, "Handler '", &definition, "' doesn't exist"); - ZEPHIR_CALL_METHOD(NULL, &_1$$4, "__construct", NULL, 32, &_2$$4); + ZEPHIR_CALL_METHOD(NULL, &_1$$4, "__construct", NULL, 33, &_2$$4); zephir_check_call_status(); zephir_throw_exception_debug(&_1$$4, "phalcon/Mvc/Micro/LazyLoader.zep", 55); ZEPHIR_MM_RESTORE(); @@ -184,9 +173,6 @@ PHP_METHOD(Phalcon_Mvc_Micro_LazyLoader, callMethod) */ PHP_METHOD(Phalcon_Mvc_Micro_LazyLoader, getDefinition) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "definition"); } @@ -196,9 +182,6 @@ PHP_METHOD(Phalcon_Mvc_Micro_LazyLoader, getDefinition) */ PHP_METHOD(Phalcon_Mvc_Micro_LazyLoader, getHandler) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "handler"); } diff --git a/ext/phalcon/mvc/micro/lazyloader.zep.h b/ext/phalcon/mvc/micro/lazyloader.zep.h index 486163495d2..678882b7bcc 100644 --- a/ext/phalcon/mvc/micro/lazyloader.zep.h +++ b/ext/phalcon/mvc/micro/lazyloader.zep.h @@ -21,11 +21,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_micro_lazyloader_getdefinition, 0, 0, IS_STRING, 0) ZEND_END_ARG_INFO() -#if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_phalcon_mvc_micro_lazyloader_gethandler, 0, 0, MAY_BE_NULL|MAY_BE_OBJECT) -#else -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_micro_lazyloader_gethandler, 0, 0, IS_OBJECT, 1) -#endif ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_mvc_micro_lazyloader_method_entry) { diff --git a/ext/phalcon/mvc/model.zep.c b/ext/phalcon/mvc/model.zep.c index f193e689a51..e5b00b96acf 100644 --- a/ext/phalcon/mvc/model.zep.c +++ b/ext/phalcon/mvc/model.zep.c @@ -162,23 +162,21 @@ PHP_METHOD(Phalcon_Mvc_Model, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; - zval *data = NULL, data_sub, *container = NULL, container_sub, *modelsManager = NULL, modelsManager_sub, __$null, _1$$4, _2$$4, _3$$4, _4$$5, _5$$5, _6$$6, _7$$6, _8$$6; + zval *data = NULL, data_sub, *container = NULL, container_sub, *modelsManager = NULL, modelsManager_sub, __$null, _0$$4, _1$$4, _2$$4, _3$$5, _4$$5, _5$$6, _6$$6, _7$$6; zval *this_ptr = getThis(); ZVAL_UNDEF(&data_sub); ZVAL_UNDEF(&container_sub); ZVAL_UNDEF(&modelsManager_sub); ZVAL_NULL(&__$null); + ZVAL_UNDEF(&_0$$4); ZVAL_UNDEF(&_1$$4); ZVAL_UNDEF(&_2$$4); - ZVAL_UNDEF(&_3$$4); + ZVAL_UNDEF(&_3$$5); ZVAL_UNDEF(&_4$$5); - ZVAL_UNDEF(&_5$$5); + ZVAL_UNDEF(&_5$$6); ZVAL_UNDEF(&_6$$6); ZVAL_UNDEF(&_7$$6); - ZVAL_UNDEF(&_8$$6); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 3) Z_PARAM_OPTIONAL @@ -186,10 +184,8 @@ PHP_METHOD(Phalcon_Mvc_Model, __construct) Z_PARAM_OBJECT_OF_CLASS_OR_NULL(container, phalcon_di_diinterface_ce) Z_PARAM_OBJECT_OF_CLASS_OR_NULL(modelsManager, phalcon_mvc_model_managerinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 3, &data, &container, &modelsManager); if (!data) { data = &data_sub; @@ -207,42 +203,40 @@ PHP_METHOD(Phalcon_Mvc_Model, __construct) } else { ZEPHIR_SEPARATE_PARAM(modelsManager); } - - if (Z_TYPE_P(container) == IS_NULL) { - ZEPHIR_CALL_CE_STATIC(container, phalcon_di_di_ce, "getdefault", &_0, 0); + ZEPHIR_CALL_CE_STATIC(container, phalcon_di_di_ce, "getdefault", NULL, 0); zephir_check_call_status(); } if (Z_TYPE_P(container) == IS_NULL) { + ZEPHIR_INIT_VAR(&_0$$4); + object_init_ex(&_0$$4, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_VAR(&_1$$4); - object_init_ex(&_1$$4, phalcon_mvc_model_exception_ce); + zephir_get_class(&_1$$4, this_ptr, 0); ZEPHIR_INIT_VAR(&_2$$4); - zephir_get_class(&_2$$4, this_ptr, 0); - ZEPHIR_INIT_VAR(&_3$$4); - ZEPHIR_CONCAT_SVS(&_3$$4, "A dependency injection container is required to access the services related to the ODM in '", &_2$$4, "'"); - ZEPHIR_CALL_METHOD(NULL, &_1$$4, "__construct", NULL, 32, &_3$$4); + ZEPHIR_CONCAT_SVS(&_2$$4, "A dependency injection container is required to access the services related to the ODM in '", &_1$$4, "'"); + ZEPHIR_CALL_METHOD(NULL, &_0$$4, "__construct", NULL, 33, &_2$$4); zephir_check_call_status(); - zephir_throw_exception_debug(&_1$$4, "phalcon/Mvc/Model.zep", 184); + zephir_throw_exception_debug(&_0$$4, "phalcon/Mvc/Model.zep", 184); ZEPHIR_MM_RESTORE(); return; } zephir_update_property_zval(this_ptr, ZEND_STRL("container"), container); if (Z_TYPE_P(modelsManager) == IS_NULL) { - ZEPHIR_INIT_VAR(&_5$$5); - ZVAL_STRING(&_5$$5, "modelsManager"); - ZEPHIR_CALL_METHOD(&_4$$5, container, "getshared", NULL, 0, &_5$$5); + ZEPHIR_INIT_VAR(&_4$$5); + ZVAL_STRING(&_4$$5, "modelsManager"); + ZEPHIR_CALL_METHOD(&_3$$5, container, "getshared", NULL, 0, &_4$$5); zephir_check_call_status(); - ZEPHIR_CPY_WRT(modelsManager, &_4$$5); + ZEPHIR_CPY_WRT(modelsManager, &_3$$5); if (Z_TYPE_P(modelsManager) == IS_NULL) { + ZEPHIR_INIT_VAR(&_5$$6); + object_init_ex(&_5$$6, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_VAR(&_6$$6); - object_init_ex(&_6$$6, phalcon_mvc_model_exception_ce); + zephir_get_class(&_6$$6, this_ptr, 0); ZEPHIR_INIT_VAR(&_7$$6); - zephir_get_class(&_7$$6, this_ptr, 0); - ZEPHIR_INIT_VAR(&_8$$6); - ZEPHIR_CONCAT_SVS(&_8$$6, "The injected service 'modelsManager' is not valid in '", &_7$$6, "'"); - ZEPHIR_CALL_METHOD(NULL, &_6$$6, "__construct", NULL, 32, &_8$$6); + ZEPHIR_CONCAT_SVS(&_7$$6, "The injected service 'modelsManager' is not valid in '", &_6$$6, "'"); + ZEPHIR_CALL_METHOD(NULL, &_5$$6, "__construct", NULL, 33, &_7$$6); zephir_check_call_status(); - zephir_throw_exception_debug(&_6$$6, "phalcon/Mvc/Model.zep", 197); + zephir_throw_exception_debug(&_5$$6, "phalcon/Mvc/Model.zep", 197); ZEPHIR_MM_RESTORE(); return; } @@ -285,22 +279,16 @@ PHP_METHOD(Phalcon_Mvc_Model, __call) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&arguments); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(method) Z_PARAM_ARRAY(arguments) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &method_param, &arguments_param); zephir_get_strval(&method, method_param); zephir_get_arrval(&arguments, arguments_param); - - - ZEPHIR_CALL_SELF(&records, "invokefinder", &_0, 417, &method, &arguments); + ZEPHIR_CALL_SELF(&records, "invokefinder", &_0, 418, &method, &arguments); zephir_check_call_status(); if (!ZEPHIR_IS_FALSE_IDENTICAL(&records)) { RETURN_CCTOR(&records); @@ -322,7 +310,7 @@ PHP_METHOD(Phalcon_Mvc_Model, __call) object_init_ex(&_2, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_VAR(&_3); ZEPHIR_CONCAT_SVSVS(&_3, "The method '", &method, "' doesn't exist on model '", &modelName, "'"); - ZEPHIR_CALL_METHOD(NULL, &_2, "__construct", NULL, 32, &_3); + ZEPHIR_CALL_METHOD(NULL, &_2, "__construct", NULL, 33, &_3); zephir_check_call_status(); zephir_throw_exception_debug(&_2, "phalcon/Mvc/Model.zep", 266); ZEPHIR_MM_RESTORE(); @@ -343,7 +331,6 @@ PHP_METHOD(Phalcon_Mvc_Model, __callStatic) zval arguments; zval *method_param = NULL, *arguments_param = NULL, modelName, records, _1, _2; zval method; - zval *this_ptr = getThis(); ZVAL_UNDEF(&method); ZVAL_UNDEF(&modelName); @@ -351,22 +338,16 @@ PHP_METHOD(Phalcon_Mvc_Model, __callStatic) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&arguments); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(method) Z_PARAM_ARRAY(arguments) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &method_param, &arguments_param); zephir_get_strval(&method, method_param); zephir_get_arrval(&arguments, arguments_param); - - - ZEPHIR_CALL_SELF(&records, "invokefinder", &_0, 417, &method, &arguments); + ZEPHIR_CALL_SELF(&records, "invokefinder", &_0, 418, &method, &arguments); zephir_check_call_status(); if (!ZEPHIR_IS_FALSE_IDENTICAL(&records)) { RETURN_CCTOR(&records); @@ -377,7 +358,7 @@ PHP_METHOD(Phalcon_Mvc_Model, __callStatic) object_init_ex(&_1, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_VAR(&_2); ZEPHIR_CONCAT_SVSVS(&_2, "The method '", &method, "' doesn't exist on model '", &modelName, "'"); - ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 32, &_2); + ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 33, &_2); zephir_check_call_status(); zephir_throw_exception_debug(&_1, "phalcon/Mvc/Model.zep", 292); ZEPHIR_MM_RESTORE(); @@ -411,15 +392,11 @@ PHP_METHOD(Phalcon_Mvc_Model, __get) ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$4); ZVAL_UNDEF(&_3$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(property) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -430,8 +407,6 @@ PHP_METHOD(Phalcon_Mvc_Model, __get) } else { ZEPHIR_INIT_VAR(&property); } - - ZEPHIR_INIT_VAR(&modelName); zephir_get_class(&modelName, this_ptr, 0); ZEPHIR_CALL_METHOD(&manager, this_ptr, "getmodelsmanager", NULL, 0); @@ -453,7 +428,7 @@ PHP_METHOD(Phalcon_Mvc_Model, __get) RETURN_MM(); } ZEPHIR_INIT_VAR(&_4); - zephir_camelize(&_4, &property, NULL ); + zephir_camelize(&_4, &property, NULL ); ZEPHIR_INIT_VAR(&_5); ZEPHIR_CONCAT_SV(&_5, "get", &_4); zephir_get_strval(&method, &_5); @@ -488,15 +463,11 @@ PHP_METHOD(Phalcon_Mvc_Model, __isset) ZVAL_UNDEF(&result); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(property) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -507,8 +478,6 @@ PHP_METHOD(Phalcon_Mvc_Model, __isset) } else { ZEPHIR_INIT_VAR(&property); } - - ZEPHIR_INIT_VAR(&modelName); zephir_get_class(&modelName, this_ptr, 0); ZEPHIR_CALL_METHOD(&_0, this_ptr, "getmodelsmanager", NULL, 0); @@ -522,7 +491,7 @@ PHP_METHOD(Phalcon_Mvc_Model, __isset) ZVAL_BOOL(&result, 1); } else { ZEPHIR_INIT_VAR(&_1$$4); - zephir_camelize(&_1$$4, &property, NULL ); + zephir_camelize(&_1$$4, &property, NULL ); ZEPHIR_INIT_VAR(&method); ZEPHIR_CONCAT_SV(&method, "get", &_1$$4); ZEPHIR_INIT_NVAR(&result); @@ -550,9 +519,8 @@ PHP_METHOD(Phalcon_Mvc_Model, __serialize) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_5$$3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&snapshot); ZVAL_NULL(&snapshot); @@ -629,20 +597,14 @@ PHP_METHOD(Phalcon_Mvc_Model, __set) ZVAL_UNDEF(&_18$$21); ZVAL_UNDEF(&_19$$21); ZVAL_UNDEF(&related); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(property) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &property_param, &value); zephir_get_strval(&property, property_param); - - _0 = Z_TYPE_P(value) == IS_OBJECT; if (_0) { _0 = zephir_instance_of_ev(value, phalcon_mvc_modelinterface_ce); @@ -700,7 +662,7 @@ PHP_METHOD(Phalcon_Mvc_Model, __set) zephir_read_property(&_7$$9, this_ptr, ZEND_STRL("related"), PH_NOISY_CC | PH_READONLY); zephir_array_unset(&_7$$9, &lowerProperty, PH_SEPARATE); zephir_update_property_array(this_ptr, SL("dirtyRelated"), &lowerProperty, &referencedModel); - ZEPHIR_INIT_ZVAL_NREF(_8$$9); + ZVAL_UNDEF(&_8$$9); ZVAL_LONG(&_8$$9, 1); zephir_update_property_zval(this_ptr, ZEND_STRL("dirtyState"), &_8$$9); RETVAL_ZVAL(value, 1, 0); @@ -749,7 +711,7 @@ PHP_METHOD(Phalcon_Mvc_Model, __set) zephir_array_unset(&_11$$10, &lowerProperty, PH_SEPARATE); if (zephir_fast_count_int(&related) > 0) { zephir_update_property_array(this_ptr, SL("dirtyRelated"), &lowerProperty, &related); - ZEPHIR_INIT_ZVAL_NREF(_12$$17); + ZVAL_UNDEF(&_12$$17); ZVAL_LONG(&_12$$17, 1); zephir_update_property_zval(this_ptr, ZEND_STRL("dirtyState"), &_12$$17); } else { @@ -764,13 +726,13 @@ PHP_METHOD(Phalcon_Mvc_Model, __set) } } - ZEPHIR_CALL_METHOD(&_14, this_ptr, "possiblesetter", NULL, 418, &property, value); + ZEPHIR_CALL_METHOD(&_14, this_ptr, "possiblesetter", NULL, 419, &property, value); zephir_check_call_status(); if (zephir_is_true(&_14)) { RETVAL_ZVAL(value, 1, 0); RETURN_MM(); } - ZEPHIR_CALL_FUNCTION(&_15, "property_exists", NULL, 289, this_ptr, &property); + ZEPHIR_CALL_FUNCTION(&_15, "property_exists", NULL, 290, this_ptr, &property); zephir_check_call_status(); if (zephir_is_true(&_15)) { ZEPHIR_CALL_METHOD(&manager, this_ptr, "getmodelsmanager", NULL, 0); @@ -784,7 +746,7 @@ PHP_METHOD(Phalcon_Mvc_Model, __set) zephir_get_class(&_18$$21, this_ptr, 0); ZEPHIR_INIT_VAR(&_19$$21); ZEPHIR_CONCAT_SVSVS(&_19$$21, "Cannot access property '", &property, "' (not public) in '", &_18$$21, "'"); - ZEPHIR_CALL_METHOD(NULL, &_17$$21, "__construct", NULL, 32, &_19$$21); + ZEPHIR_CALL_METHOD(NULL, &_17$$21, "__construct", NULL, 33, &_19$$21); zephir_check_call_status(); zephir_throw_exception_debug(&_17$$21, "phalcon/Mvc/Model.zep", 524); ZEPHIR_MM_RESTORE(); @@ -801,12 +763,11 @@ PHP_METHOD(Phalcon_Mvc_Model, __set) */ PHP_METHOD(Phalcon_Mvc_Model, __unserialize) { - zend_string *_13$$6; - zend_ulong _12$$6; + zend_string *_12$$6; + zend_ulong _11$$6; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_1 = NULL; - zval *data_param = NULL, container, manager, key, value, snapshot, properties, dirtyState, _5, _6, _0$$3, _2$$4, _3$$4, _4$$4, _7$$5, _8$$5, _9$$5, *_10$$6, _11$$6; + zval *data_param = NULL, container, manager, key, value, snapshot, properties, dirtyState, _4, _5, _0$$3, _1$$4, _2$$4, _3$$4, _6$$5, _7$$5, _8$$5, *_9$$6, _10$$6; zval data; zval *this_ptr = getThis(); @@ -818,95 +779,89 @@ PHP_METHOD(Phalcon_Mvc_Model, __unserialize) ZVAL_UNDEF(&snapshot); ZVAL_UNDEF(&properties); ZVAL_UNDEF(&dirtyState); + ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_5); - ZVAL_UNDEF(&_6); ZVAL_UNDEF(&_0$$3); + ZVAL_UNDEF(&_1$$4); ZVAL_UNDEF(&_2$$4); ZVAL_UNDEF(&_3$$4); - ZVAL_UNDEF(&_4$$4); + ZVAL_UNDEF(&_6$$5); ZVAL_UNDEF(&_7$$5); ZVAL_UNDEF(&_8$$5); - ZVAL_UNDEF(&_9$$5); - ZVAL_UNDEF(&_11$$6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; + ZVAL_UNDEF(&_10$$6); ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &data_param); zephir_get_arrval(&data, data_param); - - if (!(zephir_array_isset_string(&data, SL("attributes")))) { ZEPHIR_INIT_VAR(&_0$$3); zephir_create_array(&_0$$3, 1, 0); zephir_array_update_string(&_0$$3, SL("attributes"), &data, PH_COPY | PH_SEPARATE); ZEPHIR_CPY_WRT(&data, &_0$$3); } - ZEPHIR_CALL_CE_STATIC(&container, phalcon_di_di_ce, "getdefault", &_1, 0); + ZEPHIR_CALL_CE_STATIC(&container, phalcon_di_di_ce, "getdefault", NULL, 0); zephir_check_call_status(); if (Z_TYPE_P(&container) == IS_NULL) { + ZEPHIR_INIT_VAR(&_1$$4); + object_init_ex(&_1$$4, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_VAR(&_2$$4); - object_init_ex(&_2$$4, phalcon_mvc_model_exception_ce); + zephir_get_class(&_2$$4, this_ptr, 0); ZEPHIR_INIT_VAR(&_3$$4); - zephir_get_class(&_3$$4, this_ptr, 0); - ZEPHIR_INIT_VAR(&_4$$4); - ZEPHIR_CONCAT_SVS(&_4$$4, "A dependency injection container is required to access the services related to the ODM in '", &_3$$4, "'"); - ZEPHIR_CALL_METHOD(NULL, &_2$$4, "__construct", NULL, 32, &_4$$4); + ZEPHIR_CONCAT_SVS(&_3$$4, "A dependency injection container is required to access the services related to the ODM in '", &_2$$4, "'"); + ZEPHIR_CALL_METHOD(NULL, &_1$$4, "__construct", NULL, 33, &_3$$4); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$4, "phalcon/Mvc/Model.zep", 553); + zephir_throw_exception_debug(&_1$$4, "phalcon/Mvc/Model.zep", 553); ZEPHIR_MM_RESTORE(); return; } zephir_update_property_zval(this_ptr, ZEND_STRL("container"), &container); - ZEPHIR_INIT_VAR(&_6); - ZVAL_STRING(&_6, "modelsManager"); - ZEPHIR_CALL_METHOD(&_5, &container, "getshared", NULL, 0, &_6); + ZEPHIR_INIT_VAR(&_5); + ZVAL_STRING(&_5, "modelsManager"); + ZEPHIR_CALL_METHOD(&_4, &container, "getshared", NULL, 0, &_5); zephir_check_call_status(); - ZEPHIR_CPY_WRT(&manager, &_5); + ZEPHIR_CPY_WRT(&manager, &_4); if (Z_TYPE_P(&manager) == IS_NULL) { + ZEPHIR_INIT_VAR(&_6$$5); + object_init_ex(&_6$$5, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_VAR(&_7$$5); - object_init_ex(&_7$$5, phalcon_mvc_model_exception_ce); + zephir_get_class(&_7$$5, this_ptr, 0); ZEPHIR_INIT_VAR(&_8$$5); - zephir_get_class(&_8$$5, this_ptr, 0); - ZEPHIR_INIT_VAR(&_9$$5); - ZEPHIR_CONCAT_SVS(&_9$$5, "The injected service 'modelsManager' is not valid in '", &_8$$5, "'"); - ZEPHIR_CALL_METHOD(NULL, &_7$$5, "__construct", NULL, 32, &_9$$5); + ZEPHIR_CONCAT_SVS(&_8$$5, "The injected service 'modelsManager' is not valid in '", &_7$$5, "'"); + ZEPHIR_CALL_METHOD(NULL, &_6$$5, "__construct", NULL, 33, &_8$$5); zephir_check_call_status(); - zephir_throw_exception_debug(&_7$$5, "phalcon/Mvc/Model.zep", 568); + zephir_throw_exception_debug(&_6$$5, "phalcon/Mvc/Model.zep", 568); ZEPHIR_MM_RESTORE(); return; } zephir_update_property_zval(this_ptr, ZEND_STRL("modelsManager"), &manager); ZEPHIR_CALL_METHOD(NULL, &manager, "initialize", NULL, 0, this_ptr); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&properties); + zephir_memory_observe(&properties); if (zephir_array_isset_string_fetch(&properties, &data, SL("attributes"), 0)) { zephir_is_iterable(&properties, 0, "phalcon/Mvc/Model.zep", 591); if (Z_TYPE_P(&properties) == IS_ARRAY) { - ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&properties), _12$$6, _13$$6, _10$$6) + ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&properties), _11$$6, _12$$6, _9$$6) { ZEPHIR_INIT_NVAR(&key); - if (_13$$6 != NULL) { - ZVAL_STR_COPY(&key, _13$$6); + if (_12$$6 != NULL) { + ZVAL_STR_COPY(&key, _12$$6); } else { - ZVAL_LONG(&key, _12$$6); + ZVAL_LONG(&key, _11$$6); } ZEPHIR_INIT_NVAR(&value); - ZVAL_COPY(&value, _10$$6); + ZVAL_COPY(&value, _9$$6); zephir_update_property_zval_zval(this_ptr, &key, &value); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &properties, "rewind", NULL, 0); zephir_check_call_status(); while (1) { - ZEPHIR_CALL_METHOD(&_11$$6, &properties, "valid", NULL, 0); + ZEPHIR_CALL_METHOD(&_10$$6, &properties, "valid", NULL, 0); zephir_check_call_status(); - if (!zend_is_true(&_11$$6)) { + if (!zend_is_true(&_10$$6)) { break; } ZEPHIR_CALL_METHOD(&key, &properties, "key", NULL, 0); @@ -924,13 +879,13 @@ PHP_METHOD(Phalcon_Mvc_Model, __unserialize) ZEPHIR_INIT_NVAR(&properties); array_init(&properties); } - ZEPHIR_OBS_VAR(&dirtyState); + zephir_memory_observe(&dirtyState); if (zephir_array_isset_string_fetch(&dirtyState, &data, SL("dirtyState"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("dirtyState"), &dirtyState); } - ZEPHIR_CALL_METHOD(&_5, &manager, "iskeepingsnapshots", NULL, 0, this_ptr); + ZEPHIR_CALL_METHOD(&_4, &manager, "iskeepingsnapshots", NULL, 0, this_ptr); zephir_check_call_status(); - if (zephir_is_true(&_5)) { + if (zephir_is_true(&_4)) { if (zephir_array_isset_string_fetch(&snapshot, &data, SL("snapshot"), 1)) { zephir_update_property_zval(this_ptr, ZEND_STRL("snapshot"), &snapshot); } else { @@ -985,18 +940,12 @@ PHP_METHOD(Phalcon_Mvc_Model, addBehavior) ZVAL_UNDEF(&behavior_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(behavior, phalcon_mvc_model_behaviorinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &behavior); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("modelsManager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(NULL, &_0, "addbehavior", NULL, 0, this_ptr, behavior); zephir_check_call_status(); @@ -1031,17 +980,10 @@ PHP_METHOD(Phalcon_Mvc_Model, appendMessage) zval *this_ptr = getThis(); ZVAL_UNDEF(&message_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(message, phalcon_messages_messageinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &message); - - zephir_update_property_array_append(this_ptr, SL("errorMessages"), message); RETURN_THISW(); } @@ -1134,7 +1076,6 @@ PHP_METHOD(Phalcon_Mvc_Model, assign) ZVAL_UNDEF(&_20$$26); ZVAL_UNDEF(&_21$$26); ZVAL_UNDEF(&_23$$28); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_ARRAY(data) @@ -1142,10 +1083,8 @@ PHP_METHOD(Phalcon_Mvc_Model, assign) Z_PARAM_ZVAL_OR_NULL(whiteList) Z_PARAM_ZVAL_OR_NULL(dataColumnMap) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &data_param, &whiteList, &dataColumnMap); ZEPHIR_OBS_COPY_OR_DUP(&data, data_param); if (!whiteList) { @@ -1156,8 +1095,6 @@ PHP_METHOD(Phalcon_Mvc_Model, assign) dataColumnMap = &dataColumnMap_sub; dataColumnMap = &__$null; } - - ZEPHIR_INIT_VAR(&disableAssignSetters); ZVAL_BOOL(&disableAssignSetters, ZEPHIR_GLOBAL(orm).disable_assign_setters); if (Z_TYPE_P(dataColumnMap) == IS_ARRAY) { @@ -1231,7 +1168,7 @@ PHP_METHOD(Phalcon_Mvc_Model, assign) _7$$12 = ZEPHIR_GLOBAL(orm).case_insensitive_column_map; } if (_7$$12) { - ZEPHIR_CALL_SELF(&_8$$13, "caseinsensitivecolumnmap", &_9, 419, &columnMap, &attribute); + ZEPHIR_CALL_SELF(&_8$$13, "caseinsensitivecolumnmap", &_9, 420, &columnMap, &attribute); zephir_check_call_status(); ZEPHIR_CPY_WRT(&attribute, &_8$$13); } @@ -1245,7 +1182,7 @@ PHP_METHOD(Phalcon_Mvc_Model, assign) zephir_get_class(&_11$$16, this_ptr, 0); ZEPHIR_INIT_NVAR(&_12$$16); ZEPHIR_CONCAT_SVSVS(&_12$$16, "Column '", &attribute, "' doesn't make part of the column map in '", &_11$$16, "'"); - ZEPHIR_CALL_METHOD(NULL, &_10$$16, "__construct", &_13, 32, &_12$$16); + ZEPHIR_CALL_METHOD(NULL, &_10$$16, "__construct", &_13, 33, &_12$$16); zephir_check_call_status(); zephir_throw_exception_debug(&_10$$16, "phalcon/Mvc/Model.zep", 782); ZEPHIR_MM_RESTORE(); @@ -1265,7 +1202,7 @@ PHP_METHOD(Phalcon_Mvc_Model, assign) } _14$$18 = zephir_is_true(&disableAssignSetters); if (!(_14$$18)) { - ZEPHIR_CALL_METHOD(&_15$$18, this_ptr, "possiblesetter", &_16, 418, &attributeField, &value); + ZEPHIR_CALL_METHOD(&_15$$18, this_ptr, "possiblesetter", &_16, 419, &attributeField, &value); zephir_check_call_status(); _14$$18 = !zephir_is_true(&_15$$18); } @@ -1290,7 +1227,7 @@ PHP_METHOD(Phalcon_Mvc_Model, assign) _17$$22 = ZEPHIR_GLOBAL(orm).case_insensitive_column_map; } if (_17$$22) { - ZEPHIR_CALL_SELF(&_18$$23, "caseinsensitivecolumnmap", &_9, 419, &columnMap, &attribute); + ZEPHIR_CALL_SELF(&_18$$23, "caseinsensitivecolumnmap", &_9, 420, &columnMap, &attribute); zephir_check_call_status(); ZEPHIR_CPY_WRT(&attribute, &_18$$23); } @@ -1304,7 +1241,7 @@ PHP_METHOD(Phalcon_Mvc_Model, assign) zephir_get_class(&_20$$26, this_ptr, 0); ZEPHIR_INIT_NVAR(&_21$$26); ZEPHIR_CONCAT_SVSVS(&_21$$26, "Column '", &attribute, "' doesn't make part of the column map in '", &_20$$26, "'"); - ZEPHIR_CALL_METHOD(NULL, &_19$$26, "__construct", &_13, 32, &_21$$26); + ZEPHIR_CALL_METHOD(NULL, &_19$$26, "__construct", &_13, 33, &_21$$26); zephir_check_call_status(); zephir_throw_exception_debug(&_19$$26, "phalcon/Mvc/Model.zep", 782); ZEPHIR_MM_RESTORE(); @@ -1324,7 +1261,7 @@ PHP_METHOD(Phalcon_Mvc_Model, assign) } _22$$28 = zephir_is_true(&disableAssignSetters); if (!(_22$$28)) { - ZEPHIR_CALL_METHOD(&_23$$28, this_ptr, "possiblesetter", &_16, 418, &attributeField, &value); + ZEPHIR_CALL_METHOD(&_23$$28, this_ptr, "possiblesetter", &_16, 419, &attributeField, &value); zephir_check_call_status(); _22$$28 = !zephir_is_true(&_23$$28); } @@ -1378,22 +1315,17 @@ PHP_METHOD(Phalcon_Mvc_Model, average) zend_long ZEPHIR_LAST_CALL_STATUS; zval *parameters_param = NULL, result, _0, _1; zval parameters; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters); ZVAL_UNDEF(&result); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, ¶meters_param); if (!parameters_param) { ZEPHIR_INIT_VAR(¶meters); @@ -1401,8 +1333,6 @@ PHP_METHOD(Phalcon_Mvc_Model, average) } else { zephir_get_arrval(¶meters, parameters_param); } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "AVG"); ZEPHIR_INIT_VAR(&_1); @@ -1438,7 +1368,6 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResult) zend_long dirtyState, ZEPHIR_LAST_CALL_STATUS; zval data; zval *base, base_sub, *data_param = NULL, *dirtyState_param = NULL, instance, key, value, _0, *_1, _2, _12, _5$$4, _6$$4, _7$$4, _9$$6, _10$$6, _11$$6; - zval *this_ptr = getThis(); ZVAL_UNDEF(&base_sub); ZVAL_UNDEF(&instance); @@ -1454,27 +1383,20 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResult) ZVAL_UNDEF(&_10$$6); ZVAL_UNDEF(&_11$$6); ZVAL_UNDEF(&data); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_OBJECT_OF_CLASS(base, phalcon_mvc_modelinterface_ce) Z_PARAM_ARRAY(data) Z_PARAM_OPTIONAL Z_PARAM_LONG(dirtyState) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &base, &data_param, &dirtyState_param); ZEPHIR_OBS_COPY_OR_DUP(&data, data_param); if (!dirtyState_param) { dirtyState = 0; } else { - dirtyState = zephir_get_intval(dirtyState_param); - } - - + } ZEPHIR_INIT_VAR(&instance); if (zephir_clone(&instance, base) == FAILURE) { RETURN_MM(); @@ -1501,7 +1423,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResult) zephir_get_class(&_6$$4, base, 0); ZEPHIR_INIT_NVAR(&_7$$4); ZEPHIR_CONCAT_SVS(&_7$$4, "Invalid key in array data provided to dumpResult() in '", &_6$$4, "'"); - ZEPHIR_CALL_METHOD(NULL, &_5$$4, "__construct", &_8, 32, &_7$$4); + ZEPHIR_CALL_METHOD(NULL, &_5$$4, "__construct", &_8, 33, &_7$$4); zephir_check_call_status(); zephir_throw_exception_debug(&_5$$4, "phalcon/Mvc/Model.zep", 888); ZEPHIR_MM_RESTORE(); @@ -1529,7 +1451,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResult) zephir_get_class(&_10$$6, base, 0); ZEPHIR_INIT_NVAR(&_11$$6); ZEPHIR_CONCAT_SVS(&_11$$6, "Invalid key in array data provided to dumpResult() in '", &_10$$6, "'"); - ZEPHIR_CALL_METHOD(NULL, &_9$$6, "__construct", &_8, 32, &_11$$6); + ZEPHIR_CALL_METHOD(NULL, &_9$$6, "__construct", &_8, 33, &_11$$6); zephir_check_call_status(); zephir_throw_exception_debug(&_9$$6, "phalcon/Mvc/Model.zep", 888); ZEPHIR_MM_RESTORE(); @@ -1580,7 +1502,6 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) zend_long dirtyState, ZEPHIR_LAST_CALL_STATUS; zval data; zval *base, base_sub, *data_param = NULL, *columnMap, columnMap_sub, *dirtyState_param = NULL, *keepSnapshots_param = NULL, instance, attribute, key, value, castValue, attributeName, metaData, reverseMap, _0, *_1, _2, _6$$9, _7$$9, _8$$9, _10$$11, _11$$11, _12$$11, _14$$13, _15$$14, _17$$18, _19$$27, _20$$27, _21$$27, _22$$29, _23$$29, _24$$29, _26$$31, _27$$32, _28$$36, _29$$40; - zval *this_ptr = getThis(); ZVAL_UNDEF(&base_sub); ZVAL_UNDEF(&columnMap_sub); @@ -1614,7 +1535,6 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) ZVAL_UNDEF(&_28$$36); ZVAL_UNDEF(&_29$$40); ZVAL_UNDEF(&data); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 5) Z_PARAM_ZVAL(base) @@ -1624,24 +1544,18 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) Z_PARAM_LONG(dirtyState) Z_PARAM_BOOL_OR_NULL(keepSnapshots, is_null_true) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 2, &base, &data_param, &columnMap, &dirtyState_param, &keepSnapshots_param); ZEPHIR_OBS_COPY_OR_DUP(&data, data_param); if (!dirtyState_param) { dirtyState = 0; } else { - dirtyState = zephir_get_intval(dirtyState_param); - } + } if (!keepSnapshots_param) { keepSnapshots = 0; } else { - keepSnapshots = zephir_get_boolval(keepSnapshots_param); - } - - + } ZEPHIR_INIT_VAR(&instance); if (zephir_clone(&instance, base) == FAILURE) { RETURN_MM(); @@ -1688,7 +1602,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) zephir_get_class(&_7$$9, base, 0); ZEPHIR_INIT_NVAR(&_8$$9); ZEPHIR_CONCAT_SVSVS(&_8$$9, "Column '", &key, "' doesn't make part of the column map in '", &_7$$9, "'"); - ZEPHIR_CALL_METHOD(NULL, &_6$$9, "__construct", &_9, 32, &_8$$9); + ZEPHIR_CALL_METHOD(NULL, &_6$$9, "__construct", &_9, 33, &_8$$9); zephir_check_call_status(); zephir_throw_exception_debug(&_6$$9, "phalcon/Mvc/Model.zep", 958); ZEPHIR_MM_RESTORE(); @@ -1704,7 +1618,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) zephir_get_class(&_11$$11, base, 0); ZEPHIR_INIT_NVAR(&_12$$11); ZEPHIR_CONCAT_SVSVS(&_12$$11, "Column '", &key, "' doesn't make part of the column map in '", &_11$$11, "'"); - ZEPHIR_CALL_METHOD(NULL, &_10$$11, "__construct", &_9, 32, &_12$$11); + ZEPHIR_CALL_METHOD(NULL, &_10$$11, "__construct", &_9, 33, &_12$$11); zephir_check_call_status(); zephir_throw_exception_debug(&_10$$11, "phalcon/Mvc/Model.zep", 967); ZEPHIR_MM_RESTORE(); @@ -1726,7 +1640,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) do { if (ZEPHIR_IS_LONG(&_14$$13, 0) || ZEPHIR_IS_LONG(&_14$$13, 21) || ZEPHIR_IS_LONG(&_14$$13, 22) || ZEPHIR_IS_LONG(&_14$$13, 26)) { ZVAL_LONG(&_15$$14, 10); - ZEPHIR_CALL_FUNCTION(&castValue, "intval", &_16, 41, &value, &_15$$14); + ZEPHIR_CALL_FUNCTION(&castValue, "intval", &_16, 42, &value, &_15$$14); zephir_check_call_status(); break; } @@ -1802,7 +1716,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) zephir_get_class(&_20$$27, base, 0); ZEPHIR_INIT_NVAR(&_21$$27); ZEPHIR_CONCAT_SVSVS(&_21$$27, "Column '", &key, "' doesn't make part of the column map in '", &_20$$27, "'"); - ZEPHIR_CALL_METHOD(NULL, &_19$$27, "__construct", &_9, 32, &_21$$27); + ZEPHIR_CALL_METHOD(NULL, &_19$$27, "__construct", &_9, 33, &_21$$27); zephir_check_call_status(); zephir_throw_exception_debug(&_19$$27, "phalcon/Mvc/Model.zep", 958); ZEPHIR_MM_RESTORE(); @@ -1818,7 +1732,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) zephir_get_class(&_23$$29, base, 0); ZEPHIR_INIT_NVAR(&_24$$29); ZEPHIR_CONCAT_SVSVS(&_24$$29, "Column '", &key, "' doesn't make part of the column map in '", &_23$$29, "'"); - ZEPHIR_CALL_METHOD(NULL, &_22$$29, "__construct", &_9, 32, &_24$$29); + ZEPHIR_CALL_METHOD(NULL, &_22$$29, "__construct", &_9, 33, &_24$$29); zephir_check_call_status(); zephir_throw_exception_debug(&_22$$29, "phalcon/Mvc/Model.zep", 967); ZEPHIR_MM_RESTORE(); @@ -1840,7 +1754,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) do { if (ZEPHIR_IS_LONG(&_26$$31, 0) || ZEPHIR_IS_LONG(&_26$$31, 21) || ZEPHIR_IS_LONG(&_26$$31, 22) || ZEPHIR_IS_LONG(&_26$$31, 26)) { ZVAL_LONG(&_27$$32, 10); - ZEPHIR_CALL_FUNCTION(&castValue, "intval", &_16, 41, &value, &_27$$32); + ZEPHIR_CALL_FUNCTION(&castValue, "intval", &_16, 42, &value, &_27$$32); zephir_check_call_status(); break; } @@ -1915,7 +1829,6 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMapHydrate) zend_long hydrationMode, ZEPHIR_LAST_CALL_STATUS; zval *data_param = NULL, *columnMap, columnMap_sub, *hydrationMode_param = NULL, key, value, attribute, attributeName, *_0, _1, _5$$8, _7$$10, _8$$10, _11$$17, _12$$19, _13$$19; zval data, hydrateArray; - zval *this_ptr = getThis(); ZVAL_UNDEF(&data); ZVAL_UNDEF(&hydrateArray); @@ -1931,22 +1844,15 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMapHydrate) ZVAL_UNDEF(&_11$$17); ZVAL_UNDEF(&_12$$19); ZVAL_UNDEF(&_13$$19); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_ARRAY(data) Z_PARAM_ZVAL(columnMap) Z_PARAM_LONG(hydrationMode) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &data_param, &columnMap, &hydrationMode_param); ZEPHIR_OBS_COPY_OR_DUP(&data, data_param); - hydrationMode = zephir_get_intval(hydrationMode_param); - - if (Z_TYPE_P(columnMap) != IS_ARRAY) { if (hydrationMode == 1) { RETURN_CTOR(&data); @@ -1975,7 +1881,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMapHydrate) _4$$7 = ZEPHIR_GLOBAL(orm).case_insensitive_column_map; } if (_4$$7) { - ZEPHIR_CALL_SELF(&_5$$8, "caseinsensitivecolumnmap", &_6, 419, columnMap, &key); + ZEPHIR_CALL_SELF(&_5$$8, "caseinsensitivecolumnmap", &_6, 420, columnMap, &key); zephir_check_call_status(); ZEPHIR_CPY_WRT(&key, &_5$$8); } @@ -1986,7 +1892,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMapHydrate) object_init_ex(&_7$$10, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_NVAR(&_8$$10); ZEPHIR_CONCAT_SVS(&_8$$10, "Column '", &key, "' doesn't make part of the column map"); - ZEPHIR_CALL_METHOD(NULL, &_7$$10, "__construct", &_9, 32, &_8$$10); + ZEPHIR_CALL_METHOD(NULL, &_7$$10, "__construct", &_9, 33, &_8$$10); zephir_check_call_status(); zephir_throw_exception_debug(&_7$$10, "phalcon/Mvc/Model.zep", 1097); ZEPHIR_MM_RESTORE(); @@ -2027,7 +1933,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMapHydrate) _10$$16 = ZEPHIR_GLOBAL(orm).case_insensitive_column_map; } if (_10$$16) { - ZEPHIR_CALL_SELF(&_11$$17, "caseinsensitivecolumnmap", &_6, 419, columnMap, &key); + ZEPHIR_CALL_SELF(&_11$$17, "caseinsensitivecolumnmap", &_6, 420, columnMap, &key); zephir_check_call_status(); ZEPHIR_CPY_WRT(&key, &_11$$17); } @@ -2038,7 +1944,7 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMapHydrate) object_init_ex(&_12$$19, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_NVAR(&_13$$19); ZEPHIR_CONCAT_SVS(&_13$$19, "Column '", &key, "' doesn't make part of the column map"); - ZEPHIR_CALL_METHOD(NULL, &_12$$19, "__construct", &_9, 32, &_13$$19); + ZEPHIR_CALL_METHOD(NULL, &_12$$19, "__construct", &_9, 33, &_13$$19); zephir_check_call_status(); zephir_throw_exception_debug(&_12$$19, "phalcon/Mvc/Model.zep", 1097); ZEPHIR_MM_RESTORE(); @@ -2095,9 +2001,8 @@ PHP_METHOD(Phalcon_Mvc_Model, collectRelatedToSave) ZVAL_UNDEF(&_9$$6); ZVAL_UNDEF(&related); ZVAL_UNDEF(&dirtyRelated); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("related"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&related, &_0); @@ -2192,30 +2097,24 @@ PHP_METHOD(Phalcon_Mvc_Model, count) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *parameters = NULL, parameters_sub, __$null, result, _0, _1; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&result); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, ¶meters); if (!parameters) { parameters = ¶meters_sub; parameters = &__$null; } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "COUNT"); ZEPHIR_INIT_VAR(&_1); @@ -2275,13 +2174,12 @@ PHP_METHOD(Phalcon_Mvc_Model, create) ZVAL_UNDEF(&_8$$3); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_4$$3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&metaData, this_ptr, "getmodelsmetadata", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_1, this_ptr, "getwriteconnection", NULL, 420); + ZEPHIR_CALL_METHOD(&_1, this_ptr, "getwriteconnection", NULL, 421); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_0, this_ptr, "has", NULL, 0, &metaData, &_1); zephir_check_call_status(); @@ -2391,22 +2289,21 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) ZVAL_UNDEF(&values); ZVAL_UNDEF(&bindTypes); ZVAL_UNDEF(&conditions); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&metaData, this_ptr, "getmodelsmetadata", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&writeConnection, this_ptr, "getwriteconnection", NULL, 420); + ZEPHIR_CALL_METHOD(&writeConnection, this_ptr, "getwriteconnection", NULL, 421); zephir_check_call_status(); - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, 3); zephir_update_property_zval(this_ptr, ZEND_STRL("operationMade"), &_0); ZEPHIR_INIT_VAR(&_1); array_init(&_1); zephir_update_property_zval(this_ptr, ZEND_STRL("errorMessages"), &_1); if (ZEPHIR_GLOBAL(orm).virtual_foreign_keys) { - ZEPHIR_CALL_METHOD(&_2$$3, this_ptr, "checkforeignkeysreverserestrict", NULL, 421); + ZEPHIR_CALL_METHOD(&_2$$3, this_ptr, "checkforeignkeysreverserestrict", NULL, 422); zephir_check_call_status(); if (ZEPHIR_IS_FALSE_IDENTICAL(&_2$$3)) { RETURN_MM_BOOL(0); @@ -2436,7 +2333,7 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) zephir_get_class(&_4$$7, this_ptr, 0); ZEPHIR_INIT_VAR(&_5$$7); ZEPHIR_CONCAT_SVS(&_5$$7, "A primary key must be defined in the model in order to perform the operation in '", &_4$$7, "'"); - ZEPHIR_CALL_METHOD(NULL, &_3$$7, "__construct", NULL, 32, &_5$$7); + ZEPHIR_CALL_METHOD(NULL, &_3$$7, "__construct", NULL, 33, &_5$$7); zephir_check_call_status(); zephir_throw_exception_debug(&_3$$7, "phalcon/Mvc/Model.zep", 1316); ZEPHIR_MM_RESTORE(); @@ -2456,7 +2353,7 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) zephir_get_class(&_9$$9, this_ptr, 0); ZEPHIR_INIT_NVAR(&_10$$9); ZEPHIR_CONCAT_SVSVS(&_10$$9, "Column '", &primaryKey, "' have not defined a bind data type in '", &_9$$9, "'"); - ZEPHIR_CALL_METHOD(NULL, &_8$$9, "__construct", NULL, 32, &_10$$9); + ZEPHIR_CALL_METHOD(NULL, &_8$$9, "__construct", NULL, 33, &_10$$9); zephir_check_call_status(); zephir_throw_exception_debug(&_8$$9, "phalcon/Mvc/Model.zep", 1330); ZEPHIR_MM_RESTORE(); @@ -2471,7 +2368,7 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) zephir_get_class(&_12$$11, this_ptr, 0); ZEPHIR_INIT_NVAR(&_13$$11); ZEPHIR_CONCAT_SVSVS(&_13$$11, "Column '", &primaryKey, "' isn't part of the column map in '", &_12$$11, "'"); - ZEPHIR_CALL_METHOD(NULL, &_11$$11, "__construct", NULL, 32, &_13$$11); + ZEPHIR_CALL_METHOD(NULL, &_11$$11, "__construct", NULL, 33, &_13$$11); zephir_check_call_status(); zephir_throw_exception_debug(&_11$$11, "phalcon/Mvc/Model.zep", 1340); ZEPHIR_MM_RESTORE(); @@ -2488,7 +2385,7 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) zephir_get_class(&_15$$13, this_ptr, 0); ZEPHIR_INIT_NVAR(&_16$$13); ZEPHIR_CONCAT_SVSVS(&_16$$13, "Cannot delete the record because the primary key attribute: '", &attributeField, "' was not set in '", &_15$$13, "'"); - ZEPHIR_CALL_METHOD(NULL, &_14$$13, "__construct", NULL, 32, &_16$$13); + ZEPHIR_CALL_METHOD(NULL, &_14$$13, "__construct", NULL, 33, &_16$$13); zephir_check_call_status(); zephir_throw_exception_debug(&_14$$13, "phalcon/Mvc/Model.zep", 1354); ZEPHIR_MM_RESTORE(); @@ -2521,7 +2418,7 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) zephir_get_class(&_21$$15, this_ptr, 0); ZEPHIR_INIT_NVAR(&_22$$15); ZEPHIR_CONCAT_SVSVS(&_22$$15, "Column '", &primaryKey, "' have not defined a bind data type in '", &_21$$15, "'"); - ZEPHIR_CALL_METHOD(NULL, &_20$$15, "__construct", NULL, 32, &_22$$15); + ZEPHIR_CALL_METHOD(NULL, &_20$$15, "__construct", NULL, 33, &_22$$15); zephir_check_call_status(); zephir_throw_exception_debug(&_20$$15, "phalcon/Mvc/Model.zep", 1330); ZEPHIR_MM_RESTORE(); @@ -2536,7 +2433,7 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) zephir_get_class(&_24$$17, this_ptr, 0); ZEPHIR_INIT_NVAR(&_25$$17); ZEPHIR_CONCAT_SVSVS(&_25$$17, "Column '", &primaryKey, "' isn't part of the column map in '", &_24$$17, "'"); - ZEPHIR_CALL_METHOD(NULL, &_23$$17, "__construct", NULL, 32, &_25$$17); + ZEPHIR_CALL_METHOD(NULL, &_23$$17, "__construct", NULL, 33, &_25$$17); zephir_check_call_status(); zephir_throw_exception_debug(&_23$$17, "phalcon/Mvc/Model.zep", 1340); ZEPHIR_MM_RESTORE(); @@ -2553,7 +2450,7 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) zephir_get_class(&_27$$19, this_ptr, 0); ZEPHIR_INIT_NVAR(&_28$$19); ZEPHIR_CONCAT_SVSVS(&_28$$19, "Cannot delete the record because the primary key attribute: '", &attributeField, "' was not set in '", &_27$$19, "'"); - ZEPHIR_CALL_METHOD(NULL, &_26$$19, "__construct", NULL, 32, &_28$$19); + ZEPHIR_CALL_METHOD(NULL, &_26$$19, "__construct", NULL, 33, &_28$$19); zephir_check_call_status(); zephir_throw_exception_debug(&_26$$19, "phalcon/Mvc/Model.zep", 1354); ZEPHIR_MM_RESTORE(); @@ -2589,9 +2486,9 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) RETURN_MM_BOOL(1); } } - ZEPHIR_CALL_METHOD(&schema, this_ptr, "getschema", NULL, 422); + ZEPHIR_CALL_METHOD(&schema, this_ptr, "getschema", NULL, 423); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&source, this_ptr, "getsource", NULL, 423); + ZEPHIR_CALL_METHOD(&source, this_ptr, "getsource", NULL, 424); zephir_check_call_status(); if (zephir_is_true(&schema)) { ZEPHIR_INIT_VAR(&table); @@ -2606,7 +2503,7 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) ZEPHIR_CALL_METHOD(&success, &writeConnection, "delete", NULL, 0, &table, &_35, &values, &bindTypes); zephir_check_call_status(); if (ZEPHIR_GLOBAL(orm).virtual_foreign_keys) { - ZEPHIR_CALL_METHOD(&_36$$25, this_ptr, "checkforeignkeysreversecascade", NULL, 424); + ZEPHIR_CALL_METHOD(&_36$$25, this_ptr, "checkforeignkeysreversecascade", NULL, 425); zephir_check_call_status(); if (ZEPHIR_IS_FALSE_IDENTICAL(&_36$$25)) { RETURN_MM_BOOL(0); @@ -2628,7 +2525,7 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) ZEPHIR_CALL_METHOD(NULL, &_39$$29, "clearreusableobjects", NULL, 0); zephir_check_call_status(); } - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, 2); zephir_update_property_zval(this_ptr, ZEND_STRL("dirtyState"), &_0); RETURN_CCTOR(&success); @@ -2649,12 +2546,10 @@ PHP_METHOD(Phalcon_Mvc_Model, dump) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *this_ptr = getThis(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - - ZEPHIR_MM_GROW(); - - ZEPHIR_RETURN_CALL_FUNCTION("get_object_vars", NULL, 425, this_ptr); + ZEPHIR_RETURN_CALL_FUNCTION("get_object_vars", NULL, 426, this_ptr); zephir_check_call_status(); RETURN_MM(); } @@ -2842,7 +2737,6 @@ PHP_METHOD(Phalcon_Mvc_Model, find) zend_long ZEPHIR_LAST_CALL_STATUS; zephir_fcall_cache_entry *_0 = NULL; zval *parameters = NULL, parameters_sub, __$null, params, query, resultset, hydration; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_NULL(&__$null); @@ -2850,23 +2744,18 @@ PHP_METHOD(Phalcon_Mvc_Model, find) ZVAL_UNDEF(&query); ZVAL_UNDEF(&resultset); ZVAL_UNDEF(&hydration); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, ¶meters); if (!parameters) { parameters = ¶meters_sub; parameters = &__$null; } - - if (Z_TYPE_P(parameters) != IS_ARRAY) { ZEPHIR_INIT_VAR(¶ms); array_init(¶ms); @@ -2876,12 +2765,12 @@ PHP_METHOD(Phalcon_Mvc_Model, find) } else { ZEPHIR_CPY_WRT(¶ms, parameters); } - ZEPHIR_CALL_STATIC(&query, "getpreparedquery", &_0, 426, ¶ms); + ZEPHIR_CALL_STATIC(&query, "getpreparedquery", &_0, 427, ¶ms); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&resultset, &query, "execute", NULL, 0); zephir_check_call_status(); if (Z_TYPE_P(&resultset) == IS_OBJECT) { - ZEPHIR_OBS_VAR(&hydration); + zephir_memory_observe(&hydration); if (zephir_array_isset_string_fetch(&hydration, ¶ms, SL("hydration"), 0)) { ZEPHIR_CALL_METHOD(NULL, &resultset, "sethydratemode", NULL, 0, &hydration); zephir_check_call_status(); @@ -2983,7 +2872,6 @@ PHP_METHOD(Phalcon_Mvc_Model, findFirst) zephir_fcall_cache_entry *_5 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *parameters = NULL, parameters_sub, __$null, params, query, _6, _1$$5, _2$$6, _3$$6, _4$$6; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_NULL(&__$null); @@ -2994,23 +2882,18 @@ PHP_METHOD(Phalcon_Mvc_Model, findFirst) ZVAL_UNDEF(&_2$$6); ZVAL_UNDEF(&_3$$6); ZVAL_UNDEF(&_4$$6); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, ¶meters); if (!parameters) { parameters = ¶meters_sub; parameters = &__$null; } - - _0 = Z_TYPE_P(parameters) == IS_STRING; if (!(_0)) { _0 = zephir_is_numeric(parameters); @@ -3032,14 +2915,14 @@ PHP_METHOD(Phalcon_Mvc_Model, findFirst) zephir_get_called_class(&_3$$6); ZEPHIR_INIT_VAR(&_4$$6); ZEPHIR_CONCAT_SVS(&_4$$6, "Parameters passed must be of type array, string, numeric or null in '", &_3$$6, "'"); - ZEPHIR_CALL_METHOD(NULL, &_2$$6, "__construct", NULL, 32, &_4$$6); + ZEPHIR_CALL_METHOD(NULL, &_2$$6, "__construct", NULL, 33, &_4$$6); zephir_check_call_status(); zephir_throw_exception_debug(&_2$$6, "phalcon/Mvc/Model.zep", 1759); ZEPHIR_MM_RESTORE(); return; } ZVAL_LONG(&_6, 1); - ZEPHIR_CALL_STATIC(&query, "getpreparedquery", &_5, 426, ¶ms, &_6); + ZEPHIR_CALL_STATIC(&query, "getpreparedquery", &_5, 427, ¶ms, &_6); zephir_check_call_status(); ZVAL_BOOL(&_6, 1); ZEPHIR_CALL_METHOD(NULL, &query, "setuniquerow", NULL, 0, &_6); @@ -3063,15 +2946,11 @@ PHP_METHOD(Phalcon_Mvc_Model, fireEvent) ZVAL_UNDEF(&eventName); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(eventName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &eventName_param); if (UNEXPECTED(Z_TYPE_P(eventName_param) != IS_STRING && Z_TYPE_P(eventName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'eventName' must be of the type string")); @@ -3082,8 +2961,6 @@ PHP_METHOD(Phalcon_Mvc_Model, fireEvent) } else { ZEPHIR_INIT_VAR(&eventName); } - - if ((zephir_method_exists(this_ptr, &eventName) == SUCCESS)) { ZEPHIR_CALL_METHOD_ZVAL(NULL, this_ptr, &eventName, NULL, 0); zephir_check_call_status(); @@ -3110,15 +2987,11 @@ PHP_METHOD(Phalcon_Mvc_Model, fireEventCancel) ZVAL_UNDEF(&eventName); ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(eventName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &eventName_param); if (UNEXPECTED(Z_TYPE_P(eventName_param) != IS_STRING && Z_TYPE_P(eventName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'eventName' must be of the type string")); @@ -3129,8 +3002,6 @@ PHP_METHOD(Phalcon_Mvc_Model, fireEventCancel) } else { ZEPHIR_INIT_VAR(&eventName); } - - if ((zephir_method_exists(this_ptr, &eventName) == SUCCESS)) { ZEPHIR_CALL_METHOD_ZVAL(&_0$$3, this_ptr, &eventName, NULL, 0); zephir_check_call_status(); @@ -3182,9 +3053,8 @@ PHP_METHOD(Phalcon_Mvc_Model, getChangedFields) ZVAL_UNDEF(&_9$$6); ZVAL_UNDEF(&_10$$10); ZVAL_UNDEF(&changed); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("snapshot"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&snapshot, &_0); @@ -3195,7 +3065,7 @@ PHP_METHOD(Phalcon_Mvc_Model, getChangedFields) zephir_get_class(&_2$$3, this_ptr, 0); ZEPHIR_INIT_VAR(&_3$$3); ZEPHIR_CONCAT_SVS(&_3$$3, "The 'keepSnapshots' option must be enabled to track changes in '", &_2$$3, "'"); - ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 32, &_3$$3); + ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 33, &_3$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_1$$3, "phalcon/Mvc/Model.zep", 1845); ZEPHIR_MM_RESTORE(); @@ -3283,9 +3153,6 @@ PHP_METHOD(Phalcon_Mvc_Model, getChangedFields) */ PHP_METHOD(Phalcon_Mvc_Model, getDirtyState) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "dirtyState"); } @@ -3301,9 +3168,8 @@ PHP_METHOD(Phalcon_Mvc_Model, getEventsManager) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("modelsManager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_METHOD(&_0, "getcustomeventsmanager", NULL, 0, this_ptr); @@ -3352,16 +3218,13 @@ PHP_METHOD(Phalcon_Mvc_Model, getMessages) ZVAL_UNDEF(&_6$$5); ZVAL_UNDEF(&_7$$7); ZVAL_UNDEF(&filtered); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(filter) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &filter); if (!filter) { filter = &filter_sub; @@ -3369,8 +3232,6 @@ PHP_METHOD(Phalcon_Mvc_Model, getMessages) } else { ZEPHIR_SEPARATE_PARAM(filter); } - - _0 = Z_TYPE_P(filter) == IS_STRING; if (!(_0)) { _0 = Z_TYPE_P(filter) == IS_ARRAY; @@ -3432,9 +3293,6 @@ PHP_METHOD(Phalcon_Mvc_Model, getMessages) */ PHP_METHOD(Phalcon_Mvc_Model, getModelsManager) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "modelsManager"); } @@ -3457,11 +3315,10 @@ PHP_METHOD(Phalcon_Mvc_Model, getModelsMetaData) ZVAL_UNDEF(&_3$$4); ZVAL_UNDEF(&_4$$4); ZVAL_UNDEF(&_5$$4); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_OBS_VAR(&metaData); + zephir_memory_observe(&metaData); zephir_read_property(&metaData, this_ptr, ZEND_STRL("modelsMetaData"), PH_NOISY_CC); if (Z_TYPE_P(&metaData) == IS_NULL) { zephir_read_property(&_0$$3, this_ptr, ZEND_STRL("container"), PH_NOISY_CC | PH_READONLY); @@ -3478,7 +3335,7 @@ PHP_METHOD(Phalcon_Mvc_Model, getModelsMetaData) zephir_get_class(&_4$$4, this_ptr, 0); ZEPHIR_INIT_VAR(&_5$$4); ZEPHIR_CONCAT_SVS(&_5$$4, "The injected service 'modelsMetadata' is not valid in '", &_4$$4, "'"); - ZEPHIR_CALL_METHOD(NULL, &_3$$4, "__construct", NULL, 32, &_5$$4); + ZEPHIR_CALL_METHOD(NULL, &_3$$4, "__construct", NULL, 33, &_5$$4); zephir_check_call_status(); zephir_throw_exception_debug(&_3$$4, "phalcon/Mvc/Model.zep", 2001); ZEPHIR_MM_RESTORE(); @@ -3495,9 +3352,6 @@ PHP_METHOD(Phalcon_Mvc_Model, getModelsMetaData) */ PHP_METHOD(Phalcon_Mvc_Model, getOperationMade) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "operationMade"); } @@ -3507,9 +3361,6 @@ PHP_METHOD(Phalcon_Mvc_Model, getOperationMade) */ PHP_METHOD(Phalcon_Mvc_Model, getOldSnapshotData) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "oldSnapshot"); } @@ -3527,9 +3378,8 @@ PHP_METHOD(Phalcon_Mvc_Model, getReadConnection) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_1$$3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("transaction"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_0) != IS_NULL) { @@ -3556,9 +3406,8 @@ PHP_METHOD(Phalcon_Mvc_Model, getReadConnectionService) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("modelsManager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_METHOD(&_0, "getreadconnectionservice", NULL, 0, this_ptr); @@ -3592,25 +3441,20 @@ PHP_METHOD(Phalcon_Mvc_Model, getRelated) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(alias) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(arguments) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &alias_param, &arguments); zephir_get_strval(&alias, alias_param); if (!arguments) { arguments = &arguments_sub; arguments = &__$null; } - - ZEPHIR_INIT_VAR(&className); zephir_get_class(&className, this_ptr, 0); zephir_read_property(&_0, this_ptr, ZEND_STRL("modelsManager"), PH_NOISY_CC | PH_READONLY); @@ -3625,7 +3469,7 @@ PHP_METHOD(Phalcon_Mvc_Model, getRelated) object_init_ex(&_2$$3, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_VAR(&_3$$3); ZEPHIR_CONCAT_SVSVS(&_3$$3, "There is no defined relations for the model '", &className, "' using alias '", &alias, "'"); - ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 32, &_3$$3); + ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 33, &_3$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_2$$3, "phalcon/Mvc/Model.zep", 2077); ZEPHIR_MM_RESTORE(); @@ -3672,19 +3516,13 @@ PHP_METHOD(Phalcon_Mvc_Model, isRelationshipLoaded) ZVAL_UNDEF(&relationshipAlias); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(relationshipAlias) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &relationshipAlias_param); zephir_get_strval(&relationshipAlias, relationshipAlias_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("related"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_1); zephir_fast_strtolower(&_1, &relationshipAlias); @@ -3702,9 +3540,8 @@ PHP_METHOD(Phalcon_Mvc_Model, getSchema) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("modelsManager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_METHOD(&_0, "getmodelschema", NULL, 0, this_ptr); @@ -3717,9 +3554,6 @@ PHP_METHOD(Phalcon_Mvc_Model, getSchema) */ PHP_METHOD(Phalcon_Mvc_Model, getSnapshotData) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "snapshot"); } @@ -3735,9 +3569,8 @@ PHP_METHOD(Phalcon_Mvc_Model, getSource) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("modelsManager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_METHOD(&_0, "getmodelsource", NULL, 0, this_ptr); @@ -3787,9 +3620,8 @@ PHP_METHOD(Phalcon_Mvc_Model, getUpdatedFields) ZVAL_UNDEF(&_12$$6); ZVAL_UNDEF(&_14$$8); ZVAL_UNDEF(&updated); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("snapshot"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&snapshot, &_0); @@ -3802,7 +3634,7 @@ PHP_METHOD(Phalcon_Mvc_Model, getUpdatedFields) zephir_get_class(&_2$$3, this_ptr, 0); ZEPHIR_INIT_VAR(&_3$$3); ZEPHIR_CONCAT_SVS(&_3$$3, "The 'updateSnapshotOnSave' option must be enabled for this method to work properly in '", &_2$$3, "'"); - ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 32, &_3$$3); + ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 33, &_3$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_1$$3, "phalcon/Mvc/Model.zep", 2201); ZEPHIR_MM_RESTORE(); @@ -3820,7 +3652,7 @@ PHP_METHOD(Phalcon_Mvc_Model, getUpdatedFields) zephir_get_class(&_5$$5, this_ptr, 0); ZEPHIR_INIT_VAR(&_6$$5); ZEPHIR_CONCAT_SVS(&_6$$5, "Change checking cannot be performed because the object has not been persisted or is deleted in '", &_5$$5, "'"); - ZEPHIR_CALL_METHOD(NULL, &_4$$5, "__construct", NULL, 32, &_6$$5); + ZEPHIR_CALL_METHOD(NULL, &_4$$5, "__construct", NULL, 33, &_6$$5); zephir_check_call_status(); zephir_throw_exception_debug(&_4$$5, "phalcon/Mvc/Model.zep", 2216); ZEPHIR_MM_RESTORE(); @@ -3892,9 +3724,8 @@ PHP_METHOD(Phalcon_Mvc_Model, getWriteConnection) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_1$$3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("transaction"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_0) != IS_NULL) { @@ -3921,9 +3752,8 @@ PHP_METHOD(Phalcon_Mvc_Model, getWriteConnectionService) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("modelsManager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_METHOD(&_0, "getwriteconnectionservice", NULL, 0, this_ptr); @@ -3966,17 +3796,14 @@ PHP_METHOD(Phalcon_Mvc_Model, hasChanged) ZVAL_NULL(&__$null); ZVAL_UNDEF(&changedFields); ZVAL_UNDEF(&intersect); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(fieldName) Z_PARAM_BOOL(allFields) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 2, &fieldName, &allFields_param); if (!fieldName) { fieldName = &fieldName_sub; @@ -3985,17 +3812,14 @@ PHP_METHOD(Phalcon_Mvc_Model, hasChanged) if (!allFields_param) { allFields = 0; } else { - allFields = zephir_get_boolval(allFields_param); - } - - + } ZEPHIR_CALL_METHOD(&changedFields, this_ptr, "getchangedfields", NULL, 0); zephir_check_call_status(); if (Z_TYPE_P(fieldName) == IS_STRING) { RETURN_MM_BOOL(zephir_fast_in_array(fieldName, &changedFields)); } if (Z_TYPE_P(fieldName) == IS_ARRAY) { - ZEPHIR_CALL_FUNCTION(&intersect, "array_intersect", NULL, 427, fieldName, &changedFields); + ZEPHIR_CALL_FUNCTION(&intersect, "array_intersect", NULL, 428, fieldName, &changedFields); zephir_check_call_status(); if (allFields) { RETURN_MM_BOOL(ZEPHIR_IS_EQUAL(&intersect, fieldName)); @@ -4014,9 +3838,6 @@ PHP_METHOD(Phalcon_Mvc_Model, hasSnapshotData) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - zephir_read_property(&_0, this_ptr, ZEND_STRL("snapshot"), PH_NOISY_CC | PH_READONLY); RETURN_BOOL(!(ZEPHIR_IS_EMPTY(&_0))); } @@ -4039,17 +3860,14 @@ PHP_METHOD(Phalcon_Mvc_Model, hasUpdated) ZVAL_NULL(&__$null); ZVAL_UNDEF(&updatedFields); ZVAL_UNDEF(&intersect); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(fieldName) Z_PARAM_BOOL(allFields) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 2, &fieldName, &allFields_param); if (!fieldName) { fieldName = &fieldName_sub; @@ -4058,17 +3876,14 @@ PHP_METHOD(Phalcon_Mvc_Model, hasUpdated) if (!allFields_param) { allFields = 0; } else { - allFields = zephir_get_boolval(allFields_param); - } - - + } ZEPHIR_CALL_METHOD(&updatedFields, this_ptr, "getupdatedfields", NULL, 0); zephir_check_call_status(); if (Z_TYPE_P(fieldName) == IS_STRING) { RETURN_MM_BOOL(zephir_fast_in_array(fieldName, &updatedFields)); } if (Z_TYPE_P(fieldName) == IS_ARRAY) { - ZEPHIR_CALL_FUNCTION(&intersect, "array_intersect", NULL, 427, fieldName, &updatedFields); + ZEPHIR_CALL_FUNCTION(&intersect, "array_intersect", NULL, 428, fieldName, &updatedFields); zephir_check_call_status(); if (allFields) { RETURN_MM_BOOL(ZEPHIR_IS_EQUAL(&intersect, fieldName)); @@ -4090,10 +3905,8 @@ PHP_METHOD(Phalcon_Mvc_Model, jsonSerialize) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *this_ptr = getThis(); - - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "toarray", NULL, 0); zephir_check_call_status(); @@ -4133,29 +3946,23 @@ PHP_METHOD(Phalcon_Mvc_Model, maximum) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *parameters = NULL, parameters_sub, __$null, _0, _1; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, ¶meters); if (!parameters) { parameters = ¶meters_sub; parameters = &__$null; } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "MAX"); ZEPHIR_INIT_VAR(&_1); @@ -4197,29 +4004,23 @@ PHP_METHOD(Phalcon_Mvc_Model, minimum) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *parameters = NULL, parameters_sub, __$null, _0, _1; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, ¶meters); if (!parameters) { parameters = ¶meters_sub; parameters = &__$null; } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "MIN"); ZEPHIR_INIT_VAR(&_1); @@ -4236,26 +4037,21 @@ PHP_METHOD(Phalcon_Mvc_Model, query) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; - zval *container = NULL, container_sub, __$null, criteria, _3, _1$$4, _2$$4; - zval *this_ptr = getThis(); + zval *container = NULL, container_sub, __$null, criteria, _2, _0$$4, _1$$4; ZVAL_UNDEF(&container_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&criteria); - ZVAL_UNDEF(&_3); + ZVAL_UNDEF(&_2); + ZVAL_UNDEF(&_0$$4); ZVAL_UNDEF(&_1$$4); - ZVAL_UNDEF(&_2$$4); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_OBJECT_OF_CLASS_OR_NULL(container, phalcon_di_diinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &container); if (!container) { container = &container_sub; @@ -4263,19 +4059,17 @@ PHP_METHOD(Phalcon_Mvc_Model, query) } else { ZEPHIR_SEPARATE_PARAM(container); } - - if (Z_TYPE_P(container) != IS_OBJECT) { - ZEPHIR_CALL_CE_STATIC(container, phalcon_di_di_ce, "getdefault", &_0, 0); + ZEPHIR_CALL_CE_STATIC(container, phalcon_di_di_ce, "getdefault", NULL, 0); zephir_check_call_status(); } ZEPHIR_INIT_VAR(&criteria); if (zephir_instance_of_ev(container, phalcon_di_diinterface_ce)) { - ZEPHIR_INIT_VAR(&_2$$4); - ZVAL_STRING(&_2$$4, "Phalcon\\Mvc\\Model\\Criteria"); - ZEPHIR_CALL_METHOD(&_1$$4, container, "get", NULL, 0, &_2$$4); + ZEPHIR_INIT_VAR(&_1$$4); + ZVAL_STRING(&_1$$4, "Phalcon\\Mvc\\Model\\Criteria"); + ZEPHIR_CALL_METHOD(&_0$$4, container, "get", NULL, 0, &_1$$4); zephir_check_call_status(); - ZEPHIR_CPY_WRT(&criteria, &_1$$4); + ZEPHIR_CPY_WRT(&criteria, &_0$$4); } else { object_init_ex(&criteria, phalcon_mvc_model_criteria_ce); if (zephir_has_constructor(&criteria)) { @@ -4283,12 +4077,12 @@ PHP_METHOD(Phalcon_Mvc_Model, query) zephir_check_call_status(); } - ZEPHIR_CALL_METHOD(NULL, &criteria, "setdi", NULL, 428, container); + ZEPHIR_CALL_METHOD(NULL, &criteria, "setdi", NULL, 429, container); zephir_check_call_status(); } - ZEPHIR_INIT_VAR(&_3); - zephir_get_called_class(&_3); - ZEPHIR_CALL_METHOD(NULL, &criteria, "setmodelname", NULL, 429, &_3); + ZEPHIR_INIT_VAR(&_2); + zephir_get_called_class(&_2); + ZEPHIR_CALL_METHOD(NULL, &criteria, "setmodelname", NULL, 430, &_2); zephir_check_call_status(); RETURN_CCTOR(&criteria); } @@ -4309,15 +4103,11 @@ PHP_METHOD(Phalcon_Mvc_Model, readAttribute) ZVAL_UNDEF(&attribute); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(attribute) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &attribute_param); if (UNEXPECTED(Z_TYPE_P(attribute_param) != IS_STRING && Z_TYPE_P(attribute_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'attribute' must be of the type string")); @@ -4328,12 +4118,10 @@ PHP_METHOD(Phalcon_Mvc_Model, readAttribute) } else { ZEPHIR_INIT_VAR(&attribute); } - - if (!(zephir_isset_property_zval(this_ptr, &attribute))) { RETURN_MM_NULL(); } - ZEPHIR_OBS_VAR(&_0); + zephir_memory_observe(&_0); zephir_read_property_zval(&_0, this_ptr, &attribute, PH_NOISY_CC); RETURN_CCTOR(&_0); } @@ -4386,9 +4174,8 @@ PHP_METHOD(Phalcon_Mvc_Model, refresh) ZVAL_UNDEF(&_18); ZVAL_UNDEF(&_16$$9); ZVAL_UNDEF(&_17$$10); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("dirtyState"), PH_NOISY_CC | PH_READONLY); if (UNEXPECTED(!ZEPHIR_IS_LONG(&_0, 0))) { @@ -4398,7 +4185,7 @@ PHP_METHOD(Phalcon_Mvc_Model, refresh) zephir_get_class(&_2$$3, this_ptr, 0); ZEPHIR_INIT_VAR(&_3$$3); ZEPHIR_CONCAT_SVS(&_3$$3, "The record cannot be refreshed because it does not exist or is deleted in '", &_2$$3, "'"); - ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 32, &_3$$3); + ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 33, &_3$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_1$$3, "phalcon/Mvc/Model.zep", 2482); ZEPHIR_MM_RESTORE(); @@ -4406,13 +4193,13 @@ PHP_METHOD(Phalcon_Mvc_Model, refresh) } ZEPHIR_CALL_METHOD(&metaData, this_ptr, "getmodelsmetadata", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&readConnection, this_ptr, "getreadconnection", NULL, 430); + ZEPHIR_CALL_METHOD(&readConnection, this_ptr, "getreadconnection", NULL, 431); zephir_check_call_status(); zephir_read_property(&_4, this_ptr, ZEND_STRL("modelsManager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&manager, &_4); - ZEPHIR_CALL_METHOD(&schema, this_ptr, "getschema", NULL, 422); + ZEPHIR_CALL_METHOD(&schema, this_ptr, "getschema", NULL, 423); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&source, this_ptr, "getsource", NULL, 423); + ZEPHIR_CALL_METHOD(&source, this_ptr, "getsource", NULL, 424); zephir_check_call_status(); if (zephir_is_true(&schema)) { ZEPHIR_INIT_VAR(&table); @@ -4434,7 +4221,7 @@ PHP_METHOD(Phalcon_Mvc_Model, refresh) zephir_get_class(&_7$$7, this_ptr, 0); ZEPHIR_INIT_VAR(&_8$$7); ZEPHIR_CONCAT_SVS(&_8$$7, "The record cannot be refreshed because it does not exist or is deleted in '", &_7$$7, "'"); - ZEPHIR_CALL_METHOD(NULL, &_6$$7, "__construct", NULL, 32, &_8$$7); + ZEPHIR_CALL_METHOD(NULL, &_6$$7, "__construct", NULL, 33, &_8$$7); zephir_check_call_status(); zephir_throw_exception_debug(&_6$$7, "phalcon/Mvc/Model.zep", 2507); ZEPHIR_MM_RESTORE(); @@ -4452,7 +4239,7 @@ PHP_METHOD(Phalcon_Mvc_Model, refresh) zephir_get_class(&_11$$8, this_ptr, 0); ZEPHIR_INIT_VAR(&_12$$8); ZEPHIR_CONCAT_SVS(&_12$$8, "The record cannot be refreshed because it does not exist or is deleted in '", &_11$$8, "'"); - ZEPHIR_CALL_METHOD(NULL, &_10$$8, "__construct", NULL, 32, &_12$$8); + ZEPHIR_CALL_METHOD(NULL, &_10$$8, "__construct", NULL, 33, &_12$$8); zephir_check_call_status(); zephir_throw_exception_debug(&_10$$8, "phalcon/Mvc/Model.zep", 2518); ZEPHIR_MM_RESTORE(); @@ -4560,13 +4347,12 @@ PHP_METHOD(Phalcon_Mvc_Model, save) zval *this_ptr = getThis(); ZVAL_UNDEF(&visited); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&visited); object_init_ex(&visited, phalcon_support_collection_ce); - ZEPHIR_CALL_METHOD(NULL, &visited, "__construct", NULL, 22); + ZEPHIR_CALL_METHOD(NULL, &visited, "__construct", NULL, 23); zephir_check_call_status(); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "dosave", NULL, 0, &visited); zephir_check_call_status(); @@ -4614,19 +4400,13 @@ PHP_METHOD(Phalcon_Mvc_Model, doSave) ZVAL_UNDEF(&_11$$19); ZVAL_UNDEF(&_12$$22); ZVAL_UNDEF(&_13$$21); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(visited, phalcon_support_collection_collectioninterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &visited); - - - ZEPHIR_CALL_FUNCTION(&objId, "spl_object_id", NULL, 431, this_ptr); + ZEPHIR_CALL_FUNCTION(&objId, "spl_object_id", NULL, 432, this_ptr); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_0, visited, "has", NULL, 0, &objId); zephir_check_call_status(); @@ -4637,7 +4417,7 @@ PHP_METHOD(Phalcon_Mvc_Model, doSave) zephir_check_call_status(); ZEPHIR_CALL_METHOD(&metaData, this_ptr, "getmodelsmetadata", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&writeConnection, this_ptr, "getwriteconnection", NULL, 420); + ZEPHIR_CALL_METHOD(&writeConnection, this_ptr, "getwriteconnection", NULL, 421); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "prepareSave"); @@ -4653,9 +4433,9 @@ PHP_METHOD(Phalcon_Mvc_Model, doSave) RETURN_MM_BOOL(0); } } - ZEPHIR_CALL_METHOD(&schema, this_ptr, "getschema", NULL, 422); + ZEPHIR_CALL_METHOD(&schema, this_ptr, "getschema", NULL, 423); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&source, this_ptr, "getsource", NULL, 423); + ZEPHIR_CALL_METHOD(&source, this_ptr, "getsource", NULL, 424); zephir_check_call_status(); if (zephir_is_true(&schema)) { ZEPHIR_INIT_VAR(&table); @@ -4665,16 +4445,16 @@ PHP_METHOD(Phalcon_Mvc_Model, doSave) } else { ZEPHIR_CPY_WRT(&table, &source); } - ZEPHIR_CALL_METHOD(&readConnection, this_ptr, "getreadconnection", NULL, 430); + ZEPHIR_CALL_METHOD(&readConnection, this_ptr, "getreadconnection", NULL, 431); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&exists, this_ptr, "has", NULL, 0, &metaData, &readConnection); zephir_check_call_status(); if (zephir_is_true(&exists)) { - ZEPHIR_INIT_ZVAL_NREF(_3$$8); + ZVAL_UNDEF(&_3$$8); ZVAL_LONG(&_3$$8, 2); zephir_update_property_zval(this_ptr, ZEND_STRL("operationMade"), &_3$$8); } else { - ZEPHIR_INIT_ZVAL_NREF(_4$$9); + ZVAL_UNDEF(&_4$$9); ZVAL_LONG(&_4$$9, 1); zephir_update_property_zval(this_ptr, ZEND_STRL("operationMade"), &_4$$9); } @@ -4696,7 +4476,7 @@ PHP_METHOD(Phalcon_Mvc_Model, doSave) object_init_ex(&_7$$12, phalcon_mvc_model_validationfailed_ce); ZEPHIR_CALL_METHOD(&_8$$12, this_ptr, "getmessages", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &_7$$12, "__construct", NULL, 432, this_ptr, &_8$$12); + ZEPHIR_CALL_METHOD(NULL, &_7$$12, "__construct", NULL, 433, this_ptr, &_8$$12); zephir_check_call_status(); zephir_throw_exception_debug(&_7$$12, "phalcon/Mvc/Model.zep", 2707); ZEPHIR_MM_RESTORE(); @@ -4712,7 +4492,7 @@ PHP_METHOD(Phalcon_Mvc_Model, doSave) zephir_check_call_status(); } if (ZEPHIR_IS_TRUE_IDENTICAL(&success)) { - ZEPHIR_INIT_ZVAL_NREF(_9$$15); + ZVAL_UNDEF(&_9$$15); ZVAL_LONG(&_9$$15, 0); zephir_update_property_zval(this_ptr, ZEND_STRL("dirtyState"), &_9$$15); } @@ -4770,9 +4550,8 @@ PHP_METHOD(Phalcon_Mvc_Model, serialize) ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_5$$3); ZVAL_UNDEF(&_6); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&snapshot); ZVAL_NULL(&snapshot); @@ -4814,12 +4593,11 @@ PHP_METHOD(Phalcon_Mvc_Model, serialize) */ PHP_METHOD(Phalcon_Mvc_Model, unserialize) { - zend_string *_13$$7; - zend_ulong _12$$7; + zend_string *_12$$7; + zend_ulong _11$$7; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zephir_fcall_cache_entry *_1 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *data, data_sub, attributes, container, manager, key, value, snapshot, properties, dirtyState, _0$$4, _2$$5, _3$$5, _4$$5, _5$$3, _6$$3, _7$$6, _8$$6, _9$$6, *_10$$7, _11$$7; + zval *data, data_sub, attributes, container, manager, key, value, snapshot, properties, dirtyState, _0$$4, _1$$5, _2$$5, _3$$5, _4$$3, _5$$3, _6$$6, _7$$6, _8$$6, *_9$$7, _10$$7; zval *this_ptr = getThis(); ZVAL_UNDEF(&data_sub); @@ -4832,27 +4610,21 @@ PHP_METHOD(Phalcon_Mvc_Model, unserialize) ZVAL_UNDEF(&properties); ZVAL_UNDEF(&dirtyState); ZVAL_UNDEF(&_0$$4); + ZVAL_UNDEF(&_1$$5); ZVAL_UNDEF(&_2$$5); ZVAL_UNDEF(&_3$$5); - ZVAL_UNDEF(&_4$$5); + ZVAL_UNDEF(&_4$$3); ZVAL_UNDEF(&_5$$3); - ZVAL_UNDEF(&_6$$3); + ZVAL_UNDEF(&_6$$6); ZVAL_UNDEF(&_7$$6); ZVAL_UNDEF(&_8$$6); - ZVAL_UNDEF(&_9$$6); - ZVAL_UNDEF(&_11$$7); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; + ZVAL_UNDEF(&_10$$7); ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &data); - - ZEPHIR_CALL_FUNCTION(&attributes, "unserialize", NULL, 16, data); zephir_check_call_status(); if (Z_TYPE_P(&attributes) == IS_ARRAY) { @@ -4862,66 +4634,66 @@ PHP_METHOD(Phalcon_Mvc_Model, unserialize) zephir_array_update_string(&_0$$4, SL("attributes"), &attributes, PH_COPY | PH_SEPARATE); ZEPHIR_CPY_WRT(&attributes, &_0$$4); } - ZEPHIR_CALL_CE_STATIC(&container, phalcon_di_di_ce, "getdefault", &_1, 0); + ZEPHIR_CALL_CE_STATIC(&container, phalcon_di_di_ce, "getdefault", NULL, 0); zephir_check_call_status(); if (Z_TYPE_P(&container) == IS_NULL) { + ZEPHIR_INIT_VAR(&_1$$5); + object_init_ex(&_1$$5, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_VAR(&_2$$5); - object_init_ex(&_2$$5, phalcon_mvc_model_exception_ce); + zephir_get_class(&_2$$5, this_ptr, 0); ZEPHIR_INIT_VAR(&_3$$5); - zephir_get_class(&_3$$5, this_ptr, 0); - ZEPHIR_INIT_VAR(&_4$$5); - ZEPHIR_CONCAT_SVS(&_4$$5, "A dependency injection container is required to access the services related to the ODM in '", &_3$$5, "'"); - ZEPHIR_CALL_METHOD(NULL, &_2$$5, "__construct", NULL, 32, &_4$$5); + ZEPHIR_CONCAT_SVS(&_3$$5, "A dependency injection container is required to access the services related to the ODM in '", &_2$$5, "'"); + ZEPHIR_CALL_METHOD(NULL, &_1$$5, "__construct", NULL, 33, &_3$$5); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$5, "phalcon/Mvc/Model.zep", 2827); + zephir_throw_exception_debug(&_1$$5, "phalcon/Mvc/Model.zep", 2827); ZEPHIR_MM_RESTORE(); return; } zephir_update_property_zval(this_ptr, ZEND_STRL("container"), &container); - ZEPHIR_INIT_VAR(&_6$$3); - ZVAL_STRING(&_6$$3, "modelsManager"); - ZEPHIR_CALL_METHOD(&_5$$3, &container, "getshared", NULL, 0, &_6$$3); + ZEPHIR_INIT_VAR(&_5$$3); + ZVAL_STRING(&_5$$3, "modelsManager"); + ZEPHIR_CALL_METHOD(&_4$$3, &container, "getshared", NULL, 0, &_5$$3); zephir_check_call_status(); - ZEPHIR_CPY_WRT(&manager, &_5$$3); + ZEPHIR_CPY_WRT(&manager, &_4$$3); if (UNEXPECTED(Z_TYPE_P(&manager) != IS_OBJECT)) { + ZEPHIR_INIT_VAR(&_6$$6); + object_init_ex(&_6$$6, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_VAR(&_7$$6); - object_init_ex(&_7$$6, phalcon_mvc_model_exception_ce); + zephir_get_class(&_7$$6, this_ptr, 0); ZEPHIR_INIT_VAR(&_8$$6); - zephir_get_class(&_8$$6, this_ptr, 0); - ZEPHIR_INIT_VAR(&_9$$6); - ZEPHIR_CONCAT_SVS(&_9$$6, "The injected service 'modelsManager' is not valid in '", &_8$$6, "'"); - ZEPHIR_CALL_METHOD(NULL, &_7$$6, "__construct", NULL, 32, &_9$$6); + ZEPHIR_CONCAT_SVS(&_8$$6, "The injected service 'modelsManager' is not valid in '", &_7$$6, "'"); + ZEPHIR_CALL_METHOD(NULL, &_6$$6, "__construct", NULL, 33, &_8$$6); zephir_check_call_status(); - zephir_throw_exception_debug(&_7$$6, "phalcon/Mvc/Model.zep", 2843); + zephir_throw_exception_debug(&_6$$6, "phalcon/Mvc/Model.zep", 2843); ZEPHIR_MM_RESTORE(); return; } zephir_update_property_zval(this_ptr, ZEND_STRL("modelsManager"), &manager); ZEPHIR_CALL_METHOD(NULL, &manager, "initialize", NULL, 0, this_ptr); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&properties); + zephir_memory_observe(&properties); if (zephir_array_isset_string_fetch(&properties, &attributes, SL("attributes"), 0)) { zephir_is_iterable(&properties, 0, "phalcon/Mvc/Model.zep", 2866); if (Z_TYPE_P(&properties) == IS_ARRAY) { - ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&properties), _12$$7, _13$$7, _10$$7) + ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&properties), _11$$7, _12$$7, _9$$7) { ZEPHIR_INIT_NVAR(&key); - if (_13$$7 != NULL) { - ZVAL_STR_COPY(&key, _13$$7); + if (_12$$7 != NULL) { + ZVAL_STR_COPY(&key, _12$$7); } else { - ZVAL_LONG(&key, _12$$7); + ZVAL_LONG(&key, _11$$7); } ZEPHIR_INIT_NVAR(&value); - ZVAL_COPY(&value, _10$$7); + ZVAL_COPY(&value, _9$$7); zephir_update_property_zval_zval(this_ptr, &key, &value); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &properties, "rewind", NULL, 0); zephir_check_call_status(); while (1) { - ZEPHIR_CALL_METHOD(&_11$$7, &properties, "valid", NULL, 0); + ZEPHIR_CALL_METHOD(&_10$$7, &properties, "valid", NULL, 0); zephir_check_call_status(); - if (!zend_is_true(&_11$$7)) { + if (!zend_is_true(&_10$$7)) { break; } ZEPHIR_CALL_METHOD(&key, &properties, "key", NULL, 0); @@ -4939,13 +4711,13 @@ PHP_METHOD(Phalcon_Mvc_Model, unserialize) ZEPHIR_INIT_NVAR(&properties); array_init(&properties); } - ZEPHIR_OBS_VAR(&dirtyState); + zephir_memory_observe(&dirtyState); if (zephir_array_isset_string_fetch(&dirtyState, &attributes, SL("dirtyState"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("dirtyState"), &dirtyState); } - ZEPHIR_CALL_METHOD(&_5$$3, &manager, "iskeepingsnapshots", NULL, 0, this_ptr); + ZEPHIR_CALL_METHOD(&_4$$3, &manager, "iskeepingsnapshots", NULL, 0, this_ptr); zephir_check_call_status(); - if (zephir_is_true(&_5$$3)) { + if (zephir_is_true(&_4$$3)) { if (zephir_array_isset_string_fetch(&snapshot, &attributes, SL("snapshot"), 1)) { zephir_update_property_zval(this_ptr, ZEND_STRL("snapshot"), &snapshot); } else { @@ -4969,15 +4741,11 @@ PHP_METHOD(Phalcon_Mvc_Model, setConnectionService) ZVAL_UNDEF(&connectionService); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(connectionService) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &connectionService_param); if (UNEXPECTED(Z_TYPE_P(connectionService_param) != IS_STRING && Z_TYPE_P(connectionService_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'connectionService' must be of the type string")); @@ -4988,8 +4756,6 @@ PHP_METHOD(Phalcon_Mvc_Model, setConnectionService) } else { ZEPHIR_INIT_VAR(&connectionService); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("modelsManager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(NULL, &_0, "setconnectionservice", NULL, 0, this_ptr, &connectionService); zephir_check_call_status(); @@ -5006,19 +4772,11 @@ PHP_METHOD(Phalcon_Mvc_Model, setDirtyState) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(dirtyState) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &dirtyState_param); - dirtyState = zephir_get_intval(dirtyState_param); - - - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, dirtyState); zephir_update_property_zval(this_ptr, ZEND_STRL("dirtyState"), &_0); RETURN_THISW(); @@ -5036,18 +4794,12 @@ PHP_METHOD(Phalcon_Mvc_Model, setEventsManager) ZVAL_UNDEF(&eventsManager_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(eventsManager, phalcon_events_managerinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &eventsManager); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("modelsManager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(NULL, &_0, "setcustomeventsmanager", NULL, 0, this_ptr, eventsManager); zephir_check_call_status(); @@ -5067,15 +4819,11 @@ PHP_METHOD(Phalcon_Mvc_Model, setReadConnectionService) ZVAL_UNDEF(&connectionService); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(connectionService) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &connectionService_param); if (UNEXPECTED(Z_TYPE_P(connectionService_param) != IS_STRING && Z_TYPE_P(connectionService_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'connectionService' must be of the type string")); @@ -5086,8 +4834,6 @@ PHP_METHOD(Phalcon_Mvc_Model, setReadConnectionService) } else { ZEPHIR_INIT_VAR(&connectionService); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("modelsManager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(NULL, &_0, "setreadconnectionservice", NULL, 0, this_ptr, &connectionService); zephir_check_call_status(); @@ -5133,25 +4879,20 @@ PHP_METHOD(Phalcon_Mvc_Model, setOldSnapshotData) ZVAL_UNDEF(&_14$$17); ZVAL_UNDEF(&_15$$17); ZVAL_UNDEF(&_16$$17); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(data) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(columnMap) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &data_param, &columnMap); ZEPHIR_OBS_COPY_OR_DUP(&data, data_param); if (!columnMap) { columnMap = &columnMap_sub; columnMap = &__$null; } - - if (Z_TYPE_P(columnMap) == IS_ARRAY) { ZEPHIR_INIT_VAR(&snapshot); array_init(&snapshot); @@ -5179,7 +4920,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setOldSnapshotData) zephir_get_class(&_5$$7, this_ptr, 0); ZEPHIR_INIT_NVAR(&_6$$7); ZEPHIR_CONCAT_SVSVS(&_6$$7, "Column '", &key, "' doesn't make part of the column map in '", &_5$$7, "'"); - ZEPHIR_CALL_METHOD(NULL, &_4$$7, "__construct", &_7, 32, &_6$$7); + ZEPHIR_CALL_METHOD(NULL, &_4$$7, "__construct", &_7, 33, &_6$$7); zephir_check_call_status(); zephir_throw_exception_debug(&_4$$7, "phalcon/Mvc/Model.zep", 2964); ZEPHIR_MM_RESTORE(); @@ -5197,7 +4938,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setOldSnapshotData) zephir_get_class(&_9$$10, this_ptr, 0); ZEPHIR_INIT_NVAR(&_10$$10); ZEPHIR_CONCAT_SVSVS(&_10$$10, "Column '", &key, "' doesn't make part of the column map in '", &_9$$10, "'"); - ZEPHIR_CALL_METHOD(NULL, &_8$$10, "__construct", &_7, 32, &_10$$10); + ZEPHIR_CALL_METHOD(NULL, &_8$$10, "__construct", &_7, 33, &_10$$10); zephir_check_call_status(); zephir_throw_exception_debug(&_8$$10, "phalcon/Mvc/Model.zep", 2975); ZEPHIR_MM_RESTORE(); @@ -5233,7 +4974,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setOldSnapshotData) zephir_get_class(&_12$$14, this_ptr, 0); ZEPHIR_INIT_NVAR(&_13$$14); ZEPHIR_CONCAT_SVSVS(&_13$$14, "Column '", &key, "' doesn't make part of the column map in '", &_12$$14, "'"); - ZEPHIR_CALL_METHOD(NULL, &_11$$14, "__construct", &_7, 32, &_13$$14); + ZEPHIR_CALL_METHOD(NULL, &_11$$14, "__construct", &_7, 33, &_13$$14); zephir_check_call_status(); zephir_throw_exception_debug(&_11$$14, "phalcon/Mvc/Model.zep", 2964); ZEPHIR_MM_RESTORE(); @@ -5251,7 +4992,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setOldSnapshotData) zephir_get_class(&_15$$17, this_ptr, 0); ZEPHIR_INIT_NVAR(&_16$$17); ZEPHIR_CONCAT_SVSVS(&_16$$17, "Column '", &key, "' doesn't make part of the column map in '", &_15$$17, "'"); - ZEPHIR_CALL_METHOD(NULL, &_14$$17, "__construct", &_7, 32, &_16$$17); + ZEPHIR_CALL_METHOD(NULL, &_14$$17, "__construct", &_7, 33, &_16$$17); zephir_check_call_status(); zephir_throw_exception_debug(&_14$$17, "phalcon/Mvc/Model.zep", 2975); ZEPHIR_MM_RESTORE(); @@ -5315,25 +5056,20 @@ PHP_METHOD(Phalcon_Mvc_Model, setSnapshotData) ZVAL_UNDEF(&_19$$19); ZVAL_UNDEF(&_20$$19); ZVAL_UNDEF(&_21$$19); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(data) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(columnMap) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &data_param, &columnMap); ZEPHIR_OBS_COPY_OR_DUP(&data, data_param); if (!columnMap) { columnMap = &columnMap_sub; columnMap = &__$null; } - - if (Z_TYPE_P(columnMap) == IS_ARRAY) { ZEPHIR_INIT_VAR(&snapshot); array_init(&snapshot); @@ -5357,7 +5093,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setSnapshotData) _4$$4 = ZEPHIR_GLOBAL(orm).case_insensitive_column_map; } if (_4$$4) { - ZEPHIR_CALL_SELF(&_5$$6, "caseinsensitivecolumnmap", &_6, 419, columnMap, &key); + ZEPHIR_CALL_SELF(&_5$$6, "caseinsensitivecolumnmap", &_6, 420, columnMap, &key); zephir_check_call_status(); ZEPHIR_CPY_WRT(&key, &_5$$6); } @@ -5370,7 +5106,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setSnapshotData) zephir_get_class(&_8$$8, this_ptr, 0); ZEPHIR_INIT_NVAR(&_9$$8); ZEPHIR_CONCAT_SVSVS(&_9$$8, "Column '", &key, "' doesn't make part of the column map in '", &_8$$8, "'"); - ZEPHIR_CALL_METHOD(NULL, &_7$$8, "__construct", &_10, 32, &_9$$8); + ZEPHIR_CALL_METHOD(NULL, &_7$$8, "__construct", &_10, 33, &_9$$8); zephir_check_call_status(); zephir_throw_exception_debug(&_7$$8, "phalcon/Mvc/Model.zep", 3029); ZEPHIR_MM_RESTORE(); @@ -5388,7 +5124,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setSnapshotData) zephir_get_class(&_12$$11, this_ptr, 0); ZEPHIR_INIT_NVAR(&_13$$11); ZEPHIR_CONCAT_SVSVS(&_13$$11, "Column '", &key, "' doesn't make part of the column map in '", &_12$$11, "'"); - ZEPHIR_CALL_METHOD(NULL, &_11$$11, "__construct", &_10, 32, &_13$$11); + ZEPHIR_CALL_METHOD(NULL, &_11$$11, "__construct", &_10, 33, &_13$$11); zephir_check_call_status(); zephir_throw_exception_debug(&_11$$11, "phalcon/Mvc/Model.zep", 3040); ZEPHIR_MM_RESTORE(); @@ -5420,7 +5156,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setSnapshotData) _14$$12 = ZEPHIR_GLOBAL(orm).case_insensitive_column_map; } if (_14$$12) { - ZEPHIR_CALL_SELF(&_15$$14, "caseinsensitivecolumnmap", &_6, 419, columnMap, &key); + ZEPHIR_CALL_SELF(&_15$$14, "caseinsensitivecolumnmap", &_6, 420, columnMap, &key); zephir_check_call_status(); ZEPHIR_CPY_WRT(&key, &_15$$14); } @@ -5433,7 +5169,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setSnapshotData) zephir_get_class(&_17$$16, this_ptr, 0); ZEPHIR_INIT_NVAR(&_18$$16); ZEPHIR_CONCAT_SVSVS(&_18$$16, "Column '", &key, "' doesn't make part of the column map in '", &_17$$16, "'"); - ZEPHIR_CALL_METHOD(NULL, &_16$$16, "__construct", &_10, 32, &_18$$16); + ZEPHIR_CALL_METHOD(NULL, &_16$$16, "__construct", &_10, 33, &_18$$16); zephir_check_call_status(); zephir_throw_exception_debug(&_16$$16, "phalcon/Mvc/Model.zep", 3029); ZEPHIR_MM_RESTORE(); @@ -5451,7 +5187,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setSnapshotData) zephir_get_class(&_20$$19, this_ptr, 0); ZEPHIR_INIT_NVAR(&_21$$19); ZEPHIR_CONCAT_SVSVS(&_21$$19, "Column '", &key, "' doesn't make part of the column map in '", &_20$$19, "'"); - ZEPHIR_CALL_METHOD(NULL, &_19$$19, "__construct", &_10, 32, &_21$$19); + ZEPHIR_CALL_METHOD(NULL, &_19$$19, "__construct", &_10, 33, &_21$$19); zephir_check_call_status(); zephir_throw_exception_debug(&_19$$19, "phalcon/Mvc/Model.zep", 3040); ZEPHIR_MM_RESTORE(); @@ -5519,26 +5255,16 @@ PHP_METHOD(Phalcon_Mvc_Model, setTransaction) zval *this_ptr = getThis(); ZVAL_UNDEF(&transaction_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(transaction, phalcon_mvc_model_transactioninterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &transaction); - - zephir_update_property_zval(this_ptr, ZEND_STRL("transaction"), transaction); RETURN_THISW(); } PHP_METHOD(Phalcon_Mvc_Model, getTransaction) -{ - zval *this_ptr = getThis(); - - +{ RETURN_MEMBER(getThis(), "transaction"); } @@ -5551,7 +5277,6 @@ PHP_METHOD(Phalcon_Mvc_Model, setup) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *options_param = NULL, disableEvents, columnRenaming, notNullValidations, exceptionOnFailedSave, exceptionOnFailedMetaDataSave, phqlLiterals, virtualForeignKeys, lateStateBinding, castOnHydrate, ignoreUnknownColumns, updateSnapshotOnSave, disableAssignSetters, caseInsensitiveColumnMap, prefetchRecords, lastInsertId; zval options; - zval *this_ptr = getThis(); ZVAL_UNDEF(&options); ZVAL_UNDEF(&disableEvents); @@ -5569,76 +5294,70 @@ PHP_METHOD(Phalcon_Mvc_Model, setup) ZVAL_UNDEF(&caseInsensitiveColumnMap); ZVAL_UNDEF(&prefetchRecords); ZVAL_UNDEF(&lastInsertId); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &options_param); ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); - - - ZEPHIR_OBS_VAR(&disableEvents); + zephir_memory_observe(&disableEvents); if (zephir_array_isset_string_fetch(&disableEvents, &options, SL("events"), 0)) { ZEPHIR_GLOBAL(orm).events = zend_is_true(&disableEvents); } - ZEPHIR_OBS_VAR(&virtualForeignKeys); + zephir_memory_observe(&virtualForeignKeys); if (zephir_array_isset_string_fetch(&virtualForeignKeys, &options, SL("virtualForeignKeys"), 0)) { ZEPHIR_GLOBAL(orm).virtual_foreign_keys = zend_is_true(&virtualForeignKeys); } - ZEPHIR_OBS_VAR(&columnRenaming); + zephir_memory_observe(&columnRenaming); if (zephir_array_isset_string_fetch(&columnRenaming, &options, SL("columnRenaming"), 0)) { ZEPHIR_GLOBAL(orm).column_renaming = zend_is_true(&columnRenaming); } - ZEPHIR_OBS_VAR(¬NullValidations); + zephir_memory_observe(¬NullValidations); if (zephir_array_isset_string_fetch(¬NullValidations, &options, SL("notNullValidations"), 0)) { ZEPHIR_GLOBAL(orm).not_null_validations = zend_is_true(¬NullValidations); } - ZEPHIR_OBS_VAR(&exceptionOnFailedSave); + zephir_memory_observe(&exceptionOnFailedSave); if (zephir_array_isset_string_fetch(&exceptionOnFailedSave, &options, SL("exceptionOnFailedSave"), 0)) { ZEPHIR_GLOBAL(orm).exception_on_failed_save = zend_is_true(&exceptionOnFailedSave); } - ZEPHIR_OBS_VAR(&exceptionOnFailedMetaDataSave); + zephir_memory_observe(&exceptionOnFailedMetaDataSave); if (zephir_array_isset_string_fetch(&exceptionOnFailedMetaDataSave, &options, SL("exceptionOnFailedMetaDataSave"), 0)) { ZEPHIR_GLOBAL(orm).exception_on_failed_metadata_save = zend_is_true(&exceptionOnFailedMetaDataSave); } - ZEPHIR_OBS_VAR(&phqlLiterals); + zephir_memory_observe(&phqlLiterals); if (zephir_array_isset_string_fetch(&phqlLiterals, &options, SL("phqlLiterals"), 0)) { ZEPHIR_GLOBAL(orm).enable_literals = zend_is_true(&phqlLiterals); } - ZEPHIR_OBS_VAR(&lateStateBinding); + zephir_memory_observe(&lateStateBinding); if (zephir_array_isset_string_fetch(&lateStateBinding, &options, SL("lateStateBinding"), 0)) { ZEPHIR_GLOBAL(orm).late_state_binding = zend_is_true(&lateStateBinding); } - ZEPHIR_OBS_VAR(&castOnHydrate); + zephir_memory_observe(&castOnHydrate); if (zephir_array_isset_string_fetch(&castOnHydrate, &options, SL("castOnHydrate"), 0)) { ZEPHIR_GLOBAL(orm).cast_on_hydrate = zend_is_true(&castOnHydrate); } - ZEPHIR_OBS_VAR(&ignoreUnknownColumns); + zephir_memory_observe(&ignoreUnknownColumns); if (zephir_array_isset_string_fetch(&ignoreUnknownColumns, &options, SL("ignoreUnknownColumns"), 0)) { ZEPHIR_GLOBAL(orm).ignore_unknown_columns = zend_is_true(&ignoreUnknownColumns); } - ZEPHIR_OBS_VAR(&caseInsensitiveColumnMap); + zephir_memory_observe(&caseInsensitiveColumnMap); if (zephir_array_isset_string_fetch(&caseInsensitiveColumnMap, &options, SL("caseInsensitiveColumnMap"), 0)) { ZEPHIR_GLOBAL(orm).case_insensitive_column_map = zend_is_true(&caseInsensitiveColumnMap); } - ZEPHIR_OBS_VAR(&updateSnapshotOnSave); + zephir_memory_observe(&updateSnapshotOnSave); if (zephir_array_isset_string_fetch(&updateSnapshotOnSave, &options, SL("updateSnapshotOnSave"), 0)) { ZEPHIR_GLOBAL(orm).update_snapshot_on_save = zend_is_true(&updateSnapshotOnSave); } - ZEPHIR_OBS_VAR(&disableAssignSetters); + zephir_memory_observe(&disableAssignSetters); if (zephir_array_isset_string_fetch(&disableAssignSetters, &options, SL("disableAssignSetters"), 0)) { ZEPHIR_GLOBAL(orm).disable_assign_setters = zend_is_true(&disableAssignSetters); } - ZEPHIR_OBS_VAR(&prefetchRecords); + zephir_memory_observe(&prefetchRecords); if (zephir_array_isset_string_fetch(&prefetchRecords, &options, SL("prefetchRecords"), 0)) { ZEPHIR_GLOBAL(orm).resultset_prefetch_records = ZSTR_VAL(zval_get_string(&prefetchRecords)); } - ZEPHIR_OBS_VAR(&lastInsertId); + zephir_memory_observe(&lastInsertId); if (zephir_array_isset_string_fetch(&lastInsertId, &options, SL("castLastInsertIdToInt"), 0)) { ZEPHIR_GLOBAL(orm).cast_last_insert_id_to_int = zend_is_true(&lastInsertId); } @@ -5658,15 +5377,11 @@ PHP_METHOD(Phalcon_Mvc_Model, setWriteConnectionService) ZVAL_UNDEF(&connectionService); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(connectionService) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &connectionService_param); if (UNEXPECTED(Z_TYPE_P(connectionService_param) != IS_STRING && Z_TYPE_P(connectionService_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'connectionService' must be of the type string")); @@ -5677,8 +5392,6 @@ PHP_METHOD(Phalcon_Mvc_Model, setWriteConnectionService) } else { ZEPHIR_INIT_VAR(&connectionService); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("modelsManager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(NULL, &_0, "setwriteconnectionservice", NULL, 0, this_ptr, &connectionService); zephir_check_call_status(); @@ -5696,18 +5409,10 @@ PHP_METHOD(Phalcon_Mvc_Model, skipOperation) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(skip) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &skip_param); - skip = zephir_get_boolval(skip_param); - - if (skip) { zephir_update_property_zval(this_ptr, ZEND_STRL("skipped"), &__$true); } else { @@ -5748,29 +5453,23 @@ PHP_METHOD(Phalcon_Mvc_Model, sum) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *parameters = NULL, parameters_sub, __$null, _0, _1; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, ¶meters); if (!parameters) { parameters = ¶meters_sub; parameters = &__$null; } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "SUM"); ZEPHIR_INIT_VAR(&_1); @@ -5793,20 +5492,21 @@ PHP_METHOD(Phalcon_Mvc_Model, sum) */ PHP_METHOD(Phalcon_Mvc_Model, toArray) { - zend_bool _3$$4, _10$$14; + zend_bool _3$$4, _12$$15; zval data; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zephir_fcall_cache_entry *_5 = NULL, *_9 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *columns = NULL, columns_sub, __$null, metaData, columnMap, attribute, attributeField, value, _0, *_1, _2, _4$$5, _6$$7, _7$$7, _8$$7, _11$$15, _12$$17, _13$$17, _14$$17; + zval *columns = NULL, columns_sub, __$null, attribute, attributeField, columnMap, metaData, method, value, _0, *_1, _2, _4$$5, _6$$7, _7$$7, _8$$7, _10$$3, _11$$11, _13$$16, _14$$18, _15$$18, _16$$18, _17$$14, _18$$22; zval *this_ptr = getThis(); ZVAL_UNDEF(&columns_sub); ZVAL_NULL(&__$null); - ZVAL_UNDEF(&metaData); - ZVAL_UNDEF(&columnMap); ZVAL_UNDEF(&attribute); ZVAL_UNDEF(&attributeField); + ZVAL_UNDEF(&columnMap); + ZVAL_UNDEF(&metaData); + ZVAL_UNDEF(&method); ZVAL_UNDEF(&value); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2); @@ -5814,28 +5514,27 @@ PHP_METHOD(Phalcon_Mvc_Model, toArray) ZVAL_UNDEF(&_6$$7); ZVAL_UNDEF(&_7$$7); ZVAL_UNDEF(&_8$$7); - ZVAL_UNDEF(&_11$$15); - ZVAL_UNDEF(&_12$$17); - ZVAL_UNDEF(&_13$$17); - ZVAL_UNDEF(&_14$$17); + ZVAL_UNDEF(&_10$$3); + ZVAL_UNDEF(&_11$$11); + ZVAL_UNDEF(&_13$$16); + ZVAL_UNDEF(&_14$$18); + ZVAL_UNDEF(&_15$$18); + ZVAL_UNDEF(&_16$$18); + ZVAL_UNDEF(&_17$$14); + ZVAL_UNDEF(&_18$$22); ZVAL_UNDEF(&data); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(columns) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &columns); if (!columns) { columns = &columns_sub; columns = &__$null; } - - ZEPHIR_INIT_VAR(&data); array_init(&data); ZEPHIR_CALL_METHOD(&metaData, this_ptr, "getmodelsmetadata", NULL, 0); @@ -5844,7 +5543,7 @@ PHP_METHOD(Phalcon_Mvc_Model, toArray) zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_0, &metaData, "getattributes", NULL, 0, this_ptr); zephir_check_call_status(); - zephir_is_iterable(&_0, 0, "phalcon/Mvc/Model.zep", 3326); + zephir_is_iterable(&_0, 0, "phalcon/Mvc/Model.zep", 3333); if (Z_TYPE_P(&_0) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_0), _1) { @@ -5856,7 +5555,7 @@ PHP_METHOD(Phalcon_Mvc_Model, toArray) _3$$4 = ZEPHIR_GLOBAL(orm).case_insensitive_column_map; } if (_3$$4) { - ZEPHIR_CALL_SELF(&_4$$5, "caseinsensitivecolumnmap", &_5, 419, &columnMap, &attribute); + ZEPHIR_CALL_SELF(&_4$$5, "caseinsensitivecolumnmap", &_5, 420, &columnMap, &attribute); zephir_check_call_status(); ZEPHIR_CPY_WRT(&attribute, &_4$$5); } @@ -5869,7 +5568,7 @@ PHP_METHOD(Phalcon_Mvc_Model, toArray) zephir_get_class(&_7$$7, this_ptr, 0); ZEPHIR_INIT_NVAR(&_8$$7); ZEPHIR_CONCAT_SVSVS(&_8$$7, "Column '", &attribute, "' doesn't make part of the column map in '", &_7$$7, "'"); - ZEPHIR_CALL_METHOD(NULL, &_6$$7, "__construct", &_9, 32, &_8$$7); + ZEPHIR_CALL_METHOD(NULL, &_6$$7, "__construct", &_9, 33, &_8$$7); zephir_check_call_status(); zephir_throw_exception_debug(&_6$$7, "phalcon/Mvc/Model.zep", 3304); ZEPHIR_MM_RESTORE(); @@ -5885,8 +5584,16 @@ PHP_METHOD(Phalcon_Mvc_Model, toArray) continue; } } + ZEPHIR_INIT_NVAR(&_10$$3); + zephir_camelize(&_10$$3, &attributeField, NULL ); + ZEPHIR_INIT_NVAR(&method); + ZEPHIR_CONCAT_SV(&method, "get", &_10$$3); ZEPHIR_OBS_NVAR(&value); - if (zephir_fetch_property_zval(&value, this_ptr, &attributeField, PH_SILENT_CC)) { + if ((zephir_method_exists(this_ptr, &method) == SUCCESS)) { + ZEPHIR_CALL_METHOD_ZVAL(&_11$$11, this_ptr, &method, NULL, 0); + zephir_check_call_status(); + zephir_array_update_zval(&data, &attributeField, &_11$$11, PH_COPY | PH_SEPARATE); + } else if (zephir_fetch_property_zval(&value, this_ptr, &attributeField, PH_SILENT_CC)) { zephir_array_update_zval(&data, &attributeField, &value, PH_COPY | PH_SEPARATE); } else { zephir_array_update_zval(&data, &attributeField, &__$null, PH_COPY | PH_SEPARATE); @@ -5904,27 +5611,27 @@ PHP_METHOD(Phalcon_Mvc_Model, toArray) ZEPHIR_CALL_METHOD(&attribute, &_0, "current", NULL, 0); zephir_check_call_status(); if (Z_TYPE_P(&columnMap) == IS_ARRAY) { - _10$$14 = !(zephir_array_isset(&columnMap, &attribute)); - if (_10$$14) { - _10$$14 = ZEPHIR_GLOBAL(orm).case_insensitive_column_map; + _12$$15 = !(zephir_array_isset(&columnMap, &attribute)); + if (_12$$15) { + _12$$15 = ZEPHIR_GLOBAL(orm).case_insensitive_column_map; } - if (_10$$14) { - ZEPHIR_CALL_SELF(&_11$$15, "caseinsensitivecolumnmap", &_5, 419, &columnMap, &attribute); + if (_12$$15) { + ZEPHIR_CALL_SELF(&_13$$16, "caseinsensitivecolumnmap", &_5, 420, &columnMap, &attribute); zephir_check_call_status(); - ZEPHIR_CPY_WRT(&attribute, &_11$$15); + ZEPHIR_CPY_WRT(&attribute, &_13$$16); } ZEPHIR_OBS_NVAR(&attributeField); if (!(zephir_array_isset_fetch(&attributeField, &columnMap, &attribute, 0))) { if (UNEXPECTED(!(ZEPHIR_GLOBAL(orm).ignore_unknown_columns))) { - ZEPHIR_INIT_NVAR(&_12$$17); - object_init_ex(&_12$$17, phalcon_mvc_model_exception_ce); - ZEPHIR_INIT_NVAR(&_13$$17); - zephir_get_class(&_13$$17, this_ptr, 0); - ZEPHIR_INIT_NVAR(&_14$$17); - ZEPHIR_CONCAT_SVSVS(&_14$$17, "Column '", &attribute, "' doesn't make part of the column map in '", &_13$$17, "'"); - ZEPHIR_CALL_METHOD(NULL, &_12$$17, "__construct", &_9, 32, &_14$$17); + ZEPHIR_INIT_NVAR(&_14$$18); + object_init_ex(&_14$$18, phalcon_mvc_model_exception_ce); + ZEPHIR_INIT_NVAR(&_15$$18); + zephir_get_class(&_15$$18, this_ptr, 0); + ZEPHIR_INIT_NVAR(&_16$$18); + ZEPHIR_CONCAT_SVSVS(&_16$$18, "Column '", &attribute, "' doesn't make part of the column map in '", &_15$$18, "'"); + ZEPHIR_CALL_METHOD(NULL, &_14$$18, "__construct", &_9, 33, &_16$$18); zephir_check_call_status(); - zephir_throw_exception_debug(&_12$$17, "phalcon/Mvc/Model.zep", 3304); + zephir_throw_exception_debug(&_14$$18, "phalcon/Mvc/Model.zep", 3304); ZEPHIR_MM_RESTORE(); return; } @@ -5938,8 +5645,16 @@ PHP_METHOD(Phalcon_Mvc_Model, toArray) continue; } } + ZEPHIR_INIT_NVAR(&_17$$14); + zephir_camelize(&_17$$14, &attributeField, NULL ); + ZEPHIR_INIT_NVAR(&method); + ZEPHIR_CONCAT_SV(&method, "get", &_17$$14); ZEPHIR_OBS_NVAR(&value); - if (zephir_fetch_property_zval(&value, this_ptr, &attributeField, PH_SILENT_CC)) { + if ((zephir_method_exists(this_ptr, &method) == SUCCESS)) { + ZEPHIR_CALL_METHOD_ZVAL(&_18$$22, this_ptr, &method, NULL, 0); + zephir_check_call_status(); + zephir_array_update_zval(&data, &attributeField, &_18$$22, PH_COPY | PH_SEPARATE); + } else if (zephir_fetch_property_zval(&value, this_ptr, &attributeField, PH_SILENT_CC)) { zephir_array_update_zval(&data, &attributeField, &value, PH_COPY | PH_SEPARATE); } else { zephir_array_update_zval(&data, &attributeField, &__$null, PH_COPY | PH_SEPARATE); @@ -5985,15 +5700,14 @@ PHP_METHOD(Phalcon_Mvc_Model, update) ZVAL_UNDEF(&_9$$4); ZVAL_UNDEF(&_3$$4); ZVAL_UNDEF(&_5$$4); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("dirtyState"), PH_NOISY_CC | PH_READONLY); if (zephir_is_true(&_0)) { ZEPHIR_CALL_METHOD(&metaData, this_ptr, "getmodelsmetadata", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_2$$3, this_ptr, "getreadconnection", NULL, 430); + ZEPHIR_CALL_METHOD(&_2$$3, this_ptr, "getreadconnection", NULL, 431); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_1$$3, this_ptr, "has", NULL, 0, &metaData, &_2$$3); zephir_check_call_status(); @@ -6041,16 +5755,12 @@ PHP_METHOD(Phalcon_Mvc_Model, writeAttribute) ZVAL_UNDEF(&attribute); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(attribute) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &attribute_param, &value); if (UNEXPECTED(Z_TYPE_P(attribute_param) != IS_STRING && Z_TYPE_P(attribute_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'attribute' must be of the type string")); @@ -6061,8 +5771,6 @@ PHP_METHOD(Phalcon_Mvc_Model, writeAttribute) } else { ZEPHIR_INIT_VAR(&attribute); } - - zephir_update_property_zval_zval(this_ptr, &attribute, value); ZEPHIR_MM_RESTORE(); } @@ -6136,16 +5844,15 @@ PHP_METHOD(Phalcon_Mvc_Model, checkForeignKeysRestrict) ZVAL_UNDEF(&_21$$18); ZVAL_UNDEF(&_41$$22); ZVAL_UNDEF(&_45$$37); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("modelsManager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&manager, &_0); ZEPHIR_CALL_METHOD(&belongsTo, &manager, "getbelongsto", NULL, 0, this_ptr); zephir_check_call_status(); error = 0; - zephir_is_iterable(&belongsTo, 0, "phalcon/Mvc/Model.zep", 3546); + zephir_is_iterable(&belongsTo, 0, "phalcon/Mvc/Model.zep", 3553); if (Z_TYPE_P(&belongsTo) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&belongsTo), _1) { @@ -6160,7 +5867,7 @@ PHP_METHOD(Phalcon_Mvc_Model, checkForeignKeysRestrict) action = 1; if (zephir_array_isset_string(&foreignKey, SL("action"))) { ZEPHIR_OBS_NVAR(&_3$$5); - zephir_array_fetch_string(&_3$$5, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3432); + zephir_array_fetch_string(&_3$$5, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3439); action = zephir_get_intval(&_3$$5); } if (action != 1) { @@ -6180,7 +5887,7 @@ PHP_METHOD(Phalcon_Mvc_Model, checkForeignKeysRestrict) ZEPHIR_CALL_METHOD(&referencedFields, &relation, "getreferencedfields", NULL, 0); zephir_check_call_status(); if (Z_TYPE_P(&fields) == IS_ARRAY) { - zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model.zep", 3475); + zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model.zep", 3482); if (Z_TYPE_P(&fields) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&fields), _8$$7, _9$$7, _6$$7) { @@ -6194,11 +5901,11 @@ PHP_METHOD(Phalcon_Mvc_Model, checkForeignKeysRestrict) ZVAL_COPY(&field, _6$$7); ZEPHIR_OBS_NVAR(&value); zephir_fetch_property_zval(&value, this_ptr, &field, PH_SILENT_CC); - zephir_array_fetch(&_10$$8, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3467); + zephir_array_fetch(&_10$$8, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3474); ZEPHIR_INIT_NVAR(&_11$$8); ZEPHIR_CONCAT_SVSV(&_11$$8, "[", &_10$$8, "] = ?", &position); - zephir_array_append(&conditions, &_11$$8, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3467); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3468); + zephir_array_append(&conditions, &_11$$8, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3474); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3475); if (Z_TYPE_P(&value) == IS_NULL) { numberNull++; } @@ -6218,11 +5925,11 @@ PHP_METHOD(Phalcon_Mvc_Model, checkForeignKeysRestrict) zephir_check_call_status(); ZEPHIR_OBS_NVAR(&value); zephir_fetch_property_zval(&value, this_ptr, &field, PH_SILENT_CC); - zephir_array_fetch(&_12$$10, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3467); + zephir_array_fetch(&_12$$10, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3474); ZEPHIR_INIT_NVAR(&_13$$10); ZEPHIR_CONCAT_SVSV(&_13$$10, "[", &_12$$10, "] = ?", &position); - zephir_array_append(&conditions, &_13$$10, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3467); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3468); + zephir_array_append(&conditions, &_13$$10, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3474); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3475); if (Z_TYPE_P(&value) == IS_NULL) { numberNull++; } @@ -6238,15 +5945,15 @@ PHP_METHOD(Phalcon_Mvc_Model, checkForeignKeysRestrict) zephir_fetch_property_zval(&value, this_ptr, &fields, PH_SILENT_CC); ZEPHIR_INIT_NVAR(&_14$$12); ZEPHIR_CONCAT_SVS(&_14$$12, "[", &referencedFields, "] = ?0"); - zephir_array_append(&conditions, &_14$$12, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3479); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3480); + zephir_array_append(&conditions, &_14$$12, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3486); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3487); if (Z_TYPE_P(&value) == IS_NULL) { validateWithNulls = 1; } } ZEPHIR_OBS_NVAR(&extraConditions); if (zephir_array_isset_string_fetch(&extraConditions, &foreignKey, SL("conditions"), 0)) { - zephir_array_append(&conditions, &extraConditions, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3491); + zephir_array_append(&conditions, &extraConditions, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3498); } if (validateWithNulls) { ZEPHIR_OBS_NVAR(&allowNulls); @@ -6321,7 +6028,7 @@ PHP_METHOD(Phalcon_Mvc_Model, checkForeignKeysRestrict) action = 1; if (zephir_array_isset_string(&foreignKey, SL("action"))) { ZEPHIR_OBS_NVAR(&_27$$24); - zephir_array_fetch_string(&_27$$24, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3432); + zephir_array_fetch_string(&_27$$24, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3439); action = zephir_get_intval(&_27$$24); } if (action != 1) { @@ -6341,7 +6048,7 @@ PHP_METHOD(Phalcon_Mvc_Model, checkForeignKeysRestrict) ZEPHIR_CALL_METHOD(&referencedFields, &relation, "getreferencedfields", NULL, 0); zephir_check_call_status(); if (Z_TYPE_P(&fields) == IS_ARRAY) { - zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model.zep", 3475); + zephir_is_iterable(&fields, 0, "phalcon/Mvc/Model.zep", 3482); if (Z_TYPE_P(&fields) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&fields), _32$$26, _33$$26, _30$$26) { @@ -6355,11 +6062,11 @@ PHP_METHOD(Phalcon_Mvc_Model, checkForeignKeysRestrict) ZVAL_COPY(&field, _30$$26); ZEPHIR_OBS_NVAR(&value); zephir_fetch_property_zval(&value, this_ptr, &field, PH_SILENT_CC); - zephir_array_fetch(&_34$$27, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3467); + zephir_array_fetch(&_34$$27, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3474); ZEPHIR_INIT_NVAR(&_35$$27); ZEPHIR_CONCAT_SVSV(&_35$$27, "[", &_34$$27, "] = ?", &position); - zephir_array_append(&conditions, &_35$$27, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3467); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3468); + zephir_array_append(&conditions, &_35$$27, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3474); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3475); if (Z_TYPE_P(&value) == IS_NULL) { numberNull++; } @@ -6379,11 +6086,11 @@ PHP_METHOD(Phalcon_Mvc_Model, checkForeignKeysRestrict) zephir_check_call_status(); ZEPHIR_OBS_NVAR(&value); zephir_fetch_property_zval(&value, this_ptr, &field, PH_SILENT_CC); - zephir_array_fetch(&_36$$29, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3467); + zephir_array_fetch(&_36$$29, &referencedFields, &position, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3474); ZEPHIR_INIT_NVAR(&_37$$29); ZEPHIR_CONCAT_SVSV(&_37$$29, "[", &_36$$29, "] = ?", &position); - zephir_array_append(&conditions, &_37$$29, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3467); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3468); + zephir_array_append(&conditions, &_37$$29, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3474); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3475); if (Z_TYPE_P(&value) == IS_NULL) { numberNull++; } @@ -6399,15 +6106,15 @@ PHP_METHOD(Phalcon_Mvc_Model, checkForeignKeysRestrict) zephir_fetch_property_zval(&value, this_ptr, &fields, PH_SILENT_CC); ZEPHIR_INIT_NVAR(&_38$$31); ZEPHIR_CONCAT_SVS(&_38$$31, "[", &referencedFields, "] = ?0"); - zephir_array_append(&conditions, &_38$$31, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3479); - zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3480); + zephir_array_append(&conditions, &_38$$31, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3486); + zephir_array_append(&bindParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3487); if (Z_TYPE_P(&value) == IS_NULL) { validateWithNulls = 1; } } ZEPHIR_OBS_NVAR(&extraConditions); if (zephir_array_isset_string_fetch(&extraConditions, &foreignKey, SL("conditions"), 0)) { - zephir_array_append(&conditions, &extraConditions, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3491); + zephir_array_append(&conditions, &extraConditions, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3498); } if (validateWithNulls) { ZEPHIR_OBS_NVAR(&allowNulls); @@ -6504,15 +6211,14 @@ PHP_METHOD(Phalcon_Mvc_Model, checkForeignKeysReverseCascade) ZVAL_UNDEF(&_6$$7); ZVAL_UNDEF(&_8$$11); ZVAL_UNDEF(&_10$$13); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("modelsManager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&manager, &_0); ZEPHIR_CALL_METHOD(&relations, &manager, "gethasoneandhasmany", NULL, 0, this_ptr); zephir_check_call_status(); - zephir_is_iterable(&relations, 0, "phalcon/Mvc/Model.zep", 3622); + zephir_is_iterable(&relations, 0, "phalcon/Mvc/Model.zep", 3629); if (Z_TYPE_P(&relations) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&relations), _1) { @@ -6530,7 +6236,7 @@ PHP_METHOD(Phalcon_Mvc_Model, checkForeignKeysReverseCascade) } if (_3$$3) { ZEPHIR_OBS_NVAR(&_4$$5); - zephir_array_fetch_string(&_4$$5, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3596); + zephir_array_fetch_string(&_4$$5, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3603); action = zephir_get_intval(&_4$$5); } if (action != 2) { @@ -6569,7 +6275,7 @@ PHP_METHOD(Phalcon_Mvc_Model, checkForeignKeysReverseCascade) } if (_7$$9) { ZEPHIR_OBS_NVAR(&_8$$11); - zephir_array_fetch_string(&_8$$11, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3596); + zephir_array_fetch_string(&_8$$11, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3603); action = zephir_get_intval(&_8$$11); } if (action != 2) { @@ -6632,16 +6338,15 @@ PHP_METHOD(Phalcon_Mvc_Model, checkForeignKeysReverseRestrict) ZVAL_UNDEF(&_25$$16); ZVAL_UNDEF(&_10$$7); ZVAL_UNDEF(&_22$$13); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("modelsManager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&manager, &_0); ZEPHIR_CALL_METHOD(&relations, &manager, "gethasoneandhasmany", NULL, 0, this_ptr); zephir_check_call_status(); error = 0; - zephir_is_iterable(&relations, 0, "phalcon/Mvc/Model.zep", 3713); + zephir_is_iterable(&relations, 0, "phalcon/Mvc/Model.zep", 3720); if (Z_TYPE_P(&relations) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&relations), _1) { @@ -6659,7 +6364,7 @@ PHP_METHOD(Phalcon_Mvc_Model, checkForeignKeysReverseRestrict) } if (_3$$3) { ZEPHIR_OBS_NVAR(&_4$$5); - zephir_array_fetch_string(&_4$$5, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3667); + zephir_array_fetch_string(&_4$$5, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3674); action = zephir_get_intval(&_4$$5); } if (action != 1) { @@ -6722,7 +6427,7 @@ PHP_METHOD(Phalcon_Mvc_Model, checkForeignKeysReverseRestrict) } if (_15$$9) { ZEPHIR_OBS_NVAR(&_16$$11); - zephir_array_fetch_string(&_16$$11, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3667); + zephir_array_fetch_string(&_16$$11, &foreignKey, SL("action"), PH_NOISY, "phalcon/Mvc/Model.zep", 3674); action = zephir_get_intval(&_16$$11); } if (action != 1) { @@ -6867,22 +6572,16 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowInsert) ZVAL_UNDEF(&_54$$55); ZVAL_UNDEF(&_56$$56); ZVAL_UNDEF(&_59$$56); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(4, 4) Z_PARAM_OBJECT_OF_CLASS(metaData, phalcon_mvc_model_metadatainterface_ce) Z_PARAM_OBJECT_OF_CLASS(connection, phalcon_db_adapter_adapterinterface_ce) Z_PARAM_ZVAL(table) Z_PARAM_ZVAL(identityField) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 4, 0, &metaData, &connection, &table, &identityField); ZEPHIR_SEPARATE_PARAM(table); - - ZEPHIR_INIT_VAR(&bindSkip); ZVAL_LONG(&bindSkip, 1024); zephir_read_property(&_0, this_ptr, ZEND_STRL("modelsManager"), PH_NOISY_CC | PH_READONLY); @@ -6912,7 +6611,7 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowInsert) ZEPHIR_INIT_NVAR(&columnMap); ZVAL_NULL(&columnMap); } - zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 3835); + zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 3842); if (Z_TYPE_P(&attributes) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&attributes), _1) { @@ -6927,9 +6626,9 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowInsert) zephir_get_class(&_4$$7, this_ptr, 0); ZEPHIR_INIT_NVAR(&_5$$7); ZEPHIR_CONCAT_SVSVS(&_5$$7, "Column '", &field, "' in '", &_4$$7, "' isn't part of the column map"); - ZEPHIR_CALL_METHOD(NULL, &_3$$7, "__construct", &_6, 32, &_5$$7); + ZEPHIR_CALL_METHOD(NULL, &_3$$7, "__construct", &_6, 33, &_5$$7); zephir_check_call_status(); - zephir_throw_exception_debug(&_3$$7, "phalcon/Mvc/Model.zep", 3769); + zephir_throw_exception_debug(&_3$$7, "phalcon/Mvc/Model.zep", 3776); ZEPHIR_MM_RESTORE(); return; } @@ -6945,9 +6644,9 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowInsert) _7$$11 = zephir_array_isset(&defaultValues, &field); } if (_7$$11) { - zephir_array_fetch(&_8$$12, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3786); + zephir_array_fetch(&_8$$12, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3793); zephir_array_update_zval(&snapshot, &attributeField, &_8$$12, PH_COPY | PH_SEPARATE); - zephir_array_fetch(&_9$$12, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3787); + zephir_array_fetch(&_9$$12, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3794); zephir_array_update_zval(&unsetDefaultValues, &attributeField, &_9$$12, PH_COPY | PH_SEPARATE); ZEPHIR_CALL_METHOD(&_10$$12, connection, "supportsdefaultvalue", &_11, 0); zephir_check_call_status(); @@ -6967,20 +6666,20 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowInsert) zephir_get_class(&_14$$15, this_ptr, 0); ZEPHIR_INIT_NVAR(&_15$$15); ZEPHIR_CONCAT_SVSVS(&_15$$15, "Column '", &field, "' in '", &_14$$15, "' have not defined a bind data type"); - ZEPHIR_CALL_METHOD(NULL, &_13$$15, "__construct", &_6, 32, &_15$$15); + ZEPHIR_CALL_METHOD(NULL, &_13$$15, "__construct", &_6, 33, &_15$$15); zephir_check_call_status(); - zephir_throw_exception_debug(&_13$$15, "phalcon/Mvc/Model.zep", 3804); + zephir_throw_exception_debug(&_13$$15, "phalcon/Mvc/Model.zep", 3811); ZEPHIR_MM_RESTORE(); return; } - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3807); - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3808); - zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3809); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3814); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3815); + zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3816); } else { if (zephir_array_isset(&defaultValues, &field)) { - zephir_array_fetch(&_16$$17, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3812); + zephir_array_fetch(&_16$$17, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3819); zephir_array_update_zval(&snapshot, &attributeField, &_16$$17, PH_COPY | PH_SEPARATE); - zephir_array_fetch(&_17$$17, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3813); + zephir_array_fetch(&_17$$17, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3820); zephir_array_update_zval(&unsetDefaultValues, &attributeField, &_17$$17, PH_COPY | PH_SEPARATE); ZEPHIR_CALL_METHOD(&_18$$17, connection, "supportsdefaultvalue", &_19, 0); zephir_check_call_status(); @@ -6989,13 +6688,13 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowInsert) } ZEPHIR_CALL_METHOD(&_20$$17, connection, "getdefaultvalue", &_21, 0); zephir_check_call_status(); - zephir_array_append(&values, &_20$$17, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3819); + zephir_array_append(&values, &_20$$17, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3826); } else { - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3821); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3828); zephir_array_update_zval(&snapshot, &attributeField, &value, PH_COPY | PH_SEPARATE); } - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3825); - zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3826); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3832); + zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3833); } } } @@ -7020,9 +6719,9 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowInsert) zephir_get_class(&_23$$22, this_ptr, 0); ZEPHIR_INIT_NVAR(&_24$$22); ZEPHIR_CONCAT_SVSVS(&_24$$22, "Column '", &field, "' in '", &_23$$22, "' isn't part of the column map"); - ZEPHIR_CALL_METHOD(NULL, &_22$$22, "__construct", &_6, 32, &_24$$22); + ZEPHIR_CALL_METHOD(NULL, &_22$$22, "__construct", &_6, 33, &_24$$22); zephir_check_call_status(); - zephir_throw_exception_debug(&_22$$22, "phalcon/Mvc/Model.zep", 3769); + zephir_throw_exception_debug(&_22$$22, "phalcon/Mvc/Model.zep", 3776); ZEPHIR_MM_RESTORE(); return; } @@ -7038,9 +6737,9 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowInsert) _25$$26 = zephir_array_isset(&defaultValues, &field); } if (_25$$26) { - zephir_array_fetch(&_26$$27, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3786); + zephir_array_fetch(&_26$$27, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3793); zephir_array_update_zval(&snapshot, &attributeField, &_26$$27, PH_COPY | PH_SEPARATE); - zephir_array_fetch(&_27$$27, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3787); + zephir_array_fetch(&_27$$27, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3794); zephir_array_update_zval(&unsetDefaultValues, &attributeField, &_27$$27, PH_COPY | PH_SEPARATE); ZEPHIR_CALL_METHOD(&_28$$27, connection, "supportsdefaultvalue", &_29, 0); zephir_check_call_status(); @@ -7060,20 +6759,20 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowInsert) zephir_get_class(&_32$$30, this_ptr, 0); ZEPHIR_INIT_NVAR(&_33$$30); ZEPHIR_CONCAT_SVSVS(&_33$$30, "Column '", &field, "' in '", &_32$$30, "' have not defined a bind data type"); - ZEPHIR_CALL_METHOD(NULL, &_31$$30, "__construct", &_6, 32, &_33$$30); + ZEPHIR_CALL_METHOD(NULL, &_31$$30, "__construct", &_6, 33, &_33$$30); zephir_check_call_status(); - zephir_throw_exception_debug(&_31$$30, "phalcon/Mvc/Model.zep", 3804); + zephir_throw_exception_debug(&_31$$30, "phalcon/Mvc/Model.zep", 3811); ZEPHIR_MM_RESTORE(); return; } - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3807); - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3808); - zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3809); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3814); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3815); + zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3816); } else { if (zephir_array_isset(&defaultValues, &field)) { - zephir_array_fetch(&_34$$32, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3812); + zephir_array_fetch(&_34$$32, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3819); zephir_array_update_zval(&snapshot, &attributeField, &_34$$32, PH_COPY | PH_SEPARATE); - zephir_array_fetch(&_35$$32, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3813); + zephir_array_fetch(&_35$$32, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3820); zephir_array_update_zval(&unsetDefaultValues, &attributeField, &_35$$32, PH_COPY | PH_SEPARATE); ZEPHIR_CALL_METHOD(&_36$$32, connection, "supportsdefaultvalue", &_37, 0); zephir_check_call_status(); @@ -7082,13 +6781,13 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowInsert) } ZEPHIR_CALL_METHOD(&_38$$32, connection, "getdefaultvalue", &_39, 0); zephir_check_call_status(); - zephir_array_append(&values, &_38$$32, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3819); + zephir_array_append(&values, &_38$$32, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3826); } else { - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3821); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3828); zephir_array_update_zval(&snapshot, &attributeField, &value, PH_COPY | PH_SEPARATE); } - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3825); - zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3826); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3832); + zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3833); } } } @@ -7104,7 +6803,7 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowInsert) zephir_check_call_status(); useExplicitIdentity = zephir_get_boolval(&_40$$35); if (useExplicitIdentity) { - zephir_array_append(&fields, identityField, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3845); + zephir_array_append(&fields, identityField, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3852); } if (Z_TYPE_P(&columnMap) == IS_ARRAY) { ZEPHIR_OBS_NVAR(&attributeField); @@ -7115,9 +6814,9 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowInsert) zephir_get_class(&_42$$38, this_ptr, 0); ZEPHIR_INIT_VAR(&_43$$38); ZEPHIR_CONCAT_SVSVS(&_43$$38, "Identity column '", identityField, "' isn't part of the column map in '", &_42$$38, "'"); - ZEPHIR_CALL_METHOD(NULL, &_41$$38, "__construct", &_6, 32, &_43$$38); + ZEPHIR_CALL_METHOD(NULL, &_41$$38, "__construct", &_6, 33, &_43$$38); zephir_check_call_status(); - zephir_throw_exception_debug(&_41$$38, "phalcon/Mvc/Model.zep", 3855); + zephir_throw_exception_debug(&_41$$38, "phalcon/Mvc/Model.zep", 3862); ZEPHIR_MM_RESTORE(); return; } @@ -7132,12 +6831,12 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowInsert) } if (_44$$40) { if (useExplicitIdentity) { - zephir_array_append(&values, &defaultValue, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3867); - zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3867); + zephir_array_append(&values, &defaultValue, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3874); + zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3874); } } else { if (!(useExplicitIdentity)) { - zephir_array_append(&fields, identityField, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3875); + zephir_array_append(&fields, identityField, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3882); } ZEPHIR_OBS_NVAR(&bindType); if (UNEXPECTED(!(zephir_array_isset_fetch(&bindType, &bindDataTypes, identityField, 0)))) { @@ -7147,25 +6846,25 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowInsert) zephir_get_class(&_46$$45, this_ptr, 0); ZEPHIR_INIT_VAR(&_47$$45); ZEPHIR_CONCAT_SVSVS(&_47$$45, "Identity column '", identityField, "' isn\'t part of the table columns in '", &_46$$45, "'"); - ZEPHIR_CALL_METHOD(NULL, &_45$$45, "__construct", &_6, 32, &_47$$45); + ZEPHIR_CALL_METHOD(NULL, &_45$$45, "__construct", &_6, 33, &_47$$45); zephir_check_call_status(); - zephir_throw_exception_debug(&_45$$45, "phalcon/Mvc/Model.zep", 3884); + zephir_throw_exception_debug(&_45$$45, "phalcon/Mvc/Model.zep", 3891); ZEPHIR_MM_RESTORE(); return; } - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3887); - zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3888); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3894); + zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3895); } } else { if (useExplicitIdentity) { - zephir_array_append(&values, &defaultValue, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3892); - zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3893); + zephir_array_append(&values, &defaultValue, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3899); + zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 3900); } } } if (Z_TYPE_P(table) == IS_ARRAY) { - zephir_array_fetch_long(&_48$$48, table, 0, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3902); - zephir_array_fetch_long(&_49$$48, table, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3902); + zephir_array_fetch_long(&_48$$48, table, 0, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3909); + zephir_array_fetch_long(&_49$$48, table, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 3909); ZEPHIR_INIT_VAR(&_50$$48); ZEPHIR_CONCAT_VSV(&_50$$48, &_48$$48, ".", &_49$$48); ZEPHIR_CPY_WRT(table, &_50$$48); @@ -7186,9 +6885,9 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowInsert) ZEPHIR_CALL_METHOD(&sequenceName, this_ptr, "getsequencename", NULL, 0); zephir_check_call_status(); } else { - ZEPHIR_CALL_METHOD(&source, this_ptr, "getsource", NULL, 423); + ZEPHIR_CALL_METHOD(&source, this_ptr, "getsource", NULL, 424); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&schema, this_ptr, "getschema", NULL, 422); + ZEPHIR_CALL_METHOD(&schema, this_ptr, "getschema", NULL, 423); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&sequenceName); if (ZEPHIR_IS_EMPTY(&schema)) { @@ -7202,7 +6901,7 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowInsert) zephir_check_call_status(); if (UNEXPECTED(ZEPHIR_GLOBAL(orm).cast_last_insert_id_to_int)) { ZVAL_LONG(&_53$$55, 10); - ZEPHIR_CALL_FUNCTION(&_54$$55, "intval", NULL, 41, &lastInsertedId, &_53$$55); + ZEPHIR_CALL_FUNCTION(&_54$$55, "intval", NULL, 42, &lastInsertedId, &_53$$55); zephir_check_call_status(); ZEPHIR_CPY_WRT(&lastInsertedId, &_54$$55); } @@ -7211,7 +6910,7 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowInsert) zephir_update_property_zval(this_ptr, ZEND_STRL("uniqueParams"), &__$null); } if (zephir_is_true(&success)) { - zephir_is_iterable(&unsetDefaultValues, 0, "phalcon/Mvc/Model.zep", 3963); + zephir_is_iterable(&unsetDefaultValues, 0, "phalcon/Mvc/Model.zep", 3970); if (Z_TYPE_P(&unsetDefaultValues) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&unsetDefaultValues), _57$$56, _58$$56, _55$$56) { @@ -7362,21 +7061,15 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) ZVAL_UNDEF(&_22$$25); ZVAL_UNDEF(&_37$$48); ZVAL_UNDEF(&_38$$48); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_OBJECT_OF_CLASS(metaData, phalcon_mvc_model_metadatainterface_ce) Z_PARAM_OBJECT_OF_CLASS(connection, phalcon_db_adapter_adapterinterface_ce) Z_PARAM_ZVAL(table) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &metaData, &connection, &table); ZEPHIR_SEPARATE_PARAM(table); - - ZEPHIR_INIT_VAR(&bindSkip); ZVAL_LONG(&bindSkip, 1024); ZEPHIR_INIT_VAR(&fields); @@ -7414,7 +7107,7 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) _2 = Z_TYPE_P(&snapshot) == IS_ARRAY; } if (EXPECTED(_2)) { - zephir_is_iterable(&nonPrimary, 0, "phalcon/Mvc/Model.zep", 4123); + zephir_is_iterable(&nonPrimary, 0, "phalcon/Mvc/Model.zep", 4130); if (Z_TYPE_P(&nonPrimary) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&nonPrimary), _3$$5) { @@ -7431,9 +7124,9 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) zephir_get_class(&_6$$9, this_ptr, 0); ZEPHIR_INIT_NVAR(&_7$$9); ZEPHIR_CONCAT_SVSVS(&_7$$9, "Column '", &field, "' in '", &_6$$9, "' isn't part of the column map"); - ZEPHIR_CALL_METHOD(NULL, &_5$$9, "__construct", &_8, 32, &_7$$9); + ZEPHIR_CALL_METHOD(NULL, &_5$$9, "__construct", &_8, 33, &_7$$9); zephir_check_call_status(); - zephir_throw_exception_debug(&_5$$9, "phalcon/Mvc/Model.zep", 4017); + zephir_throw_exception_debug(&_5$$9, "phalcon/Mvc/Model.zep", 4024); ZEPHIR_MM_RESTORE(); return; } @@ -7450,9 +7143,9 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) zephir_get_class(&_10$$12, this_ptr, 0); ZEPHIR_INIT_NVAR(&_11$$12); ZEPHIR_CONCAT_SVSVS(&_11$$12, "Column '", &field, "' in '", &_10$$12, "' have not defined a bind data type"); - ZEPHIR_CALL_METHOD(NULL, &_9$$12, "__construct", &_8, 32, &_11$$12); + ZEPHIR_CALL_METHOD(NULL, &_9$$12, "__construct", &_8, 33, &_11$$12); zephir_check_call_status(); - zephir_throw_exception_debug(&_9$$12, "phalcon/Mvc/Model.zep", 4030); + zephir_throw_exception_debug(&_9$$12, "phalcon/Mvc/Model.zep", 4037); ZEPHIR_MM_RESTORE(); return; } @@ -7476,9 +7169,9 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) zephir_get_class(&_13$$20, this_ptr, 0); ZEPHIR_INIT_NVAR(&_14$$20); ZEPHIR_CONCAT_SVSVS(&_14$$20, "Column '", &field, "' in '", &_13$$20, "' have not defined a data type"); - ZEPHIR_CALL_METHOD(NULL, &_12$$20, "__construct", &_8, 32, &_14$$20); + ZEPHIR_CALL_METHOD(NULL, &_12$$20, "__construct", &_8, 33, &_14$$20); zephir_check_call_status(); - zephir_throw_exception_debug(&_12$$20, "phalcon/Mvc/Model.zep", 4060); + zephir_throw_exception_debug(&_12$$20, "phalcon/Mvc/Model.zep", 4067); ZEPHIR_MM_RESTORE(); return; } @@ -7526,9 +7219,9 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) } } if (changed) { - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4110); - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4111); - zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4112); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4117); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4118); + zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4119); } zephir_array_update_zval(&newSnapshot, &attributeField, &value, PH_COPY | PH_SEPARATE); } else { @@ -7558,9 +7251,9 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) zephir_get_class(&_24$$32, this_ptr, 0); ZEPHIR_INIT_NVAR(&_25$$32); ZEPHIR_CONCAT_SVSVS(&_25$$32, "Column '", &field, "' in '", &_24$$32, "' isn't part of the column map"); - ZEPHIR_CALL_METHOD(NULL, &_23$$32, "__construct", &_8, 32, &_25$$32); + ZEPHIR_CALL_METHOD(NULL, &_23$$32, "__construct", &_8, 33, &_25$$32); zephir_check_call_status(); - zephir_throw_exception_debug(&_23$$32, "phalcon/Mvc/Model.zep", 4017); + zephir_throw_exception_debug(&_23$$32, "phalcon/Mvc/Model.zep", 4024); ZEPHIR_MM_RESTORE(); return; } @@ -7577,9 +7270,9 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) zephir_get_class(&_27$$35, this_ptr, 0); ZEPHIR_INIT_NVAR(&_28$$35); ZEPHIR_CONCAT_SVSVS(&_28$$35, "Column '", &field, "' in '", &_27$$35, "' have not defined a bind data type"); - ZEPHIR_CALL_METHOD(NULL, &_26$$35, "__construct", &_8, 32, &_28$$35); + ZEPHIR_CALL_METHOD(NULL, &_26$$35, "__construct", &_8, 33, &_28$$35); zephir_check_call_status(); - zephir_throw_exception_debug(&_26$$35, "phalcon/Mvc/Model.zep", 4030); + zephir_throw_exception_debug(&_26$$35, "phalcon/Mvc/Model.zep", 4037); ZEPHIR_MM_RESTORE(); return; } @@ -7603,9 +7296,9 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) zephir_get_class(&_30$$43, this_ptr, 0); ZEPHIR_INIT_NVAR(&_31$$43); ZEPHIR_CONCAT_SVSVS(&_31$$43, "Column '", &field, "' in '", &_30$$43, "' have not defined a data type"); - ZEPHIR_CALL_METHOD(NULL, &_29$$43, "__construct", &_8, 32, &_31$$43); + ZEPHIR_CALL_METHOD(NULL, &_29$$43, "__construct", &_8, 33, &_31$$43); zephir_check_call_status(); - zephir_throw_exception_debug(&_29$$43, "phalcon/Mvc/Model.zep", 4060); + zephir_throw_exception_debug(&_29$$43, "phalcon/Mvc/Model.zep", 4067); ZEPHIR_MM_RESTORE(); return; } @@ -7653,9 +7346,9 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) } } if (changed) { - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4110); - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4111); - zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4112); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4117); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4118); + zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4119); } zephir_array_update_zval(&newSnapshot, &attributeField, &value, PH_COPY | PH_SEPARATE); } else { @@ -7672,7 +7365,7 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) RETURN_MM_BOOL(1); } } else { - zephir_is_iterable(&nonPrimary, 0, "phalcon/Mvc/Model.zep", 4178); + zephir_is_iterable(&nonPrimary, 0, "phalcon/Mvc/Model.zep", 4185); if (Z_TYPE_P(&nonPrimary) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&nonPrimary), _39$$53) { @@ -7688,9 +7381,9 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) zephir_get_class(&_42$$57, this_ptr, 0); ZEPHIR_INIT_NVAR(&_43$$57); ZEPHIR_CONCAT_SVSVS(&_43$$57, "Column '", &field, "' in '", &_42$$57, "' isn't part of the column map"); - ZEPHIR_CALL_METHOD(NULL, &_41$$57, "__construct", &_8, 32, &_43$$57); + ZEPHIR_CALL_METHOD(NULL, &_41$$57, "__construct", &_8, 33, &_43$$57); zephir_check_call_status(); - zephir_throw_exception_debug(&_41$$57, "phalcon/Mvc/Model.zep", 4141); + zephir_throw_exception_debug(&_41$$57, "phalcon/Mvc/Model.zep", 4148); ZEPHIR_MM_RESTORE(); return; } @@ -7707,23 +7400,23 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) zephir_get_class(&_45$$60, this_ptr, 0); ZEPHIR_INIT_NVAR(&_46$$60); ZEPHIR_CONCAT_SVSVS(&_46$$60, "Column '", &field, "' in '", &_45$$60, "' have not defined a bind data type"); - ZEPHIR_CALL_METHOD(NULL, &_44$$60, "__construct", &_8, 32, &_46$$60); + ZEPHIR_CALL_METHOD(NULL, &_44$$60, "__construct", &_8, 33, &_46$$60); zephir_check_call_status(); - zephir_throw_exception_debug(&_44$$60, "phalcon/Mvc/Model.zep", 4155); + zephir_throw_exception_debug(&_44$$60, "phalcon/Mvc/Model.zep", 4162); ZEPHIR_MM_RESTORE(); return; } ZEPHIR_OBS_NVAR(&value); if (zephir_fetch_property_zval(&value, this_ptr, &attributeField, PH_SILENT_CC)) { - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4166); - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4167); - zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4168); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4173); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4174); + zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4175); zephir_array_update_zval(&newSnapshot, &attributeField, &value, PH_COPY | PH_SEPARATE); } else { zephir_array_update_zval(&newSnapshot, &attributeField, &__$null, PH_COPY | PH_SEPARATE); - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4172); - zephir_array_append(&values, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4173); - zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4174); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4179); + zephir_array_append(&values, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4180); + zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4181); } } } ZEND_HASH_FOREACH_END(); @@ -7748,9 +7441,9 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) zephir_get_class(&_48$$66, this_ptr, 0); ZEPHIR_INIT_NVAR(&_49$$66); ZEPHIR_CONCAT_SVSVS(&_49$$66, "Column '", &field, "' in '", &_48$$66, "' isn't part of the column map"); - ZEPHIR_CALL_METHOD(NULL, &_47$$66, "__construct", &_8, 32, &_49$$66); + ZEPHIR_CALL_METHOD(NULL, &_47$$66, "__construct", &_8, 33, &_49$$66); zephir_check_call_status(); - zephir_throw_exception_debug(&_47$$66, "phalcon/Mvc/Model.zep", 4141); + zephir_throw_exception_debug(&_47$$66, "phalcon/Mvc/Model.zep", 4148); ZEPHIR_MM_RESTORE(); return; } @@ -7767,23 +7460,23 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) zephir_get_class(&_51$$69, this_ptr, 0); ZEPHIR_INIT_NVAR(&_52$$69); ZEPHIR_CONCAT_SVSVS(&_52$$69, "Column '", &field, "' in '", &_51$$69, "' have not defined a bind data type"); - ZEPHIR_CALL_METHOD(NULL, &_50$$69, "__construct", &_8, 32, &_52$$69); + ZEPHIR_CALL_METHOD(NULL, &_50$$69, "__construct", &_8, 33, &_52$$69); zephir_check_call_status(); - zephir_throw_exception_debug(&_50$$69, "phalcon/Mvc/Model.zep", 4155); + zephir_throw_exception_debug(&_50$$69, "phalcon/Mvc/Model.zep", 4162); ZEPHIR_MM_RESTORE(); return; } ZEPHIR_OBS_NVAR(&value); if (zephir_fetch_property_zval(&value, this_ptr, &attributeField, PH_SILENT_CC)) { - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4166); - zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4167); - zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4168); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4173); + zephir_array_append(&values, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4174); + zephir_array_append(&bindTypes, &bindType, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4175); zephir_array_update_zval(&newSnapshot, &attributeField, &value, PH_COPY | PH_SEPARATE); } else { zephir_array_update_zval(&newSnapshot, &attributeField, &__$null, PH_COPY | PH_SEPARATE); - zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4172); - zephir_array_append(&values, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4173); - zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4174); + zephir_array_append(&fields, &field, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4179); + zephir_array_append(&values, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4180); + zephir_array_append(&bindTypes, &bindSkip, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4181); } } ZEPHIR_CALL_METHOD(NULL, &nonPrimary, "next", NULL, 0); @@ -7809,15 +7502,15 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) zephir_get_class(&_54$$74, this_ptr, 0); ZEPHIR_INIT_VAR(&_55$$74); ZEPHIR_CONCAT_SVS(&_55$$74, "A primary key must be defined in the model in order to perform the operation in '", &_54$$74, "'"); - ZEPHIR_CALL_METHOD(NULL, &_53$$74, "__construct", &_8, 32, &_55$$74); + ZEPHIR_CALL_METHOD(NULL, &_53$$74, "__construct", &_8, 33, &_55$$74); zephir_check_call_status(); - zephir_throw_exception_debug(&_53$$74, "phalcon/Mvc/Model.zep", 4201); + zephir_throw_exception_debug(&_53$$74, "phalcon/Mvc/Model.zep", 4208); ZEPHIR_MM_RESTORE(); return; } ZEPHIR_INIT_NVAR(&uniqueParams); array_init(&uniqueParams); - zephir_is_iterable(&primaryKeys, 0, "phalcon/Mvc/Model.zep", 4228); + zephir_is_iterable(&primaryKeys, 0, "phalcon/Mvc/Model.zep", 4235); if (Z_TYPE_P(&primaryKeys) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&primaryKeys), _56$$73) { @@ -7832,9 +7525,9 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) zephir_get_class(&_59$$77, this_ptr, 0); ZEPHIR_INIT_NVAR(&_60$$77); ZEPHIR_CONCAT_SVSVS(&_60$$77, "Column '", &field, "' in '", &_59$$77, "' isn't part of the column map"); - ZEPHIR_CALL_METHOD(NULL, &_58$$77, "__construct", &_8, 32, &_60$$77); + ZEPHIR_CALL_METHOD(NULL, &_58$$77, "__construct", &_8, 33, &_60$$77); zephir_check_call_status(); - zephir_throw_exception_debug(&_58$$77, "phalcon/Mvc/Model.zep", 4214); + zephir_throw_exception_debug(&_58$$77, "phalcon/Mvc/Model.zep", 4221); ZEPHIR_MM_RESTORE(); return; } @@ -7844,10 +7537,10 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) ZEPHIR_OBS_NVAR(&value); if (zephir_fetch_property_zval(&value, this_ptr, &attributeField, PH_SILENT_CC)) { zephir_array_update_zval(&newSnapshot, &attributeField, &value, PH_COPY | PH_SEPARATE); - zephir_array_append(&uniqueParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4222); + zephir_array_append(&uniqueParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4229); } else { zephir_array_update_zval(&newSnapshot, &attributeField, &__$null, PH_COPY | PH_SEPARATE); - zephir_array_append(&uniqueParams, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4225); + zephir_array_append(&uniqueParams, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4232); } } ZEND_HASH_FOREACH_END(); } else { @@ -7870,9 +7563,9 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) zephir_get_class(&_62$$83, this_ptr, 0); ZEPHIR_INIT_NVAR(&_63$$83); ZEPHIR_CONCAT_SVSVS(&_63$$83, "Column '", &field, "' in '", &_62$$83, "' isn't part of the column map"); - ZEPHIR_CALL_METHOD(NULL, &_61$$83, "__construct", &_8, 32, &_63$$83); + ZEPHIR_CALL_METHOD(NULL, &_61$$83, "__construct", &_8, 33, &_63$$83); zephir_check_call_status(); - zephir_throw_exception_debug(&_61$$83, "phalcon/Mvc/Model.zep", 4214); + zephir_throw_exception_debug(&_61$$83, "phalcon/Mvc/Model.zep", 4221); ZEPHIR_MM_RESTORE(); return; } @@ -7882,10 +7575,10 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) ZEPHIR_OBS_NVAR(&value); if (zephir_fetch_property_zval(&value, this_ptr, &attributeField, PH_SILENT_CC)) { zephir_array_update_zval(&newSnapshot, &attributeField, &value, PH_COPY | PH_SEPARATE); - zephir_array_append(&uniqueParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4222); + zephir_array_append(&uniqueParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4229); } else { zephir_array_update_zval(&newSnapshot, &attributeField, &__$null, PH_COPY | PH_SEPARATE); - zephir_array_append(&uniqueParams, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4225); + zephir_array_append(&uniqueParams, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4232); } ZEPHIR_CALL_METHOD(NULL, &primaryKeys, "next", NULL, 0); zephir_check_call_status(); @@ -7894,8 +7587,8 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) ZEPHIR_INIT_NVAR(&field); } if (Z_TYPE_P(table) == IS_ARRAY) { - zephir_array_fetch_long(&_64$$87, table, 0, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 4234); - zephir_array_fetch_long(&_65$$87, table, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 4234); + zephir_array_fetch_long(&_64$$87, table, 0, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 4241); + zephir_array_fetch_long(&_65$$87, table, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 4241); ZEPHIR_INIT_VAR(&_66$$87); ZEPHIR_CONCAT_VSV(&_66$$87, &_64$$87, ".", &_65$$87); ZEPHIR_CPY_WRT(table, &_66$$87); @@ -7904,7 +7597,7 @@ PHP_METHOD(Phalcon_Mvc_Model, doLowUpdate) zephir_create_array(&_67, 3, 0); zephir_array_update_string(&_67, SL("conditions"), &uniqueKey, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_67, SL("bind"), &uniqueParams, PH_COPY | PH_SEPARATE); - ZEPHIR_OBS_VAR(&_68); + zephir_memory_observe(&_68); zephir_read_property(&_68, this_ptr, ZEND_STRL("uniqueTypes"), PH_NOISY_CC); zephir_array_update_string(&_67, SL("bindTypes"), &_68, PH_COPY | PH_SEPARATE); ZEPHIR_CALL_METHOD(&success, connection, "update", NULL, 0, table, &fields, &values, &_67, &bindTypes); @@ -7995,19 +7688,13 @@ PHP_METHOD(Phalcon_Mvc_Model, has) ZVAL_UNDEF(&_26$$27); ZVAL_UNDEF(&_31$$30); ZVAL_UNDEF(&_32$$31); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(metaData, phalcon_mvc_model_metadatainterface_ce) Z_PARAM_OBJECT_OF_CLASS(connection, phalcon_db_adapter_adapterinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &metaData, &connection); - - ZEPHIR_INIT_VAR(&uniqueParams); ZVAL_NULL(&uniqueParams); ZEPHIR_INIT_VAR(&uniqueTypes); @@ -8037,7 +7724,7 @@ PHP_METHOD(Phalcon_Mvc_Model, has) array_init(&uniqueParams); ZEPHIR_INIT_NVAR(&uniqueTypes); array_init(&uniqueTypes); - zephir_is_iterable(&primaryKeys, 0, "phalcon/Mvc/Model.zep", 4358); + zephir_is_iterable(&primaryKeys, 0, "phalcon/Mvc/Model.zep", 4365); if (Z_TYPE_P(&primaryKeys) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&primaryKeys), _1$$3) { @@ -8052,9 +7739,9 @@ PHP_METHOD(Phalcon_Mvc_Model, has) zephir_get_class(&_4$$9, this_ptr, 0); ZEPHIR_INIT_NVAR(&_5$$9); ZEPHIR_CONCAT_SVSVS(&_5$$9, "Column '", &field, "' in '", &_4$$9, "' isn't part of the column map"); - ZEPHIR_CALL_METHOD(NULL, &_3$$9, "__construct", &_6, 32, &_5$$9); + ZEPHIR_CALL_METHOD(NULL, &_3$$9, "__construct", &_6, 33, &_5$$9); zephir_check_call_status(); - zephir_throw_exception_debug(&_3$$9, "phalcon/Mvc/Model.zep", 4317); + zephir_throw_exception_debug(&_3$$9, "phalcon/Mvc/Model.zep", 4324); ZEPHIR_MM_RESTORE(); return; } @@ -8072,9 +7759,9 @@ PHP_METHOD(Phalcon_Mvc_Model, has) if (_7$$11) { numberEmpty++; } - zephir_array_append(&uniqueParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4338); + zephir_array_append(&uniqueParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4345); } else { - zephir_array_append(&uniqueParams, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4340); + zephir_array_append(&uniqueParams, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4347); numberEmpty++; } ZEPHIR_OBS_NVAR(&type); @@ -8085,18 +7772,18 @@ PHP_METHOD(Phalcon_Mvc_Model, has) zephir_get_class(&_9$$14, this_ptr, 0); ZEPHIR_INIT_NVAR(&_10$$14); ZEPHIR_CONCAT_SVSVS(&_10$$14, "Column '", &field, "' in '", &_9$$14, "' isn't part of the table columns"); - ZEPHIR_CALL_METHOD(NULL, &_8$$14, "__construct", &_6, 32, &_10$$14); + ZEPHIR_CALL_METHOD(NULL, &_8$$14, "__construct", &_6, 33, &_10$$14); zephir_check_call_status(); - zephir_throw_exception_debug(&_8$$14, "phalcon/Mvc/Model.zep", 4347); + zephir_throw_exception_debug(&_8$$14, "phalcon/Mvc/Model.zep", 4354); ZEPHIR_MM_RESTORE(); return; } - zephir_array_append(&uniqueTypes, &type, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4350); + zephir_array_append(&uniqueTypes, &type, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4357); ZEPHIR_CALL_METHOD(&_11$$7, connection, "escapeidentifier", &_12, 0, &field); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_13$$7); ZEPHIR_CONCAT_VS(&_13$$7, &_11$$7, " = ?"); - zephir_array_append(&wherePk, &_13$$7, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4351); + zephir_array_append(&wherePk, &_13$$7, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4358); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &primaryKeys, "rewind", NULL, 0); @@ -8118,9 +7805,9 @@ PHP_METHOD(Phalcon_Mvc_Model, has) zephir_get_class(&_15$$17, this_ptr, 0); ZEPHIR_INIT_NVAR(&_16$$17); ZEPHIR_CONCAT_SVSVS(&_16$$17, "Column '", &field, "' in '", &_15$$17, "' isn't part of the column map"); - ZEPHIR_CALL_METHOD(NULL, &_14$$17, "__construct", &_6, 32, &_16$$17); + ZEPHIR_CALL_METHOD(NULL, &_14$$17, "__construct", &_6, 33, &_16$$17); zephir_check_call_status(); - zephir_throw_exception_debug(&_14$$17, "phalcon/Mvc/Model.zep", 4317); + zephir_throw_exception_debug(&_14$$17, "phalcon/Mvc/Model.zep", 4324); ZEPHIR_MM_RESTORE(); return; } @@ -8138,9 +7825,9 @@ PHP_METHOD(Phalcon_Mvc_Model, has) if (_17$$19) { numberEmpty++; } - zephir_array_append(&uniqueParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4338); + zephir_array_append(&uniqueParams, &value, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4345); } else { - zephir_array_append(&uniqueParams, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4340); + zephir_array_append(&uniqueParams, &__$null, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4347); numberEmpty++; } ZEPHIR_OBS_NVAR(&type); @@ -8151,18 +7838,18 @@ PHP_METHOD(Phalcon_Mvc_Model, has) zephir_get_class(&_19$$22, this_ptr, 0); ZEPHIR_INIT_NVAR(&_20$$22); ZEPHIR_CONCAT_SVSVS(&_20$$22, "Column '", &field, "' in '", &_19$$22, "' isn't part of the table columns"); - ZEPHIR_CALL_METHOD(NULL, &_18$$22, "__construct", &_6, 32, &_20$$22); + ZEPHIR_CALL_METHOD(NULL, &_18$$22, "__construct", &_6, 33, &_20$$22); zephir_check_call_status(); - zephir_throw_exception_debug(&_18$$22, "phalcon/Mvc/Model.zep", 4347); + zephir_throw_exception_debug(&_18$$22, "phalcon/Mvc/Model.zep", 4354); ZEPHIR_MM_RESTORE(); return; } - zephir_array_append(&uniqueTypes, &type, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4350); + zephir_array_append(&uniqueTypes, &type, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4357); ZEPHIR_CALL_METHOD(&_21$$15, connection, "escapeidentifier", &_22, 0, &field); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_23$$15); ZEPHIR_CONCAT_VS(&_23$$15, &_21$$15, " = ?"); - zephir_array_append(&wherePk, &_23$$15, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4351); + zephir_array_append(&wherePk, &_23$$15, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4358); ZEPHIR_CALL_METHOD(NULL, &primaryKeys, "next", NULL, 0); zephir_check_call_status(); } @@ -8194,9 +7881,9 @@ PHP_METHOD(Phalcon_Mvc_Model, has) zephir_read_property(&_26$$27, this_ptr, ZEND_STRL("uniqueTypes"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&uniqueTypes, &_26$$27); } - ZEPHIR_CALL_METHOD(&schema, this_ptr, "getschema", NULL, 422); + ZEPHIR_CALL_METHOD(&schema, this_ptr, "getschema", NULL, 423); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&source, this_ptr, "getsource", NULL, 423); + ZEPHIR_CALL_METHOD(&source, this_ptr, "getsource", NULL, 424); zephir_check_call_status(); if (zephir_is_true(&schema)) { ZEPHIR_INIT_VAR(&table); @@ -8213,14 +7900,14 @@ PHP_METHOD(Phalcon_Mvc_Model, has) ZVAL_NULL(&_29); ZEPHIR_CALL_METHOD(&num, connection, "fetchone", NULL, 0, &_28, &_29, &uniqueParams, &uniqueTypes); zephir_check_call_status(); - zephir_array_fetch_string(&_30, &num, SL("rowcount"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 4412); + zephir_array_fetch_string(&_30, &num, SL("rowcount"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 4419); if (zephir_is_true(&_30)) { - ZEPHIR_INIT_ZVAL_NREF(_31$$30); + ZVAL_UNDEF(&_31$$30); ZVAL_LONG(&_31$$30, 0); zephir_update_property_zval(this_ptr, ZEND_STRL("dirtyState"), &_31$$30); RETURN_MM_BOOL(1); } else { - ZEPHIR_INIT_ZVAL_NREF(_32$$31); + ZVAL_UNDEF(&_32$$31); ZVAL_LONG(&_32$$31, 1); zephir_update_property_zval(this_ptr, ZEND_STRL("dirtyState"), &_32$$31); } @@ -8260,17 +7947,13 @@ PHP_METHOD(Phalcon_Mvc_Model, getRelatedRecords) ZVAL_UNDEF(&_4$$5); ZVAL_UNDEF(&_5$$5); ZVAL_UNDEF(&arguments); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(modelName) Z_PARAM_STR(method) Z_PARAM_ARRAY(arguments) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &modelName_param, &method_param, &arguments_param); if (UNEXPECTED(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'modelName' must be of the type string")); @@ -8291,15 +7974,13 @@ PHP_METHOD(Phalcon_Mvc_Model, getRelatedRecords) ZEPHIR_INIT_VAR(&method); } ZEPHIR_OBS_COPY_OR_DUP(&arguments, arguments_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("modelsManager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&manager, &_0); ZEPHIR_INIT_VAR(&relation); ZVAL_BOOL(&relation, 0); ZEPHIR_INIT_VAR(&queryMethod); ZVAL_NULL(&queryMethod); - ZEPHIR_OBS_VAR(&extraArgs); + zephir_memory_observe(&extraArgs); zephir_array_isset_long_fetch(&extraArgs, &arguments, 0, 0); if (zephir_start_with_str(&method, SL("get"))) { ZVAL_LONG(&_1$$3, 3); @@ -8347,10 +8028,8 @@ PHP_METHOD(Phalcon_Mvc_Model, groupResult) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; - zval *functionName_param = NULL, *alias_param = NULL, *parameters = NULL, parameters_sub, __$null, params, distinctColumn, groupColumn, columns, resultset, cache, firstRow, groupColumns, builder, query, container, manager, transaction, bindParams, bindTypes, _1, _2, _3; + zval *functionName_param = NULL, *alias_param = NULL, *parameters = NULL, parameters_sub, __$null, params, distinctColumn, groupColumn, columns, resultset, cache, firstRow, groupColumns, builder, query, container, manager, transaction, bindParams, bindTypes, _0, _1, _2; zval functionName, alias; - zval *this_ptr = getThis(); ZVAL_UNDEF(&functionName); ZVAL_UNDEF(&alias); @@ -8371,10 +8050,9 @@ PHP_METHOD(Phalcon_Mvc_Model, groupResult) ZVAL_UNDEF(&transaction); ZVAL_UNDEF(&bindParams); ZVAL_UNDEF(&bindTypes); + ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); - ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(functionName) @@ -8382,10 +8060,8 @@ PHP_METHOD(Phalcon_Mvc_Model, groupResult) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &functionName_param, &alias_param, ¶meters); if (UNEXPECTED(Z_TYPE_P(functionName_param) != IS_STRING && Z_TYPE_P(functionName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'functionName' must be of the type string")); @@ -8409,39 +8085,37 @@ PHP_METHOD(Phalcon_Mvc_Model, groupResult) parameters = ¶meters_sub; parameters = &__$null; } - - ZEPHIR_INIT_VAR(&bindParams); array_init(&bindParams); ZEPHIR_INIT_VAR(&bindTypes); array_init(&bindTypes); - ZEPHIR_CALL_CE_STATIC(&container, phalcon_di_di_ce, "getdefault", &_0, 0); + ZEPHIR_CALL_CE_STATIC(&container, phalcon_di_di_ce, "getdefault", NULL, 0); zephir_check_call_status(); - ZEPHIR_INIT_VAR(&_2); - ZVAL_STRING(&_2, "modelsManager"); - ZEPHIR_CALL_METHOD(&_1, &container, "getshared", NULL, 0, &_2); + ZEPHIR_INIT_VAR(&_1); + ZVAL_STRING(&_1, "modelsManager"); + ZEPHIR_CALL_METHOD(&_0, &container, "getshared", NULL, 0, &_1); zephir_check_call_status(); - ZEPHIR_CPY_WRT(&manager, &_1); + ZEPHIR_CPY_WRT(&manager, &_0); if (Z_TYPE_P(parameters) != IS_ARRAY) { ZEPHIR_INIT_VAR(¶ms); array_init(¶ms); if (Z_TYPE_P(parameters) != IS_NULL) { - zephir_array_append(¶ms, parameters, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4517); + zephir_array_append(¶ms, parameters, PH_SEPARATE, "phalcon/Mvc/Model.zep", 4524); } } else { ZEPHIR_CPY_WRT(¶ms, parameters); } - ZEPHIR_OBS_VAR(&groupColumn); + zephir_memory_observe(&groupColumn); if (!(zephir_array_isset_string_fetch(&groupColumn, ¶ms, SL("column"), 0))) { ZEPHIR_INIT_NVAR(&groupColumn); ZVAL_STRING(&groupColumn, "*"); } - ZEPHIR_OBS_VAR(&distinctColumn); + zephir_memory_observe(&distinctColumn); if (zephir_array_isset_string_fetch(&distinctColumn, ¶ms, SL("distinct"), 0)) { ZEPHIR_INIT_VAR(&columns); ZEPHIR_CONCAT_VSVSV(&columns, &functionName, "(DISTINCT ", &distinctColumn, ") AS ", &alias); } else { - ZEPHIR_OBS_VAR(&groupColumns); + zephir_memory_observe(&groupColumns); ZEPHIR_INIT_NVAR(&columns); if (zephir_array_isset_string_fetch(&groupColumns, ¶ms, SL("group"), 0)) { ZEPHIR_CONCAT_VSVSVSV(&columns, &groupColumns, ", ", &functionName, "(", &groupColumn, ") AS ", &alias); @@ -8449,19 +8123,19 @@ PHP_METHOD(Phalcon_Mvc_Model, groupResult) ZEPHIR_CONCAT_VSVSV(&columns, &functionName, "(", &groupColumn, ") AS ", &alias); } } - ZEPHIR_CALL_METHOD(&_1, &manager, "createbuilder", NULL, 0, ¶ms); + ZEPHIR_CALL_METHOD(&_0, &manager, "createbuilder", NULL, 0, ¶ms); zephir_check_call_status(); - ZEPHIR_CPY_WRT(&builder, &_1); + ZEPHIR_CPY_WRT(&builder, &_0); ZEPHIR_CALL_METHOD(NULL, &builder, "columns", NULL, 0, &columns); zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_2); - zephir_get_called_class(&_2); - ZEPHIR_CALL_METHOD(NULL, &builder, "from", NULL, 0, &_2); + ZEPHIR_INIT_NVAR(&_1); + zephir_get_called_class(&_1); + ZEPHIR_CALL_METHOD(NULL, &builder, "from", NULL, 0, &_1); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_1, &builder, "getquery", NULL, 0); + ZEPHIR_CALL_METHOD(&_0, &builder, "getquery", NULL, 0); zephir_check_call_status(); - ZEPHIR_CPY_WRT(&query, &_1); - ZEPHIR_OBS_VAR(&transaction); + ZEPHIR_CPY_WRT(&query, &_0); + zephir_memory_observe(&transaction); if (zephir_array_isset_string_fetch(&transaction, ¶ms, SL("transaction"), 0)) { if (zephir_instance_of_ev(&transaction, phalcon_mvc_model_transactioninterface_ce)) { ZEPHIR_CALL_METHOD(NULL, &query, "settransaction", NULL, 0, &transaction); @@ -8470,13 +8144,13 @@ PHP_METHOD(Phalcon_Mvc_Model, groupResult) } if (zephir_array_isset_string(¶ms, SL("bind"))) { ZEPHIR_OBS_NVAR(&bindParams); - zephir_array_fetch_string(&bindParams, ¶ms, SL("bind"), PH_NOISY, "phalcon/Mvc/Model.zep", 4560); + zephir_array_fetch_string(&bindParams, ¶ms, SL("bind"), PH_NOISY, "phalcon/Mvc/Model.zep", 4567); if (zephir_array_isset_string(¶ms, SL("bindTypes"))) { ZEPHIR_OBS_NVAR(&bindTypes); - zephir_array_fetch_string(&bindTypes, ¶ms, SL("bindTypes"), PH_NOISY, "phalcon/Mvc/Model.zep", 4563); + zephir_array_fetch_string(&bindTypes, ¶ms, SL("bindTypes"), PH_NOISY, "phalcon/Mvc/Model.zep", 4570); } } - ZEPHIR_OBS_VAR(&cache); + zephir_memory_observe(&cache); if (zephir_array_isset_string_fetch(&cache, ¶ms, SL("cache"), 0)) { ZEPHIR_CALL_METHOD(NULL, &query, "cache", NULL, 0, &cache); zephir_check_call_status(); @@ -8488,9 +8162,9 @@ PHP_METHOD(Phalcon_Mvc_Model, groupResult) } ZEPHIR_CALL_METHOD(&firstRow, &resultset, "getfirst", NULL, 0); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&_3); - zephir_read_property_zval(&_3, &firstRow, &alias, PH_NOISY_CC); - RETURN_CCTOR(&_3); + zephir_memory_observe(&_2); + zephir_read_property_zval(&_2, &firstRow, &alias, PH_NOISY_CC); + RETURN_CCTOR(&_2); } /** @@ -8506,7 +8180,6 @@ PHP_METHOD(Phalcon_Mvc_Model, invokeFinder) zval arguments, _11$$14; zval *method_param = NULL, *arguments_param = NULL, extraMethod, type, modelName, value, model, attributes, field, extraMethodFirst, metaData, params, _14, _0$$3, _1$$4, _2$$5, _3$$7, _4$$7, _5$$7, _6$$13, _7$$13, _8$$13, _9$$14, _10$$14, _12$$15, _13$$15; zval method; - zval *this_ptr = getThis(); ZVAL_UNDEF(&method); ZVAL_UNDEF(&extraMethod); @@ -8535,21 +8208,15 @@ PHP_METHOD(Phalcon_Mvc_Model, invokeFinder) ZVAL_UNDEF(&_13$$15); ZVAL_UNDEF(&arguments); ZVAL_UNDEF(&_11$$14); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(method) Z_PARAM_ARRAY(arguments) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &method_param, &arguments_param); zephir_get_strval(&method, method_param); zephir_get_arrval(&arguments, arguments_param); - - ZEPHIR_INIT_VAR(&extraMethod); ZVAL_NULL(&extraMethod); if (zephir_start_with_str(&method, SL("findFirstBy"))) { @@ -8583,9 +8250,9 @@ PHP_METHOD(Phalcon_Mvc_Model, invokeFinder) zephir_get_called_class(&_4$$7); ZEPHIR_INIT_VAR(&_5$$7); ZEPHIR_CONCAT_SVSVS(&_5$$7, "The static method '", &method, "' in '", &_4$$7, "' requires one argument"); - ZEPHIR_CALL_METHOD(NULL, &_3$$7, "__construct", NULL, 32, &_5$$7); + ZEPHIR_CALL_METHOD(NULL, &_3$$7, "__construct", NULL, 33, &_5$$7); zephir_check_call_status(); - zephir_throw_exception_debug(&_3$$7, "phalcon/Mvc/Model.zep", 4642); + zephir_throw_exception_debug(&_3$$7, "phalcon/Mvc/Model.zep", 4649); ZEPHIR_MM_RESTORE(); return; } @@ -8603,13 +8270,13 @@ PHP_METHOD(Phalcon_Mvc_Model, invokeFinder) if (zephir_array_isset(&attributes, &extraMethod)) { ZEPHIR_CPY_WRT(&field, &extraMethod); } else { - ZEPHIR_CALL_FUNCTION(&extraMethodFirst, "lcfirst", NULL, 76, &extraMethod); + ZEPHIR_CALL_FUNCTION(&extraMethodFirst, "lcfirst", NULL, 77, &extraMethod); zephir_check_call_status(); if (zephir_array_isset(&attributes, &extraMethodFirst)) { ZEPHIR_CPY_WRT(&field, &extraMethodFirst); } else { ZEPHIR_INIT_NVAR(&field); - zephir_uncamelize(&field, &extraMethod, NULL ); + zephir_uncamelize(&field, &extraMethod, NULL ); if (UNEXPECTED(!(zephir_array_isset(&attributes, &field)))) { ZEPHIR_INIT_VAR(&_6$$13); object_init_ex(&_6$$13, phalcon_mvc_model_exception_ce); @@ -8617,15 +8284,15 @@ PHP_METHOD(Phalcon_Mvc_Model, invokeFinder) zephir_get_called_class(&_7$$13); ZEPHIR_INIT_VAR(&_8$$13); ZEPHIR_CONCAT_SVSVS(&_8$$13, "Cannot resolve attribute '", &extraMethod, "' in the model '", &_7$$13, "'"); - ZEPHIR_CALL_METHOD(NULL, &_6$$13, "__construct", NULL, 32, &_8$$13); + ZEPHIR_CALL_METHOD(NULL, &_6$$13, "__construct", NULL, 33, &_8$$13); zephir_check_call_status(); - zephir_throw_exception_debug(&_6$$13, "phalcon/Mvc/Model.zep", 4679); + zephir_throw_exception_debug(&_6$$13, "phalcon/Mvc/Model.zep", 4686); ZEPHIR_MM_RESTORE(); return; } } } - ZEPHIR_OBS_VAR(&value); + zephir_memory_observe(&value); zephir_array_isset_long_fetch(&value, &arguments, 0, 0); ZEPHIR_INIT_VAR(¶ms); if (Z_TYPE_P(&value) != IS_NULL) { @@ -8676,20 +8343,14 @@ PHP_METHOD(Phalcon_Mvc_Model, possibleSetter) ZVAL_UNDEF(&possibleSetter); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&localMethods); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(property) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &property_param, &value); zephir_get_strval(&property, property_param); - - ZEPHIR_INIT_VAR(&localMethods); zephir_create_array(&localMethods, 10, 0); add_assoc_long_ex(&localMethods, SL("setConnectionService"), 1); @@ -8703,7 +8364,7 @@ PHP_METHOD(Phalcon_Mvc_Model, possibleSetter) add_assoc_long_ex(&localMethods, SL("setTransaction"), 1); add_assoc_long_ex(&localMethods, SL("setWriteConnectionService"), 1); ZEPHIR_INIT_VAR(&_0); - zephir_camelize(&_0, &property, NULL ); + zephir_camelize(&_0, &property, NULL ); ZEPHIR_INIT_VAR(&possibleSetter); ZEPHIR_CONCAT_SV(&possibleSetter, "set", &_0); if (!((zephir_method_exists(this_ptr, &possibleSetter) == SUCCESS))) { @@ -8779,21 +8440,14 @@ PHP_METHOD(Phalcon_Mvc_Model, preSave) ZVAL_UNDEF(&eventName); ZVAL_UNDEF(&_16$$32); ZVAL_UNDEF(&_29$$52); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_OBJECT_OF_CLASS(metaData, phalcon_mvc_model_metadatainterface_ce) Z_PARAM_BOOL(exists) Z_PARAM_ZVAL(identityField) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &metaData, &exists_param, &identityField); - exists = zephir_get_boolval(exists_param); - - if (ZEPHIR_GLOBAL(orm).events) { ZEPHIR_INIT_VAR(&_1$$3); ZVAL_STRING(&_1$$3, "beforeValidation"); @@ -8816,7 +8470,7 @@ PHP_METHOD(Phalcon_Mvc_Model, preSave) } } if (ZEPHIR_GLOBAL(orm).virtual_foreign_keys) { - ZEPHIR_CALL_METHOD(&_3$$8, this_ptr, "checkforeignkeysrestrict", NULL, 433); + ZEPHIR_CALL_METHOD(&_3$$8, this_ptr, "checkforeignkeysrestrict", NULL, 434); zephir_check_call_status(); if (ZEPHIR_IS_FALSE_IDENTICAL(&_3$$8)) { RETURN_MM_BOOL(0); @@ -8847,7 +8501,7 @@ PHP_METHOD(Phalcon_Mvc_Model, preSave) ZEPHIR_CALL_METHOD(&emptyStringValues, metaData, "getemptystringattributes", NULL, 0, this_ptr); zephir_check_call_status(); error = 0; - zephir_is_iterable(¬Null, 0, "phalcon/Mvc/Model.zep", 4920); + zephir_is_iterable(¬Null, 0, "phalcon/Mvc/Model.zep", 4927); if (Z_TYPE_P(¬Null) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(¬Null), _4$$11) { @@ -8863,9 +8517,9 @@ PHP_METHOD(Phalcon_Mvc_Model, preSave) zephir_get_class(&_7$$19, this_ptr, 0); ZEPHIR_INIT_NVAR(&_8$$19); ZEPHIR_CONCAT_SVSVS(&_8$$19, "Column '", &field, "' in '", &_7$$19, "' isn't part of the column map"); - ZEPHIR_CALL_METHOD(NULL, &_6$$19, "__construct", &_9, 32, &_8$$19); + ZEPHIR_CALL_METHOD(NULL, &_6$$19, "__construct", &_9, 33, &_8$$19); zephir_check_call_status(); - zephir_throw_exception_debug(&_6$$19, "phalcon/Mvc/Model.zep", 4840); + zephir_throw_exception_debug(&_6$$19, "phalcon/Mvc/Model.zep", 4847); ZEPHIR_MM_RESTORE(); return; } @@ -8890,7 +8544,7 @@ PHP_METHOD(Phalcon_Mvc_Model, preSave) if (_11$$27) { _12$$27 = !(zephir_array_isset(&defaultValues, &field)); if (!(_12$$27)) { - zephir_array_fetch(&_13$$27, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 4870); + zephir_array_fetch(&_13$$27, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 4877); _12$$27 = !ZEPHIR_IS_IDENTICAL(&value, &_13$$27); } _11$$27 = _12$$27; @@ -8959,9 +8613,9 @@ PHP_METHOD(Phalcon_Mvc_Model, preSave) zephir_get_class(&_21$$39, this_ptr, 0); ZEPHIR_INIT_NVAR(&_22$$39); ZEPHIR_CONCAT_SVSVS(&_22$$39, "Column '", &field, "' in '", &_21$$39, "' isn't part of the column map"); - ZEPHIR_CALL_METHOD(NULL, &_20$$39, "__construct", &_9, 32, &_22$$39); + ZEPHIR_CALL_METHOD(NULL, &_20$$39, "__construct", &_9, 33, &_22$$39); zephir_check_call_status(); - zephir_throw_exception_debug(&_20$$39, "phalcon/Mvc/Model.zep", 4840); + zephir_throw_exception_debug(&_20$$39, "phalcon/Mvc/Model.zep", 4847); ZEPHIR_MM_RESTORE(); return; } @@ -8986,7 +8640,7 @@ PHP_METHOD(Phalcon_Mvc_Model, preSave) if (_24$$47) { _25$$47 = !(zephir_array_isset(&defaultValues, &field)); if (!(_25$$47)) { - zephir_array_fetch(&_26$$47, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 4870); + zephir_array_fetch(&_26$$47, &defaultValues, &field, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model.zep", 4877); _25$$47 = !ZEPHIR_IS_IDENTICAL(&value, &_26$$47); } _24$$47 = _25$$47; @@ -9174,20 +8828,14 @@ PHP_METHOD(Phalcon_Mvc_Model, preSaveRelatedRecords) ZVAL_UNDEF(&_40$$11); ZVAL_UNDEF(&_43$$11); ZVAL_UNDEF(&_41$$14); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_OBJECT_OF_CLASS(connection, phalcon_db_adapter_adapterinterface_ce) Z_PARAM_ZVAL(related) Z_PARAM_OBJECT_OF_CLASS(visited, phalcon_support_collection_collectioninterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &connection, &related, &visited); - - nesting = 0; if (nesting) { ZVAL_BOOL(&_0, 1); @@ -9201,7 +8849,7 @@ PHP_METHOD(Phalcon_Mvc_Model, preSaveRelatedRecords) ZEPHIR_CALL_METHOD(&_1, this_ptr, "getmodelsmanager", NULL, 0); zephir_check_call_status(); ZEPHIR_CPY_WRT(&manager, &_1); - zephir_is_iterable(related, 0, "phalcon/Mvc/Model.zep", 5084); + zephir_is_iterable(related, 0, "phalcon/Mvc/Model.zep", 5091); if (Z_TYPE_P(related) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(related), _4, _5, _2) { @@ -9234,9 +8882,9 @@ PHP_METHOD(Phalcon_Mvc_Model, preSaveRelatedRecords) zephir_get_class(&_11$$6, this_ptr, 0); ZEPHIR_INIT_NVAR(&_12$$6); ZEPHIR_CONCAT_SVSV(&_12$$6, "Only objects can be stored as part of belongs-to relations in '", &_11$$6, "' Relation ", &name); - ZEPHIR_CALL_METHOD(NULL, &_10$$6, "__construct", &_13, 32, &_12$$6); + ZEPHIR_CALL_METHOD(NULL, &_10$$6, "__construct", &_13, 33, &_12$$6); zephir_check_call_status(); - zephir_throw_exception_debug(&_10$$6, "phalcon/Mvc/Model.zep", 5042); + zephir_throw_exception_debug(&_10$$6, "phalcon/Mvc/Model.zep", 5049); ZEPHIR_MM_RESTORE(); return; } @@ -9258,9 +8906,9 @@ PHP_METHOD(Phalcon_Mvc_Model, preSaveRelatedRecords) zephir_get_class(&_17$$7, this_ptr, 0); ZEPHIR_INIT_NVAR(&_18$$7); ZEPHIR_CONCAT_SVSV(&_18$$7, "Not implemented in '", &_17$$7, "' Relation ", &name); - ZEPHIR_CALL_METHOD(NULL, &_16$$7, "__construct", &_13, 32, &_18$$7); + ZEPHIR_CALL_METHOD(NULL, &_16$$7, "__construct", &_13, 33, &_18$$7); zephir_check_call_status(); - zephir_throw_exception_debug(&_16$$7, "phalcon/Mvc/Model.zep", 5053); + zephir_throw_exception_debug(&_16$$7, "phalcon/Mvc/Model.zep", 5060); ZEPHIR_MM_RESTORE(); return; } @@ -9323,9 +8971,9 @@ PHP_METHOD(Phalcon_Mvc_Model, preSaveRelatedRecords) zephir_get_class(&_31$$12, this_ptr, 0); ZEPHIR_INIT_NVAR(&_32$$12); ZEPHIR_CONCAT_SVSV(&_32$$12, "Only objects can be stored as part of belongs-to relations in '", &_31$$12, "' Relation ", &name); - ZEPHIR_CALL_METHOD(NULL, &_30$$12, "__construct", &_13, 32, &_32$$12); + ZEPHIR_CALL_METHOD(NULL, &_30$$12, "__construct", &_13, 33, &_32$$12); zephir_check_call_status(); - zephir_throw_exception_debug(&_30$$12, "phalcon/Mvc/Model.zep", 5042); + zephir_throw_exception_debug(&_30$$12, "phalcon/Mvc/Model.zep", 5049); ZEPHIR_MM_RESTORE(); return; } @@ -9347,9 +8995,9 @@ PHP_METHOD(Phalcon_Mvc_Model, preSaveRelatedRecords) zephir_get_class(&_36$$13, this_ptr, 0); ZEPHIR_INIT_NVAR(&_37$$13); ZEPHIR_CONCAT_SVSV(&_37$$13, "Not implemented in '", &_36$$13, "' Relation ", &name); - ZEPHIR_CALL_METHOD(NULL, &_35$$13, "__construct", &_13, 32, &_37$$13); + ZEPHIR_CALL_METHOD(NULL, &_35$$13, "__construct", &_13, 33, &_37$$13); zephir_check_call_status(); - zephir_throw_exception_debug(&_35$$13, "phalcon/Mvc/Model.zep", 5053); + zephir_throw_exception_debug(&_35$$13, "phalcon/Mvc/Model.zep", 5060); ZEPHIR_MM_RESTORE(); return; } @@ -9401,21 +9049,13 @@ PHP_METHOD(Phalcon_Mvc_Model, postSave) ZVAL_UNDEF(&_0$$4); ZVAL_UNDEF(&_1$$5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_BOOL(success) Z_PARAM_BOOL(exists) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &success_param, &exists_param); - success = zephir_get_boolval(success_param); - exists = zephir_get_boolval(exists_param); - - if (success) { if (exists) { ZEPHIR_INIT_VAR(&_0$$4); @@ -9549,27 +9189,21 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) ZVAL_UNDEF(&_90$$40); ZVAL_UNDEF(&_100$$45); ZVAL_UNDEF(&_102$$45); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_OBJECT_OF_CLASS(connection, phalcon_db_adapter_adapterinterface_ce) Z_PARAM_ZVAL(related) Z_PARAM_OBJECT_OF_CLASS(visited, phalcon_support_collection_collectioninterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &connection, &related, &visited); - - nesting = 0; ZEPHIR_INIT_VAR(&className); zephir_get_class(&className, this_ptr, 0); ZEPHIR_CALL_METHOD(&_0, this_ptr, "getmodelsmanager", NULL, 0); zephir_check_call_status(); ZEPHIR_CPY_WRT(&manager, &_0); - zephir_is_iterable(related, 0, "phalcon/Mvc/Model.zep", 5312); + zephir_is_iterable(related, 0, "phalcon/Mvc/Model.zep", 5319); if (Z_TYPE_P(related) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(related), _3, _4, _1) { @@ -9606,9 +9240,9 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) object_init_ex(&_11$$6, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_NVAR(&_12$$6); ZEPHIR_CONCAT_SVSV(&_12$$6, "Only objects/arrays can be stored as part of has-many/has-one/has-one-through/has-many-to-many relations on model ", &className, " on Relation ", &name); - ZEPHIR_CALL_METHOD(NULL, &_11$$6, "__construct", &_13, 32, &_12$$6); + ZEPHIR_CALL_METHOD(NULL, &_11$$6, "__construct", &_13, 33, &_12$$6); zephir_check_call_status(); - zephir_throw_exception_debug(&_11$$6, "phalcon/Mvc/Model.zep", 5147); + zephir_throw_exception_debug(&_11$$6, "phalcon/Mvc/Model.zep", 5154); ZEPHIR_MM_RESTORE(); return; } @@ -9630,9 +9264,9 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) object_init_ex(&_16$$7, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_NVAR(&_17$$7); ZEPHIR_CONCAT_SVSV(&_17$$7, "Not implemented in '", &className, "' on Relation ", &name); - ZEPHIR_CALL_METHOD(NULL, &_16$$7, "__construct", &_13, 32, &_17$$7); + ZEPHIR_CALL_METHOD(NULL, &_16$$7, "__construct", &_13, 33, &_17$$7); zephir_check_call_status(); - zephir_throw_exception_debug(&_16$$7, "phalcon/Mvc/Model.zep", 5157); + zephir_throw_exception_debug(&_16$$7, "phalcon/Mvc/Model.zep", 5164); ZEPHIR_MM_RESTORE(); return; } @@ -9656,9 +9290,9 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) object_init_ex(&_20$$10, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_NVAR(&_21$$10); ZEPHIR_CONCAT_SVSVS(&_21$$10, "The column '", &columns, "' needs to be present in the model '", &className, "'"); - ZEPHIR_CALL_METHOD(NULL, &_20$$10, "__construct", &_13, 32, &_21$$10); + ZEPHIR_CALL_METHOD(NULL, &_20$$10, "__construct", &_13, 33, &_21$$10); zephir_check_call_status(); - zephir_throw_exception_debug(&_20$$10, "phalcon/Mvc/Model.zep", 5174); + zephir_throw_exception_debug(&_20$$10, "phalcon/Mvc/Model.zep", 5181); ZEPHIR_MM_RESTORE(); return; } @@ -9672,7 +9306,7 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) zephir_check_call_status(); ZEPHIR_CALL_METHOD(&intermediateReferencedFields, &relation, "getintermediatereferencedfields", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&relatedRecords, 0, "phalcon/Mvc/Model.zep", 5273); + zephir_is_iterable(&relatedRecords, 0, "phalcon/Mvc/Model.zep", 5280); if (Z_TYPE_P(&relatedRecords) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&relatedRecords), _23$$11) { @@ -9806,7 +9440,7 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) } ZEPHIR_INIT_NVAR(&recordAfter); } else { - zephir_is_iterable(&relatedRecords, 0, "phalcon/Mvc/Model.zep", 5297); + zephir_is_iterable(&relatedRecords, 0, "phalcon/Mvc/Model.zep", 5304); if (Z_TYPE_P(&relatedRecords) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&relatedRecords), _50$$22) { @@ -9875,9 +9509,9 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) object_init_ex(&_60$$28, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_NVAR(&_61$$28); ZEPHIR_CONCAT_SVSVS(&_61$$28, "There are no defined relations for the model '", &className, "' using alias '", &name, "'"); - ZEPHIR_CALL_METHOD(NULL, &_60$$28, "__construct", &_13, 32, &_61$$28); + ZEPHIR_CALL_METHOD(NULL, &_60$$28, "__construct", &_13, 33, &_61$$28); zephir_check_call_status(); - zephir_throw_exception_debug(&_60$$28, "phalcon/Mvc/Model.zep", 5304); + zephir_throw_exception_debug(&_60$$28, "phalcon/Mvc/Model.zep", 5311); ZEPHIR_MM_RESTORE(); return; } @@ -9921,9 +9555,9 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) object_init_ex(&_68$$32, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_NVAR(&_69$$32); ZEPHIR_CONCAT_SVSV(&_69$$32, "Only objects/arrays can be stored as part of has-many/has-one/has-one-through/has-many-to-many relations on model ", &className, " on Relation ", &name); - ZEPHIR_CALL_METHOD(NULL, &_68$$32, "__construct", &_13, 32, &_69$$32); + ZEPHIR_CALL_METHOD(NULL, &_68$$32, "__construct", &_13, 33, &_69$$32); zephir_check_call_status(); - zephir_throw_exception_debug(&_68$$32, "phalcon/Mvc/Model.zep", 5147); + zephir_throw_exception_debug(&_68$$32, "phalcon/Mvc/Model.zep", 5154); ZEPHIR_MM_RESTORE(); return; } @@ -9945,9 +9579,9 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) object_init_ex(&_72$$33, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_NVAR(&_73$$33); ZEPHIR_CONCAT_SVSV(&_73$$33, "Not implemented in '", &className, "' on Relation ", &name); - ZEPHIR_CALL_METHOD(NULL, &_72$$33, "__construct", &_13, 32, &_73$$33); + ZEPHIR_CALL_METHOD(NULL, &_72$$33, "__construct", &_13, 33, &_73$$33); zephir_check_call_status(); - zephir_throw_exception_debug(&_72$$33, "phalcon/Mvc/Model.zep", 5157); + zephir_throw_exception_debug(&_72$$33, "phalcon/Mvc/Model.zep", 5164); ZEPHIR_MM_RESTORE(); return; } @@ -9972,9 +9606,9 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) object_init_ex(&_77$$36, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_NVAR(&_78$$36); ZEPHIR_CONCAT_SVSVS(&_78$$36, "The column '", &columns, "' needs to be present in the model '", &className, "'"); - ZEPHIR_CALL_METHOD(NULL, &_77$$36, "__construct", &_13, 32, &_78$$36); + ZEPHIR_CALL_METHOD(NULL, &_77$$36, "__construct", &_13, 33, &_78$$36); zephir_check_call_status(); - zephir_throw_exception_debug(&_77$$36, "phalcon/Mvc/Model.zep", 5174); + zephir_throw_exception_debug(&_77$$36, "phalcon/Mvc/Model.zep", 5181); ZEPHIR_MM_RESTORE(); return; } @@ -9988,7 +9622,7 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) zephir_check_call_status(); ZEPHIR_CALL_METHOD(&intermediateReferencedFields, &relation, "getintermediatereferencedfields", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&relatedRecords, 0, "phalcon/Mvc/Model.zep", 5273); + zephir_is_iterable(&relatedRecords, 0, "phalcon/Mvc/Model.zep", 5280); if (Z_TYPE_P(&relatedRecords) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&relatedRecords), _80$$37) { @@ -10122,7 +9756,7 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) } ZEPHIR_INIT_NVAR(&recordAfter); } else { - zephir_is_iterable(&relatedRecords, 0, "phalcon/Mvc/Model.zep", 5297); + zephir_is_iterable(&relatedRecords, 0, "phalcon/Mvc/Model.zep", 5304); if (Z_TYPE_P(&relatedRecords) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&relatedRecords), _106$$48) { @@ -10191,9 +9825,9 @@ PHP_METHOD(Phalcon_Mvc_Model, postSaveRelatedRecords) object_init_ex(&_116$$54, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_NVAR(&_117$$54); ZEPHIR_CONCAT_SVSVS(&_117$$54, "There are no defined relations for the model '", &className, "' using alias '", &name, "'"); - ZEPHIR_CALL_METHOD(NULL, &_116$$54, "__construct", &_13, 32, &_117$$54); + ZEPHIR_CALL_METHOD(NULL, &_116$$54, "__construct", &_13, 33, &_117$$54); zephir_check_call_status(); - zephir_throw_exception_debug(&_116$$54, "phalcon/Mvc/Model.zep", 5304); + zephir_throw_exception_debug(&_116$$54, "phalcon/Mvc/Model.zep", 5311); ZEPHIR_MM_RESTORE(); return; } @@ -10246,22 +9880,16 @@ PHP_METHOD(Phalcon_Mvc_Model, allowEmptyStringValues) ZVAL_UNDEF(&attribute); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &attributes_param); ZEPHIR_OBS_COPY_OR_DUP(&attributes, attributes_param); - - ZEPHIR_INIT_VAR(&keysAttributes); array_init(&keysAttributes); - zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 5345); + zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 5352); if (Z_TYPE_P(&attributes) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&attributes), _0) { @@ -10306,9 +9934,8 @@ PHP_METHOD(Phalcon_Mvc_Model, cancelOperation) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$4); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("operationMade"), PH_NOISY_CC | PH_READONLY); if (ZEPHIR_IS_LONG(&_0, 3)) { @@ -10383,8 +10010,6 @@ PHP_METHOD(Phalcon_Mvc_Model, belongsTo) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&referenceModel); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 4) Z_PARAM_ZVAL(fields) Z_PARAM_STR(referenceModel) @@ -10392,10 +10017,8 @@ PHP_METHOD(Phalcon_Mvc_Model, belongsTo) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 1, &fields, &referenceModel_param, &referencedFields, &options_param); if (UNEXPECTED(Z_TYPE_P(referenceModel_param) != IS_STRING && Z_TYPE_P(referenceModel_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'referenceModel' must be of the type string")); @@ -10412,8 +10035,6 @@ PHP_METHOD(Phalcon_Mvc_Model, belongsTo) } else { zephir_get_arrval(&options, options_param); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("modelsManager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_METHOD(&_0, "addbelongsto", NULL, 0, this_ptr, fields, &referenceModel, referencedFields, &options); zephir_check_call_status(); @@ -10427,9 +10048,7 @@ PHP_METHOD(Phalcon_Mvc_Model, getPreparedQuery) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; - zval *params, params_sub, *limit = NULL, limit_sub, __$null, builder, bindParams, bindTypes, transaction, cache, manager, query, container, _1, _2, _3$$5, _4$$7; - zval *this_ptr = getThis(); + zval *params, params_sub, *limit = NULL, limit_sub, __$null, builder, bindParams, bindTypes, transaction, cache, manager, query, container, _0, _1, _2$$5, _3$$7; ZVAL_UNDEF(¶ms_sub); ZVAL_UNDEF(&limit_sub); @@ -10442,73 +10061,68 @@ PHP_METHOD(Phalcon_Mvc_Model, getPreparedQuery) ZVAL_UNDEF(&manager); ZVAL_UNDEF(&query); ZVAL_UNDEF(&container); + ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - ZVAL_UNDEF(&_2); - ZVAL_UNDEF(&_3$$5); - ZVAL_UNDEF(&_4$$7); -#if PHP_VERSION_ID >= 80000 + ZVAL_UNDEF(&_2$$5); + ZVAL_UNDEF(&_3$$7); bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ZVAL(params) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(limit) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, ¶ms, &limit); if (!limit) { limit = &limit_sub; limit = &__$null; } - - - ZEPHIR_CALL_CE_STATIC(&container, phalcon_di_di_ce, "getdefault", &_0, 0); + ZEPHIR_CALL_CE_STATIC(&container, phalcon_di_di_ce, "getdefault", NULL, 0); zephir_check_call_status(); - ZEPHIR_INIT_VAR(&_2); - ZVAL_STRING(&_2, "modelsManager"); - ZEPHIR_CALL_METHOD(&_1, &container, "getshared", NULL, 0, &_2); + ZEPHIR_INIT_VAR(&_1); + ZVAL_STRING(&_1, "modelsManager"); + ZEPHIR_CALL_METHOD(&_0, &container, "getshared", NULL, 0, &_1); zephir_check_call_status(); - ZEPHIR_CPY_WRT(&manager, &_1); - ZEPHIR_CALL_METHOD(&_1, &manager, "createbuilder", NULL, 0, params); + ZEPHIR_CPY_WRT(&manager, &_0); + ZEPHIR_CALL_METHOD(&_0, &manager, "createbuilder", NULL, 0, params); zephir_check_call_status(); - ZEPHIR_CPY_WRT(&builder, &_1); - ZEPHIR_INIT_NVAR(&_2); - zephir_get_called_class(&_2); - ZEPHIR_CALL_METHOD(NULL, &builder, "from", NULL, 0, &_2); + ZEPHIR_CPY_WRT(&builder, &_0); + ZEPHIR_INIT_NVAR(&_1); + zephir_get_called_class(&_1); + ZEPHIR_CALL_METHOD(NULL, &builder, "from", NULL, 0, &_1); zephir_check_call_status(); if (Z_TYPE_P(limit) != IS_NULL) { ZEPHIR_CALL_METHOD(NULL, &builder, "limit", NULL, 0, limit); zephir_check_call_status(); } - ZEPHIR_CALL_METHOD(&_1, &builder, "getquery", NULL, 0); + ZEPHIR_CALL_METHOD(&_0, &builder, "getquery", NULL, 0); zephir_check_call_status(); - ZEPHIR_CPY_WRT(&query, &_1); - ZEPHIR_OBS_VAR(&bindParams); + ZEPHIR_CPY_WRT(&query, &_0); + zephir_memory_observe(&bindParams); if (zephir_array_isset_string_fetch(&bindParams, params, SL("bind"), 0)) { if (Z_TYPE_P(&bindParams) == IS_ARRAY) { - ZVAL_BOOL(&_3$$5, 1); - ZEPHIR_CALL_METHOD(NULL, &query, "setbindparams", NULL, 0, &bindParams, &_3$$5); + ZVAL_BOOL(&_2$$5, 1); + ZEPHIR_CALL_METHOD(NULL, &query, "setbindparams", NULL, 0, &bindParams, &_2$$5); zephir_check_call_status(); } - ZEPHIR_OBS_VAR(&bindTypes); + zephir_memory_observe(&bindTypes); if (zephir_array_isset_string_fetch(&bindTypes, params, SL("bindTypes"), 0)) { if (Z_TYPE_P(&bindTypes) == IS_ARRAY) { - ZVAL_BOOL(&_4$$7, 1); - ZEPHIR_CALL_METHOD(NULL, &query, "setbindtypes", NULL, 0, &bindTypes, &_4$$7); + ZVAL_BOOL(&_3$$7, 1); + ZEPHIR_CALL_METHOD(NULL, &query, "setbindtypes", NULL, 0, &bindTypes, &_3$$7); zephir_check_call_status(); } } } - ZEPHIR_OBS_VAR(&transaction); + zephir_memory_observe(&transaction); if (zephir_array_isset_string_fetch(&transaction, params, SL("transaction"), 0)) { if (zephir_instance_of_ev(&transaction, phalcon_mvc_model_transactioninterface_ce)) { ZEPHIR_CALL_METHOD(NULL, &query, "settransaction", NULL, 0, &transaction); zephir_check_call_status(); } } - ZEPHIR_OBS_VAR(&cache); + zephir_memory_observe(&cache); if (zephir_array_isset_string_fetch(&cache, params, SL("cache"), 0)) { ZEPHIR_CALL_METHOD(NULL, &query, "cache", NULL, 0, &cache); zephir_check_call_status(); @@ -10574,8 +10188,6 @@ PHP_METHOD(Phalcon_Mvc_Model, hasMany) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&referenceModel); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 4) Z_PARAM_ZVAL(fields) Z_PARAM_STR(referenceModel) @@ -10583,10 +10195,8 @@ PHP_METHOD(Phalcon_Mvc_Model, hasMany) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 1, &fields, &referenceModel_param, &referencedFields, &options_param); if (UNEXPECTED(Z_TYPE_P(referenceModel_param) != IS_STRING && Z_TYPE_P(referenceModel_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'referenceModel' must be of the type string")); @@ -10603,8 +10213,6 @@ PHP_METHOD(Phalcon_Mvc_Model, hasMany) } else { zephir_get_arrval(&options, options_param); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("modelsManager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_METHOD(&_0, "addhasmany", NULL, 0, this_ptr, fields, &referenceModel, referencedFields, &options); zephir_check_call_status(); @@ -10683,8 +10291,6 @@ PHP_METHOD(Phalcon_Mvc_Model, hasManyToMany) ZVAL_UNDEF(&intermediateModel); ZVAL_UNDEF(&referenceModel); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(6, 7) Z_PARAM_ZVAL(fields) Z_PARAM_STR(intermediateModel) @@ -10695,10 +10301,8 @@ PHP_METHOD(Phalcon_Mvc_Model, hasManyToMany) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 6, 1, &fields, &intermediateModel_param, &intermediateFields, &intermediateReferencedFields, &referenceModel_param, &referencedFields, &options_param); if (UNEXPECTED(Z_TYPE_P(intermediateModel_param) != IS_STRING && Z_TYPE_P(intermediateModel_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'intermediateModel' must be of the type string")); @@ -10724,8 +10328,6 @@ PHP_METHOD(Phalcon_Mvc_Model, hasManyToMany) } else { zephir_get_arrval(&options, options_param); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("modelsManager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_METHOD(&_0, "addhasmanytomany", NULL, 0, this_ptr, fields, &intermediateModel, intermediateFields, intermediateReferencedFields, &referenceModel, referencedFields, &options); zephir_check_call_status(); @@ -10790,8 +10392,6 @@ PHP_METHOD(Phalcon_Mvc_Model, hasOne) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&referenceModel); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 4) Z_PARAM_ZVAL(fields) Z_PARAM_STR(referenceModel) @@ -10799,10 +10399,8 @@ PHP_METHOD(Phalcon_Mvc_Model, hasOne) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 1, &fields, &referenceModel_param, &referencedFields, &options_param); if (UNEXPECTED(Z_TYPE_P(referenceModel_param) != IS_STRING && Z_TYPE_P(referenceModel_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'referenceModel' must be of the type string")); @@ -10819,8 +10417,6 @@ PHP_METHOD(Phalcon_Mvc_Model, hasOne) } else { zephir_get_arrval(&options, options_param); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("modelsManager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_METHOD(&_0, "addhasone", NULL, 0, this_ptr, fields, &referenceModel, referencedFields, &options); zephir_check_call_status(); @@ -10872,8 +10468,6 @@ PHP_METHOD(Phalcon_Mvc_Model, hasOneThrough) ZVAL_UNDEF(&intermediateModel); ZVAL_UNDEF(&referenceModel); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(6, 7) Z_PARAM_ZVAL(fields) Z_PARAM_STR(intermediateModel) @@ -10884,10 +10478,8 @@ PHP_METHOD(Phalcon_Mvc_Model, hasOneThrough) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 6, 1, &fields, &intermediateModel_param, &intermediateFields, &intermediateReferencedFields, &referenceModel_param, &referencedFields, &options_param); if (UNEXPECTED(Z_TYPE_P(intermediateModel_param) != IS_STRING && Z_TYPE_P(intermediateModel_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'intermediateModel' must be of the type string")); @@ -10913,8 +10505,6 @@ PHP_METHOD(Phalcon_Mvc_Model, hasOneThrough) } else { zephir_get_arrval(&options, options_param); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("modelsManager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_METHOD(&_0, "addhasonethrough", NULL, 0, this_ptr, fields, &intermediateModel, intermediateFields, intermediateReferencedFields, &referenceModel, referencedFields, &options); zephir_check_call_status(); @@ -10946,19 +10536,12 @@ PHP_METHOD(Phalcon_Mvc_Model, keepSnapshots) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(keepSnapshot) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &keepSnapshot_param); - keepSnapshot = zephir_get_boolval(keepSnapshot_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("modelsManager"), PH_NOISY_CC | PH_READONLY); if (keepSnapshot) { ZVAL_BOOL(&_1, 1); @@ -10983,15 +10566,11 @@ PHP_METHOD(Phalcon_Mvc_Model, setSchema) ZVAL_UNDEF(&schema); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(schema) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &schema_param); if (UNEXPECTED(Z_TYPE_P(schema_param) != IS_STRING && Z_TYPE_P(schema_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'schema' must be of the type string")); @@ -11002,8 +10581,6 @@ PHP_METHOD(Phalcon_Mvc_Model, setSchema) } else { ZEPHIR_INIT_VAR(&schema); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("modelsManager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(NULL, &_0, "setmodelschema", NULL, 0, this_ptr, &schema); zephir_check_call_status(); @@ -11023,15 +10600,11 @@ PHP_METHOD(Phalcon_Mvc_Model, setSource) ZVAL_UNDEF(&source); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(source) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &source_param); if (UNEXPECTED(Z_TYPE_P(source_param) != IS_STRING && Z_TYPE_P(source_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'source' must be of the type string")); @@ -11042,8 +10615,6 @@ PHP_METHOD(Phalcon_Mvc_Model, setSource) } else { ZEPHIR_INIT_VAR(&source); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("modelsManager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(NULL, &_0, "setmodelsource", NULL, 0, this_ptr, &source); zephir_check_call_status(); @@ -11077,19 +10648,13 @@ PHP_METHOD(Phalcon_Mvc_Model, skipAttributes) zval *this_ptr = getThis(); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &attributes_param); ZEPHIR_OBS_COPY_OR_DUP(&attributes, attributes_param); - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "skipattributesoncreate", NULL, 0, &attributes); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, this_ptr, "skipattributesonupdate", NULL, 0, &attributes); @@ -11129,22 +10694,16 @@ PHP_METHOD(Phalcon_Mvc_Model, skipAttributesOnCreate) ZVAL_UNDEF(&attribute); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &attributes_param); ZEPHIR_OBS_COPY_OR_DUP(&attributes, attributes_param); - - ZEPHIR_INIT_VAR(&keysAttributes); array_init(&keysAttributes); - zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 5804); + zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 5811); if (Z_TYPE_P(&attributes) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&attributes), _0) { @@ -11208,22 +10767,16 @@ PHP_METHOD(Phalcon_Mvc_Model, skipAttributesOnUpdate) ZVAL_UNDEF(&attribute); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &attributes_param); ZEPHIR_OBS_COPY_OR_DUP(&attributes, attributes_param); - - ZEPHIR_INIT_VAR(&keysAttributes); array_init(&keysAttributes); - zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 5839); + zephir_is_iterable(&attributes, 0, "phalcon/Mvc/Model.zep", 5846); if (Z_TYPE_P(&attributes) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&attributes), _0) { @@ -11280,19 +10833,12 @@ PHP_METHOD(Phalcon_Mvc_Model, useDynamicUpdate) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(dynamicUpdate) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &dynamicUpdate_param); - dynamicUpdate = zephir_get_boolval(dynamicUpdate_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("modelsManager"), PH_NOISY_CC | PH_READONLY); if (dynamicUpdate) { ZVAL_BOOL(&_1, 1); @@ -11354,18 +10900,12 @@ PHP_METHOD(Phalcon_Mvc_Model, validate) ZVAL_UNDEF(&_5$$4); ZVAL_UNDEF(&_6$$4); ZVAL_UNDEF(&_7$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(validator, phalcon_filter_validation_validationinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &validator); - - ZVAL_NULL(&_0); ZEPHIR_CALL_METHOD(&messages, validator, "validate", NULL, 0, &_0, this_ptr); zephir_check_call_status(); @@ -11436,9 +10976,6 @@ PHP_METHOD(Phalcon_Mvc_Model, validationHasFailed) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - zephir_read_property(&_0, this_ptr, ZEND_STRL("errorMessages"), PH_NOISY_CC | PH_READONLY); RETURN_BOOL(zephir_fast_count_int(&_0) > 0); } @@ -11451,7 +10988,6 @@ PHP_METHOD(Phalcon_Mvc_Model, caseInsensitiveColumnMap) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *columnMap, columnMap_sub, *key, key_sub, cmKey, _0, *_1, _2, _3$$3, _4$$3, _5$$5, _6$$5; - zval *this_ptr = getThis(); ZVAL_UNDEF(&columnMap_sub); ZVAL_UNDEF(&key_sub); @@ -11462,22 +10998,16 @@ PHP_METHOD(Phalcon_Mvc_Model, caseInsensitiveColumnMap) ZVAL_UNDEF(&_4$$3); ZVAL_UNDEF(&_5$$5); ZVAL_UNDEF(&_6$$5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ZVAL(columnMap) Z_PARAM_ZVAL(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &columnMap, &key); - - ZEPHIR_INIT_VAR(&_0); zephir_array_keys(&_0, columnMap); - zephir_is_iterable(&_0, 0, "phalcon/Mvc/Model.zep", 5976); + zephir_is_iterable(&_0, 0, "phalcon/Mvc/Model.zep", 5983); if (Z_TYPE_P(&_0) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_0), _1) { @@ -11536,22 +11066,16 @@ PHP_METHOD(Phalcon_Mvc_Model, appendMessagesFrom) ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$5); ZVAL_UNDEF(&_4$$7); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(model) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &model); - - ZEPHIR_CALL_METHOD(&messages, model, "getmessages", NULL, 0); zephir_check_call_status(); if (0 == ZEPHIR_IS_EMPTY(&messages)) { - zephir_is_iterable(&messages, 0, "phalcon/Mvc/Model.zep", 6000); + zephir_is_iterable(&messages, 0, "phalcon/Mvc/Model.zep", 6007); if (Z_TYPE_P(&messages) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&messages), _0$$3) { @@ -11616,7 +11140,8 @@ zend_object *zephir_init_properties_Phalcon_Mvc_Model(zend_class_entry *class_ty ZVAL_UNDEF(&_13$$9); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/mvc/model.zep.h b/ext/phalcon/mvc/model.zep.h index f787d12b09c..32a9003f71c 100644 --- a/ext/phalcon/mvc/model.zep.h +++ b/ext/phalcon/mvc/model.zep.h @@ -161,11 +161,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_assign, 0, 1, P ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_average, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, parameters, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, parameters, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, parameters, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_cloneresult, 0, 2, Phalcon\\Mvc\\ModelInterface, 0) @@ -323,15 +319,9 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_serialize, 0, 0, IS_STRING, 0) ZEND_END_ARG_INFO() -#if PHP_VERSION_ID >= 80000 -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_unserialize, 0, 1, IS_VOID, 0) - ZEND_ARG_TYPE_INFO(0, serialized, IS_STRING, 0) -ZEND_END_ARG_INFO() -#else -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_unserialize, 0, 1, IS_VOID, 0) - ZEND_ARG_INFO(0, serialized) +ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_unserialize, 0, 0, 1) + ZEND_ARG_INFO(0, data) ZEND_END_ARG_INFO() -#endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_setconnectionservice, 0, 1, IS_VOID, 0) @@ -485,11 +475,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_belongsto, 0, 3 ZEND_ARG_INFO(0, fields) ZEND_ARG_TYPE_INFO(0, referenceModel, IS_STRING, 0) ZEND_ARG_INFO(0, referencedFields) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_getpreparedquery, 0, 1, Phalcon\\Mvc\\Model\\QueryInterface, 0) @@ -501,11 +487,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_hasmany, 0, 3, ZEND_ARG_INFO(0, fields) ZEND_ARG_TYPE_INFO(0, referenceModel, IS_STRING, 0) ZEND_ARG_INFO(0, referencedFields) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_hasmanytomany, 0, 6, Phalcon\\Mvc\\Model\\Relation, 0) @@ -515,22 +497,14 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_hasmanytomany, ZEND_ARG_INFO(0, intermediateReferencedFields) ZEND_ARG_TYPE_INFO(0, referenceModel, IS_STRING, 0) ZEND_ARG_INFO(0, referencedFields) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_hasone, 0, 3, Phalcon\\Mvc\\Model\\Relation, 0) ZEND_ARG_INFO(0, fields) ZEND_ARG_TYPE_INFO(0, referenceModel, IS_STRING, 0) ZEND_ARG_INFO(0, referencedFields) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_hasonethrough, 0, 6, Phalcon\\Mvc\\Model\\Relation, 0) @@ -540,11 +514,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_hasonethrough, ZEND_ARG_INFO(0, intermediateReferencedFields) ZEND_ARG_TYPE_INFO(0, referenceModel, IS_STRING, 0) ZEND_ARG_INFO(0, referencedFields) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_keepsnapshots, 0, 1, IS_VOID, 0) @@ -686,11 +656,7 @@ ZEPHIR_INIT_FUNCS(phalcon_mvc_model_method_entry) { PHP_ME(Phalcon_Mvc_Model, postSave, arginfo_phalcon_mvc_model_postsave, ZEND_ACC_PROTECTED) PHP_ME(Phalcon_Mvc_Model, postSaveRelatedRecords, arginfo_phalcon_mvc_model_postsaverelatedrecords, ZEND_ACC_PROTECTED) PHP_ME(Phalcon_Mvc_Model, allowEmptyStringValues, arginfo_phalcon_mvc_model_allowemptystringvalues, ZEND_ACC_PROTECTED) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Mvc_Model, cancelOperation, arginfo_phalcon_mvc_model_canceloperation, ZEND_ACC_PROTECTED) -#else - PHP_ME(Phalcon_Mvc_Model, cancelOperation, NULL, ZEND_ACC_PROTECTED) -#endif +PHP_ME(Phalcon_Mvc_Model, cancelOperation, arginfo_phalcon_mvc_model_canceloperation, ZEND_ACC_PROTECTED) PHP_ME(Phalcon_Mvc_Model, belongsTo, arginfo_phalcon_mvc_model_belongsto, ZEND_ACC_PROTECTED) PHP_ME(Phalcon_Mvc_Model, getPreparedQuery, arginfo_phalcon_mvc_model_getpreparedquery, ZEND_ACC_PRIVATE|ZEND_ACC_STATIC) PHP_ME(Phalcon_Mvc_Model, hasMany, arginfo_phalcon_mvc_model_hasmany, ZEND_ACC_PROTECTED) diff --git a/ext/phalcon/mvc/model/behavior.zep.c b/ext/phalcon/mvc/model/behavior.zep.c index bbe42d548a1..8a3daf7fa45 100644 --- a/ext/phalcon/mvc/model/behavior.zep.c +++ b/ext/phalcon/mvc/model/behavior.zep.c @@ -56,16 +56,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Behavior, __construct) zval *this_ptr = getThis(); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -73,8 +69,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Behavior, __construct) } else { zephir_get_arrval(&options, options_param); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("options"), &options); ZEPHIR_MM_RESTORE(); } @@ -95,16 +89,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Behavior, getOptions) ZVAL_UNDEF(&options); ZVAL_UNDEF(&eventOptions); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(eventName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &eventName_param); if (!eventName_param) { ZEPHIR_INIT_VAR(&eventName); @@ -119,15 +110,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Behavior, getOptions) ZEPHIR_INIT_VAR(&eventName); } } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("options"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&options, &_0); if (!ZEPHIR_IS_NULL(&eventName)) { - if (!(zephir_array_isset_fetch(&eventOptions, &options, &eventName, 1))) { + zephir_memory_observe(&eventOptions); + if (!(zephir_array_isset_fetch(&eventOptions, &options, &eventName, 0))) { RETURN_MM_NULL(); } - RETURN_CTOR(&eventOptions); + RETURN_CCTOR(&eventOptions); } RETURN_CCTOR(&options); } @@ -141,23 +131,18 @@ PHP_METHOD(Phalcon_Mvc_Model_Behavior, missingMethod) zval arguments; zval method; zval *model, model_sub, *method_param = NULL, *arguments_param = NULL; - zval *this_ptr = getThis(); ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&method); ZVAL_UNDEF(&arguments); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) Z_PARAM_STR(method) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(arguments) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &model, &method_param, &arguments_param); zephir_get_strval(&method, method_param); if (!arguments_param) { @@ -166,8 +151,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Behavior, missingMethod) } else { zephir_get_arrval(&arguments, arguments_param); } - - RETURN_MM_NULL(); } @@ -183,15 +166,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Behavior, mustTakeAction) ZVAL_UNDEF(&eventName); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(eventName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &eventName_param); if (UNEXPECTED(Z_TYPE_P(eventName_param) != IS_STRING && Z_TYPE_P(eventName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'eventName' must be of the type string")); @@ -202,8 +181,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Behavior, mustTakeAction) } else { ZEPHIR_INIT_VAR(&eventName); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("options"), PH_NOISY_CC | PH_READONLY); RETURN_MM_BOOL(zephir_array_isset(&_0, &eventName)); } @@ -216,24 +193,17 @@ PHP_METHOD(Phalcon_Mvc_Model_Behavior, notify) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *type_param = NULL, *model, model_sub; zval type; - zval *this_ptr = getThis(); ZVAL_UNDEF(&type); ZVAL_UNDEF(&model_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(type) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &type_param, &model); zephir_get_strval(&type, type_param); - - RETURN_MM_NULL(); } diff --git a/ext/phalcon/mvc/model/behavior.zep.h b/ext/phalcon/mvc/model/behavior.zep.h index 4282863e8ed..5c475bab36f 100644 --- a/ext/phalcon/mvc/model/behavior.zep.h +++ b/ext/phalcon/mvc/model/behavior.zep.h @@ -10,11 +10,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Behavior, mustTakeAction); PHP_METHOD(Phalcon_Mvc_Model_Behavior, notify); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_behavior___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_behavior_getoptions, 0, 0, 0) @@ -24,11 +20,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_behavior_missingmethod, 0, 0, 2) ZEND_ARG_OBJ_INFO(0, model, Phalcon\\Mvc\\ModelInterface, 0) ZEND_ARG_TYPE_INFO(0, method, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, arguments, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, arguments, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, arguments, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_behavior_musttakeaction, 0, 1, _IS_BOOL, 0) diff --git a/ext/phalcon/mvc/model/behavior/softdelete.zep.c b/ext/phalcon/mvc/model/behavior/softdelete.zep.c index 9a030939c61..4fd8b45c51d 100644 --- a/ext/phalcon/mvc/model/behavior/softdelete.zep.c +++ b/ext/phalcon/mvc/model/behavior/softdelete.zep.c @@ -72,16 +72,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Behavior_SoftDelete, notify) ZVAL_UNDEF(&_5$$7); ZVAL_UNDEF(&_10$$10); ZVAL_UNDEF(&_11$$10); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(type) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &type_param, &model); if (UNEXPECTED(Z_TYPE_P(type_param) != IS_STRING && Z_TYPE_P(type_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'type' must be of the type string")); @@ -92,19 +88,17 @@ PHP_METHOD(Phalcon_Mvc_Model_Behavior_SoftDelete, notify) } else { ZEPHIR_INIT_VAR(&type); } - - if (!ZEPHIR_IS_STRING_IDENTICAL(&type, "beforeDelete")) { RETURN_MM_NULL(); } ZEPHIR_CALL_METHOD(&options, this_ptr, "getoptions", NULL, 0); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&value); + zephir_memory_observe(&value); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&value, &options, SL("value"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The option 'value' is required", "phalcon/Mvc/Model/Behavior/SoftDelete.zep", 42); return; } - ZEPHIR_OBS_VAR(&field); + zephir_memory_observe(&field); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&field, &options, SL("field"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The option 'field' is required", "phalcon/Mvc/Model/Behavior/SoftDelete.zep", 49); return; diff --git a/ext/phalcon/mvc/model/behavior/timestampable.zep.c b/ext/phalcon/mvc/model/behavior/timestampable.zep.c index 02254e12976..e2c6c754b57 100644 --- a/ext/phalcon/mvc/model/behavior/timestampable.zep.c +++ b/ext/phalcon/mvc/model/behavior/timestampable.zep.c @@ -64,16 +64,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Behavior_Timestampable, notify) ZVAL_UNDEF(&field); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2$$6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(type) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &type_param, &model); if (UNEXPECTED(Z_TYPE_P(type_param) != IS_STRING && Z_TYPE_P(type_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'type' must be of the type string")); @@ -84,8 +80,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Behavior_Timestampable, notify) } else { ZEPHIR_INIT_VAR(&type); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "musttakeaction", NULL, 0, &type); zephir_check_call_status(); if (!ZEPHIR_IS_TRUE_IDENTICAL(&_0)) { @@ -96,12 +90,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Behavior_Timestampable, notify) if (Z_TYPE_P(&options) != IS_ARRAY) { RETURN_MM_NULL(); } - ZEPHIR_OBS_VAR(&field); + zephir_memory_observe(&field); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&field, &options, SL("field"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The option 'field' is required", "phalcon/Mvc/Model/Behavior/Timestampable.zep", 50); return; } - ZEPHIR_CALL_METHOD(×tamp, this_ptr, "gettimestamp", NULL, 434, &options); + ZEPHIR_CALL_METHOD(×tamp, this_ptr, "gettimestamp", NULL, 435, &options); zephir_check_call_status(); if (UNEXPECTED(Z_TYPE_P(&field) == IS_ARRAY)) { zephir_is_iterable(&field, 0, "phalcon/Mvc/Model/Behavior/Timestampable.zep", 63); @@ -145,31 +139,24 @@ PHP_METHOD(Phalcon_Mvc_Model_Behavior_Timestampable, getTimestamp) zend_long ZEPHIR_LAST_CALL_STATUS; zval *options_param = NULL, format, generator; zval options; - zval *this_ptr = getThis(); ZVAL_UNDEF(&options); ZVAL_UNDEF(&format); ZVAL_UNDEF(&generator); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &options_param); zephir_get_arrval(&options, options_param); - - - ZEPHIR_OBS_VAR(&format); + zephir_memory_observe(&format); if (zephir_array_isset_string_fetch(&format, &options, SL("format"), 0)) { - ZEPHIR_RETURN_CALL_FUNCTION("date", NULL, 435, &format); + ZEPHIR_RETURN_CALL_FUNCTION("date", NULL, 436, &format); zephir_check_call_status(); RETURN_MM(); } - ZEPHIR_OBS_VAR(&generator); + zephir_memory_observe(&generator); if (zephir_array_isset_string_fetch(&generator, &options, SL("generator"), 0)) { _0$$4 = Z_TYPE_P(&generator) == IS_OBJECT; if (_0$$4) { diff --git a/ext/phalcon/mvc/model/behaviorinterface.zep.h b/ext/phalcon/mvc/model/behaviorinterface.zep.h index ce5e38dc2bf..f87a869709e 100644 --- a/ext/phalcon/mvc/model/behaviorinterface.zep.h +++ b/ext/phalcon/mvc/model/behaviorinterface.zep.h @@ -6,11 +6,7 @@ ZEPHIR_INIT_CLASS(Phalcon_Mvc_Model_BehaviorInterface); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_behaviorinterface_missingmethod, 0, 0, 2) ZEND_ARG_OBJ_INFO(0, model, Phalcon\\Mvc\\ModelInterface, 0) ZEND_ARG_TYPE_INFO(0, method, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, arguments, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, arguments, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, arguments, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_behaviorinterface_notify, 0, 0, 2) diff --git a/ext/phalcon/mvc/model/binder.zep.c b/ext/phalcon/mvc/model/binder.zep.c index b85ed799b77..66e56edc1a0 100644 --- a/ext/phalcon/mvc/model/binder.zep.c +++ b/ext/phalcon/mvc/model/binder.zep.c @@ -80,22 +80,16 @@ PHP_METHOD(Phalcon_Mvc_Model_Binder, __construct) ZVAL_UNDEF(&cache_sub); ZVAL_NULL(&__$null); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_OBJECT_OF_CLASS_OR_NULL(cache, phalcon_cache_adapter_adapterinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(0, 1, &cache); if (!cache) { cache = &cache_sub; cache = &__$null; } - - zephir_update_property_zval(this_ptr, ZEND_STRL("cache"), cache); } @@ -127,7 +121,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Binder, bindToHandler) ZVAL_UNDEF(¶ms); ZVAL_UNDEF(&cacheKey); ZVAL_UNDEF(&methodName); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 4) Z_PARAM_OBJECT(handler) @@ -136,10 +129,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Binder, bindToHandler) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(methodName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 1, &handler, ¶ms_param, &cacheKey_param, &methodName_param); zephir_get_arrval(¶ms, params_param); zephir_get_strval(&cacheKey, cacheKey_param); @@ -156,8 +147,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Binder, bindToHandler) ZEPHIR_INIT_VAR(&methodName); } } - - ZEPHIR_INIT_VAR(&_0); array_init(&_0); zephir_update_property_zval(this_ptr, ZEND_STRL("originalValues"), &_0); @@ -240,24 +229,17 @@ PHP_METHOD(Phalcon_Mvc_Model_Binder, findBoundModel) zend_long ZEPHIR_LAST_CALL_STATUS; zval className; zval *paramValue, paramValue_sub, *className_param = NULL; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶mValue_sub); ZVAL_UNDEF(&className); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ZVAL(paramValue) Z_PARAM_STR(className) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, ¶mValue, &className_param); zephir_get_strval(&className, className_param); - - _0 = zephir_fetch_class(&className); ZEPHIR_RETURN_CALL_CE_STATIC(_0, "findfirst", NULL, 0, paramValue); zephir_check_call_status(); @@ -271,9 +253,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Binder, findBoundModel) */ PHP_METHOD(Phalcon_Mvc_Model_Binder, getBoundModels) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "boundModels"); } @@ -285,9 +264,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Binder, getBoundModels) */ PHP_METHOD(Phalcon_Mvc_Model_Binder, getOriginalValues) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "originalValues"); } @@ -297,9 +273,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Binder, getOriginalValues) */ PHP_METHOD(Phalcon_Mvc_Model_Binder, getCache) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "cache"); } @@ -322,20 +295,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Binder, getParamsFromCache) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(cacheKey) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &cacheKey_param); zephir_get_strval(&cacheKey, cacheKey_param); - - - ZEPHIR_OBS_VAR(&internalParams); + zephir_memory_observe(&internalParams); zephir_read_property(&_0, this_ptr, ZEND_STRL("internalCache"), PH_NOISY_CC | PH_READONLY); if (zephir_array_isset_fetch(&internalParams, &_0, &cacheKey, 0)) { RETURN_CCTOR(&internalParams); @@ -402,18 +369,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Binder, getParamsFromReflection) ZVAL_UNDEF(¶msCache); ZVAL_UNDEF(&cacheKey); ZVAL_UNDEF(&methodName); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(4, 4) Z_PARAM_OBJECT(handler) Z_PARAM_ARRAY(params) Z_PARAM_STR(cacheKey) Z_PARAM_STR(methodName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 4, 0, &handler, ¶ms_param, &cacheKey_param, &methodName_param); zephir_get_arrval(¶ms, params_param); zephir_get_strval(&cacheKey, cacheKey_param); @@ -426,8 +389,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Binder, getParamsFromReflection) } else { ZEPHIR_INIT_VAR(&methodName); } - - ZEPHIR_INIT_VAR(&realClasses); ZVAL_NULL(&realClasses); ZEPHIR_INIT_VAR(¶msCache); @@ -435,16 +396,16 @@ PHP_METHOD(Phalcon_Mvc_Model_Binder, getParamsFromReflection) ZEPHIR_INIT_VAR(&reflection); if (!ZEPHIR_IS_NULL(&methodName)) { object_init_ex(&reflection, zephir_get_internal_ce(SL("reflectionmethod"))); - ZEPHIR_CALL_METHOD(NULL, &reflection, "__construct", NULL, 436, handler, &methodName); + ZEPHIR_CALL_METHOD(NULL, &reflection, "__construct", NULL, 437, handler, &methodName); zephir_check_call_status(); } else { object_init_ex(&reflection, zephir_get_internal_ce(SL("reflectionfunction"))); - ZEPHIR_CALL_METHOD(NULL, &reflection, "__construct", NULL, 150, handler); + ZEPHIR_CALL_METHOD(NULL, &reflection, "__construct", NULL, 151, handler); zephir_check_call_status(); } zephir_read_property(&_0, this_ptr, ZEND_STRL("cache"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&cache, &_0); - ZEPHIR_CALL_METHOD(&methodParams, &reflection, "getparameters", NULL, 151); + ZEPHIR_CALL_METHOD(&methodParams, &reflection, "getparameters", NULL, 152); zephir_check_call_status(); ZEPHIR_INIT_VAR(¶msKeys); zephir_array_keys(¶msKeys, ¶ms); @@ -477,7 +438,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Binder, getParamsFromReflection) zephir_array_fetch(¶mValue, ¶ms, ¶mKey, PH_NOISY, "phalcon/Mvc/Model/Binder.zep", 199); ZEPHIR_INIT_NVAR(&_6$$5); ZVAL_STRING(&_6$$5, "Phalcon\\Mvc\\Model"); - ZEPHIR_CALL_FUNCTION(&_7$$5, "is_subclass_of", &_8, 437, &className, &_6$$5); + ZEPHIR_CALL_FUNCTION(&_7$$5, "is_subclass_of", &_8, 438, &className, &_6$$5); zephir_check_call_status(); if (ZEPHIR_IS_STRING(&className, "Phalcon\\Mvc\\Model")) { if (Z_TYPE_P(&realClasses) == IS_NULL) { @@ -502,7 +463,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Binder, getParamsFromReflection) object_init_ex(&_10$$14, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_NVAR(&_11$$14); ZEPHIR_CONCAT_SVS(&_11$$14, "You should provide model class name for ", ¶mKey, " parameter"); - ZEPHIR_CALL_METHOD(NULL, &_10$$14, "__construct", &_12, 32, &_11$$14); + ZEPHIR_CALL_METHOD(NULL, &_10$$14, "__construct", &_12, 33, &_11$$14); zephir_check_call_status(); zephir_throw_exception_debug(&_10$$14, "phalcon/Mvc/Model/Binder.zep", 219); ZEPHIR_MM_RESTORE(); @@ -559,7 +520,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Binder, getParamsFromReflection) zephir_array_fetch(¶mValue, ¶ms, ¶mKey, PH_NOISY, "phalcon/Mvc/Model/Binder.zep", 199); ZEPHIR_INIT_NVAR(&_15$$19); ZVAL_STRING(&_15$$19, "Phalcon\\Mvc\\Model"); - ZEPHIR_CALL_FUNCTION(&_16$$19, "is_subclass_of", &_8, 437, &className, &_15$$19); + ZEPHIR_CALL_FUNCTION(&_16$$19, "is_subclass_of", &_8, 438, &className, &_15$$19); zephir_check_call_status(); if (ZEPHIR_IS_STRING(&className, "Phalcon\\Mvc\\Model")) { if (Z_TYPE_P(&realClasses) == IS_NULL) { @@ -584,7 +545,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Binder, getParamsFromReflection) object_init_ex(&_18$$28, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_NVAR(&_19$$28); ZEPHIR_CONCAT_SVS(&_19$$28, "You should provide model class name for ", ¶mKey, " parameter"); - ZEPHIR_CALL_METHOD(NULL, &_18$$28, "__construct", &_12, 32, &_19$$28); + ZEPHIR_CALL_METHOD(NULL, &_18$$28, "__construct", &_12, 33, &_19$$28); zephir_check_call_status(); zephir_throw_exception_debug(&_18$$28, "phalcon/Mvc/Model/Binder.zep", 219); ZEPHIR_MM_RESTORE(); @@ -633,17 +594,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Binder, setCache) zval *this_ptr = getThis(); ZVAL_UNDEF(&cache_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(cache, phalcon_cache_adapter_adapterinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &cache); - - zephir_update_property_zval(this_ptr, ZEND_STRL("cache"), cache); RETURN_THISW(); } @@ -660,7 +614,8 @@ zend_object *zephir_init_properties_Phalcon_Mvc_Model_Binder(zend_class_entry *c ZVAL_UNDEF(&_5$$5); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/mvc/model/criteria.zep.c b/ext/phalcon/mvc/model/criteria.zep.c index 71f5634eb36..000f0eb8a3a 100644 --- a/ext/phalcon/mvc/model/criteria.zep.c +++ b/ext/phalcon/mvc/model/criteria.zep.c @@ -97,7 +97,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, andWhere) ZVAL_UNDEF(¤tConditions); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(conditions) @@ -105,10 +104,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, andWhere) Z_PARAM_ZVAL_OR_NULL(bindParams) Z_PARAM_ZVAL_OR_NULL(bindTypes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &conditions_param, &bindParams, &bindTypes); if (UNEXPECTED(Z_TYPE_P(conditions_param) != IS_STRING && Z_TYPE_P(conditions_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'conditions' must be of the type string")); @@ -127,9 +124,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, andWhere) bindTypes = &bindTypes_sub; bindTypes = &__$null; } - - - ZEPHIR_OBS_VAR(¤tConditions); + zephir_memory_observe(¤tConditions); zephir_read_property(&_0, this_ptr, ZEND_STRL("params"), PH_NOISY_CC | PH_READONLY); if (zephir_array_isset_string_fetch(¤tConditions, &_0, SL("conditions"), 0)) { ZEPHIR_INIT_VAR(&_1$$3); @@ -166,17 +161,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, betweenWhere) ZVAL_UNDEF(&maximumKey); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(expr) Z_PARAM_ZVAL(minimum) Z_PARAM_ZVAL(maximum) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &expr_param, &minimum, &maximum); if (UNEXPECTED(Z_TYPE_P(expr_param) != IS_STRING && Z_TYPE_P(expr_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'expr' must be of the type string")); @@ -187,9 +178,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, betweenWhere) } else { ZEPHIR_INIT_VAR(&expr); } - - - ZEPHIR_OBS_VAR(&hiddenParam); + zephir_memory_observe(&hiddenParam); zephir_read_property(&hiddenParam, this_ptr, ZEND_STRL("hiddenParamNumber"), PH_NOISY_CC); ZEPHIR_INIT_VAR(&nextHiddenParam); ZVAL_LONG(&nextHiddenParam, (zephir_get_numberval(&hiddenParam) + 1)); @@ -205,7 +194,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, betweenWhere) zephir_array_update_zval(&_1, &maximumKey, maximum, PH_COPY); ZEPHIR_CALL_METHOD(NULL, this_ptr, "andwhere", NULL, 0, &_0, &_1); zephir_check_call_status(); - ZEPHIR_SEPARATE(&nextHiddenParam); + SEPARATE_ZVAL(&nextHiddenParam); zephir_increment(&nextHiddenParam); zephir_update_property_zval(this_ptr, ZEND_STRL("hiddenParamNumber"), &nextHiddenParam); RETURN_THIS(); @@ -234,26 +223,19 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, bind) ZVAL_UNDEF(&_8$$4); ZVAL_UNDEF(&_9$$4); ZVAL_UNDEF(&_10$$5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(bindParams) Z_PARAM_OPTIONAL Z_PARAM_BOOL(merge) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &bindParams_param, &merge_param); ZEPHIR_OBS_COPY_OR_DUP(&bindParams, bindParams_param); if (!merge_param) { merge = 0; } else { - merge = zephir_get_boolval(merge_param); - } - - + } zephir_read_property(&_0, this_ptr, ZEND_STRL("params"), PH_NOISY_CC | PH_READONLY); if (!(zephir_array_isset_string(&_0, SL("bind")))) { ZEPHIR_INIT_VAR(&_1$$3); @@ -263,7 +245,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, bind) zephir_update_property_array(this_ptr, SL("params"), &_2$$3, &_1$$3); } zephir_read_property(&_3, this_ptr, ZEND_STRL("params"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_OBS_VAR(&_4); + zephir_memory_observe(&_4); zephir_array_fetch_string(&_4, &_3, SL("bind"), PH_NOISY, "phalcon/Mvc/Model/Criteria.zep", 129); _5 = Z_TYPE_P(&_4) == IS_ARRAY; if (_5) { @@ -298,19 +280,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, bindTypes) ZVAL_UNDEF(&bindTypes); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(bindTypes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &bindTypes_param); ZEPHIR_OBS_COPY_OR_DUP(&bindTypes, bindTypes_param); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "bindTypes"); zephir_update_property_array(this_ptr, SL("params"), &_0, &bindTypes); @@ -330,19 +306,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, cache) ZVAL_UNDEF(&cache); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(cache) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &cache_param); ZEPHIR_OBS_COPY_OR_DUP(&cache, cache_param); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "cache"); zephir_update_property_array(this_ptr, SL("params"), &_0, &cache); @@ -371,18 +341,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, columns) ZVAL_UNDEF(&columns_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(columns) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &columns); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "columns"); zephir_update_property_array(this_ptr, SL("params"), &_0, columns); @@ -401,15 +365,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, conditions) ZVAL_UNDEF(&conditions); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(conditions) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &conditions_param); if (UNEXPECTED(Z_TYPE_P(conditions_param) != IS_STRING && Z_TYPE_P(conditions_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'conditions' must be of the type string")); @@ -420,8 +380,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, conditions) } else { ZEPHIR_INIT_VAR(&conditions); } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "conditions"); zephir_update_property_array(this_ptr, SL("params"), &_0, &conditions); @@ -440,41 +398,39 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, conditions) */ PHP_METHOD(Phalcon_Mvc_Model_Criteria, createBuilder) { - zval container, manager, builder, _1, _2, _3, _4; + zval container, manager, builder, _0, _1, _2, _3; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zephir_fcall_cache_entry *_0 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *this_ptr = getThis(); ZVAL_UNDEF(&container); ZVAL_UNDEF(&manager); ZVAL_UNDEF(&builder); + ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); - ZVAL_UNDEF(&_4); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&container, this_ptr, "getdi", NULL, 0); zephir_check_call_status(); if (Z_TYPE_P(&container) != IS_OBJECT) { - ZEPHIR_CALL_CE_STATIC(&container, phalcon_di_di_ce, "getdefault", &_0, 0); + ZEPHIR_CALL_CE_STATIC(&container, phalcon_di_di_ce, "getdefault", NULL, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, this_ptr, "setdi", NULL, 0, &container); zephir_check_call_status(); } - ZEPHIR_INIT_VAR(&_2); - ZVAL_STRING(&_2, "modelsManager"); - ZEPHIR_CALL_METHOD(&_1, &container, "getshared", NULL, 0, &_2); + ZEPHIR_INIT_VAR(&_1); + ZVAL_STRING(&_1, "modelsManager"); + ZEPHIR_CALL_METHOD(&_0, &container, "getshared", NULL, 0, &_1); zephir_check_call_status(); - ZEPHIR_CPY_WRT(&manager, &_1); - zephir_read_property(&_3, this_ptr, ZEND_STRL("params"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_METHOD(&builder, &manager, "createbuilder", NULL, 0, &_3); + ZEPHIR_CPY_WRT(&manager, &_0); + zephir_read_property(&_2, this_ptr, ZEND_STRL("params"), PH_NOISY_CC | PH_READONLY); + ZEPHIR_CALL_METHOD(&builder, &manager, "createbuilder", NULL, 0, &_2); zephir_check_call_status(); - zephir_read_property(&_4, this_ptr, ZEND_STRL("model"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_METHOD(NULL, &builder, "from", NULL, 0, &_4); + zephir_read_property(&_3, this_ptr, ZEND_STRL("model"), PH_NOISY_CC | PH_READONLY); + ZEPHIR_CALL_METHOD(NULL, &builder, "from", NULL, 0, &_3); zephir_check_call_status(); RETURN_CCTOR(&builder); } @@ -490,18 +446,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, distinct) ZVAL_UNDEF(&distinct_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(distinct) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &distinct); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "distinct"); zephir_update_property_array(this_ptr, SL("params"), &_0, distinct); @@ -521,9 +471,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, execute) ZVAL_UNDEF(&model); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&model, this_ptr, "getmodelname", NULL, 0); zephir_check_call_status(); @@ -551,24 +500,17 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, forUpdate) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_BOOL(forUpdate) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &forUpdate_param); if (!forUpdate_param) { forUpdate = 1; } else { - forUpdate = zephir_get_boolval(forUpdate_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "for_update"); ZEPHIR_INIT_VAR(&_1); @@ -590,7 +532,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, fromInput) zval data, conditions, bind, _1$$3; zval modelName, operator, _17$$16; zval *container, container_sub, *modelName_param = NULL, *data_param = NULL, *operator_param = NULL, __$null, attribute, field, value, type, metaData, model, dataTypes, criteria, columnMap, _0$$3, *_2$$3, _3$$3, _8$$9, _9$$9, _10$$8, _13$$15, _14$$15, _15$$14, _16$$16; - zval *this_ptr = getThis(); ZVAL_UNDEF(&container_sub); ZVAL_NULL(&__$null); @@ -619,8 +560,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, fromInput) ZVAL_UNDEF(&conditions); ZVAL_UNDEF(&bind); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 4) Z_PARAM_OBJECT_OF_CLASS(container, phalcon_di_diinterface_ce) Z_PARAM_STR(modelName) @@ -628,10 +567,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, fromInput) Z_PARAM_OPTIONAL Z_PARAM_STR(operator) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 1, &container, &modelName_param, &data_param, &operator_param); if (UNEXPECTED(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'modelName' must be of the type string")); @@ -657,8 +594,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, fromInput) ZEPHIR_INIT_VAR(&operator); } } - - ZEPHIR_INIT_VAR(&conditions); array_init(&conditions); if (zephir_fast_count_int(&data)) { @@ -783,19 +718,19 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, fromInput) zephir_check_call_status(); } - ZEPHIR_CALL_METHOD(NULL, &criteria, "setdi", NULL, 428, container); + ZEPHIR_CALL_METHOD(NULL, &criteria, "setdi", NULL, 429, container); zephir_check_call_status(); if (zephir_fast_count_int(&conditions)) { ZEPHIR_INIT_VAR(&_16$$16); ZEPHIR_INIT_VAR(&_17$$16); ZEPHIR_CONCAT_SVS(&_17$$16, " ", &operator, " "); zephir_fast_join(&_16$$16, &_17$$16, &conditions); - ZEPHIR_CALL_METHOD(NULL, &criteria, "where", NULL, 438, &_16$$16); + ZEPHIR_CALL_METHOD(NULL, &criteria, "where", NULL, 439, &_16$$16); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &criteria, "bind", NULL, 439, &bind); + ZEPHIR_CALL_METHOD(NULL, &criteria, "bind", NULL, 440, &bind); zephir_check_call_status(); } - ZEPHIR_CALL_METHOD(NULL, &criteria, "setmodelname", NULL, 429, &modelName); + ZEPHIR_CALL_METHOD(NULL, &criteria, "setmodelname", NULL, 430, &modelName); zephir_check_call_status(); RETURN_CCTOR(&criteria); } @@ -806,18 +741,20 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, fromInput) PHP_METHOD(Phalcon_Mvc_Model_Criteria, getColumns) { zval columns, _0; + zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *this_ptr = getThis(); ZVAL_UNDEF(&columns); ZVAL_UNDEF(&_0); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - + zephir_memory_observe(&columns); zephir_read_property(&_0, this_ptr, ZEND_STRL("params"), PH_NOISY_CC | PH_READONLY); - if (!(zephir_array_isset_string_fetch(&columns, &_0, SL("columns"), 1))) { - RETURN_NULL(); + if (!(zephir_array_isset_string_fetch(&columns, &_0, SL("columns"), 0))) { + RETURN_MM_NULL(); } - RETURN_CTORW(&columns); + RETURN_CCTOR(&columns); } /** @@ -826,18 +763,20 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, getColumns) PHP_METHOD(Phalcon_Mvc_Model_Criteria, getConditions) { zval conditions, _0; + zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *this_ptr = getThis(); ZVAL_UNDEF(&conditions); ZVAL_UNDEF(&_0); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - + zephir_memory_observe(&conditions); zephir_read_property(&_0, this_ptr, ZEND_STRL("params"), PH_NOISY_CC | PH_READONLY); - if (!(zephir_array_isset_string_fetch(&conditions, &_0, SL("conditions"), 1))) { - RETURN_NULL(); + if (!(zephir_array_isset_string_fetch(&conditions, &_0, SL("conditions"), 0))) { + RETURN_MM_NULL(); } - RETURN_CTORW(&conditions); + RETURN_CCTOR(&conditions); } /** @@ -850,9 +789,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, getDI) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - zephir_read_property(&_0, this_ptr, ZEND_STRL("params"), PH_NOISY_CC | PH_READONLY); zephir_array_fetch_string(&_1, &_0, SL("di"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Criteria.zep", 379); RETURN_CTORW(&_1); @@ -864,18 +800,20 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, getDI) PHP_METHOD(Phalcon_Mvc_Model_Criteria, getGroupBy) { zval group, _0; + zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *this_ptr = getThis(); ZVAL_UNDEF(&group); ZVAL_UNDEF(&_0); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - + zephir_memory_observe(&group); zephir_read_property(&_0, this_ptr, ZEND_STRL("params"), PH_NOISY_CC | PH_READONLY); - if (!(zephir_array_isset_string_fetch(&group, &_0, SL("group"), 1))) { - RETURN_NULL(); + if (!(zephir_array_isset_string_fetch(&group, &_0, SL("group"), 0))) { + RETURN_MM_NULL(); } - RETURN_CTORW(&group); + RETURN_CCTOR(&group); } /** @@ -884,18 +822,20 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, getGroupBy) PHP_METHOD(Phalcon_Mvc_Model_Criteria, getHaving) { zval having, _0; + zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *this_ptr = getThis(); ZVAL_UNDEF(&having); ZVAL_UNDEF(&_0); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - + zephir_memory_observe(&having); zephir_read_property(&_0, this_ptr, ZEND_STRL("params"), PH_NOISY_CC | PH_READONLY); - if (!(zephir_array_isset_string_fetch(&having, &_0, SL("having"), 1))) { - RETURN_NULL(); + if (!(zephir_array_isset_string_fetch(&having, &_0, SL("having"), 0))) { + RETURN_MM_NULL(); } - RETURN_CTORW(&having); + RETURN_CCTOR(&having); } /** @@ -908,18 +848,20 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, getHaving) PHP_METHOD(Phalcon_Mvc_Model_Criteria, getLimit) { zval limit, _0; + zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *this_ptr = getThis(); ZVAL_UNDEF(&limit); ZVAL_UNDEF(&_0); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - + zephir_memory_observe(&limit); zephir_read_property(&_0, this_ptr, ZEND_STRL("params"), PH_NOISY_CC | PH_READONLY); - if (!(zephir_array_isset_string_fetch(&limit, &_0, SL("limit"), 1))) { - RETURN_NULL(); + if (!(zephir_array_isset_string_fetch(&limit, &_0, SL("limit"), 0))) { + RETURN_MM_NULL(); } - RETURN_CTORW(&limit); + RETURN_CCTOR(&limit); } /** @@ -927,9 +869,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, getLimit) */ PHP_METHOD(Phalcon_Mvc_Model_Criteria, getModelName) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "model"); } @@ -940,18 +879,20 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, getModelName) PHP_METHOD(Phalcon_Mvc_Model_Criteria, getOrderBy) { zval order, _0; + zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *this_ptr = getThis(); ZVAL_UNDEF(&order); ZVAL_UNDEF(&_0); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - + zephir_memory_observe(&order); zephir_read_property(&_0, this_ptr, ZEND_STRL("params"), PH_NOISY_CC | PH_READONLY); - if (!(zephir_array_isset_string_fetch(&order, &_0, SL("order"), 1))) { - RETURN_NULL(); + if (!(zephir_array_isset_string_fetch(&order, &_0, SL("order"), 0))) { + RETURN_MM_NULL(); } - RETURN_CTORW(&order); + RETURN_CCTOR(&order); } /** @@ -959,9 +900,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, getOrderBy) */ PHP_METHOD(Phalcon_Mvc_Model_Criteria, getParams) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "params"); } @@ -972,18 +910,20 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, getParams) PHP_METHOD(Phalcon_Mvc_Model_Criteria, getWhere) { zval conditions, _0; + zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *this_ptr = getThis(); ZVAL_UNDEF(&conditions); ZVAL_UNDEF(&_0); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - + zephir_memory_observe(&conditions); zephir_read_property(&_0, this_ptr, ZEND_STRL("params"), PH_NOISY_CC | PH_READONLY); - if (!(zephir_array_isset_string_fetch(&conditions, &_0, SL("conditions"), 1))) { - RETURN_NULL(); + if (!(zephir_array_isset_string_fetch(&conditions, &_0, SL("conditions"), 0))) { + RETURN_MM_NULL(); } - RETURN_CTORW(&conditions); + RETURN_CCTOR(&conditions); } /** @@ -997,18 +937,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, groupBy) ZVAL_UNDEF(&group_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(group) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &group); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "group"); zephir_update_property_array(this_ptr, SL("params"), &_0, group); @@ -1026,18 +960,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, having) ZVAL_UNDEF(&having_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(having) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &having); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "having"); zephir_update_property_array(this_ptr, SL("params"), &_0, having); @@ -1077,7 +1005,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, innerJoin) ZVAL_UNDEF(&alias_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(model) @@ -1085,10 +1012,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, innerJoin) Z_PARAM_ZVAL_OR_NULL(conditions) Z_PARAM_ZVAL_OR_NULL(alias) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &model_param, &conditions, &alias); if (UNEXPECTED(Z_TYPE_P(model_param) != IS_STRING && Z_TYPE_P(model_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'model' must be of the type string")); @@ -1107,8 +1032,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, innerJoin) alias = &alias_sub; alias = &__$null; } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "INNER"); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "join", NULL, 0, &model, conditions, alias, &_0); @@ -1146,16 +1069,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, inWhere) ZVAL_UNDEF(&values); ZVAL_UNDEF(&bindParams); ZVAL_UNDEF(&bindKeys); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(expr) Z_PARAM_ARRAY(values) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &expr_param, &values_param); if (UNEXPECTED(Z_TYPE_P(expr_param) != IS_STRING && Z_TYPE_P(expr_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'expr' must be of the type string")); @@ -1167,8 +1086,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, inWhere) ZEPHIR_INIT_VAR(&expr); } ZEPHIR_OBS_COPY_OR_DUP(&values, values_param); - - if (!(zephir_fast_count_int(&values))) { ZEPHIR_INIT_VAR(&_0$$3); ZEPHIR_CONCAT_VSV(&_0$$3, &expr, " != ", &expr); @@ -1176,7 +1093,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, inWhere) zephir_check_call_status(); RETURN_THIS(); } - ZEPHIR_OBS_VAR(&hiddenParam); + zephir_memory_observe(&hiddenParam); zephir_read_property(&hiddenParam, this_ptr, ZEND_STRL("hiddenParamNumber"), PH_NOISY_CC); ZEPHIR_INIT_VAR(&bindParams); array_init(&bindParams); @@ -1195,7 +1112,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, inWhere) ZEPHIR_CONCAT_SVS(&queryKey, ":", &key, ":"); zephir_array_append(&bindKeys, &queryKey, PH_SEPARATE, "phalcon/Mvc/Model/Criteria.zep", 549); zephir_array_update_zval(&bindParams, &key, &value, PH_COPY | PH_SEPARATE); - ZEPHIR_SEPARATE(&hiddenParam); + SEPARATE_ZVAL(&hiddenParam); zephir_increment(&hiddenParam); } ZEND_HASH_FOREACH_END(); } else { @@ -1216,7 +1133,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, inWhere) ZEPHIR_CONCAT_SVS(&queryKey, ":", &key, ":"); zephir_array_append(&bindKeys, &queryKey, PH_SEPARATE, "phalcon/Mvc/Model/Criteria.zep", 549); zephir_array_update_zval(&bindParams, &key, &value, PH_COPY | PH_SEPARATE); - ZEPHIR_SEPARATE(&hiddenParam); + SEPARATE_ZVAL(&hiddenParam); zephir_increment(&hiddenParam); ZEPHIR_CALL_METHOD(NULL, &values, "next", NULL, 0); zephir_check_call_status(); @@ -1281,7 +1198,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, join) ZVAL_UNDEF(&_3$$6); ZVAL_UNDEF(&join); ZVAL_UNDEF(&_1$$4); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 4) Z_PARAM_STR(model) @@ -1290,10 +1206,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, join) Z_PARAM_ZVAL_OR_NULL(alias) Z_PARAM_ZVAL_OR_NULL(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 3, &model_param, &conditions, &alias, &type); if (UNEXPECTED(Z_TYPE_P(model_param) != IS_STRING && Z_TYPE_P(model_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'model' must be of the type string")); @@ -1316,15 +1230,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, join) type = &type_sub; type = &__$null; } - - ZEPHIR_INIT_VAR(&join); zephir_create_array(&join, 4, 0); zephir_array_fast_append(&join, &model); zephir_array_fast_append(&join, conditions); zephir_array_fast_append(&join, alias); zephir_array_fast_append(&join, type); - ZEPHIR_OBS_VAR(¤tJoins); + zephir_memory_observe(¤tJoins); zephir_read_property(&_0, this_ptr, ZEND_STRL("params"), PH_NOISY_CC | PH_READONLY); if (zephir_array_isset_string_fetch(¤tJoins, &_0, SL("joins"), 0)) { if (Z_TYPE_P(¤tJoins) == IS_ARRAY) { @@ -1375,7 +1287,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, leftJoin) ZVAL_UNDEF(&alias_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(model) @@ -1383,10 +1294,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, leftJoin) Z_PARAM_ZVAL_OR_NULL(conditions) Z_PARAM_ZVAL_OR_NULL(alias) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &model_param, &conditions, &alias); if (UNEXPECTED(Z_TYPE_P(model_param) != IS_STRING && Z_TYPE_P(model_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'model' must be of the type string")); @@ -1405,8 +1314,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, leftJoin) alias = &alias_sub; alias = &__$null; } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "LEFT"); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "join", NULL, 0, &model, conditions, alias, &_0); @@ -1438,32 +1345,24 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, limit) ZVAL_UNDEF(&_4$$4); ZVAL_UNDEF(&_6$$5); ZVAL_UNDEF(&_5$$5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_LONG(limit) Z_PARAM_OPTIONAL Z_PARAM_LONG(offset) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &limit_param, &offset_param); - limit = zephir_get_intval(limit_param); if (!offset_param) { offset = 0; } else { - offset = zephir_get_intval(offset_param); - } - - + } ZVAL_LONG(&_0, limit); - ZEPHIR_CALL_FUNCTION(&_1, "abs", NULL, 283, &_0); + ZEPHIR_CALL_FUNCTION(&_1, "abs", NULL, 284, &_0); zephir_check_call_status(); limit = zephir_get_numberval(&_1); ZVAL_LONG(&_0, offset); - ZEPHIR_CALL_FUNCTION(&_2, "abs", NULL, 283, &_0); + ZEPHIR_CALL_FUNCTION(&_2, "abs", NULL, 284, &_0); zephir_check_call_status(); offset = zephir_get_numberval(&_2); if (UNEXPECTED(limit == 0)) { @@ -1518,17 +1417,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, notBetweenWhere) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(expr) Z_PARAM_ZVAL(minimum) Z_PARAM_ZVAL(maximum) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &expr_param, &minimum, &maximum); if (UNEXPECTED(Z_TYPE_P(expr_param) != IS_STRING && Z_TYPE_P(expr_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'expr' must be of the type string")); @@ -1539,9 +1434,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, notBetweenWhere) } else { ZEPHIR_INIT_VAR(&expr); } - - - ZEPHIR_OBS_VAR(&hiddenParam); + zephir_memory_observe(&hiddenParam); zephir_read_property(&hiddenParam, this_ptr, ZEND_STRL("hiddenParamNumber"), PH_NOISY_CC); ZEPHIR_INIT_VAR(&nextHiddenParam); ZVAL_LONG(&nextHiddenParam, (zephir_get_numberval(&hiddenParam) + 1)); @@ -1559,7 +1452,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, notBetweenWhere) zephir_array_update_zval(&_3, &maximumKey, maximum, PH_COPY); ZEPHIR_CALL_METHOD(NULL, this_ptr, "andwhere", NULL, 0, &_2, &_3); zephir_check_call_status(); - ZEPHIR_SEPARATE(&nextHiddenParam); + SEPARATE_ZVAL(&nextHiddenParam); zephir_increment(&nextHiddenParam); zephir_update_property_zval(this_ptr, ZEND_STRL("hiddenParamNumber"), &nextHiddenParam); RETURN_THIS(); @@ -1595,16 +1488,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, notInWhere) ZVAL_UNDEF(&values); ZVAL_UNDEF(&bindParams); ZVAL_UNDEF(&bindKeys); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(expr) Z_PARAM_ARRAY(values) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &expr_param, &values_param); if (UNEXPECTED(Z_TYPE_P(expr_param) != IS_STRING && Z_TYPE_P(expr_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'expr' must be of the type string")); @@ -1616,9 +1505,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, notInWhere) ZEPHIR_INIT_VAR(&expr); } ZEPHIR_OBS_COPY_OR_DUP(&values, values_param); - - - ZEPHIR_OBS_VAR(&hiddenParam); + zephir_memory_observe(&hiddenParam); zephir_read_property(&hiddenParam, this_ptr, ZEND_STRL("hiddenParamNumber"), PH_NOISY_CC); ZEPHIR_INIT_VAR(&bindParams); array_init(&bindParams); @@ -1637,7 +1524,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, notInWhere) ZEPHIR_CONCAT_SVS(&_3$$3, ":", &key, ":"); zephir_array_append(&bindKeys, &_3$$3, PH_SEPARATE, "phalcon/Mvc/Model/Criteria.zep", 732); zephir_array_update_zval(&bindParams, &key, &value, PH_COPY | PH_SEPARATE); - ZEPHIR_SEPARATE(&hiddenParam); + SEPARATE_ZVAL(&hiddenParam); zephir_increment(&hiddenParam); } ZEND_HASH_FOREACH_END(); } else { @@ -1658,7 +1545,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, notInWhere) ZEPHIR_CONCAT_SVS(&_5$$4, ":", &key, ":"); zephir_array_append(&bindKeys, &_5$$4, PH_SEPARATE, "phalcon/Mvc/Model/Criteria.zep", 732); zephir_array_update_zval(&bindParams, &key, &value, PH_COPY | PH_SEPARATE); - ZEPHIR_SEPARATE(&hiddenParam); + SEPARATE_ZVAL(&hiddenParam); zephir_increment(&hiddenParam); ZEPHIR_CALL_METHOD(NULL, &values, "next", NULL, 0); zephir_check_call_status(); @@ -1687,15 +1574,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, orderBy) ZVAL_UNDEF(&orderColumns); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(orderColumns) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &orderColumns_param); if (UNEXPECTED(Z_TYPE_P(orderColumns_param) != IS_STRING && Z_TYPE_P(orderColumns_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'orderColumns' must be of the type string")); @@ -1706,8 +1589,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, orderBy) } else { ZEPHIR_INIT_VAR(&orderColumns); } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "order"); zephir_update_property_array(this_ptr, SL("params"), &_0, &orderColumns); @@ -1732,7 +1613,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, orWhere) ZVAL_UNDEF(¤tConditions); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(conditions) @@ -1740,10 +1620,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, orWhere) Z_PARAM_ZVAL_OR_NULL(bindParams) Z_PARAM_ZVAL_OR_NULL(bindTypes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &conditions_param, &bindParams, &bindTypes); if (UNEXPECTED(Z_TYPE_P(conditions_param) != IS_STRING && Z_TYPE_P(conditions_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'conditions' must be of the type string")); @@ -1762,9 +1640,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, orWhere) bindTypes = &bindTypes_sub; bindTypes = &__$null; } - - - ZEPHIR_OBS_VAR(¤tConditions); + zephir_memory_observe(¤tConditions); zephir_read_property(&_0, this_ptr, ZEND_STRL("params"), PH_NOISY_CC | PH_READONLY); if (zephir_array_isset_string_fetch(¤tConditions, &_0, SL("conditions"), 0)) { ZEPHIR_INIT_VAR(&_1$$3); @@ -1800,7 +1676,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, rightJoin) ZVAL_UNDEF(&alias_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(model) @@ -1808,10 +1683,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, rightJoin) Z_PARAM_ZVAL_OR_NULL(conditions) Z_PARAM_ZVAL_OR_NULL(alias) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &model_param, &conditions, &alias); if (UNEXPECTED(Z_TYPE_P(model_param) != IS_STRING && Z_TYPE_P(model_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'model' must be of the type string")); @@ -1830,8 +1703,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, rightJoin) alias = &alias_sub; alias = &__$null; } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "RIGHT"); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "join", NULL, 0, &model, conditions, alias, &_0); @@ -1850,18 +1721,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, setDI) ZVAL_UNDEF(&container_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(container, phalcon_di_diinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &container); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "di"); zephir_update_property_array(this_ptr, SL("params"), &_0, container); @@ -1879,15 +1744,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, setModelName) zval *this_ptr = getThis(); ZVAL_UNDEF(&modelName); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(modelName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &modelName_param); if (UNEXPECTED(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'modelName' must be of the type string")); @@ -1898,8 +1759,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, setModelName) } else { ZEPHIR_INIT_VAR(&modelName); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("model"), &modelName); RETURN_THIS(); } @@ -1916,24 +1775,17 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, sharedLock) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_BOOL(sharedLock) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &sharedLock_param); if (!sharedLock_param) { sharedLock = 1; } else { - sharedLock = zephir_get_boolval(sharedLock_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "shared_lock"); ZEPHIR_INIT_VAR(&_1); @@ -1967,7 +1819,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, where) ZVAL_UNDEF(&_6$$7); ZVAL_UNDEF(&_7$$7); ZVAL_UNDEF(&_8$$8); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(conditions) @@ -1975,10 +1826,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, where) Z_PARAM_ZVAL_OR_NULL(bindParams) Z_PARAM_ZVAL_OR_NULL(bindTypes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &conditions_param, &bindParams, &bindTypes); if (UNEXPECTED(Z_TYPE_P(conditions_param) != IS_STRING && Z_TYPE_P(conditions_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'conditions' must be of the type string")); @@ -1997,13 +1846,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, where) bindTypes = &bindTypes_sub; bindTypes = &__$null; } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "conditions"); zephir_update_property_array(this_ptr, SL("params"), &_0, &conditions); if (Z_TYPE_P(bindParams) == IS_ARRAY) { - ZEPHIR_OBS_VAR(¤tBindParams); + zephir_memory_observe(¤tBindParams); zephir_read_property(&_1$$3, this_ptr, ZEND_STRL("params"), PH_NOISY_CC | PH_READONLY); if (zephir_array_isset_string_fetch(¤tBindParams, &_1$$3, SL("bind"), 0)) { ZEPHIR_INIT_VAR(&_2$$4); @@ -2018,7 +1865,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, where) } } if (Z_TYPE_P(bindTypes) == IS_ARRAY) { - ZEPHIR_OBS_VAR(¤tBindTypes); + zephir_memory_observe(¤tBindTypes); zephir_read_property(&_5$$6, this_ptr, ZEND_STRL("params"), PH_NOISY_CC | PH_READONLY); if (zephir_array_isset_string_fetch(¤tBindTypes, &_5$$6, SL("bindTypes"), 0)) { ZEPHIR_INIT_VAR(&_6$$7); @@ -2043,7 +1890,8 @@ zend_object *zephir_init_properties_Phalcon_Mvc_Model_Criteria(zend_class_entry ZVAL_UNDEF(&_1$$3); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/mvc/model/criteria.zep.h b/ext/phalcon/mvc/model/criteria.zep.h index 38bc8978c82..58b5d93db40 100644 --- a/ext/phalcon/mvc/model/criteria.zep.h +++ b/ext/phalcon/mvc/model/criteria.zep.h @@ -226,28 +226,12 @@ ZEPHIR_INIT_FUNCS(phalcon_mvc_model_criteria_method_entry) { PHP_ME(Phalcon_Mvc_Model_Criteria, execute, arginfo_phalcon_mvc_model_criteria_execute, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Criteria, forUpdate, arginfo_phalcon_mvc_model_criteria_forupdate, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Criteria, fromInput, arginfo_phalcon_mvc_model_criteria_frominput, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Mvc_Model_Criteria, getColumns, arginfo_phalcon_mvc_model_criteria_getcolumns, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Mvc_Model_Criteria, getColumns, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Mvc_Model_Criteria, getColumns, arginfo_phalcon_mvc_model_criteria_getcolumns, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Criteria, getConditions, arginfo_phalcon_mvc_model_criteria_getconditions, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Criteria, getDI, arginfo_phalcon_mvc_model_criteria_getdi, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Mvc_Model_Criteria, getGroupBy, arginfo_phalcon_mvc_model_criteria_getgroupby, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Mvc_Model_Criteria, getGroupBy, NULL, ZEND_ACC_PUBLIC) -#endif -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Mvc_Model_Criteria, getHaving, arginfo_phalcon_mvc_model_criteria_gethaving, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Mvc_Model_Criteria, getHaving, NULL, ZEND_ACC_PUBLIC) -#endif -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Mvc_Model_Criteria, getLimit, arginfo_phalcon_mvc_model_criteria_getlimit, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Mvc_Model_Criteria, getLimit, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Mvc_Model_Criteria, getGroupBy, arginfo_phalcon_mvc_model_criteria_getgroupby, ZEND_ACC_PUBLIC) +PHP_ME(Phalcon_Mvc_Model_Criteria, getHaving, arginfo_phalcon_mvc_model_criteria_gethaving, ZEND_ACC_PUBLIC) +PHP_ME(Phalcon_Mvc_Model_Criteria, getLimit, arginfo_phalcon_mvc_model_criteria_getlimit, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Criteria, getModelName, arginfo_phalcon_mvc_model_criteria_getmodelname, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Criteria, getOrderBy, arginfo_phalcon_mvc_model_criteria_getorderby, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Criteria, getParams, arginfo_phalcon_mvc_model_criteria_getparams, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/mvc/model/manager.zep.c b/ext/phalcon/mvc/model/manager.zep.c index e37ee5c53be..bf7e48c0185 100644 --- a/ext/phalcon/mvc/model/manager.zep.c +++ b/ext/phalcon/mvc/model/manager.zep.c @@ -220,15 +220,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, __destruct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; - zval *this_ptr = getThis(); - - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); phalcon_orm_destroy_cache(); - ZEPHIR_CALL_CE_STATIC(NULL, phalcon_mvc_model_query_ce, "clean", &_0, 0); + ZEPHIR_CALL_CE_STATIC(NULL, phalcon_mvc_model_query_ce, "clean", NULL, 0); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -250,19 +246,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addBehavior) ZVAL_UNDEF(&entityName); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) Z_PARAM_OBJECT_OF_CLASS(behavior, phalcon_mvc_model_behaviorinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &model, &behavior); - - ZEPHIR_INIT_VAR(&entityName); zephir_get_class(&entityName, model, 1); zephir_read_property(&_0, this_ptr, ZEND_STRL("behaviors"), PH_NOISY_CC | PH_READONLY); @@ -312,8 +302,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addBelongsTo) ZVAL_UNDEF(&referencedModel); ZVAL_UNDEF(&keyRelation); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(4, 5) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) Z_PARAM_ZVAL(fields) @@ -322,10 +310,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addBelongsTo) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 4, 1, &model, &fields, &referencedModel_param, &referencedFields, &options_param); if (UNEXPECTED(Z_TYPE_P(referencedModel_param) != IS_STRING && Z_TYPE_P(referencedModel_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'referencedModel' must be of the type string")); @@ -342,8 +328,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addBelongsTo) } else { zephir_get_arrval(&options, options_param); } - - ZEPHIR_INIT_VAR(&entityName); zephir_get_class(&entityName, model, 1); ZEPHIR_INIT_VAR(&referencedEntity); @@ -351,7 +335,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addBelongsTo) ZEPHIR_INIT_VAR(&_0); ZEPHIR_CONCAT_VSV(&_0, &entityName, "$", &referencedEntity); zephir_get_strval(&keyRelation, &_0); - ZEPHIR_OBS_VAR(&relations); + zephir_memory_observe(&relations); zephir_read_property(&_1, this_ptr, ZEND_STRL("belongsTo"), PH_NOISY_CC | PH_READONLY); if (!(zephir_array_isset_fetch(&relations, &_1, &keyRelation, 0))) { ZEPHIR_INIT_NVAR(&relations); @@ -366,9 +350,9 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addBelongsTo) ZEPHIR_INIT_VAR(&relation); object_init_ex(&relation, phalcon_mvc_model_relation_ce); ZVAL_LONG(&_2, 0); - ZEPHIR_CALL_METHOD(NULL, &relation, "__construct", NULL, 440, &_2, &referencedModel, fields, referencedFields, &options); + ZEPHIR_CALL_METHOD(NULL, &relation, "__construct", NULL, 441, &_2, &referencedModel, fields, referencedFields, &options); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&alias); + zephir_memory_observe(&alias); if (zephir_array_isset_string_fetch(&alias, &options, SL("alias"), 0)) { if (UNEXPECTED(Z_TYPE_P(&alias) != IS_STRING)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Relation alias must be a string", "phalcon/Mvc/Model/Manager.zep", 316); @@ -384,7 +368,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addBelongsTo) ZEPHIR_CONCAT_VSV(&_3, &entityName, "$", &lowerAlias); zephir_update_property_array(this_ptr, SL("aliases"), &_3, &relation); zephir_update_property_array(this_ptr, SL("belongsTo"), &keyRelation, &relations); - ZEPHIR_OBS_VAR(&singleRelations); + zephir_memory_observe(&singleRelations); zephir_read_property(&_2, this_ptr, ZEND_STRL("belongsToSingle"), PH_NOISY_CC | PH_READONLY); if (!(zephir_array_isset_fetch(&singleRelations, &_2, &entityName, 0))) { ZEPHIR_INIT_NVAR(&singleRelations); @@ -432,8 +416,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addHasMany) ZVAL_UNDEF(&referencedModel); ZVAL_UNDEF(&keyRelation); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(4, 5) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) Z_PARAM_ZVAL(fields) @@ -442,10 +424,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addHasMany) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 4, 1, &model, &fields, &referencedModel_param, &referencedFields, &options_param); if (UNEXPECTED(Z_TYPE_P(referencedModel_param) != IS_STRING && Z_TYPE_P(referencedModel_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'referencedModel' must be of the type string")); @@ -462,8 +442,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addHasMany) } else { zephir_get_arrval(&options, options_param); } - - ZEPHIR_INIT_VAR(&entityName); zephir_get_class(&entityName, model, 1); ZEPHIR_INIT_VAR(&referencedEntity); @@ -473,7 +451,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addHasMany) zephir_get_strval(&keyRelation, &_0); zephir_read_property(&_1, this_ptr, ZEND_STRL("hasMany"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&hasMany, &_1); - ZEPHIR_OBS_VAR(&relations); + zephir_memory_observe(&relations); if (!(zephir_array_isset_fetch(&relations, &hasMany, &keyRelation, 0))) { ZEPHIR_INIT_NVAR(&relations); array_init(&relations); @@ -487,9 +465,9 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addHasMany) ZEPHIR_INIT_VAR(&relation); object_init_ex(&relation, phalcon_mvc_model_relation_ce); ZVAL_LONG(&_1, 2); - ZEPHIR_CALL_METHOD(NULL, &relation, "__construct", NULL, 440, &_1, &referencedModel, fields, referencedFields, &options); + ZEPHIR_CALL_METHOD(NULL, &relation, "__construct", NULL, 441, &_1, &referencedModel, fields, referencedFields, &options); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&alias); + zephir_memory_observe(&alias); if (zephir_array_isset_string_fetch(&alias, &options, SL("alias"), 0)) { if (UNEXPECTED(Z_TYPE_P(&alias) != IS_STRING)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Relation alias must be a string", "phalcon/Mvc/Model/Manager.zep", 412); @@ -505,7 +483,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addHasMany) ZEPHIR_CONCAT_VSV(&_2, &entityName, "$", &lowerAlias); zephir_update_property_array(this_ptr, SL("aliases"), &_2, &relation); zephir_update_property_array(this_ptr, SL("hasMany"), &keyRelation, &relations); - ZEPHIR_OBS_VAR(&singleRelations); + zephir_memory_observe(&singleRelations); zephir_read_property(&_1, this_ptr, ZEND_STRL("hasManySingle"), PH_NOISY_CC | PH_READONLY); if (!(zephir_array_isset_fetch(&singleRelations, &_1, &entityName, 0))) { ZEPHIR_INIT_NVAR(&singleRelations); @@ -560,8 +538,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addHasManyToMany) ZVAL_UNDEF(&referencedModel); ZVAL_UNDEF(&keyRelation); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(7, 8) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) Z_PARAM_ZVAL(fields) @@ -573,10 +549,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addHasManyToMany) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 7, 1, &model, &fields, &intermediateModel_param, &intermediateFields, &intermediateReferencedFields, &referencedModel_param, &referencedFields, &options_param); if (UNEXPECTED(Z_TYPE_P(intermediateModel_param) != IS_STRING && Z_TYPE_P(intermediateModel_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'intermediateModel' must be of the type string")); @@ -602,8 +576,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addHasManyToMany) } else { zephir_get_arrval(&options, options_param); } - - ZEPHIR_INIT_VAR(&entityName); zephir_get_class(&entityName, model, 1); ZEPHIR_INIT_VAR(&intermediateEntity); @@ -615,7 +587,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addHasManyToMany) zephir_get_strval(&keyRelation, &_0); zephir_read_property(&_1, this_ptr, ZEND_STRL("hasManyToMany"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&hasManyToMany, &_1); - ZEPHIR_OBS_VAR(&relations); + zephir_memory_observe(&relations); if (!(zephir_array_isset_fetch(&relations, &hasManyToMany, &keyRelation, 0))) { ZEPHIR_INIT_NVAR(&relations); array_init(&relations); @@ -635,11 +607,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addHasManyToMany) ZEPHIR_INIT_VAR(&relation); object_init_ex(&relation, phalcon_mvc_model_relation_ce); ZVAL_LONG(&_1, 4); - ZEPHIR_CALL_METHOD(NULL, &relation, "__construct", NULL, 440, &_1, &referencedModel, fields, referencedFields, &options); + ZEPHIR_CALL_METHOD(NULL, &relation, "__construct", NULL, 441, &_1, &referencedModel, fields, referencedFields, &options); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &relation, "setintermediaterelation", NULL, 441, intermediateFields, &intermediateModel, intermediateReferencedFields); + ZEPHIR_CALL_METHOD(NULL, &relation, "setintermediaterelation", NULL, 442, intermediateFields, &intermediateModel, intermediateReferencedFields); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&alias); + zephir_memory_observe(&alias); if (zephir_array_isset_string_fetch(&alias, &options, SL("alias"), 0)) { if (Z_TYPE_P(&alias) != IS_STRING) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Relation alias must be a string", "phalcon/Mvc/Model/Manager.zep", 537); @@ -655,7 +627,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addHasManyToMany) ZEPHIR_CONCAT_VSV(&_2, &entityName, "$", &lowerAlias); zephir_update_property_array(this_ptr, SL("aliases"), &_2, &relation); zephir_update_property_array(this_ptr, SL("hasManyToMany"), &keyRelation, &relations); - ZEPHIR_OBS_VAR(&singleRelations); + zephir_memory_observe(&singleRelations); zephir_read_property(&_1, this_ptr, ZEND_STRL("hasManyToManySingle"), PH_NOISY_CC | PH_READONLY); if (!(zephir_array_isset_fetch(&singleRelations, &_1, &entityName, 0))) { ZEPHIR_INIT_NVAR(&singleRelations); @@ -703,8 +675,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addHasOne) ZVAL_UNDEF(&referencedModel); ZVAL_UNDEF(&keyRelation); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(4, 5) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) Z_PARAM_ZVAL(fields) @@ -713,10 +683,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addHasOne) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 4, 1, &model, &fields, &referencedModel_param, &referencedFields, &options_param); if (UNEXPECTED(Z_TYPE_P(referencedModel_param) != IS_STRING && Z_TYPE_P(referencedModel_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'referencedModel' must be of the type string")); @@ -733,8 +701,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addHasOne) } else { zephir_get_arrval(&options, options_param); } - - ZEPHIR_INIT_VAR(&entityName); zephir_get_class(&entityName, model, 1); ZEPHIR_INIT_VAR(&referencedEntity); @@ -742,7 +708,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addHasOne) ZEPHIR_INIT_VAR(&_0); ZEPHIR_CONCAT_VSV(&_0, &entityName, "$", &referencedEntity); zephir_get_strval(&keyRelation, &_0); - ZEPHIR_OBS_VAR(&relations); + zephir_memory_observe(&relations); zephir_read_property(&_1, this_ptr, ZEND_STRL("hasOne"), PH_NOISY_CC | PH_READONLY); if (!(zephir_array_isset_fetch(&relations, &_1, &keyRelation, 0))) { ZEPHIR_INIT_NVAR(&relations); @@ -757,9 +723,9 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addHasOne) ZEPHIR_INIT_VAR(&relation); object_init_ex(&relation, phalcon_mvc_model_relation_ce); ZVAL_LONG(&_2, 1); - ZEPHIR_CALL_METHOD(NULL, &relation, "__construct", NULL, 440, &_2, &referencedModel, fields, referencedFields, &options); + ZEPHIR_CALL_METHOD(NULL, &relation, "__construct", NULL, 441, &_2, &referencedModel, fields, referencedFields, &options); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&alias); + zephir_memory_observe(&alias); if (zephir_array_isset_string_fetch(&alias, &options, SL("alias"), 0)) { if (UNEXPECTED(Z_TYPE_P(&alias) != IS_STRING)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Relation alias must be a string", "phalcon/Mvc/Model/Manager.zep", 638); @@ -775,7 +741,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addHasOne) ZEPHIR_CONCAT_VSV(&_3, &entityName, "$", &lowerAlias); zephir_update_property_array(this_ptr, SL("aliases"), &_3, &relation); zephir_update_property_array(this_ptr, SL("hasOne"), &keyRelation, &relations); - ZEPHIR_OBS_VAR(&singleRelations); + zephir_memory_observe(&singleRelations); zephir_read_property(&_2, this_ptr, ZEND_STRL("hasOneSingle"), PH_NOISY_CC | PH_READONLY); if (!(zephir_array_isset_fetch(&singleRelations, &_2, &entityName, 0))) { ZEPHIR_INIT_NVAR(&singleRelations); @@ -830,8 +796,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addHasOneThrough) ZVAL_UNDEF(&referencedModel); ZVAL_UNDEF(&keyRelation); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(7, 8) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) Z_PARAM_ZVAL(fields) @@ -843,10 +807,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addHasOneThrough) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 7, 1, &model, &fields, &intermediateModel_param, &intermediateFields, &intermediateReferencedFields, &referencedModel_param, &referencedFields, &options_param); if (UNEXPECTED(Z_TYPE_P(intermediateModel_param) != IS_STRING && Z_TYPE_P(intermediateModel_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'intermediateModel' must be of the type string")); @@ -872,8 +834,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addHasOneThrough) } else { zephir_get_arrval(&options, options_param); } - - ZEPHIR_INIT_VAR(&entityName); zephir_get_class(&entityName, model, 1); ZEPHIR_INIT_VAR(&intermediateEntity); @@ -885,7 +845,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addHasOneThrough) zephir_get_strval(&keyRelation, &_0); zephir_read_property(&_1, this_ptr, ZEND_STRL("hasOneThrough"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&hasOneThrough, &_1); - ZEPHIR_OBS_VAR(&relations); + zephir_memory_observe(&relations); if (!(zephir_array_isset_fetch(&relations, &hasOneThrough, &keyRelation, 0))) { ZEPHIR_INIT_NVAR(&relations); array_init(&relations); @@ -905,11 +865,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addHasOneThrough) ZEPHIR_INIT_VAR(&relation); object_init_ex(&relation, phalcon_mvc_model_relation_ce); ZVAL_LONG(&_1, 3); - ZEPHIR_CALL_METHOD(NULL, &relation, "__construct", NULL, 440, &_1, &referencedModel, fields, referencedFields, &options); + ZEPHIR_CALL_METHOD(NULL, &relation, "__construct", NULL, 441, &_1, &referencedModel, fields, referencedFields, &options); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &relation, "setintermediaterelation", NULL, 441, intermediateFields, &intermediateModel, intermediateReferencedFields); + ZEPHIR_CALL_METHOD(NULL, &relation, "setintermediaterelation", NULL, 442, intermediateFields, &intermediateModel, intermediateReferencedFields); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&alias); + zephir_memory_observe(&alias); if (zephir_array_isset_string_fetch(&alias, &options, SL("alias"), 0)) { if (Z_TYPE_P(&alias) != IS_STRING) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Relation alias must be a string", "phalcon/Mvc/Model/Manager.zep", 763); @@ -925,7 +885,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addHasOneThrough) ZEPHIR_CONCAT_VSV(&_2, &entityName, "$", &lowerAlias); zephir_update_property_array(this_ptr, SL("aliases"), &_2, &relation); zephir_update_property_array(this_ptr, SL("hasOneThrough"), &keyRelation, &relations); - ZEPHIR_OBS_VAR(&singleRelations); + zephir_memory_observe(&singleRelations); zephir_read_property(&_1, this_ptr, ZEND_STRL("hasOneThroughSingle"), PH_NOISY_CC | PH_READONLY); if (!(zephir_array_isset_fetch(&singleRelations, &_1, &entityName, 0))) { ZEPHIR_INIT_NVAR(&singleRelations); @@ -946,9 +906,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, clearReusableObjects) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); array_init(&_0); @@ -976,23 +935,18 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, createBuilder) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(params) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, ¶ms); if (!params) { params = ¶ms_sub; params = &__$null; } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("container"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&container, &_0); if (UNEXPECTED(Z_TYPE_P(&container) != IS_OBJECT)) { @@ -1034,15 +988,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, createQuery) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(phql) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &phql_param); if (UNEXPECTED(Z_TYPE_P(phql_param) != IS_STRING && Z_TYPE_P(phql_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'phql' must be of the type string")); @@ -1053,8 +1003,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, createQuery) } else { ZEPHIR_INIT_VAR(&phql); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("container"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&container, &_0); if (UNEXPECTED(Z_TYPE_P(&container) != IS_OBJECT)) { @@ -1116,7 +1064,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, executeQuery) ZVAL_UNDEF(&types_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&query); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(phql) @@ -1124,10 +1071,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, executeQuery) Z_PARAM_ZVAL_OR_NULL(placeholders) Z_PARAM_ZVAL_OR_NULL(types) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &phql_param, &placeholders, &types); if (UNEXPECTED(Z_TYPE_P(phql_param) != IS_STRING && Z_TYPE_P(phql_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'phql' must be of the type string")); @@ -1146,8 +1091,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, executeQuery) types = &types_sub; types = &__$null; } - - ZEPHIR_CALL_METHOD(&query, this_ptr, "createquery", NULL, 0, &phql); zephir_check_call_status(); if (Z_TYPE_P(placeholders) == IS_ARRAY) { @@ -1177,16 +1120,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, existsBelongsTo) ZVAL_UNDEF(&modelName); ZVAL_UNDEF(&modelRelation); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(modelName) Z_PARAM_STR(modelRelation) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &modelName_param, &modelRelation_param); if (UNEXPECTED(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'modelName' must be of the type string")); @@ -1206,8 +1145,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, existsBelongsTo) } else { ZEPHIR_INIT_VAR(&modelRelation); } - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "hasbelongsto", NULL, 0, &modelName, &modelRelation); zephir_check_call_status(); RETURN_MM(); @@ -1227,16 +1164,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, existsHasMany) ZVAL_UNDEF(&modelName); ZVAL_UNDEF(&modelRelation); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(modelName) Z_PARAM_STR(modelRelation) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &modelName_param, &modelRelation_param); if (UNEXPECTED(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'modelName' must be of the type string")); @@ -1256,8 +1189,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, existsHasMany) } else { ZEPHIR_INIT_VAR(&modelRelation); } - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "hashasmany", NULL, 0, &modelName, &modelRelation); zephir_check_call_status(); RETURN_MM(); @@ -1277,16 +1208,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, existsHasManyToMany) ZVAL_UNDEF(&modelName); ZVAL_UNDEF(&modelRelation); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(modelName) Z_PARAM_STR(modelRelation) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &modelName_param, &modelRelation_param); if (UNEXPECTED(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'modelName' must be of the type string")); @@ -1306,8 +1233,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, existsHasManyToMany) } else { ZEPHIR_INIT_VAR(&modelRelation); } - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "hashasmanytomany", NULL, 0, &modelName, &modelRelation); zephir_check_call_status(); RETURN_MM(); @@ -1327,16 +1252,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, existsHasOne) ZVAL_UNDEF(&modelName); ZVAL_UNDEF(&modelRelation); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(modelName) Z_PARAM_STR(modelRelation) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &modelName_param, &modelRelation_param); if (UNEXPECTED(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'modelName' must be of the type string")); @@ -1356,8 +1277,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, existsHasOne) } else { ZEPHIR_INIT_VAR(&modelRelation); } - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "hashasone", NULL, 0, &modelName, &modelRelation); zephir_check_call_status(); RETURN_MM(); @@ -1377,16 +1296,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, existsHasOneThrough) ZVAL_UNDEF(&modelName); ZVAL_UNDEF(&modelRelation); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(modelName) Z_PARAM_STR(modelRelation) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &modelName_param, &modelRelation_param); if (UNEXPECTED(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'modelName' must be of the type string")); @@ -1406,8 +1321,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, existsHasOneThrough) } else { ZEPHIR_INIT_VAR(&modelRelation); } - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "hashasonethrough", NULL, 0, &modelName, &modelRelation); zephir_check_call_status(); RETURN_MM(); @@ -1436,26 +1349,21 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getBelongsTo) ZVAL_UNDEF(&relations); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &model); - - + zephir_memory_observe(&relations); zephir_read_property(&_0, this_ptr, ZEND_STRL("belongsToSingle"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_1); zephir_get_class(&_1, model, 1); - if (!(zephir_array_isset_fetch(&relations, &_0, &_1, 1))) { + if (!(zephir_array_isset_fetch(&relations, &_0, &_1, 0))) { array_init(return_value); RETURN_MM(); } - RETURN_CTOR(&relations); + RETURN_CCTOR(&relations); } /** @@ -1490,7 +1398,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getBelongsToRecords) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 5) Z_PARAM_STR(modelName) @@ -1500,10 +1407,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getBelongsToRecords) Z_PARAM_ZVAL_OR_NULL(parameters) Z_PARAM_STR_OR_NULL(method) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 2, &modelName_param, &modelRelation_param, &record, ¶meters, &method_param); if (UNEXPECTED(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'modelName' must be of the type string")); @@ -1532,8 +1437,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getBelongsToRecords) } else { zephir_get_strval(&method, method_param); } - - ZEPHIR_INIT_VAR(&_0); zephir_fast_strtolower(&_0, &modelName); ZEPHIR_INIT_VAR(&_1); @@ -1541,7 +1444,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getBelongsToRecords) ZEPHIR_INIT_VAR(&_2); ZEPHIR_CONCAT_VSV(&_2, &_0, "$", &_1); zephir_get_strval(&keyRelation, &_2); - ZEPHIR_OBS_VAR(&relations); + zephir_memory_observe(&relations); zephir_read_property(&_3, this_ptr, ZEND_STRL("hasMany"), PH_NOISY_CC | PH_READONLY); if (!(zephir_array_isset_fetch(&relations, &_3, &keyRelation, 0))) { RETURN_MM_BOOL(0); @@ -1559,9 +1462,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getBelongsToRecords) */ PHP_METHOD(Phalcon_Mvc_Model_Manager, getBuilder) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "builder"); } @@ -1580,32 +1480,26 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getConnectionService) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval connectionServices; zval *model, model_sub, *connectionServices_param = NULL, connection, _0; - zval *this_ptr = getThis(); ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&connection); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&connectionServices); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) Z_PARAM_ARRAY(connectionServices) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &model, &connectionServices_param); zephir_get_arrval(&connectionServices, connectionServices_param); - - + zephir_memory_observe(&connection); ZEPHIR_INIT_VAR(&_0); zephir_get_class(&_0, model, 1); - if (!(zephir_array_isset_fetch(&connection, &connectionServices, &_0, 1))) { + if (!(zephir_array_isset_fetch(&connection, &connectionServices, &_0, 0))) { RETURN_MM_STRING("db"); } - RETURN_CTOR(&connection); + RETURN_CCTOR(&connection); } /** @@ -1626,23 +1520,18 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getCustomEventsManager) ZVAL_UNDEF(&eventsManager); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &model); - - + zephir_memory_observe(&eventsManager); zephir_read_property(&_0, this_ptr, ZEND_STRL("customEventsManager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_1); zephir_get_class(&_1, model, 1); - if (zephir_array_isset_fetch(&eventsManager, &_0, &_1, 1)) { - RETURN_CTOR(&eventsManager); + if (zephir_array_isset_fetch(&eventsManager, &_0, &_1, 0)) { + RETURN_CCTOR(&eventsManager); } RETURN_MM_NULL(); } @@ -1652,9 +1541,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getCustomEventsManager) */ PHP_METHOD(Phalcon_Mvc_Model_Manager, getDI) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "container"); } @@ -1664,9 +1550,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getDI) */ PHP_METHOD(Phalcon_Mvc_Model_Manager, getEventsManager) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "eventsManager"); } @@ -1684,26 +1567,21 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getHasMany) ZVAL_UNDEF(&relations); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &model); - - + zephir_memory_observe(&relations); zephir_read_property(&_0, this_ptr, ZEND_STRL("hasManySingle"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_1); zephir_get_class(&_1, model, 1); - if (!(zephir_array_isset_fetch(&relations, &_0, &_1, 1))) { + if (!(zephir_array_isset_fetch(&relations, &_0, &_1, 0))) { array_init(return_value); RETURN_MM(); } - RETURN_CTOR(&relations); + RETURN_CCTOR(&relations); } /** @@ -1730,7 +1608,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getHasManyRecords) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 5) Z_PARAM_STR(modelName) @@ -1740,10 +1617,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getHasManyRecords) Z_PARAM_ZVAL_OR_NULL(parameters) Z_PARAM_STR_OR_NULL(method) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 2, &modelName_param, &modelRelation_param, &record, ¶meters, &method_param); if (UNEXPECTED(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'modelName' must be of the type string")); @@ -1772,8 +1647,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getHasManyRecords) } else { zephir_get_strval(&method, method_param); } - - ZEPHIR_INIT_VAR(&_0); zephir_fast_strtolower(&_0, &modelName); ZEPHIR_INIT_VAR(&_1); @@ -1781,7 +1654,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getHasManyRecords) ZEPHIR_INIT_VAR(&_2); ZEPHIR_CONCAT_VSV(&_2, &_0, "$", &_1); zephir_get_strval(&keyRelation, &_2); - ZEPHIR_OBS_VAR(&relations); + zephir_memory_observe(&relations); zephir_read_property(&_3, this_ptr, ZEND_STRL("hasMany"), PH_NOISY_CC | PH_READONLY); if (!(zephir_array_isset_fetch(&relations, &_3, &keyRelation, 0))) { RETURN_MM_BOOL(0); @@ -1805,26 +1678,21 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getHasManyToMany) ZVAL_UNDEF(&relations); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &model); - - + zephir_memory_observe(&relations); zephir_read_property(&_0, this_ptr, ZEND_STRL("hasManyToManySingle"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_1); zephir_get_class(&_1, model, 1); - if (!(zephir_array_isset_fetch(&relations, &_0, &_1, 1))) { + if (!(zephir_array_isset_fetch(&relations, &_0, &_1, 0))) { array_init(return_value); RETURN_MM(); } - RETURN_CTOR(&relations); + RETURN_CCTOR(&relations); } /** @@ -1840,26 +1708,21 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getHasOne) ZVAL_UNDEF(&relations); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &model); - - + zephir_memory_observe(&relations); zephir_read_property(&_0, this_ptr, ZEND_STRL("hasOneSingle"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_1); zephir_get_class(&_1, model, 1); - if (!(zephir_array_isset_fetch(&relations, &_0, &_1, 1))) { + if (!(zephir_array_isset_fetch(&relations, &_0, &_1, 0))) { array_init(return_value); RETURN_MM(); } - RETURN_CTOR(&relations); + RETURN_CCTOR(&relations); } /** @@ -1875,18 +1738,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getHasOneAndHasMany) ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &model); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "gethasone", NULL, 0, model); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_1, this_ptr, "gethasmany", NULL, 0, model); @@ -1919,7 +1776,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getHasOneRecords) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 5) Z_PARAM_STR(modelName) @@ -1929,10 +1785,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getHasOneRecords) Z_PARAM_ZVAL_OR_NULL(parameters) Z_PARAM_STR_OR_NULL(method) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 2, &modelName_param, &modelRelation_param, &record, ¶meters, &method_param); if (UNEXPECTED(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'modelName' must be of the type string")); @@ -1961,8 +1815,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getHasOneRecords) } else { zephir_get_strval(&method, method_param); } - - ZEPHIR_INIT_VAR(&_0); zephir_fast_strtolower(&_0, &modelName); ZEPHIR_INIT_VAR(&_1); @@ -1970,7 +1822,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getHasOneRecords) ZEPHIR_INIT_VAR(&_2); ZEPHIR_CONCAT_VSV(&_2, &_0, "$", &_1); zephir_get_strval(&keyRelation, &_2); - ZEPHIR_OBS_VAR(&relations); + zephir_memory_observe(&relations); zephir_read_property(&_3, this_ptr, ZEND_STRL("hasOne"), PH_NOISY_CC | PH_READONLY); if (!(zephir_array_isset_fetch(&relations, &_3, &keyRelation, 0))) { RETURN_MM_BOOL(0); @@ -1994,26 +1846,21 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getHasOneThrough) ZVAL_UNDEF(&relations); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &model); - - + zephir_memory_observe(&relations); zephir_read_property(&_0, this_ptr, ZEND_STRL("hasOneThroughSingle"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_1); zephir_get_class(&_1, model, 1); - if (!(zephir_array_isset_fetch(&relations, &_0, &_1, 1))) { + if (!(zephir_array_isset_fetch(&relations, &_0, &_1, 0))) { array_init(return_value); RETURN_MM(); } - RETURN_CTOR(&relations); + RETURN_CCTOR(&relations); } /** @@ -2021,9 +1868,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getHasOneThrough) */ PHP_METHOD(Phalcon_Mvc_Model_Manager, getLastInitialized) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "lastInitialized"); } @@ -2033,9 +1877,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getLastInitialized) */ PHP_METHOD(Phalcon_Mvc_Model_Manager, getLastQuery) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "lastQuery"); } @@ -2045,9 +1886,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getLastQuery) */ PHP_METHOD(Phalcon_Mvc_Model_Manager, getModelPrefix) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "prefix"); } @@ -2065,25 +1903,20 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getModelSchema) ZVAL_UNDEF(&schema); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &model); - - + zephir_memory_observe(&schema); zephir_read_property(&_0, this_ptr, ZEND_STRL("schemas"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_1); zephir_get_class(&_1, model, 1); - if (!(zephir_array_isset_fetch(&schema, &_0, &_1, 1))) { + if (!(zephir_array_isset_fetch(&schema, &_0, &_1, 0))) { RETURN_MM_NULL(); } - RETURN_CTOR(&schema); + RETURN_CCTOR(&schema); } /** @@ -2104,18 +1937,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getModelSource) ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &model); - - ZEPHIR_INIT_VAR(&entityName); zephir_get_class(&entityName, model, 1); zephir_read_property(&_0, this_ptr, ZEND_STRL("sources"), PH_NOISY_CC | PH_READONLY); @@ -2123,7 +1950,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getModelSource) ZEPHIR_INIT_VAR(&_1$$3); ZEPHIR_INIT_VAR(&_2$$3); zephir_get_class_ns(&_2$$3, model, 0); - zephir_uncamelize(&_1$$3, &_2$$3, NULL ); + zephir_uncamelize(&_1$$3, &_2$$3, NULL ); ZEPHIR_CALL_METHOD(NULL, this_ptr, "setmodelsource", NULL, 0, model, &_1$$3); zephir_check_call_status(); } @@ -2146,18 +1973,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getReadConnection) ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &model); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("readConnectionServices"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getconnection", NULL, 0, model, &_0); zephir_check_call_status(); @@ -2176,18 +1997,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getReadConnectionService) ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &model); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("readConnectionServices"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getconnectionservice", NULL, 0, model, &_0); zephir_check_call_status(); @@ -2215,16 +2030,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getRelationByAlias) ZVAL_UNDEF(&relation); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(modelName) Z_PARAM_STR(alias) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &modelName_param, &alias_param); if (UNEXPECTED(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'modelName' must be of the type string")); @@ -2244,17 +2055,16 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getRelationByAlias) } else { ZEPHIR_INIT_VAR(&alias); } - - + zephir_memory_observe(&relation); zephir_read_property(&_0, this_ptr, ZEND_STRL("aliases"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_1); ZEPHIR_INIT_VAR(&_2); ZEPHIR_CONCAT_VSV(&_2, &modelName, "$", &alias); zephir_fast_strtolower(&_1, &_2); - if (!(zephir_array_isset_fetch(&relation, &_0, &_1, 1))) { + if (!(zephir_array_isset_fetch(&relation, &_0, &_1, 0))) { RETURN_MM_BOOL(0); } - RETURN_CTOR(&relation); + RETURN_CCTOR(&relation); } /** @@ -2337,7 +2147,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getRelationRecords) ZVAL_UNDEF(&joinConditions); ZVAL_UNDEF(&_36); ZVAL_UNDEF(&_34$$21); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 4) Z_PARAM_OBJECT_OF_CLASS(relation, phalcon_mvc_model_relationinterface_ce) @@ -2346,10 +2155,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getRelationRecords) Z_PARAM_ZVAL_OR_NULL(parameters) Z_PARAM_STR_OR_NULL(method) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 2, &relation, &record, ¶meters, &method_param); if (!parameters) { parameters = ¶meters_sub; @@ -2360,8 +2167,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getRelationRecords) } else { zephir_get_strval(&method, method_param); } - - ZEPHIR_INIT_VAR(&placeholders); array_init(&placeholders); ZEPHIR_CALL_METHOD(&extraParameters, relation, "getparams", NULL, 0); @@ -2402,7 +2207,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getRelationRecords) ZEPHIR_INIT_VAR(&_4$$3); ZEPHIR_CONCAT_SVSVSVSVS(&_4$$3, "[", &intermediateModel, "].[", &intermediateFields, "] = [", &referencedModel, "].[", &_3$$3, "]"); zephir_array_append(&joinConditions, &_4$$3, PH_SEPARATE, "phalcon/Mvc/Model/Manager.zep", 1401); - ZEPHIR_CALL_METHOD(&_5$$3, this_ptr, "mergefindparameters", NULL, 442, &extraParameters, parameters); + ZEPHIR_CALL_METHOD(&_5$$3, this_ptr, "mergefindparameters", NULL, 443, &extraParameters, parameters); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&builder, this_ptr, "createbuilder", NULL, 0, &_5$$3); zephir_check_call_status(); @@ -2533,10 +2338,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getRelationRecords) ZEPHIR_CALL_METHOD(&_32, record, "getdi", NULL, 0); zephir_check_call_status(); zephir_array_update_string(&findParams, SL("di"), &_32, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(&findArguments, this_ptr, "mergefindparameters", NULL, 442, &findParams, parameters); + ZEPHIR_CALL_METHOD(&findArguments, this_ptr, "mergefindparameters", NULL, 443, &findParams, parameters); zephir_check_call_status(); if (Z_TYPE_P(&extraParameters) == IS_ARRAY) { - ZEPHIR_CALL_METHOD(&findParams, this_ptr, "mergefindparameters", NULL, 442, &extraParameters, &findArguments); + ZEPHIR_CALL_METHOD(&findParams, this_ptr, "mergefindparameters", NULL, 443, &extraParameters, &findArguments); zephir_check_call_status(); } else { ZEPHIR_CPY_WRT(&findParams, &findArguments); @@ -2632,15 +2437,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getRelations) ZVAL_UNDEF(&_11$$12); ZVAL_UNDEF(&_14$$15); ZVAL_UNDEF(&allRelations); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(modelName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &modelName_param); if (UNEXPECTED(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'modelName' must be of the type string")); @@ -2651,13 +2452,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getRelations) } else { ZEPHIR_INIT_VAR(&modelName); } - - ZEPHIR_INIT_VAR(&entityName); zephir_fast_strtolower(&entityName, &modelName); ZEPHIR_INIT_VAR(&allRelations); array_init(&allRelations); - ZEPHIR_OBS_VAR(&relations); + zephir_memory_observe(&relations); zephir_read_property(&_0, this_ptr, ZEND_STRL("belongsToSingle"), PH_NOISY_CC | PH_READONLY); if (zephir_array_isset_fetch(&relations, &_0, &entityName, 0)) { zephir_is_iterable(&relations, 0, "phalcon/Mvc/Model/Manager.zep", 1574); @@ -2832,16 +2631,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getRelationsBetween) ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_6); ZVAL_UNDEF(&_7); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(first) Z_PARAM_STR(second) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &first_param, &second_param); if (UNEXPECTED(Z_TYPE_P(first_param) != IS_STRING && Z_TYPE_P(first_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'first' must be of the type string")); @@ -2861,8 +2656,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getRelationsBetween) } else { ZEPHIR_INIT_VAR(&second); } - - ZEPHIR_INIT_VAR(&_0); zephir_fast_strtolower(&_0, &first); ZEPHIR_INIT_VAR(&_1); @@ -2870,7 +2663,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getRelationsBetween) ZEPHIR_INIT_VAR(&_2); ZEPHIR_CONCAT_VSV(&_2, &_0, "$", &_1); zephir_get_strval(&keyRelation, &_2); - ZEPHIR_OBS_VAR(&relations); + zephir_memory_observe(&relations); zephir_read_property(&_3, this_ptr, ZEND_STRL("belongsTo"), PH_NOISY_CC | PH_READONLY); if (zephir_array_isset_fetch(&relations, &_3, &keyRelation, 0)) { RETURN_CCTOR(&relations); @@ -2915,16 +2708,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getReusableRecords) ZVAL_UNDEF(&key); ZVAL_UNDEF(&records); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(modelName) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &modelName_param, &key_param); if (UNEXPECTED(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'modelName' must be of the type string")); @@ -2944,13 +2733,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getReusableRecords) } else { ZEPHIR_INIT_VAR(&key); } - - + zephir_memory_observe(&records); zephir_read_property(&_0, this_ptr, ZEND_STRL("reusable"), PH_NOISY_CC | PH_READONLY); - if (!(zephir_array_isset_fetch(&records, &_0, &key, 1))) { + if (!(zephir_array_isset_fetch(&records, &_0, &key, 0))) { RETURN_MM_NULL(); } - RETURN_CTOR(&records); + RETURN_CCTOR(&records); } /** @@ -2969,18 +2757,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getWriteConnection) ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &model); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("writeConnectionServices"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getconnection", NULL, 0, model, &_0); zephir_check_call_status(); @@ -3003,18 +2785,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getWriteConnectionService) ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &model); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("writeConnectionServices"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getconnectionservice", NULL, 0, model, &_0); zephir_check_call_status(); @@ -3040,16 +2816,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, hasBelongsTo) ZVAL_UNDEF(&modelName); ZVAL_UNDEF(&modelRelation); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(modelName) Z_PARAM_STR(modelRelation) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &modelName_param, &modelRelation_param); if (UNEXPECTED(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'modelName' must be of the type string")); @@ -3069,11 +2841,9 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, hasBelongsTo) } else { ZEPHIR_INIT_VAR(&modelRelation); } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "belongsTo"); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "checkhasrelationship", NULL, 443, &_0, &modelName, &modelRelation); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "checkhasrelationship", NULL, 444, &_0, &modelName, &modelRelation); zephir_check_call_status(); RETURN_MM(); } @@ -3097,16 +2867,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, hasHasMany) ZVAL_UNDEF(&modelName); ZVAL_UNDEF(&modelRelation); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(modelName) Z_PARAM_STR(modelRelation) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &modelName_param, &modelRelation_param); if (UNEXPECTED(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'modelName' must be of the type string")); @@ -3126,11 +2892,9 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, hasHasMany) } else { ZEPHIR_INIT_VAR(&modelRelation); } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "hasMany"); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "checkhasrelationship", NULL, 443, &_0, &modelName, &modelRelation); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "checkhasrelationship", NULL, 444, &_0, &modelName, &modelRelation); zephir_check_call_status(); RETURN_MM(); } @@ -3154,16 +2918,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, hasHasManyToMany) ZVAL_UNDEF(&modelName); ZVAL_UNDEF(&modelRelation); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(modelName) Z_PARAM_STR(modelRelation) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &modelName_param, &modelRelation_param); if (UNEXPECTED(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'modelName' must be of the type string")); @@ -3183,11 +2943,9 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, hasHasManyToMany) } else { ZEPHIR_INIT_VAR(&modelRelation); } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "hasManyToMany"); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "checkhasrelationship", NULL, 443, &_0, &modelName, &modelRelation); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "checkhasrelationship", NULL, 444, &_0, &modelName, &modelRelation); zephir_check_call_status(); RETURN_MM(); } @@ -3211,16 +2969,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, hasHasOne) ZVAL_UNDEF(&modelName); ZVAL_UNDEF(&modelRelation); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(modelName) Z_PARAM_STR(modelRelation) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &modelName_param, &modelRelation_param); if (UNEXPECTED(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'modelName' must be of the type string")); @@ -3240,11 +2994,9 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, hasHasOne) } else { ZEPHIR_INIT_VAR(&modelRelation); } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "hasOne"); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "checkhasrelationship", NULL, 443, &_0, &modelName, &modelRelation); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "checkhasrelationship", NULL, 444, &_0, &modelName, &modelRelation); zephir_check_call_status(); RETURN_MM(); } @@ -3268,16 +3020,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, hasHasOneThrough) ZVAL_UNDEF(&modelName); ZVAL_UNDEF(&modelRelation); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(modelName) Z_PARAM_STR(modelRelation) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &modelName_param, &modelRelation_param); if (UNEXPECTED(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'modelName' must be of the type string")); @@ -3297,11 +3045,9 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, hasHasOneThrough) } else { ZEPHIR_INIT_VAR(&modelRelation); } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "hasOneThrough"); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "checkhasrelationship", NULL, 443, &_0, &modelName, &modelRelation); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "checkhasrelationship", NULL, 444, &_0, &modelName, &modelRelation); zephir_check_call_status(); RETURN_MM(); } @@ -3327,18 +3073,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, initialize) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2$$5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &model); - - ZEPHIR_INIT_VAR(&className); zephir_get_class(&className, model, 1); zephir_read_property(&_0, this_ptr, ZEND_STRL("initialized"), PH_NOISY_CC | PH_READONLY); @@ -3379,15 +3119,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, isInitialized) ZVAL_UNDEF(&className); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(className) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &className_param); if (UNEXPECTED(Z_TYPE_P(className_param) != IS_STRING && Z_TYPE_P(className_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'className' must be of the type string")); @@ -3398,8 +3134,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, isInitialized) } else { ZEPHIR_INIT_VAR(&className); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("initialized"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_1); zephir_fast_strtolower(&_1, &className); @@ -3423,18 +3157,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, isKeepingSnapshots) ZVAL_UNDEF(&isKeeping); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &model); - - if (ZEPHIR_GLOBAL(orm).dynamic_update) { RETURN_MM_BOOL(1); } @@ -3464,18 +3192,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, isUsingDynamicUpdate) ZVAL_UNDEF(&isUsing); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &model); - - if (ZEPHIR_GLOBAL(orm).dynamic_update) { RETURN_MM_BOOL(1); } @@ -3526,20 +3248,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, isVisibleModelProperty) ZVAL_UNDEF(&_4$$4); ZVAL_UNDEF(&_5$$5); ZVAL_UNDEF(&property); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) Z_PARAM_STR(property) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &model, &property_param); zephir_get_strval(&property, property_param); - - ZEPHIR_INIT_VAR(&className); zephir_get_class(&className, model, 0); zephir_read_property(&_0, this_ptr, ZEND_STRL("modelVisibility"), PH_NOISY_CC | PH_READONLY); @@ -3548,10 +3264,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, isVisibleModelProperty) array_init(&publicProperties); ZEPHIR_INIT_VAR(&classReflection); object_init_ex(&classReflection, zephir_get_internal_ce(SL("reflectionclass"))); - ZEPHIR_CALL_METHOD(NULL, &classReflection, "__construct", NULL, 153, &className); + ZEPHIR_CALL_METHOD(NULL, &classReflection, "__construct", NULL, 154, &className); zephir_check_call_status(); ZVAL_LONG(&_1$$3, 1); - ZEPHIR_CALL_METHOD(&reflectionProperties, &classReflection, "getproperties", NULL, 164, &_1$$3); + ZEPHIR_CALL_METHOD(&reflectionProperties, &classReflection, "getproperties", NULL, 165, &_1$$3); zephir_check_call_status(); zephir_is_iterable(&reflectionProperties, 0, "phalcon/Mvc/Model/Manager.zep", 1913); if (Z_TYPE_P(&reflectionProperties) == IS_ARRAY) { @@ -3585,7 +3301,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, isVisibleModelProperty) zephir_update_property_array(this_ptr, SL("modelVisibility"), &className, &publicProperties); } zephir_read_property(&_6, this_ptr, ZEND_STRL("modelVisibility"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_OBS_VAR(&properties); + zephir_memory_observe(&properties); zephir_array_fetch(&properties, &_6, &className, PH_NOISY, "phalcon/Mvc/Model/Manager.zep", 1916); RETURN_MM_BOOL(zephir_array_key_exists(&properties, &property)); } @@ -3608,20 +3324,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, keepSnapshots) ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) Z_PARAM_BOOL(keepSnapshots) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &model, &keepSnapshots_param); - keepSnapshots = zephir_get_boolval(keepSnapshots_param); - - ZEPHIR_INIT_VAR(&_0); zephir_get_class(&_0, model, 1); ZEPHIR_INIT_VAR(&_1); @@ -3653,15 +3362,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, load) ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(modelName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &modelName_param); if (UNEXPECTED(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'modelName' must be of the type string")); @@ -3672,14 +3377,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, load) } else { ZEPHIR_INIT_VAR(&modelName); } - - if (UNEXPECTED(!(zephir_class_exists(&modelName, 1)))) { ZEPHIR_INIT_VAR(&_0$$3); object_init_ex(&_0$$3, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_VAR(&_1$$3); ZEPHIR_CONCAT_SVS(&_1$$3, "Model '", &modelName, "' could not be loaded"); - ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 32, &_1$$3); + ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 33, &_1$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_0$$3, "phalcon/Mvc/Model/Manager.zep", 1951); ZEPHIR_MM_RESTORE(); @@ -3688,7 +3391,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, load) ZEPHIR_INIT_VAR(&_2); zephir_create_array(&_2, 3, 0); zephir_array_fast_append(&_2, &__$null); - ZEPHIR_OBS_VAR(&_3); + zephir_memory_observe(&_3); zephir_read_property(&_3, this_ptr, ZEND_STRL("container"), PH_NOISY_CC); zephir_array_fast_append(&_2, &_3); zephir_array_fast_append(&_2, this_ptr); @@ -3728,16 +3431,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, notifyEvent) ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_6); ZVAL_UNDEF(&_3$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(eventName) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &eventName_param, &model); if (UNEXPECTED(Z_TYPE_P(eventName_param) != IS_STRING && Z_TYPE_P(eventName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'eventName' must be of the type string")); @@ -3748,11 +3447,9 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, notifyEvent) } else { ZEPHIR_INIT_VAR(&eventName); } - - ZEPHIR_INIT_VAR(&status); ZVAL_BOOL(&status, 1); - ZEPHIR_OBS_VAR(&modelsBehaviors); + zephir_memory_observe(&modelsBehaviors); zephir_read_property(&_0, this_ptr, ZEND_STRL("behaviors"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_1); zephir_get_class(&_1, model, 1); @@ -3802,7 +3499,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, notifyEvent) RETURN_CCTOR(&status); } } - ZEPHIR_OBS_VAR(&customEventsManager); + zephir_memory_observe(&customEventsManager); zephir_read_property(&_4, this_ptr, ZEND_STRL("customEventsManager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_6); zephir_get_class(&_6, model, 1); @@ -3847,17 +3544,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, missingMethod) ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&eventName); ZVAL_UNDEF(&_5$$8); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) Z_PARAM_STR(eventName) Z_PARAM_ZVAL(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &model, &eventName_param, &data); if (UNEXPECTED(Z_TYPE_P(eventName_param) != IS_STRING && Z_TYPE_P(eventName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'eventName' must be of the type string")); @@ -3868,9 +3561,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, missingMethod) } else { ZEPHIR_INIT_VAR(&eventName); } - - - ZEPHIR_OBS_VAR(&modelsBehaviors); + zephir_memory_observe(&modelsBehaviors); zephir_read_property(&_0, this_ptr, ZEND_STRL("behaviors"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_1); zephir_get_class(&_1, model, 1); @@ -3939,16 +3630,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, setConnectionService) ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&connectionService); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) Z_PARAM_STR(connectionService) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &model, &connectionService_param); if (UNEXPECTED(Z_TYPE_P(connectionService_param) != IS_STRING && Z_TYPE_P(connectionService_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'connectionService' must be of the type string")); @@ -3959,8 +3646,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, setConnectionService) } else { ZEPHIR_INIT_VAR(&connectionService); } - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "setreadconnectionservice", NULL, 0, model, &connectionService); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, this_ptr, "setwriteconnectionservice", NULL, 0, model, &connectionService); @@ -3985,19 +3670,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, setCustomEventsManager) ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&eventsManager_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) Z_PARAM_OBJECT_OF_CLASS(eventsManager, phalcon_events_managerinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &model, &eventsManager); - - ZEPHIR_INIT_VAR(&_0); zephir_get_class(&_0, model, 1); zephir_update_property_array(this_ptr, SL("customEventsManager"), &_0, eventsManager); @@ -4017,17 +3696,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, setDI) zval *this_ptr = getThis(); ZVAL_UNDEF(&container_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(container, phalcon_di_diinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &container); - - zephir_update_property_zval(this_ptr, ZEND_STRL("container"), container); } @@ -4044,17 +3716,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, setEventsManager) zval *this_ptr = getThis(); ZVAL_UNDEF(&eventsManager_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(eventsManager, phalcon_events_managerinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &eventsManager); - - zephir_update_property_zval(this_ptr, ZEND_STRL("eventsManager"), eventsManager); } @@ -4092,15 +3757,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, setModelPrefix) zval *this_ptr = getThis(); ZVAL_UNDEF(&prefix); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(prefix) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &prefix_param); if (UNEXPECTED(Z_TYPE_P(prefix_param) != IS_STRING && Z_TYPE_P(prefix_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'prefix' must be of the type string")); @@ -4111,8 +3772,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, setModelPrefix) } else { ZEPHIR_INIT_VAR(&prefix); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("prefix"), &prefix); ZEPHIR_MM_RESTORE(); } @@ -4135,16 +3794,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, setModelSchema) ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&schema); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) Z_PARAM_STR(schema) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &model, &schema_param); if (UNEXPECTED(Z_TYPE_P(schema_param) != IS_STRING && Z_TYPE_P(schema_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'schema' must be of the type string")); @@ -4155,8 +3810,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, setModelSchema) } else { ZEPHIR_INIT_VAR(&schema); } - - ZEPHIR_INIT_VAR(&_0); zephir_get_class(&_0, model, 1); zephir_update_property_array(this_ptr, SL("schemas"), &_0, &schema); @@ -4181,16 +3834,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, setModelSource) ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&source); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) Z_PARAM_STR(source) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &model, &source_param); if (UNEXPECTED(Z_TYPE_P(source_param) != IS_STRING && Z_TYPE_P(source_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'source' must be of the type string")); @@ -4201,8 +3850,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, setModelSource) } else { ZEPHIR_INIT_VAR(&source); } - - ZEPHIR_INIT_VAR(&_0); zephir_get_class(&_0, model, 1); zephir_update_property_array(this_ptr, SL("sources"), &_0, &source); @@ -4227,16 +3874,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, setReadConnectionService) ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&connectionService); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) Z_PARAM_STR(connectionService) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &model, &connectionService_param); if (UNEXPECTED(Z_TYPE_P(connectionService_param) != IS_STRING && Z_TYPE_P(connectionService_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'connectionService' must be of the type string")); @@ -4247,8 +3890,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, setReadConnectionService) } else { ZEPHIR_INIT_VAR(&connectionService); } - - ZEPHIR_INIT_VAR(&_0); zephir_get_class(&_0, model, 1); zephir_update_property_array(this_ptr, SL("readConnectionServices"), &_0, &connectionService); @@ -4274,17 +3915,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, setReusableRecords) ZVAL_UNDEF(&modelName); ZVAL_UNDEF(&key); ZVAL_UNDEF(&records_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(modelName) Z_PARAM_STR(key) Z_PARAM_ZVAL(records) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &modelName_param, &key_param, &records); if (UNEXPECTED(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'modelName' must be of the type string")); @@ -4304,8 +3941,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, setReusableRecords) } else { ZEPHIR_INIT_VAR(&key); } - - zephir_update_property_array(this_ptr, SL("reusable"), &key, records); ZEPHIR_MM_RESTORE(); } @@ -4328,16 +3963,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, setWriteConnectionService) ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&connectionService); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) Z_PARAM_STR(connectionService) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &model, &connectionService_param); if (UNEXPECTED(Z_TYPE_P(connectionService_param) != IS_STRING && Z_TYPE_P(connectionService_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'connectionService' must be of the type string")); @@ -4348,8 +3979,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, setWriteConnectionService) } else { ZEPHIR_INIT_VAR(&connectionService); } - - ZEPHIR_INIT_VAR(&_0); zephir_get_class(&_0, model, 1); zephir_update_property_array(this_ptr, SL("writeConnectionServices"), &_0, &connectionService); @@ -4375,20 +4004,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, useDynamicUpdate) ZVAL_UNDEF(&entityName); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) Z_PARAM_BOOL(dynamicUpdate) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &model, &dynamicUpdate_param); - dynamicUpdate = zephir_get_boolval(dynamicUpdate_param); - - ZEPHIR_INIT_VAR(&entityName); zephir_get_class(&entityName, model, 1); ZEPHIR_INIT_VAR(&_0); @@ -4424,20 +4046,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getConnection) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&connectionServices); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) Z_PARAM_ARRAY(connectionServices) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &model, &connectionServices_param); zephir_get_arrval(&connectionServices, connectionServices_param); - - ZEPHIR_CALL_METHOD(&service, this_ptr, "getconnectionservice", NULL, 0, model, &connectionServices); zephir_check_call_status(); zephir_read_property(&_0, this_ptr, ZEND_STRL("container"), PH_NOISY_CC | PH_READONLY); @@ -4473,7 +4089,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, mergeFindParameters) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *findParamsOne = NULL, findParamsOne_sub, *findParamsTwo = NULL, findParamsTwo_sub, key, value, _0$$3, _1$$4, *_2$$5, _3$$5, _7$$9, _8$$9, _10$$14, _11$$14, *_12$$16, _13$$16, _18$$20, _19$$20, _20$$24, _21$$24, _24$$29, _25$$29, _26$$33, _27$$33; - zval *this_ptr = getThis(); ZVAL_UNDEF(&findParamsOne_sub); ZVAL_UNDEF(&findParamsTwo_sub); @@ -4496,21 +4111,15 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, mergeFindParameters) ZVAL_UNDEF(&_26$$33); ZVAL_UNDEF(&_27$$33); ZVAL_UNDEF(&findParams); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ZVAL(findParamsOne) Z_PARAM_ZVAL(findParamsTwo) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &findParamsOne, &findParamsTwo); ZEPHIR_SEPARATE_PARAM(findParamsOne); ZEPHIR_SEPARATE_PARAM(findParamsTwo); - - ZEPHIR_INIT_VAR(&findParams); array_init(&findParams); if (Z_TYPE_P(findParamsOne) == IS_STRING) { @@ -4714,17 +4323,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, checkHasRelationship) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(collection) Z_PARAM_STR(modelName) Z_PARAM_STR(modelRelation) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &collection_param, &modelName_param, &modelRelation_param); zephir_get_strval(&collection, collection_param); if (UNEXPECTED(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) { @@ -4745,8 +4350,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, checkHasRelationship) } else { ZEPHIR_INIT_VAR(&modelRelation); } - - ZEPHIR_INIT_VAR(&entityName); zephir_fast_strtolower(&entityName, &modelName); ZEPHIR_INIT_VAR(&_0); @@ -4759,7 +4362,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, checkHasRelationship) ZEPHIR_CALL_METHOD(NULL, this_ptr, "load", NULL, 0, &modelName); zephir_check_call_status(); } - ZEPHIR_OBS_VAR(&_3); + zephir_memory_observe(&_3); zephir_read_property_zval(&_3, this_ptr, &collection, PH_NOISY_CC); RETURN_MM_BOOL(zephir_array_isset(&_3, &keyRelation)); } @@ -4814,7 +4417,8 @@ zend_object *zephir_init_properties_Phalcon_Mvc_Model_Manager(zend_class_entry * ZVAL_UNDEF(&_43$$24); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/mvc/model/manager.zep.h b/ext/phalcon/mvc/model/manager.zep.h index 84987530c68..b1ccbdcdf01 100644 --- a/ext/phalcon/mvc/model/manager.zep.h +++ b/ext/phalcon/mvc/model/manager.zep.h @@ -91,11 +91,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_manager_addbelo ZEND_ARG_INFO(0, fields) ZEND_ARG_TYPE_INFO(0, referencedModel, IS_STRING, 0) ZEND_ARG_INFO(0, referencedFields) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_manager_addhasmany, 0, 4, Phalcon\\Mvc\\Model\\RelationInterface, 0) @@ -103,11 +99,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_manager_addhasm ZEND_ARG_INFO(0, fields) ZEND_ARG_TYPE_INFO(0, referencedModel, IS_STRING, 0) ZEND_ARG_INFO(0, referencedFields) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_manager_addhasmanytomany, 0, 7, Phalcon\\Mvc\\Model\\RelationInterface, 0) @@ -118,11 +110,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_manager_addhasm ZEND_ARG_INFO(0, intermediateReferencedFields) ZEND_ARG_TYPE_INFO(0, referencedModel, IS_STRING, 0) ZEND_ARG_INFO(0, referencedFields) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_manager_addhasone, 0, 4, Phalcon\\Mvc\\Model\\RelationInterface, 0) @@ -130,11 +118,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_manager_addhaso ZEND_ARG_INFO(0, fields) ZEND_ARG_TYPE_INFO(0, referencedModel, IS_STRING, 0) ZEND_ARG_INFO(0, referencedFields) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_manager_addhasonethrough, 0, 7, Phalcon\\Mvc\\Model\\RelationInterface, 0) @@ -145,11 +129,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_manager_addhaso ZEND_ARG_INFO(0, intermediateReferencedFields) ZEND_ARG_TYPE_INFO(0, referencedModel, IS_STRING, 0) ZEND_ARG_INFO(0, referencedFields) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_manager_clearreusableobjects, 0, 0, IS_VOID, 0) @@ -470,11 +450,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_manager_zephir_init_properties_ ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_mvc_model_manager_method_entry) { -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Mvc_Model_Manager, __destruct, arginfo_phalcon_mvc_model_manager___destruct, ZEND_ACC_PUBLIC|ZEND_ACC_DTOR) -#else - PHP_ME(Phalcon_Mvc_Model_Manager, __destruct, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_DTOR) -#endif +PHP_ME(Phalcon_Mvc_Model_Manager, __destruct, arginfo_phalcon_mvc_model_manager___destruct, ZEND_ACC_PUBLIC|ZEND_ACC_DTOR) PHP_ME(Phalcon_Mvc_Model_Manager, addBehavior, arginfo_phalcon_mvc_model_manager_addbehavior, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Manager, addBelongsTo, arginfo_phalcon_mvc_model_manager_addbelongsto, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Manager, addHasMany, arginfo_phalcon_mvc_model_manager_addhasmany, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/mvc/model/managerinterface.zep.h b/ext/phalcon/mvc/model/managerinterface.zep.h index 33027d9679f..89198e78c54 100644 --- a/ext/phalcon/mvc/model/managerinterface.zep.h +++ b/ext/phalcon/mvc/model/managerinterface.zep.h @@ -14,11 +14,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_managerinterfac ZEND_ARG_INFO(0, fields) ZEND_ARG_TYPE_INFO(0, referencedModel, IS_STRING, 0) ZEND_ARG_INFO(0, referencedFields) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_managerinterface_addhasmany, 0, 4, Phalcon\\Mvc\\Model\\RelationInterface, 0) @@ -26,11 +22,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_managerinterfac ZEND_ARG_INFO(0, fields) ZEND_ARG_TYPE_INFO(0, referencedModel, IS_STRING, 0) ZEND_ARG_INFO(0, referencedFields) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_managerinterface_addhasone, 0, 4, Phalcon\\Mvc\\Model\\RelationInterface, 0) @@ -38,11 +30,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_managerinterfac ZEND_ARG_INFO(0, fields) ZEND_ARG_TYPE_INFO(0, referencedModel, IS_STRING, 0) ZEND_ARG_INFO(0, referencedFields) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_managerinterface_addhasonethrough, 0, 7, Phalcon\\Mvc\\Model\\RelationInterface, 0) @@ -53,11 +41,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_managerinterfac ZEND_ARG_INFO(0, intermediateReferencedFields) ZEND_ARG_TYPE_INFO(0, referencedModel, IS_STRING, 0) ZEND_ARG_INFO(0, referencedFields) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_managerinterface_addhasmanytomany, 0, 7, Phalcon\\Mvc\\Model\\RelationInterface, 0) @@ -68,11 +52,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_managerinterfac ZEND_ARG_INFO(0, intermediateReferencedFields) ZEND_ARG_TYPE_INFO(0, referencedModel, IS_STRING, 0) ZEND_ARG_INFO(0, referencedFields) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_managerinterface_createbuilder, 0, 0, Phalcon\\Mvc\\Model\\Query\\BuilderInterface, 0) diff --git a/ext/phalcon/mvc/model/metadata.zep.c b/ext/phalcon/mvc/model/metadata.zep.c index b14b9c23631..7889b116824 100644 --- a/ext/phalcon/mvc/model/metadata.zep.c +++ b/ext/phalcon/mvc/model/metadata.zep.c @@ -117,9 +117,6 @@ ZEPHIR_INIT_CLASS(Phalcon_Mvc_Model_MetaData) */ PHP_METHOD(Phalcon_Mvc_Model_MetaData, getAdapter) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "adapter"); } @@ -145,20 +142,14 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, getAttributes) ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&data); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &model); - - ZVAL_LONG(&_0, 0); - ZEPHIR_CALL_METHOD(&data, this_ptr, "readmetadataindex", NULL, 23, model, &_0); + ZEPHIR_CALL_METHOD(&data, this_ptr, "readmetadataindex", NULL, 24, model, &_0); zephir_check_call_status(); if (UNEXPECTED(Z_TYPE_P(&data) != IS_ARRAY)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The meta-data is invalid or is corrupt", "phalcon/Mvc/Model/MetaData.zep", 110); @@ -188,20 +179,14 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, getAutomaticCreateAttributes) ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&data); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &model); - - ZVAL_LONG(&_0, 10); - ZEPHIR_CALL_METHOD(&data, this_ptr, "readmetadataindex", NULL, 23, model, &_0); + ZEPHIR_CALL_METHOD(&data, this_ptr, "readmetadataindex", NULL, 24, model, &_0); zephir_check_call_status(); if (UNEXPECTED(Z_TYPE_P(&data) != IS_ARRAY)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The meta-data is invalid or is corrupt", "phalcon/Mvc/Model/MetaData.zep", 137); @@ -231,20 +216,14 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, getAutomaticUpdateAttributes) ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&data); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &model); - - ZVAL_LONG(&_0, 11); - ZEPHIR_CALL_METHOD(&data, this_ptr, "readmetadataindex", NULL, 23, model, &_0); + ZEPHIR_CALL_METHOD(&data, this_ptr, "readmetadataindex", NULL, 24, model, &_0); zephir_check_call_status(); if (UNEXPECTED(Z_TYPE_P(&data) != IS_ARRAY)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The meta-data is invalid or is corrupt", "phalcon/Mvc/Model/MetaData.zep", 164); @@ -274,20 +253,14 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, getBindTypes) ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&data); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &model); - - ZVAL_LONG(&_0, 9); - ZEPHIR_CALL_METHOD(&data, this_ptr, "readmetadataindex", NULL, 23, model, &_0); + ZEPHIR_CALL_METHOD(&data, this_ptr, "readmetadataindex", NULL, 24, model, &_0); zephir_check_call_status(); if (UNEXPECTED(Z_TYPE_P(&data) != IS_ARRAY)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The meta-data is invalid or is corrupt", "phalcon/Mvc/Model/MetaData.zep", 191); @@ -318,20 +291,14 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, getColumnMap) ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&data); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &model); - - ZVAL_LONG(&_0, 0); - ZEPHIR_CALL_METHOD(&data, this_ptr, "readcolumnmapindex", NULL, 24, model, &_0); + ZEPHIR_CALL_METHOD(&data, this_ptr, "readcolumnmapindex", NULL, 25, model, &_0); zephir_check_call_status(); _1 = Z_TYPE_P(&data) != IS_NULL; if (_1) { @@ -365,20 +332,14 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, getDefaultValues) ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&data); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &model); - - ZVAL_LONG(&_0, 12); - ZEPHIR_CALL_METHOD(&data, this_ptr, "readmetadataindex", NULL, 23, model, &_0); + ZEPHIR_CALL_METHOD(&data, this_ptr, "readmetadataindex", NULL, 24, model, &_0); zephir_check_call_status(); if (UNEXPECTED(Z_TYPE_P(&data) != IS_ARRAY)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The meta-data is invalid or is corrupt", "phalcon/Mvc/Model/MetaData.zep", 239); @@ -408,20 +369,14 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, getDataTypes) ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&data); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &model); - - ZVAL_LONG(&_0, 4); - ZEPHIR_CALL_METHOD(&data, this_ptr, "readmetadataindex", NULL, 23, model, &_0); + ZEPHIR_CALL_METHOD(&data, this_ptr, "readmetadataindex", NULL, 24, model, &_0); zephir_check_call_status(); if (UNEXPECTED(Z_TYPE_P(&data) != IS_ARRAY)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The meta-data is invalid or is corrupt", "phalcon/Mvc/Model/MetaData.zep", 263); @@ -451,20 +406,14 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, getDataTypesNumeric) ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&data); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &model); - - ZVAL_LONG(&_0, 5); - ZEPHIR_CALL_METHOD(&data, this_ptr, "readmetadataindex", NULL, 23, model, &_0); + ZEPHIR_CALL_METHOD(&data, this_ptr, "readmetadataindex", NULL, 24, model, &_0); zephir_check_call_status(); if (UNEXPECTED(Z_TYPE_P(&data) != IS_ARRAY)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The meta-data is invalid or is corrupt", "phalcon/Mvc/Model/MetaData.zep", 290); @@ -484,9 +433,8 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, getDI) ZVAL_UNDEF(&container); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("container"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&container, &_0); @@ -518,20 +466,14 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, getEmptyStringAttributes) ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&data); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &model); - - ZVAL_LONG(&_0, 13); - ZEPHIR_CALL_METHOD(&data, this_ptr, "readmetadataindex", NULL, 23, model, &_0); + ZEPHIR_CALL_METHOD(&data, this_ptr, "readmetadataindex", NULL, 24, model, &_0); zephir_check_call_status(); if (UNEXPECTED(Z_TYPE_P(&data) != IS_ARRAY)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The meta-data is invalid or is corrupt", "phalcon/Mvc/Model/MetaData.zep", 335); @@ -560,20 +502,14 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, getIdentityField) ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &model); - - ZVAL_LONG(&_0, 8); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "readmetadataindex", NULL, 23, model, &_0); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "readmetadataindex", NULL, 24, model, &_0); zephir_check_call_status(); RETURN_MM(); } @@ -599,20 +535,14 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, getNonPrimaryKeyAttributes) ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&data); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &model); - - ZVAL_LONG(&_0, 2); - ZEPHIR_CALL_METHOD(&data, this_ptr, "readmetadataindex", NULL, 23, model, &_0); + ZEPHIR_CALL_METHOD(&data, this_ptr, "readmetadataindex", NULL, 24, model, &_0); zephir_check_call_status(); if (UNEXPECTED(Z_TYPE_P(&data) != IS_ARRAY)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The meta-data is invalid or is corrupt", "phalcon/Mvc/Model/MetaData.zep", 375); @@ -642,20 +572,14 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, getNotNullAttributes) ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&data); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &model); - - ZVAL_LONG(&_0, 3); - ZEPHIR_CALL_METHOD(&data, this_ptr, "readmetadataindex", NULL, 23, model, &_0); + ZEPHIR_CALL_METHOD(&data, this_ptr, "readmetadataindex", NULL, 24, model, &_0); zephir_check_call_status(); if (UNEXPECTED(Z_TYPE_P(&data) != IS_ARRAY)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The meta-data is invalid or is corrupt", "phalcon/Mvc/Model/MetaData.zep", 399); @@ -685,20 +609,14 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, getPrimaryKeyAttributes) ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&data); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &model); - - ZVAL_LONG(&_0, 1); - ZEPHIR_CALL_METHOD(&data, this_ptr, "readmetadataindex", NULL, 23, model, &_0); + ZEPHIR_CALL_METHOD(&data, this_ptr, "readmetadataindex", NULL, 24, model, &_0); zephir_check_call_status(); if (UNEXPECTED(Z_TYPE_P(&data) != IS_ARRAY)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The meta-data is invalid or is corrupt", "phalcon/Mvc/Model/MetaData.zep", 423); @@ -729,20 +647,14 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, getReverseColumnMap) ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&data); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &model); - - ZVAL_LONG(&_0, 1); - ZEPHIR_CALL_METHOD(&data, this_ptr, "readcolumnmapindex", NULL, 24, model, &_0); + ZEPHIR_CALL_METHOD(&data, this_ptr, "readcolumnmapindex", NULL, 25, model, &_0); zephir_check_call_status(); _1 = Z_TYPE_P(&data) != IS_NULL; if (_1) { @@ -767,9 +679,8 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, getStrategy) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("strategy"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_0) == IS_NULL) { @@ -810,26 +721,20 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, hasAttribute) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&attribute); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) Z_PARAM_STR(attribute) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &model, &attribute_param); zephir_get_strval(&attribute, attribute_param); - - ZEPHIR_CALL_METHOD(&columnMap, this_ptr, "getreversecolumnmap", NULL, 0, model); zephir_check_call_status(); if (Z_TYPE_P(&columnMap) == IS_ARRAY) { RETURN_MM_BOOL(zephir_array_isset(&columnMap, &attribute)); } - ZEPHIR_CALL_METHOD(&_0, this_ptr, "readmetadata", NULL, 25, model); + ZEPHIR_CALL_METHOD(&_0, this_ptr, "readmetadata", NULL, 26, model); zephir_check_call_status(); zephir_array_fetch_long(&_1, &_0, 4, PH_READONLY, "phalcon/Mvc/Model/MetaData.zep", 490); RETURN_MM_BOOL(zephir_array_isset(&_1, &attribute)); @@ -850,9 +755,6 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, isEmpty) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - zephir_read_property(&_0, this_ptr, ZEND_STRL("metaData"), PH_NOISY_CC | PH_READONLY); RETURN_BOOL(zephir_fast_count_int(&_0) == 0); } @@ -870,15 +772,11 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, read) ZVAL_UNDEF(&key); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -889,8 +787,6 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, read) } else { ZEPHIR_INIT_VAR(&key); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("adapter"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_METHOD(&_0, "get", NULL, 0, &key); zephir_check_call_status(); @@ -919,22 +815,16 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, readColumnMap) ZVAL_UNDEF(&keyName); ZVAL_UNDEF(&_0$$4); ZVAL_UNDEF(&_1$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &model); - - if (!(ZEPHIR_GLOBAL(orm).column_renaming)) { RETURN_MM_NULL(); } - ZEPHIR_CALL_METHOD(&keyName, this_ptr, "getcolumnmapuniquekey", NULL, 26, model); + ZEPHIR_CALL_METHOD(&keyName, this_ptr, "getcolumnmapuniquekey", NULL, 27, model); zephir_check_call_status(); if (EXPECTED(Z_TYPE_P(&keyName) != IS_NULL)) { zephir_read_property(&_0$$4, this_ptr, ZEND_STRL("columnMap"), PH_NOISY_CC | PH_READONLY); @@ -968,24 +858,17 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, readColumnMapIndex) ZVAL_UNDEF(&_0$$4); ZVAL_UNDEF(&_1$$4); ZVAL_UNDEF(&_2$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) Z_PARAM_LONG(index) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &model, &index_param); - index = zephir_get_intval(index_param); - - if (!(ZEPHIR_GLOBAL(orm).column_renaming)) { RETURN_MM_NULL(); } - ZEPHIR_CALL_METHOD(&keyName, this_ptr, "getcolumnmapuniquekey", NULL, 26, model); + ZEPHIR_CALL_METHOD(&keyName, this_ptr, "getcolumnmapuniquekey", NULL, 27, model); zephir_check_call_status(); if (EXPECTED(Z_TYPE_P(&keyName) != IS_NULL)) { zephir_read_property(&_0$$4, this_ptr, ZEND_STRL("columnMap"), PH_NOISY_CC | PH_READONLY); @@ -1018,19 +901,13 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, readMetaData) ZVAL_UNDEF(&key); ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &model); - - - ZEPHIR_CALL_METHOD(&key, this_ptr, "getmetadatauniquekey", NULL, 27, model); + ZEPHIR_CALL_METHOD(&key, this_ptr, "getmetadatauniquekey", NULL, 28, model); zephir_check_call_status(); if (EXPECTED(Z_TYPE_P(&key) != IS_NULL)) { zephir_read_property(&_0$$3, this_ptr, ZEND_STRL("metaData"), PH_NOISY_CC | PH_READONLY); @@ -1064,21 +941,14 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, readMetaDataIndex) ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) Z_PARAM_LONG(index) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &model, &index_param); - index = zephir_get_intval(index_param); - - - ZEPHIR_CALL_METHOD(&key, this_ptr, "getmetadatauniquekey", NULL, 27, model); + ZEPHIR_CALL_METHOD(&key, this_ptr, "getmetadatauniquekey", NULL, 28, model); zephir_check_call_status(); if (EXPECTED(Z_TYPE_P(&key) != IS_NULL)) { zephir_read_property(&_0$$3, this_ptr, ZEND_STRL("metaData"), PH_NOISY_CC | PH_READONLY); @@ -1104,9 +974,8 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, reset) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); array_init(&_0); @@ -1140,22 +1009,16 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, setAutomaticCreateAttributes) ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &model, &attributes_param); zephir_get_arrval(&attributes, attributes_param); - - ZVAL_LONG(&_0, 10); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "writemetadataindex", NULL, 28, model, &_0, &attributes); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "writemetadataindex", NULL, 29, model, &_0, &attributes); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -1183,22 +1046,16 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, setAutomaticUpdateAttributes) ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &model, &attributes_param); zephir_get_arrval(&attributes, attributes_param); - - ZVAL_LONG(&_0, 11); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "writemetadataindex", NULL, 28, model, &_0, &attributes); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "writemetadataindex", NULL, 29, model, &_0, &attributes); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -1226,22 +1083,16 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, setEmptyStringAttributes) ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &model, &attributes_param); zephir_get_arrval(&attributes, attributes_param); - - ZVAL_LONG(&_0, 13); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "writemetadataindex", NULL, 28, model, &_0, &attributes); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "writemetadataindex", NULL, 29, model, &_0, &attributes); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -1255,17 +1106,10 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, setDI) zval *this_ptr = getThis(); ZVAL_UNDEF(&container_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(container, phalcon_di_diinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &container); - - zephir_update_property_zval(this_ptr, ZEND_STRL("container"), container); } @@ -1278,17 +1122,10 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, setStrategy) zval *this_ptr = getThis(); ZVAL_UNDEF(&strategy_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(strategy, phalcon_mvc_model_metadata_strategy_strategyinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &strategy); - - zephir_update_property_zval(this_ptr, ZEND_STRL("strategy"), strategy); } @@ -1311,16 +1148,12 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, write) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&data); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(key) Z_PARAM_ARRAY(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &key_param, &data_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -1332,9 +1165,6 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, write) ZEPHIR_INIT_VAR(&key); } zephir_get_arrval(&data, data_param); - - - /* try_start_1: */ ZEPHIR_INIT_VAR(&option); @@ -1343,7 +1173,7 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, write) ZEPHIR_CALL_METHOD(&result, &_0$$3, "set", NULL, 0, &key, &data); zephir_check_call_status_or_jump(try_end_1); if (ZEPHIR_IS_FALSE_IDENTICAL(&result)) { - ZEPHIR_CALL_METHOD(NULL, this_ptr, "throwwriteexception", NULL, 29, &option); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "throwwriteexception", NULL, 30, &option); zephir_check_call_status_or_jump(try_end_1); } @@ -1357,7 +1187,7 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, write) if (zephir_is_instance_of(&_1, SL("Exception"))) { zend_clear_exception(); ZEPHIR_CPY_WRT(&_2, &_1); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "throwwriteexception", NULL, 29, &option); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "throwwriteexception", NULL, 30, &option); zephir_check_call_status(); } } @@ -1389,22 +1219,15 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, writeMetaDataIndex) ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&data_sub); ZVAL_UNDEF(&key); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) Z_PARAM_LONG(index) Z_PARAM_ZVAL(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &model, &index_param, &data); - index = zephir_get_intval(index_param); - - - ZEPHIR_CALL_METHOD(&key, this_ptr, "getmetadatauniquekey", NULL, 27, model); + ZEPHIR_CALL_METHOD(&key, this_ptr, "getmetadatauniquekey", NULL, 28, model); zephir_check_call_status(); if (EXPECTED(Z_TYPE_P(&key) != IS_NULL)) { zephir_update_property_array_multi(this_ptr, SL("metaData"), data, SL("zl"), 2, &key, index); @@ -1426,24 +1249,18 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, initialize) ZVAL_UNDEF(&key_sub); ZVAL_UNDEF(&table_sub); ZVAL_UNDEF(&schema_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(4, 4) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) Z_PARAM_ZVAL(key) Z_PARAM_ZVAL(table) Z_PARAM_ZVAL(schema) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 4, 0, &model, &key, &table, &schema); - - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "initializemetadata", NULL, 30, model, key); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "initializemetadata", NULL, 31, model, key); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "initializecolumnmap", NULL, 31, model, key); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "initializecolumnmap", NULL, 32, model, key); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -1472,19 +1289,13 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, initializeMetaData) ZVAL_UNDEF(&_3$$8); ZVAL_UNDEF(&_4$$8); ZVAL_UNDEF(&prefixKey); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) Z_PARAM_ZVAL(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &model, &key); - - ZEPHIR_INIT_VAR(&strategy); ZVAL_NULL(&strategy); if (EXPECTED(Z_TYPE_P(key) != IS_NULL)) { @@ -1509,7 +1320,7 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, initializeMetaData) zephir_get_class(&_3$$8, model, 0); ZEPHIR_INIT_VAR(&_4$$8); ZEPHIR_CONCAT_SV(&_4$$8, "Invalid meta-data for model ", &_3$$8); - ZEPHIR_CALL_METHOD(NULL, &_2$$8, "__construct", NULL, 32, &_4$$8); + ZEPHIR_CALL_METHOD(NULL, &_2$$8, "__construct", NULL, 33, &_4$$8); zephir_check_call_status(); zephir_throw_exception_debug(&_2$$8, "phalcon/Mvc/Model/MetaData.zep", 785); ZEPHIR_MM_RESTORE(); @@ -1553,19 +1364,13 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, initializeColumnMap) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&prefixKey); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) Z_PARAM_ZVAL(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &model, &key); - - if (UNEXPECTED(Z_TYPE_P(key) == IS_NULL)) { RETURN_MM_BOOL(0); } @@ -1606,29 +1411,22 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, throwWriteException) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *option, option_sub, _0$$3; - zval *this_ptr = getThis(); ZVAL_UNDEF(&option_sub); ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&message); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(option) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &option); - - ZEPHIR_INIT_VAR(&message); ZVAL_STRING(&message, "Failed to store metaData to the cache adapter"); if (zephir_is_true(option)) { ZEPHIR_INIT_VAR(&_0$$3); object_init_ex(&_0$$3, phalcon_mvc_model_exception_ce); - ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 32, &message); + ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 33, &message); zephir_check_call_status(); zephir_throw_exception_debug(&_0$$3, "phalcon/Mvc/Model/MetaData.zep", 882); ZEPHIR_MM_RESTORE(); @@ -1648,14 +1446,12 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, getArrVal) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *collection_param = NULL, *index, index_sub, *defaultValue = NULL, defaultValue_sub, __$null, value; zval collection; - zval *this_ptr = getThis(); ZVAL_UNDEF(&collection); ZVAL_UNDEF(&index_sub); ZVAL_UNDEF(&defaultValue_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&value); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_ARRAY(collection) @@ -1663,23 +1459,20 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, getArrVal) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(defaultValue) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &collection_param, &index, &defaultValue); ZEPHIR_OBS_COPY_OR_DUP(&collection, collection_param); if (!defaultValue) { defaultValue = &defaultValue_sub; defaultValue = &__$null; } - - - if (UNEXPECTED(!(zephir_array_isset_fetch(&value, &collection, index, 1)))) { + zephir_memory_observe(&value); + if (UNEXPECTED(!(zephir_array_isset_fetch(&value, &collection, index, 0)))) { RETVAL_ZVAL(defaultValue, 1, 0); RETURN_MM(); } - RETURN_CTOR(&value); + RETURN_CCTOR(&value); } /** @@ -1699,23 +1492,17 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, getMetaDataUniqueKey) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&key); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &model); - - ZEPHIR_INIT_VAR(&key); zephir_get_class(&key, model, 1); zephir_read_property(&_0, this_ptr, ZEND_STRL("metaData"), PH_NOISY_CC | PH_READONLY); if (0 == zephir_array_isset(&_0, &key)) { - ZEPHIR_CALL_METHOD(&_1$$3, this_ptr, "initializemetadata", NULL, 30, model, &key); + ZEPHIR_CALL_METHOD(&_1$$3, this_ptr, "initializemetadata", NULL, 31, model, &key); zephir_check_call_status(); if (ZEPHIR_IS_FALSE_IDENTICAL(&_1$$3)) { RETURN_MM_NULL(); @@ -1741,23 +1528,17 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData, getColumnMapUniqueKey) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&key); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &model); - - ZEPHIR_INIT_VAR(&key); zephir_get_class(&key, model, 1); zephir_read_property(&_0, this_ptr, ZEND_STRL("columnMap"), PH_NOISY_CC | PH_READONLY); if (0 == zephir_array_isset(&_0, &key)) { - ZEPHIR_CALL_METHOD(&_1$$3, this_ptr, "initializecolumnmap", NULL, 31, model, &key); + ZEPHIR_CALL_METHOD(&_1$$3, this_ptr, "initializecolumnmap", NULL, 32, model, &key); zephir_check_call_status(); if (ZEPHIR_IS_FALSE_IDENTICAL(&_1$$3)) { RETURN_MM_NULL(); @@ -1776,7 +1557,8 @@ zend_object *zephir_init_properties_Phalcon_Mvc_Model_MetaData(zend_class_entry ZVAL_UNDEF(&_3$$4); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/mvc/model/metadata/apcu.zep.c b/ext/phalcon/mvc/model/metadata/apcu.zep.c index 90609a0c7be..4d021b97cd6 100644 --- a/ext/phalcon/mvc/model/metadata/apcu.zep.c +++ b/ext/phalcon/mvc/model/metadata/apcu.zep.c @@ -74,25 +74,20 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Apcu, __construct) ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_5); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_OBJECT_OF_CLASS(factory, phalcon_cache_adapterfactory_ce) Z_PARAM_OPTIONAL Z_PARAM_ARRAY_OR_NULL(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &factory, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "prefix"); ZEPHIR_INIT_VAR(&_2); diff --git a/ext/phalcon/mvc/model/metadata/apcu.zep.h b/ext/phalcon/mvc/model/metadata/apcu.zep.h index 24048998c28..545cf4a26b7 100644 --- a/ext/phalcon/mvc/model/metadata/apcu.zep.h +++ b/ext/phalcon/mvc/model/metadata/apcu.zep.h @@ -7,11 +7,7 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Apcu, __construct); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_metadata_apcu___construct, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, factory, Phalcon\\Cache\\AdapterFactory, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 1, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 1) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 1, "[]") ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_mvc_model_metadata_apcu_method_entry) { diff --git a/ext/phalcon/mvc/model/metadata/libmemcached.zep.c b/ext/phalcon/mvc/model/metadata/libmemcached.zep.c index a8352afaf14..c90d57800e3 100644 --- a/ext/phalcon/mvc/model/metadata/libmemcached.zep.c +++ b/ext/phalcon/mvc/model/metadata/libmemcached.zep.c @@ -64,17 +64,13 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Libmemcached, __construct) ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_6); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_OBJECT_OF_CLASS(factory, phalcon_cache_adapterfactory_ce) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &factory, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -82,8 +78,6 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Libmemcached, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "persistentId"); ZEPHIR_INIT_VAR(&_2); @@ -119,19 +113,17 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Libmemcached, reset) { zval _0; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zephir_fcall_cache_entry *_1 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("adapter"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(NULL, &_0, "clear", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_PARENT(NULL, phalcon_mvc_model_metadata_libmemcached_ce, getThis(), "reset", &_1, 0); + ZEPHIR_CALL_PARENT(NULL, phalcon_mvc_model_metadata_libmemcached_ce, getThis(), "reset", NULL, 0); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } diff --git a/ext/phalcon/mvc/model/metadata/libmemcached.zep.h b/ext/phalcon/mvc/model/metadata/libmemcached.zep.h index 40757fc39b2..fca0ce4a217 100644 --- a/ext/phalcon/mvc/model/metadata/libmemcached.zep.h +++ b/ext/phalcon/mvc/model/metadata/libmemcached.zep.h @@ -8,11 +8,7 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Libmemcached, reset); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_metadata_libmemcached___construct, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, factory, Phalcon\\Cache\\AdapterFactory, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_metadata_libmemcached_reset, 0, 0, IS_VOID, 0) diff --git a/ext/phalcon/mvc/model/metadata/memory.zep.c b/ext/phalcon/mvc/model/metadata/memory.zep.c index 28aa4d60ede..566e41b47b8 100644 --- a/ext/phalcon/mvc/model/metadata/memory.zep.c +++ b/ext/phalcon/mvc/model/metadata/memory.zep.c @@ -48,26 +48,19 @@ ZEPHIR_INIT_CLASS(Phalcon_Mvc_Model_MetaData_Memory) PHP_METHOD(Phalcon_Mvc_Model_MetaData_Memory, __construct) { zval *options = NULL, options_sub, __$null; - zval *this_ptr = getThis(); ZVAL_UNDEF(&options_sub); ZVAL_NULL(&__$null); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(0, 1, &options); if (!options) { options = &options_sub; options = &__$null; } - - } /** @@ -78,18 +71,13 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Memory, read) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *key_param = NULL; zval key; - zval *this_ptr = getThis(); ZVAL_UNDEF(&key); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -100,8 +88,6 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Memory, read) } else { ZEPHIR_INIT_VAR(&key); } - - RETURN_MM_NULL(); } @@ -114,20 +100,15 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Memory, write) zval data; zval *key_param = NULL, *data_param = NULL; zval key; - zval *this_ptr = getThis(); ZVAL_UNDEF(&key); ZVAL_UNDEF(&data); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(key) Z_PARAM_ARRAY(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &key_param, &data_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -139,8 +120,6 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Memory, write) ZEPHIR_INIT_VAR(&key); } zephir_get_arrval(&data, data_param); - - RETURN_MM_NULL(); } diff --git a/ext/phalcon/mvc/model/metadata/redis.zep.c b/ext/phalcon/mvc/model/metadata/redis.zep.c index 1815760db00..7ab73b3c7fd 100644 --- a/ext/phalcon/mvc/model/metadata/redis.zep.c +++ b/ext/phalcon/mvc/model/metadata/redis.zep.c @@ -77,17 +77,13 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Redis, __construct) ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_5); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_OBJECT_OF_CLASS(factory, phalcon_cache_adapterfactory_ce) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &factory, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -95,8 +91,6 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Redis, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "prefix"); ZEPHIR_INIT_VAR(&_2); @@ -125,19 +119,17 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Redis, reset) { zval _0; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zephir_fcall_cache_entry *_1 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("adapter"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(NULL, &_0, "clear", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_PARENT(NULL, phalcon_mvc_model_metadata_redis_ce, getThis(), "reset", &_1, 0); + ZEPHIR_CALL_PARENT(NULL, phalcon_mvc_model_metadata_redis_ce, getThis(), "reset", NULL, 0); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } diff --git a/ext/phalcon/mvc/model/metadata/redis.zep.h b/ext/phalcon/mvc/model/metadata/redis.zep.h index f07a91fb5c2..85f7bd9dc05 100644 --- a/ext/phalcon/mvc/model/metadata/redis.zep.h +++ b/ext/phalcon/mvc/model/metadata/redis.zep.h @@ -8,11 +8,7 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Redis, reset); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_metadata_redis___construct, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, factory, Phalcon\\Cache\\AdapterFactory, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_metadata_redis_reset, 0, 0, IS_VOID, 0) diff --git a/ext/phalcon/mvc/model/metadata/strategy/annotations.zep.c b/ext/phalcon/mvc/model/metadata/strategy/annotations.zep.c index fa78e54e6a6..53e42514335 100644 --- a/ext/phalcon/mvc/model/metadata/strategy/annotations.zep.c +++ b/ext/phalcon/mvc/model/metadata/strategy/annotations.zep.c @@ -49,7 +49,6 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Strategy_Annotations, getColumnMaps) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *model, model_sub, *container, container_sub, __$null, annotations, className, reflection, propertiesAnnotations, property, propAnnotations, columnAnnotation, columnName, _0, *_5, _6, _1$$4, _2$$4, _3$$5, _4$$5, _9$$6, _10$$6, _12$$10, _13$$10; - zval *this_ptr = getThis(); ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&container_sub); @@ -74,19 +73,13 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Strategy_Annotations, getColumnMaps) ZVAL_UNDEF(&_13$$10); ZVAL_UNDEF(&orderedColumnMap); ZVAL_UNDEF(&reversedColumnMap); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) Z_PARAM_OBJECT_OF_CLASS(container, phalcon_di_diinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &model, &container); - - if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The dependency injector is invalid", "phalcon/Mvc/Model/MetaData/Strategy/Annotations.zep", 32); return; @@ -104,7 +97,7 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Strategy_Annotations, getColumnMaps) object_init_ex(&_1$$4, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_VAR(&_2$$4); ZEPHIR_CONCAT_SV(&_2$$4, "No annotations were found in class ", &className); - ZEPHIR_CALL_METHOD(NULL, &_1$$4, "__construct", NULL, 32, &_2$$4); + ZEPHIR_CALL_METHOD(NULL, &_1$$4, "__construct", NULL, 33, &_2$$4); zephir_check_call_status(); zephir_throw_exception_debug(&_1$$4, "phalcon/Mvc/Model/MetaData/Strategy/Annotations.zep", 43); ZEPHIR_MM_RESTORE(); @@ -117,7 +110,7 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Strategy_Annotations, getColumnMaps) object_init_ex(&_3$$5, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_VAR(&_4$$5); ZEPHIR_CONCAT_SV(&_4$$5, "No properties with annotations were found in class ", &className); - ZEPHIR_CALL_METHOD(NULL, &_3$$5, "__construct", NULL, 32, &_4$$5); + ZEPHIR_CALL_METHOD(NULL, &_3$$5, "__construct", NULL, 33, &_4$$5); zephir_check_call_status(); zephir_throw_exception_debug(&_3$$5, "phalcon/Mvc/Model/MetaData/Strategy/Annotations.zep", 54); ZEPHIR_MM_RESTORE(); @@ -237,7 +230,6 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Strategy_Annotations, getMetaData) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *model, model_sub, *container, container_sub, __$true, annotations, className, reflection, propertiesAnnotations, property, propAnnotations, columnAnnotation, columnName, feature, fieldTypes, fieldBindTypes, numericTyped, primaryKeys, nonPrimaryKeys, identityField, notNull, attributes, defaultValues, defaultValue, emptyStringValues, skipOnInsert, skipOnUpdate, _0, *_5, _6, _1$$4, _2$$4, _3$$5, _4$$5, _9$$6, _10$$6, _65$$6, _66$$6, _67$$6, _68$$6, _69$$6, _70$$6, _72$$6, _11$$9, _12$$9, _13$$10, _14$$10, _15$$11, _16$$11, _17$$12, _18$$12, _19$$13, _20$$13, _21$$14, _22$$14, _23$$15, _24$$15, _25$$16, _26$$16, _27$$17, _28$$17, _29$$18, _30$$18, _31$$19, _32$$19, _33$$20, _34$$20, _35$$21, _36$$21, _37$$22, _38$$22, _39$$23, _40$$23, _41$$24, _42$$24, _43$$25, _44$$25, _45$$26, _46$$26, _47$$27, _48$$27, _49$$28, _50$$28, _51$$29, _52$$29, _53$$30, _54$$30, _55$$31, _56$$31, _57$$32, _58$$32, _59$$33, _60$$33, _61$$34, _62$$34, _63$$35, _64$$35, _73$$44, _74$$44, _129$$44, _130$$44, _131$$44, _132$$44, _133$$44, _134$$44, _136$$44, _75$$47, _76$$47, _77$$48, _78$$48, _79$$49, _80$$49, _81$$50, _82$$50, _83$$51, _84$$51, _85$$52, _86$$52, _87$$53, _88$$53, _89$$54, _90$$54, _91$$55, _92$$55, _93$$56, _94$$56, _95$$57, _96$$57, _97$$58, _98$$58, _99$$59, _100$$59, _101$$60, _102$$60, _103$$61, _104$$61, _105$$62, _106$$62, _107$$63, _108$$63, _109$$64, _110$$64, _111$$65, _112$$65, _113$$66, _114$$66, _115$$67, _116$$67, _117$$68, _118$$68, _119$$69, _120$$69, _121$$70, _122$$70, _123$$71, _124$$71, _125$$72, _126$$72, _127$$73, _128$$73; - zval *this_ptr = getThis(); ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&container_sub); @@ -396,19 +388,13 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Strategy_Annotations, getMetaData) ZVAL_UNDEF(&_126$$72); ZVAL_UNDEF(&_127$$73); ZVAL_UNDEF(&_128$$73); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) Z_PARAM_OBJECT_OF_CLASS(container, phalcon_di_diinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &model, &container); - - if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The dependency injector is invalid", "phalcon/Mvc/Model/MetaData/Strategy/Annotations.zep", 113); return; @@ -426,7 +412,7 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Strategy_Annotations, getMetaData) object_init_ex(&_1$$4, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_VAR(&_2$$4); ZEPHIR_CONCAT_SV(&_2$$4, "No annotations were found in class ", &className); - ZEPHIR_CALL_METHOD(NULL, &_1$$4, "__construct", NULL, 32, &_2$$4); + ZEPHIR_CALL_METHOD(NULL, &_1$$4, "__construct", NULL, 33, &_2$$4); zephir_check_call_status(); zephir_throw_exception_debug(&_1$$4, "phalcon/Mvc/Model/MetaData/Strategy/Annotations.zep", 124); ZEPHIR_MM_RESTORE(); @@ -439,7 +425,7 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Strategy_Annotations, getMetaData) object_init_ex(&_3$$5, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_VAR(&_4$$5); ZEPHIR_CONCAT_SV(&_4$$5, "No properties with annotations were found in class ", &className); - ZEPHIR_CALL_METHOD(NULL, &_3$$5, "__construct", NULL, 32, &_4$$5); + ZEPHIR_CALL_METHOD(NULL, &_3$$5, "__construct", NULL, 33, &_4$$5); zephir_check_call_status(); zephir_throw_exception_debug(&_3$$5, "phalcon/Mvc/Model/MetaData/Strategy/Annotations.zep", 135); ZEPHIR_MM_RESTORE(); diff --git a/ext/phalcon/mvc/model/metadata/strategy/introspection.zep.c b/ext/phalcon/mvc/model/metadata/strategy/introspection.zep.c index 63f0e69119f..c7effece7d4 100644 --- a/ext/phalcon/mvc/model/metadata/strategy/introspection.zep.c +++ b/ext/phalcon/mvc/model/metadata/strategy/introspection.zep.c @@ -52,7 +52,6 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Strategy_Introspection, getColumnMaps) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *model, model_sub, *container, container_sub, orderedColumnMap, userColumnMap, reversedColumnMap, name, userName, *_0$$3, _1$$3; - zval *this_ptr = getThis(); ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&container_sub); @@ -62,19 +61,13 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Strategy_Introspection, getColumnMaps) ZVAL_UNDEF(&name); ZVAL_UNDEF(&userName); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) Z_PARAM_OBJECT_OF_CLASS(container, phalcon_di_diinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &model, &container); - - ZEPHIR_INIT_VAR(&orderedColumnMap); ZVAL_NULL(&orderedColumnMap); ZEPHIR_INIT_VAR(&reversedColumnMap); @@ -140,7 +133,6 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Strategy_Introspection, getMetaData) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *model, model_sub, *container, container_sub, __$true, schema, table, readConnection, columns, attributes, primaryKeys, nonPrimaryKeys, numericTyped, notNull, fieldTypes, automaticDefault, identityField, fieldBindTypes, defaultValues, column, fieldName, defaultValue, emptyStringValues, _0, *_9, _10, _1$$4, _2$$3, _3$$3, _4$$3, _5$$7, _6$$6, _7$$6, _8$$6, _11$$9, _12$$9, _13$$9, _14$$9, _15$$9, _16$$9, _18$$9, _19$$15, _20$$17, _21$$17, _22$$17, _23$$17, _24$$17, _25$$17, _27$$17, _28$$23; - zval *this_ptr = getThis(); ZVAL_UNDEF(&model_sub); ZVAL_UNDEF(&container_sub); @@ -190,19 +182,13 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Strategy_Introspection, getMetaData) ZVAL_UNDEF(&_27$$17); ZVAL_UNDEF(&_28$$23); ZVAL_UNDEF(&completeTable); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) Z_PARAM_OBJECT_OF_CLASS(container, phalcon_di_diinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &model, &container); - - ZEPHIR_CALL_METHOD(&schema, model, "getschema", NULL, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&table, model, "getsource", NULL, 0); @@ -225,7 +211,7 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Strategy_Introspection, getMetaData) zephir_get_class(&_3$$3, model, 0); ZEPHIR_INIT_VAR(&_4$$3); ZEPHIR_CONCAT_SVSV(&_4$$3, "Table '", &completeTable, "' doesn't exist in database when dumping meta-data for ", &_3$$3); - ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 32, &_4$$3); + ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 33, &_4$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_2$$3, "phalcon/Mvc/Model/MetaData/Strategy/Introspection.zep", 92); ZEPHIR_MM_RESTORE(); @@ -247,7 +233,7 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Strategy_Introspection, getMetaData) zephir_get_class(&_7$$6, model, 0); ZEPHIR_INIT_VAR(&_8$$6); ZEPHIR_CONCAT_SVSV(&_8$$6, "Cannot obtain table columns for the mapped source '", &completeTable, "' used in model ", &_7$$6); - ZEPHIR_CALL_METHOD(NULL, &_6$$6, "__construct", NULL, 32, &_8$$6); + ZEPHIR_CALL_METHOD(NULL, &_6$$6, "__construct", NULL, 33, &_8$$6); zephir_check_call_status(); zephir_throw_exception_debug(&_6$$6, "phalcon/Mvc/Model/MetaData/Strategy/Introspection.zep", 112); ZEPHIR_MM_RESTORE(); diff --git a/ext/phalcon/mvc/model/metadata/stream.zep.c b/ext/phalcon/mvc/model/metadata/stream.zep.c index 413b63e3367..635bd734116 100644 --- a/ext/phalcon/mvc/model/metadata/stream.zep.c +++ b/ext/phalcon/mvc/model/metadata/stream.zep.c @@ -13,8 +13,8 @@ #include "kernel/main.h" #include "kernel/array.h" -#include "kernel/object.h" #include "kernel/memory.h" +#include "kernel/object.h" #include "kernel/operators.h" #include "kernel/concat.h" #include "kernel/file.h" @@ -71,16 +71,12 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Stream, __construct) ZVAL_UNDEF(&options); ZVAL_UNDEF(&metaDataDir); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -88,9 +84,8 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Stream, __construct) } else { zephir_get_arrval(&options, options_param); } - - - if (zephir_array_isset_string_fetch(&metaDataDir, &options, SL("metaDataDir"), 1)) { + zephir_memory_observe(&metaDataDir); + if (zephir_array_isset_string_fetch(&metaDataDir, &options, SL("metaDataDir"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("metaDataDir"), &metaDataDir); } ZEPHIR_MM_RESTORE(); @@ -112,15 +107,11 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Stream, read) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -131,8 +122,6 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Stream, read) } else { ZEPHIR_INIT_VAR(&key); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("metaDataDir"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_1); ZEPHIR_INIT_VAR(&_2); @@ -174,16 +163,12 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Stream, write) ZVAL_UNDEF(&_4$$3); ZVAL_UNDEF(&_5$$3); ZVAL_UNDEF(&data); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(key) Z_PARAM_ARRAY(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &key_param, &data_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -195,9 +180,6 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Stream, write) ZEPHIR_INIT_VAR(&key); } zephir_get_arrval(&data, data_param); - - - /* try_start_1: */ zephir_read_property(&_0$$3, this_ptr, ZEND_STRL("metaDataDir"), PH_NOISY_CC | PH_READONLY); @@ -217,7 +199,7 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Stream, write) ZEPHIR_CONCAT_SVS(&_5$$3, "= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(option) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &option); - - if (zephir_is_true(option)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Meta-Data directory cannot be written", "phalcon/Mvc/Model/MetaData/Stream.zep", 93); return; diff --git a/ext/phalcon/mvc/model/metadata/stream.zep.h b/ext/phalcon/mvc/model/metadata/stream.zep.h index cb54760b62b..baed06a80af 100644 --- a/ext/phalcon/mvc/model/metadata/stream.zep.h +++ b/ext/phalcon/mvc/model/metadata/stream.zep.h @@ -9,11 +9,7 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Stream, write); PHP_METHOD(Phalcon_Mvc_Model_MetaData_Stream, throwWriteException); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_metadata_stream___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_metadata_stream_read, 0, 1, IS_ARRAY, 1) diff --git a/ext/phalcon/mvc/model/query.zep.c b/ext/phalcon/mvc/model/query.zep.c index d22fe013c4b..79c20b8fda6 100644 --- a/ext/phalcon/mvc/model/query.zep.c +++ b/ext/phalcon/mvc/model/query.zep.c @@ -227,7 +227,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, __construct) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 3) Z_PARAM_OPTIONAL @@ -235,10 +234,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, __construct) Z_PARAM_OBJECT_OF_CLASS_OR_NULL(container, phalcon_di_diinterface_ce) Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 3, &phql_param, &container, &options_param); if (!phql_param) { ZEPHIR_INIT_VAR(&phql); @@ -255,14 +252,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, __construct) } else { zephir_get_arrval(&options, options_param); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("phql"), &phql); if (Z_TYPE_P(container) == IS_OBJECT) { ZEPHIR_CALL_METHOD(NULL, this_ptr, "setdi", NULL, 0, container); zephir_check_call_status(); } - ZEPHIR_OBS_VAR(&enableImplicitJoins); + zephir_memory_observe(&enableImplicitJoins); if (zephir_array_isset_string_fetch(&enableImplicitJoins, &options, SL("enable_implicit_joins"), 0)) { if (ZEPHIR_IS_TRUE(&enableImplicitJoins)) { zephir_update_property_zval(this_ptr, ZEND_STRL("enableImplicitJoins"), &__$true); @@ -296,19 +291,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, cache) zval *this_ptr = getThis(); ZVAL_UNDEF(&cacheOptions); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(cacheOptions) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &cacheOptions_param); zephir_get_arrval(&cacheOptions, cacheOptions_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("cacheOptions"), &cacheOptions); RETURN_THIS(); } @@ -320,12 +309,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, clean) { zval _0; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); array_init(&_0); @@ -372,17 +359,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, execute) ZVAL_UNDEF(&_7$$19); ZVAL_UNDEF(&_8$$19); ZVAL_UNDEF(&_5$$8); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(bindParams) Z_PARAM_ARRAY(bindTypes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 2, &bindParams_param, &bindTypes_param); if (!bindParams_param) { ZEPHIR_INIT_VAR(&bindParams); @@ -396,8 +379,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, execute) } else { zephir_get_arrval(&bindTypes, bindTypes_param); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("uniqueRow"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&uniqueRow, &_0); zephir_read_property(&_0, this_ptr, ZEND_STRL("cacheOptions"), PH_NOISY_CC | PH_READONLY); @@ -407,17 +388,17 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, execute) ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Invalid caching options", "phalcon/Mvc/Model/Query.zep", 274); return; } - ZEPHIR_OBS_VAR(&key); + zephir_memory_observe(&key); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&key, &cacheOptions, SL("key"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "A cache key must be provided to identify the cached resultset in the cache backend", "phalcon/Mvc/Model/Query.zep", 283); return; } - ZEPHIR_OBS_VAR(&lifetime); + zephir_memory_observe(&lifetime); if (!(zephir_array_isset_string_fetch(&lifetime, &cacheOptions, SL("lifetime"), 0))) { ZEPHIR_INIT_NVAR(&lifetime); ZVAL_LONG(&lifetime, 3600); } - ZEPHIR_OBS_VAR(&cacheService); + zephir_memory_observe(&cacheService); if (!(zephir_array_isset_string_fetch(&cacheService, &cacheOptions, SL("service"), 0))) { ZEPHIR_INIT_NVAR(&cacheService); ZVAL_STRING(&cacheService, "modelsCache"); @@ -427,14 +408,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, execute) zephir_check_call_status(); ZEPHIR_INIT_VAR(&_2$$3); ZVAL_STRING(&_2$$3, "Phalcon\\Cache\\CacheInterface"); - ZEPHIR_CALL_FUNCTION(&_3$$3, "is_a", NULL, 86, &cache, &_2$$3); + ZEPHIR_CALL_FUNCTION(&_3$$3, "is_a", NULL, 87, &cache, &_2$$3); zephir_check_call_status(); if (UNEXPECTED(!ZEPHIR_IS_TRUE_IDENTICAL(&_3$$3))) { ZEPHIR_INIT_VAR(&_4$$8); object_init_ex(&_4$$8, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_VAR(&_5$$8); ZEPHIR_CONCAT_SS(&_5$$8, "Cache service must be an object implementing ", "Phalcon\\Cache\\CacheInterface"); - ZEPHIR_CALL_METHOD(NULL, &_4$$8, "__construct", NULL, 32, &_5$$8); + ZEPHIR_CALL_METHOD(NULL, &_4$$8, "__construct", NULL, 33, &_5$$8); zephir_check_call_status(); zephir_throw_exception_debug(&_4$$8, "phalcon/Mvc/Model/Query.zep", 303); ZEPHIR_MM_RESTORE(); @@ -462,11 +443,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, execute) } ZEPHIR_CALL_METHOD(&intermediate, this_ptr, "parse", NULL, 0); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&defaultBindParams); + zephir_memory_observe(&defaultBindParams); zephir_read_property(&defaultBindParams, this_ptr, ZEND_STRL("bindParams"), PH_NOISY_CC); ZEPHIR_INIT_VAR(&mergedParams); zephir_add_function(&mergedParams, &defaultBindParams, &bindParams); - ZEPHIR_OBS_VAR(&defaultBindTypes); + zephir_memory_observe(&defaultBindTypes); zephir_read_property(&defaultBindTypes, this_ptr, ZEND_STRL("bindTypes"), PH_NOISY_CC); if (Z_TYPE_P(&defaultBindTypes) == IS_ARRAY) { ZEPHIR_INIT_VAR(&mergedTypes); @@ -478,22 +459,22 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, execute) ZEPHIR_CPY_WRT(&type, &_0); do { if (ZEPHIR_IS_LONG(&type, 309)) { - ZEPHIR_CALL_METHOD(&result, this_ptr, "executeselect", NULL, 445, &intermediate, &mergedParams, &mergedTypes); + ZEPHIR_CALL_METHOD(&result, this_ptr, "executeselect", NULL, 446, &intermediate, &mergedParams, &mergedTypes); zephir_check_call_status(); break; } if (ZEPHIR_IS_LONG(&type, 306)) { - ZEPHIR_CALL_METHOD(&result, this_ptr, "executeinsert", NULL, 446, &intermediate, &mergedParams, &mergedTypes); + ZEPHIR_CALL_METHOD(&result, this_ptr, "executeinsert", NULL, 447, &intermediate, &mergedParams, &mergedTypes); zephir_check_call_status(); break; } if (ZEPHIR_IS_LONG(&type, 300)) { - ZEPHIR_CALL_METHOD(&result, this_ptr, "executeupdate", NULL, 447, &intermediate, &mergedParams, &mergedTypes); + ZEPHIR_CALL_METHOD(&result, this_ptr, "executeupdate", NULL, 448, &intermediate, &mergedParams, &mergedTypes); zephir_check_call_status(); break; } if (ZEPHIR_IS_LONG(&type, 303)) { - ZEPHIR_CALL_METHOD(&result, this_ptr, "executedelete", NULL, 448, &intermediate, &mergedParams, &mergedTypes); + ZEPHIR_CALL_METHOD(&result, this_ptr, "executedelete", NULL, 449, &intermediate, &mergedParams, &mergedTypes); zephir_check_call_status(); break; } @@ -501,7 +482,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, execute) object_init_ex(&_7$$19, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_VAR(&_8$$19); ZEPHIR_CONCAT_SV(&_8$$19, "Unknown statement ", &type); - ZEPHIR_CALL_METHOD(NULL, &_7$$19, "__construct", NULL, 32, &_8$$19); + ZEPHIR_CALL_METHOD(NULL, &_7$$19, "__construct", NULL, 33, &_8$$19); zephir_check_call_status(); zephir_throw_exception_debug(&_7$$19, "phalcon/Mvc/Model/Query.zep", 395); ZEPHIR_MM_RESTORE(); @@ -530,9 +511,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, execute) */ PHP_METHOD(Phalcon_Mvc_Model_Query, getCache) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "cache"); } @@ -542,9 +520,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getCache) */ PHP_METHOD(Phalcon_Mvc_Model_Query, getCacheOptions) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "cacheOptions"); } @@ -554,9 +529,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getCacheOptions) */ PHP_METHOD(Phalcon_Mvc_Model_Query, getBindParams) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "bindParams"); } @@ -566,9 +538,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getBindParams) */ PHP_METHOD(Phalcon_Mvc_Model_Query, getBindTypes) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "bindTypes"); } @@ -578,9 +547,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getBindTypes) */ PHP_METHOD(Phalcon_Mvc_Model_Query, getDI) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "container"); } @@ -590,9 +556,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getDI) */ PHP_METHOD(Phalcon_Mvc_Model_Query, getIntermediate) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "intermediate"); } @@ -612,17 +575,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSingleResult) ZVAL_UNDEF(&bindTypes); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(bindParams) Z_PARAM_ARRAY(bindTypes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 2, &bindParams_param, &bindTypes_param); if (!bindParams_param) { ZEPHIR_INIT_VAR(&bindParams); @@ -636,8 +595,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSingleResult) } else { zephir_get_arrval(&bindTypes, bindTypes_param); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("uniqueRow"), PH_NOISY_CC | PH_READONLY); if (zephir_is_true(&_0)) { ZEPHIR_RETURN_CALL_METHOD(this_ptr, "execute", NULL, 0, &bindParams, &bindTypes); @@ -667,9 +624,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSql) ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&intermediate, this_ptr, "parse", NULL, 0); zephir_check_call_status(); @@ -678,7 +634,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSql) zephir_read_property(&_1$$3, this_ptr, ZEND_STRL("bindParams"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_2$$3, this_ptr, ZEND_STRL("bindTypes"), PH_NOISY_CC | PH_READONLY); ZVAL_BOOL(&_3$$3, 1); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "executeselect", NULL, 445, &intermediate, &_1$$3, &_2$$3, &_3$$3); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "executeselect", NULL, 446, &intermediate, &_1$$3, &_2$$3, &_3$$3); zephir_check_call_status(); RETURN_MM(); } @@ -693,9 +649,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSql) */ PHP_METHOD(Phalcon_Mvc_Model_Query, getType) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "type"); } @@ -708,9 +661,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getType) */ PHP_METHOD(Phalcon_Mvc_Model_Query, getUniqueRow) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "uniqueRow"); } @@ -720,9 +670,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getUniqueRow) */ PHP_METHOD(Phalcon_Mvc_Model_Query, getTransaction) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "transaction"); } @@ -734,10 +681,9 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getTransaction) */ PHP_METHOD(Phalcon_Mvc_Model_Query, parse) { - zval intermediate, phql, ast, irPhql, uniqueId, type, _0, _2$$5, _3$$7, _4$$13, _5$$13; + zval intermediate, phql, ast, irPhql, uniqueId, type, _0, _1$$5, _2$$7, _3$$13, _4$$13; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_1 = NULL; zval *this_ptr = getThis(); ZVAL_UNDEF(&intermediate); @@ -747,13 +693,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, parse) ZVAL_UNDEF(&uniqueId); ZVAL_UNDEF(&type); ZVAL_UNDEF(&_0); - ZVAL_UNDEF(&_2$$5); - ZVAL_UNDEF(&_3$$7); + ZVAL_UNDEF(&_1$$5); + ZVAL_UNDEF(&_2$$7); + ZVAL_UNDEF(&_3$$13); ZVAL_UNDEF(&_4$$13); - ZVAL_UNDEF(&_5$$13); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("intermediate"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&intermediate, &_0); @@ -762,7 +707,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, parse) } zephir_read_property(&_0, this_ptr, ZEND_STRL("phql"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&phql, &_0); - ZEPHIR_CALL_CE_STATIC(&ast, phalcon_mvc_model_query_lang_ce, "parsephql", &_1, 0, &phql); + ZEPHIR_CALL_CE_STATIC(&ast, phalcon_mvc_model_query_lang_ce, "parsephql", NULL, 0, &phql); zephir_check_call_status(); ZEPHIR_INIT_VAR(&irPhql); ZVAL_NULL(&irPhql); @@ -772,47 +717,47 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, parse) ZEPHIR_OBS_NVAR(&uniqueId); if (zephir_array_isset_string_fetch(&uniqueId, &ast, SL("id"), 0)) { ZEPHIR_OBS_NVAR(&irPhql); - zephir_read_static_property_ce(&_2$$5, phalcon_mvc_model_query_ce, SL("internalPhqlCache"), PH_NOISY_CC | PH_READONLY); - if (zephir_array_isset_fetch(&irPhql, &_2$$5, &uniqueId, 0)) { + zephir_read_static_property_ce(&_1$$5, phalcon_mvc_model_query_ce, SL("internalPhqlCache"), PH_NOISY_CC | PH_READONLY); + if (zephir_array_isset_fetch(&irPhql, &_1$$5, &uniqueId, 0)) { if (Z_TYPE_P(&irPhql) == IS_ARRAY) { - zephir_array_fetch_string(&_3$$7, &ast, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 579); - zephir_update_property_zval(this_ptr, ZEND_STRL("type"), &_3$$7); + zephir_array_fetch_string(&_2$$7, &ast, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 579); + zephir_update_property_zval(this_ptr, ZEND_STRL("type"), &_2$$7); RETURN_CCTOR(&irPhql); } } } - ZEPHIR_OBS_VAR(&type); + zephir_memory_observe(&type); if (zephir_array_isset_string_fetch(&type, &ast, SL("type"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("ast"), &ast); zephir_update_property_zval(this_ptr, ZEND_STRL("type"), &type); do { if (ZEPHIR_IS_LONG(&type, 309)) { - ZEPHIR_CALL_METHOD(&irPhql, this_ptr, "_prepareselect", NULL, 449); + ZEPHIR_CALL_METHOD(&irPhql, this_ptr, "_prepareselect", NULL, 450); zephir_check_call_status(); break; } if (ZEPHIR_IS_LONG(&type, 306)) { - ZEPHIR_CALL_METHOD(&irPhql, this_ptr, "_prepareinsert", NULL, 450); + ZEPHIR_CALL_METHOD(&irPhql, this_ptr, "_prepareinsert", NULL, 451); zephir_check_call_status(); break; } if (ZEPHIR_IS_LONG(&type, 300)) { - ZEPHIR_CALL_METHOD(&irPhql, this_ptr, "_prepareupdate", NULL, 451); + ZEPHIR_CALL_METHOD(&irPhql, this_ptr, "_prepareupdate", NULL, 452); zephir_check_call_status(); break; } if (ZEPHIR_IS_LONG(&type, 303)) { - ZEPHIR_CALL_METHOD(&irPhql, this_ptr, "_preparedelete", NULL, 452); + ZEPHIR_CALL_METHOD(&irPhql, this_ptr, "_preparedelete", NULL, 453); zephir_check_call_status(); break; } + ZEPHIR_INIT_VAR(&_3$$13); + object_init_ex(&_3$$13, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_VAR(&_4$$13); - object_init_ex(&_4$$13, phalcon_mvc_model_exception_ce); - ZEPHIR_INIT_VAR(&_5$$13); - ZEPHIR_CONCAT_SVSV(&_5$$13, "Unknown statement ", &type, ", when preparing: ", &phql); - ZEPHIR_CALL_METHOD(NULL, &_4$$13, "__construct", NULL, 32, &_5$$13); + ZEPHIR_CONCAT_SVSV(&_4$$13, "Unknown statement ", &type, ", when preparing: ", &phql); + ZEPHIR_CALL_METHOD(NULL, &_3$$13, "__construct", NULL, 33, &_4$$13); zephir_check_call_status(); - zephir_throw_exception_debug(&_4$$13, "phalcon/Mvc/Model/Query.zep", 613); + zephir_throw_exception_debug(&_3$$13, "phalcon/Mvc/Model/Query.zep", 613); ZEPHIR_MM_RESTORE(); return; } while(0); @@ -844,28 +789,22 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, setBindParams) ZVAL_UNDEF(&bindParams); ZVAL_UNDEF(¤tBindParams); ZVAL_UNDEF(&_0$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(bindParams) Z_PARAM_OPTIONAL Z_PARAM_BOOL(merge) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &bindParams_param, &merge_param); ZEPHIR_OBS_COPY_OR_DUP(&bindParams, bindParams_param); if (!merge_param) { merge = 0; } else { - merge = zephir_get_boolval(merge_param); - } - - + } if (merge) { - zephir_read_property(¤tBindParams, this_ptr, ZEND_STRL("bindParams"), PH_NOISY_CC | PH_READONLY); + zephir_memory_observe(¤tBindParams); + zephir_read_property(¤tBindParams, this_ptr, ZEND_STRL("bindParams"), PH_NOISY_CC); ZEPHIR_INIT_VAR(&_0$$3); zephir_add_function(&_0$$3, ¤tBindParams, &bindParams); zephir_update_property_zval(this_ptr, ZEND_STRL("bindParams"), &_0$$3); @@ -889,28 +828,22 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, setBindTypes) ZVAL_UNDEF(&bindTypes); ZVAL_UNDEF(¤tBindTypes); ZVAL_UNDEF(&_0$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(bindTypes) Z_PARAM_OPTIONAL Z_PARAM_BOOL(merge) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &bindTypes_param, &merge_param); ZEPHIR_OBS_COPY_OR_DUP(&bindTypes, bindTypes_param); if (!merge_param) { merge = 0; } else { - merge = zephir_get_boolval(merge_param); - } - - + } if (UNEXPECTED(merge)) { - zephir_read_property(¤tBindTypes, this_ptr, ZEND_STRL("bindTypes"), PH_NOISY_CC | PH_READONLY); + zephir_memory_observe(¤tBindTypes); + zephir_read_property(¤tBindTypes, this_ptr, ZEND_STRL("bindTypes"), PH_NOISY_CC); if (Z_TYPE_P(¤tBindTypes) == IS_ARRAY) { ZEPHIR_INIT_VAR(&_0$$4); zephir_add_function(&_0$$4, ¤tBindTypes, &bindTypes); @@ -938,18 +871,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, setDI) ZVAL_UNDEF(&manager); ZVAL_UNDEF(&metaData); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(container, phalcon_di_diinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &container); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "modelsManager"); ZEPHIR_CALL_METHOD(&manager, container, "getshared", NULL, 0, &_0); @@ -983,19 +910,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, setIntermediate) zval *this_ptr = getThis(); ZVAL_UNDEF(&intermediate); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(intermediate) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &intermediate_param); ZEPHIR_OBS_COPY_OR_DUP(&intermediate, intermediate_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("intermediate"), &intermediate); RETURN_THIS(); } @@ -1011,23 +932,15 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, setSharedLock) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_BOOL(sharedLock) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(0, 1, &sharedLock_param); if (!sharedLock_param) { sharedLock = 0; } else { - sharedLock = zephir_get_boolval(sharedLock_param); - } - - + } if (sharedLock) { zephir_update_property_zval(this_ptr, ZEND_STRL("sharedLock"), &__$true); } else { @@ -1045,17 +958,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, setTransaction) zval *this_ptr = getThis(); ZVAL_UNDEF(&transaction_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(transaction, phalcon_mvc_model_transactioninterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &transaction); - - zephir_update_property_zval(this_ptr, ZEND_STRL("transaction"), transaction); RETURN_THISW(); } @@ -1070,19 +976,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, setType) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &type_param); - type = zephir_get_intval(type_param); - - - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, type); zephir_update_property_zval(this_ptr, ZEND_STRL("type"), &_0); RETURN_THISW(); @@ -1100,18 +998,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, setUniqueRow) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(uniqueRow) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &uniqueRow_param); - uniqueRow = zephir_get_boolval(uniqueRow_param); - - if (uniqueRow) { zephir_update_property_zval(this_ptr, ZEND_STRL("uniqueRow"), &__$true); } else { @@ -1149,44 +1039,38 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeDelete) ZVAL_UNDEF(&_2$$5); ZVAL_UNDEF(&_5$$6); ZVAL_UNDEF(&_7$$7); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_ARRAY(intermediate) Z_PARAM_ARRAY(bindParams) Z_PARAM_ARRAY(bindTypes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &intermediate_param, &bindParams_param, &bindTypes_param); zephir_get_arrval(&intermediate, intermediate_param); zephir_get_arrval(&bindParams, bindParams_param); zephir_get_arrval(&bindTypes, bindTypes_param); - - - ZEPHIR_OBS_VAR(&models); + zephir_memory_observe(&models); zephir_array_fetch_string(&models, &intermediate, SL("models"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 757); if (UNEXPECTED(zephir_array_isset_long(&models, 1))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Delete from several models at the same time is still not supported", "phalcon/Mvc/Model/Query.zep", 762); return; } - ZEPHIR_OBS_VAR(&modelName); + zephir_memory_observe(&modelName); zephir_array_fetch_long(&modelName, &models, 0, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 765); - ZEPHIR_OBS_VAR(&model); + zephir_memory_observe(&model); zephir_read_property(&_0, this_ptr, ZEND_STRL("modelsInstances"), PH_NOISY_CC | PH_READONLY); if (!(zephir_array_isset_fetch(&model, &_0, &modelName, 0))) { zephir_read_property(&_1$$4, this_ptr, ZEND_STRL("manager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&model, &_1$$4, "load", NULL, 0, &modelName); zephir_check_call_status(); } - ZEPHIR_CALL_METHOD(&records, this_ptr, "getrelatedrecords", NULL, 453, &model, &intermediate, &bindParams, &bindTypes); + ZEPHIR_CALL_METHOD(&records, this_ptr, "getrelatedrecords", NULL, 454, &model, &intermediate, &bindParams, &bindTypes); zephir_check_call_status(); if (!(zephir_fast_count_int(&records))) { object_init_ex(return_value, phalcon_mvc_model_query_status_ce); ZVAL_BOOL(&_2$$5, 1); - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 454, &_2$$5); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 455, &_2$$5); zephir_check_call_status(); RETURN_MM(); } @@ -1211,7 +1095,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeDelete) zephir_check_call_status(); object_init_ex(return_value, phalcon_mvc_model_query_status_ce); ZVAL_BOOL(&_7$$7, 0); - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 454, &_7$$7, &record); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 455, &_7$$7, &record); zephir_check_call_status(); RETURN_MM(); } @@ -1222,7 +1106,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeDelete) zephir_check_call_status(); object_init_ex(return_value, phalcon_mvc_model_query_status_ce); ZVAL_BOOL(&_9, 1); - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 454, &_9); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 455, &_9); zephir_check_call_status(); RETURN_MM(); } @@ -1287,28 +1171,22 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeInsert) ZVAL_UNDEF(&_29$$22); ZVAL_UNDEF(&_32$$24); ZVAL_UNDEF(&_33$$24); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_ARRAY(intermediate) Z_PARAM_ARRAY(bindParams) Z_PARAM_ARRAY(bindTypes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &intermediate_param, &bindParams_param, &bindTypes_param); zephir_get_arrval(&intermediate, intermediate_param); zephir_get_arrval(&bindParams, bindParams_param); zephir_get_arrval(&bindTypes, bindTypes_param); - - - ZEPHIR_OBS_VAR(&modelName); + zephir_memory_observe(&modelName); zephir_array_fetch_string(&modelName, &intermediate, SL("model"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 846); zephir_read_property(&_0, this_ptr, ZEND_STRL("manager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&manager, &_0); - ZEPHIR_OBS_VAR(&model); + zephir_memory_observe(&model); zephir_read_property(&_0, this_ptr, ZEND_STRL("modelsInstances"), PH_NOISY_CC | PH_READONLY); if (!(zephir_array_isset_fetch(&model, &_0, &modelName, 0))) { ZEPHIR_CALL_METHOD(&model, &manager, "load", NULL, 0, &modelName); @@ -1321,7 +1199,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeInsert) ZEPHIR_CALL_METHOD(&attributes, &metaData, "getattributes", NULL, 0, &model); zephir_check_call_status(); automaticFields = 0; - ZEPHIR_OBS_VAR(&fields); + zephir_memory_observe(&fields); if (!(zephir_array_isset_string_fetch(&fields, &intermediate, SL("fields"), 0))) { automaticFields = 1; ZEPHIR_CPY_WRT(&fields, &attributes); @@ -1333,7 +1211,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeInsert) ZVAL_NULL(&columnMap); } } - ZEPHIR_OBS_VAR(&values); + zephir_memory_observe(&values); zephir_array_fetch_string(&values, &intermediate, SL("values"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 881); if (UNEXPECTED(zephir_fast_count_int(&fields) != zephir_fast_count_int(&values))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The column count does not match the values count", "phalcon/Mvc/Model/Query.zep", 890); @@ -1384,7 +1262,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeInsert) object_init_ex(&_12$$12, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_NVAR(&_13$$12); ZEPHIR_CONCAT_SVS(&_13$$12, "Bound parameter '", &wildcard, "' cannot be replaced because it isn't in the placeholders list"); - ZEPHIR_CALL_METHOD(NULL, &_12$$12, "__construct", &_14, 32, &_13$$12); + ZEPHIR_CALL_METHOD(NULL, &_12$$12, "__construct", &_14, 33, &_13$$12); zephir_check_call_status(); zephir_throw_exception_debug(&_12$$12, "phalcon/Mvc/Model/Query.zep", 926); ZEPHIR_MM_RESTORE(); @@ -1396,7 +1274,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeInsert) object_init_ex(&insertValue, phalcon_db_rawvalue_ce); ZEPHIR_CALL_METHOD(&_15$$13, &dialect, "getsqlexpression", &_16, 0, &exprValue); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &insertValue, "__construct", &_17, 35, &_15$$13); + ZEPHIR_CALL_METHOD(NULL, &insertValue, "__construct", &_17, 36, &_15$$13); zephir_check_call_status(); break; } while(0); @@ -1414,7 +1292,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeInsert) object_init_ex(&_19$$15, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_NVAR(&_20$$15); ZEPHIR_CONCAT_SVS(&_20$$15, "Column '", &fieldName, "' isn't part of the column map"); - ZEPHIR_CALL_METHOD(NULL, &_19$$15, "__construct", &_14, 32, &_20$$15); + ZEPHIR_CALL_METHOD(NULL, &_19$$15, "__construct", &_14, 33, &_20$$15); zephir_check_call_status(); zephir_throw_exception_debug(&_19$$15, "phalcon/Mvc/Model/Query.zep", 949); ZEPHIR_MM_RESTORE(); @@ -1467,7 +1345,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeInsert) object_init_ex(&_27$$21, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_NVAR(&_28$$21); ZEPHIR_CONCAT_SVS(&_28$$21, "Bound parameter '", &wildcard, "' cannot be replaced because it isn't in the placeholders list"); - ZEPHIR_CALL_METHOD(NULL, &_27$$21, "__construct", &_14, 32, &_28$$21); + ZEPHIR_CALL_METHOD(NULL, &_27$$21, "__construct", &_14, 33, &_28$$21); zephir_check_call_status(); zephir_throw_exception_debug(&_27$$21, "phalcon/Mvc/Model/Query.zep", 926); ZEPHIR_MM_RESTORE(); @@ -1479,7 +1357,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeInsert) object_init_ex(&insertValue, phalcon_db_rawvalue_ce); ZEPHIR_CALL_METHOD(&_29$$22, &dialect, "getsqlexpression", &_30, 0, &exprValue); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &insertValue, "__construct", &_17, 35, &_29$$22); + ZEPHIR_CALL_METHOD(NULL, &insertValue, "__construct", &_17, 36, &_29$$22); zephir_check_call_status(); break; } while(0); @@ -1497,7 +1375,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeInsert) object_init_ex(&_32$$24, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_NVAR(&_33$$24); ZEPHIR_CONCAT_SVS(&_33$$24, "Column '", &fieldName, "' isn't part of the column map"); - ZEPHIR_CALL_METHOD(NULL, &_32$$24, "__construct", &_14, 32, &_33$$24); + ZEPHIR_CALL_METHOD(NULL, &_32$$24, "__construct", &_14, 33, &_33$$24); zephir_check_call_status(); zephir_throw_exception_debug(&_32$$24, "phalcon/Mvc/Model/Query.zep", 949); ZEPHIR_MM_RESTORE(); @@ -1520,7 +1398,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeInsert) object_init_ex(return_value, phalcon_mvc_model_query_status_ce); ZEPHIR_CALL_METHOD(&_34, &insertModel, "create", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 454, &_34, &insertModel); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 455, &_34, &insertModel); zephir_check_call_status(); RETURN_MM(); } @@ -1647,8 +1525,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect) ZVAL_UNDEF(&_94$$97); ZVAL_UNDEF(&_95$$99); ZVAL_UNDEF(&_96$$99); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 4) Z_PARAM_ARRAY(intermediate) Z_PARAM_ARRAY(bindParams) @@ -1656,10 +1532,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect) Z_PARAM_OPTIONAL Z_PARAM_BOOL(simulate) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 1, &intermediate_param, &bindParams_param, &bindTypes_param, &simulate_param); zephir_get_arrval(&intermediate, intermediate_param); zephir_get_arrval(&bindParams, bindParams_param); @@ -1667,15 +1541,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect) if (!simulate_param) { simulate = 0; } else { - simulate = zephir_get_boolval(simulate_param); - } - - + } zephir_read_property(&_0, this_ptr, ZEND_STRL("manager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&manager, &_0); ZEPHIR_INIT_VAR(&connectionTypes); array_init(&connectionTypes); - ZEPHIR_OBS_VAR(&models); + zephir_memory_observe(&models); zephir_array_fetch_string(&models, &intermediate, SL("models"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 998); zephir_is_iterable(&models, 0, "phalcon/Mvc/Model/Query.zep", 1026); if (Z_TYPE_P(&models) == IS_ARRAY) { @@ -1736,7 +1607,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect) } } ZEPHIR_INIT_NVAR(&modelName); - ZEPHIR_OBS_VAR(&columns); + zephir_memory_observe(&columns); zephir_array_fetch_string(&columns, &intermediate, SL("columns"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1026); haveObjects = 0; haveScalars = 0; @@ -2396,7 +2267,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect) object_init_ex(&_91$$98, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_VAR(&_92$$98); ZEPHIR_CONCAT_SVS(&_92$$98, "Resultset class \"", &resultsetClassName, "\" not found"); - ZEPHIR_CALL_METHOD(NULL, &_91$$98, "__construct", NULL, 32, &_92$$98); + ZEPHIR_CALL_METHOD(NULL, &_91$$98, "__construct", NULL, 33, &_92$$98); zephir_check_call_status(); zephir_throw_exception_debug(&_91$$98, "phalcon/Mvc/Model/Query.zep", 1307); ZEPHIR_MM_RESTORE(); @@ -2404,14 +2275,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect) } ZEPHIR_INIT_VAR(&_93$$97); ZVAL_STRING(&_93$$97, "Phalcon\\Mvc\\Model\\ResultsetInterface"); - ZEPHIR_CALL_FUNCTION(&_94$$97, "is_subclass_of", NULL, 437, &resultsetClassName, &_93$$97); + ZEPHIR_CALL_FUNCTION(&_94$$97, "is_subclass_of", NULL, 438, &resultsetClassName, &_93$$97); zephir_check_call_status(); if (UNEXPECTED(!zephir_is_true(&_94$$97))) { ZEPHIR_INIT_VAR(&_95$$99); object_init_ex(&_95$$99, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_VAR(&_96$$99); ZEPHIR_CONCAT_SVS(&_96$$99, "Resultset class \"", &resultsetClassName, "\" must be an implementation of Phalcon\\Mvc\\Model\\ResultsetInterface"); - ZEPHIR_CALL_METHOD(NULL, &_95$$99, "__construct", NULL, 32, &_96$$99); + ZEPHIR_CALL_METHOD(NULL, &_95$$99, "__construct", NULL, 33, &_96$$99); zephir_check_call_status(); zephir_throw_exception_debug(&_95$$99, "phalcon/Mvc/Model/Query.zep", 1313); ZEPHIR_MM_RESTORE(); @@ -2437,12 +2308,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeSelect) } else { ZVAL_BOOL(&_98$$83, 0); } - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 455, &simpleColumnMap, &resultObject, &resultData, &cache, &_98$$83); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 456, &simpleColumnMap, &resultObject, &resultData, &cache, &_98$$83); zephir_check_call_status(); RETURN_MM(); } object_init_ex(return_value, phalcon_mvc_model_resultset_complex_ce); - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 456, &columns1, &resultData, &cache); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 457, &columns1, &resultData, &cache); zephir_check_call_status(); RETURN_MM(); } @@ -2506,32 +2377,26 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeUpdate) ZVAL_UNDEF(&_28$$23); ZVAL_UNDEF(&_31$$24); ZVAL_UNDEF(&_33$$25); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_ARRAY(intermediate) Z_PARAM_ARRAY(bindParams) Z_PARAM_ARRAY(bindTypes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &intermediate_param, &bindParams_param, &bindTypes_param); zephir_get_arrval(&intermediate, intermediate_param); zephir_get_arrval(&bindParams, bindParams_param); zephir_get_arrval(&bindTypes, bindTypes_param); - - - ZEPHIR_OBS_VAR(&models); + zephir_memory_observe(&models); zephir_array_fetch_string(&models, &intermediate, SL("models"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1361); if (UNEXPECTED(zephir_array_isset_long(&models, 1))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Updating several models at the same time is still not supported", "phalcon/Mvc/Model/Query.zep", 1366); return; } - ZEPHIR_OBS_VAR(&modelName); + zephir_memory_observe(&modelName); zephir_array_fetch_long(&modelName, &models, 0, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1369); - ZEPHIR_OBS_VAR(&model); + zephir_memory_observe(&model); zephir_read_property(&_0, this_ptr, ZEND_STRL("modelsInstances"), PH_NOISY_CC | PH_READONLY); if (!(zephir_array_isset_fetch(&model, &_0, &modelName, 0))) { zephir_read_property(&_1$$4, this_ptr, ZEND_STRL("manager"), PH_NOISY_CC | PH_READONLY); @@ -2542,9 +2407,9 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeUpdate) zephir_check_call_status(); ZEPHIR_CALL_METHOD(&dialect, &connection, "getdialect", NULL, 0); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&fields); + zephir_memory_observe(&fields); zephir_array_fetch_string(&fields, &intermediate, SL("fields"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1388); - ZEPHIR_OBS_VAR(&values); + zephir_memory_observe(&values); zephir_array_fetch_string(&values, &intermediate, SL("values"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1389); ZEPHIR_INIT_VAR(&updateValues); array_init(&updateValues); @@ -2600,7 +2465,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeUpdate) object_init_ex(&_12$$11, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_NVAR(&_13$$11); ZEPHIR_CONCAT_SVS(&_13$$11, "Bound parameter '", &wildcard, "' cannot be replaced because it's not in the placeholders list"); - ZEPHIR_CALL_METHOD(NULL, &_12$$11, "__construct", &_14, 32, &_13$$11); + ZEPHIR_CALL_METHOD(NULL, &_12$$11, "__construct", &_14, 33, &_13$$11); zephir_check_call_status(); zephir_throw_exception_debug(&_12$$11, "phalcon/Mvc/Model/Query.zep", 1436); ZEPHIR_MM_RESTORE(); @@ -2618,7 +2483,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeUpdate) object_init_ex(&updateValue, phalcon_db_rawvalue_ce); ZEPHIR_CALL_METHOD(&_15$$13, &dialect, "getsqlexpression", &_16, 0, &exprValue); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &updateValue, "__construct", &_17, 35, &_15$$13); + ZEPHIR_CALL_METHOD(NULL, &updateValue, "__construct", &_17, 36, &_15$$13); zephir_check_call_status(); break; } while(0); @@ -2676,7 +2541,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeUpdate) object_init_ex(&_24$$20, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_NVAR(&_25$$20); ZEPHIR_CONCAT_SVS(&_25$$20, "Bound parameter '", &wildcard, "' cannot be replaced because it's not in the placeholders list"); - ZEPHIR_CALL_METHOD(NULL, &_24$$20, "__construct", &_14, 32, &_25$$20); + ZEPHIR_CALL_METHOD(NULL, &_24$$20, "__construct", &_14, 33, &_25$$20); zephir_check_call_status(); zephir_throw_exception_debug(&_24$$20, "phalcon/Mvc/Model/Query.zep", 1436); ZEPHIR_MM_RESTORE(); @@ -2694,7 +2559,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeUpdate) object_init_ex(&updateValue, phalcon_db_rawvalue_ce); ZEPHIR_CALL_METHOD(&_26$$22, &dialect, "getsqlexpression", &_27, 0, &exprValue); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &updateValue, "__construct", &_17, 35, &_26$$22); + ZEPHIR_CALL_METHOD(NULL, &updateValue, "__construct", &_17, 36, &_26$$22); zephir_check_call_status(); break; } while(0); @@ -2706,12 +2571,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeUpdate) } ZEPHIR_INIT_NVAR(&field); ZEPHIR_INIT_NVAR(&number); - ZEPHIR_CALL_METHOD(&records, this_ptr, "getrelatedrecords", NULL, 453, &model, &intermediate, &selectBindParams, &selectBindTypes); + ZEPHIR_CALL_METHOD(&records, this_ptr, "getrelatedrecords", NULL, 454, &model, &intermediate, &selectBindParams, &selectBindTypes); zephir_check_call_status(); if (!(zephir_fast_count_int(&records))) { object_init_ex(return_value, phalcon_mvc_model_query_status_ce); ZVAL_BOOL(&_28$$23, 1); - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 454, &_28$$23); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 455, &_28$$23); zephir_check_call_status(); RETURN_MM(); } @@ -2738,7 +2603,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeUpdate) zephir_check_call_status(); object_init_ex(return_value, phalcon_mvc_model_query_status_ce); ZVAL_BOOL(&_33$$25, 0); - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 454, &_33$$25, &record); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 455, &_33$$25, &record); zephir_check_call_status(); RETURN_MM(); } @@ -2749,7 +2614,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, executeUpdate) zephir_check_call_status(); object_init_ex(return_value, phalcon_mvc_model_query_status_ce); ZVAL_BOOL(&_35, 1); - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 454, &_35); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 455, &_35); zephir_check_call_status(); RETURN_MM(); } @@ -2767,26 +2632,20 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getCallArgument) ZVAL_UNDEF(&argument); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(argument) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &argument_param); ZEPHIR_OBS_COPY_OR_DUP(&argument, argument_param); - - zephir_array_fetch_string(&_0, &argument, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1523); if (ZEPHIR_IS_LONG(&_0, 352)) { zephir_create_array(return_value, 1, 0); add_assoc_stringl_ex(return_value, SL("type"), SL("all")); RETURN_MM(); } - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getexpression", NULL, 457, &argument); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getexpression", NULL, 458, &argument); zephir_check_call_status(); RETURN_MM(); } @@ -2824,19 +2683,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getCaseExpression) ZVAL_UNDEF(&_14$$7); ZVAL_UNDEF(&_16$$8); ZVAL_UNDEF(&_17$$8); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(expr) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &expr_param); ZEPHIR_OBS_COPY_OR_DUP(&expr, expr_param); - - ZEPHIR_INIT_VAR(&whenClauses); array_init(&whenClauses); zephir_array_fetch_string(&_0, &expr, SL("right"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1541); @@ -2851,11 +2704,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getCaseExpression) zephir_create_array(&_3$$4, 3, 0); add_assoc_stringl_ex(&_3$$4, SL("type"), SL("when")); zephir_array_fetch_string(&_5$$4, &whenExpr, SL("left"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1545); - ZEPHIR_CALL_METHOD(&_4$$4, this_ptr, "getexpression", &_6, 457, &_5$$4); + ZEPHIR_CALL_METHOD(&_4$$4, this_ptr, "getexpression", &_6, 458, &_5$$4); zephir_check_call_status(); zephir_array_update_string(&_3$$4, SL("expr"), &_4$$4, PH_COPY | PH_SEPARATE); zephir_array_fetch_string(&_7$$4, &whenExpr, SL("right"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1546); - ZEPHIR_CALL_METHOD(&_4$$4, this_ptr, "getexpression", &_6, 457, &_7$$4); + ZEPHIR_CALL_METHOD(&_4$$4, this_ptr, "getexpression", &_6, 458, &_7$$4); zephir_check_call_status(); zephir_array_update_string(&_3$$4, SL("then"), &_4$$4, PH_COPY | PH_SEPARATE); zephir_array_append(&whenClauses, &_3$$4, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1547); @@ -2864,7 +2717,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getCaseExpression) zephir_create_array(&_8$$5, 2, 0); add_assoc_stringl_ex(&_8$$5, SL("type"), SL("else")); zephir_array_fetch_string(&_10$$5, &whenExpr, SL("left"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1551); - ZEPHIR_CALL_METHOD(&_9$$5, this_ptr, "getexpression", &_6, 457, &_10$$5); + ZEPHIR_CALL_METHOD(&_9$$5, this_ptr, "getexpression", &_6, 458, &_10$$5); zephir_check_call_status(); zephir_array_update_string(&_8$$5, SL("expr"), &_9$$5, PH_COPY | PH_SEPARATE); zephir_array_append(&whenClauses, &_8$$5, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1552); @@ -2886,11 +2739,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getCaseExpression) zephir_create_array(&_11$$7, 3, 0); add_assoc_stringl_ex(&_11$$7, SL("type"), SL("when")); zephir_array_fetch_string(&_13$$7, &whenExpr, SL("left"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1545); - ZEPHIR_CALL_METHOD(&_12$$7, this_ptr, "getexpression", &_6, 457, &_13$$7); + ZEPHIR_CALL_METHOD(&_12$$7, this_ptr, "getexpression", &_6, 458, &_13$$7); zephir_check_call_status(); zephir_array_update_string(&_11$$7, SL("expr"), &_12$$7, PH_COPY | PH_SEPARATE); zephir_array_fetch_string(&_14$$7, &whenExpr, SL("right"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1546); - ZEPHIR_CALL_METHOD(&_12$$7, this_ptr, "getexpression", &_6, 457, &_14$$7); + ZEPHIR_CALL_METHOD(&_12$$7, this_ptr, "getexpression", &_6, 458, &_14$$7); zephir_check_call_status(); zephir_array_update_string(&_11$$7, SL("then"), &_12$$7, PH_COPY | PH_SEPARATE); zephir_array_append(&whenClauses, &_11$$7, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1547); @@ -2899,7 +2752,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getCaseExpression) zephir_create_array(&_15$$8, 2, 0); add_assoc_stringl_ex(&_15$$8, SL("type"), SL("else")); zephir_array_fetch_string(&_17$$8, &whenExpr, SL("left"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1551); - ZEPHIR_CALL_METHOD(&_16$$8, this_ptr, "getexpression", &_6, 457, &_17$$8); + ZEPHIR_CALL_METHOD(&_16$$8, this_ptr, "getexpression", &_6, 458, &_17$$8); zephir_check_call_status(); zephir_array_update_string(&_15$$8, SL("expr"), &_16$$8, PH_COPY | PH_SEPARATE); zephir_array_append(&whenClauses, &_15$$8, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 1552); @@ -2912,7 +2765,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getCaseExpression) zephir_create_array(return_value, 3, 0); add_assoc_stringl_ex(return_value, SL("type"), SL("case")); zephir_array_fetch_string(&_19, &expr, SL("left"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 1558); - ZEPHIR_CALL_METHOD(&_18, this_ptr, "getexpression", &_6, 457, &_19); + ZEPHIR_CALL_METHOD(&_18, this_ptr, "getexpression", &_6, 458, &_19); zephir_check_call_status(); zephir_array_update_string(return_value, SL("expr"), &_18, PH_COPY | PH_SEPARATE); zephir_array_update_string(return_value, SL("when-clauses"), &whenClauses, PH_COPY | PH_SEPARATE); @@ -3036,52 +2889,45 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression) ZVAL_UNDEF(&_87$$72); ZVAL_UNDEF(&_88$$73); ZVAL_UNDEF(&_89$$74); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(expr) Z_PARAM_OPTIONAL Z_PARAM_BOOL(quoting) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &expr_param, "ing_param); zephir_get_arrval(&expr, expr_param); if (!quoting_param) { quoting = 1; } else { - quoting = zephir_get_boolval(quoting_param); - } - - + } ZEPHIR_INIT_VAR(&left); ZVAL_NULL(&left); ZEPHIR_INIT_VAR(&right); ZVAL_NULL(&right); - ZEPHIR_OBS_VAR(&exprType); + zephir_memory_observe(&exprType); if (zephir_array_isset_string_fetch(&exprType, &expr, SL("type"), 0)) { tempNotQuoting = 1; if (!ZEPHIR_IS_LONG(&exprType, 409)) { - ZEPHIR_OBS_VAR(&exprLeft); + zephir_memory_observe(&exprLeft); if (zephir_array_isset_string_fetch(&exprLeft, &expr, SL("left"), 0)) { if (tempNotQuoting) { ZVAL_BOOL(&_0$$5, 1); } else { ZVAL_BOOL(&_0$$5, 0); } - ZEPHIR_CALL_METHOD(&left, this_ptr, "getexpression", NULL, 457, &exprLeft, &_0$$5); + ZEPHIR_CALL_METHOD(&left, this_ptr, "getexpression", NULL, 458, &exprLeft, &_0$$5); zephir_check_call_status(); } - ZEPHIR_OBS_VAR(&exprRight); + zephir_memory_observe(&exprRight); if (zephir_array_isset_string_fetch(&exprRight, &expr, SL("right"), 0)) { if (tempNotQuoting) { ZVAL_BOOL(&_1$$6, 1); } else { ZVAL_BOOL(&_1$$6, 0); } - ZEPHIR_CALL_METHOD(&right, this_ptr, "getexpression", NULL, 457, &exprRight, &_1$$6); + ZEPHIR_CALL_METHOD(&right, this_ptr, "getexpression", NULL, 458, &exprRight, &_1$$6); zephir_check_call_status(); } } @@ -3166,7 +3012,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression) break; } if (ZEPHIR_IS_LONG(&exprType, 355)) { - ZEPHIR_CALL_METHOD(&exprReturn, this_ptr, "getqualified", NULL, 458, &expr); + ZEPHIR_CALL_METHOD(&exprReturn, this_ptr, "getqualified", NULL, 459, &expr); zephir_check_call_status(); break; } @@ -3261,7 +3107,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression) ZEPHIR_INIT_VAR(&_18$$25); zephir_create_array(&_18$$25, 2, 0); add_assoc_stringl_ex(&_18$$25, SL("type"), SL("literal")); - ZEPHIR_OBS_VAR(&_19$$25); + zephir_memory_observe(&_19$$25); zephir_array_fetch_string(&_19$$25, &expr, SL("value"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1774); zephir_array_update_string(&_18$$25, SL("value"), &_19$$25, PH_COPY | PH_SEPARATE); ZEPHIR_CPY_WRT(&exprReturn, &_18$$25); @@ -3284,7 +3130,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression) break; } if (ZEPHIR_IS_LONG(&exprType, 260)) { - ZEPHIR_OBS_VAR(&value); + zephir_memory_observe(&value); zephir_array_fetch_string(&value, &expr, SL("value"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1795); if (quoting) { if (zephir_memnstr_str(&value, SL("'"), "phalcon/Mvc/Model/Query.zep", 1802)) { @@ -3337,9 +3183,9 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression) if (zephir_memnstr_str(&value, SL(":"), "phalcon/Mvc/Model/Query.zep", 1839)) { ZEPHIR_INIT_VAR(&valueParts); zephir_fast_explode_str(&valueParts, SL(":"), &value, LONG_MAX); - ZEPHIR_OBS_VAR(&name); + zephir_memory_observe(&name); zephir_array_fetch_long(&name, &valueParts, 0, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1841); - ZEPHIR_OBS_VAR(&bindType); + zephir_memory_observe(&bindType); zephir_array_fetch_long(&bindType, &valueParts, 1, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 1842); do { if (ZEPHIR_IS_STRING(&bindType, "str")) { @@ -3421,14 +3267,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression) break; } if (ZEPHIR_IS_STRING(&bindType, "array") || ZEPHIR_IS_STRING(&bindType, "array-str") || ZEPHIR_IS_STRING(&bindType, "array-int")) { - ZEPHIR_OBS_VAR(&bind); + zephir_memory_observe(&bind); zephir_read_property(&_49$$43, this_ptr, ZEND_STRL("bindParams"), PH_NOISY_CC | PH_READONLY); if (UNEXPECTED(!(zephir_array_isset_fetch(&bind, &_49$$43, &name, 0)))) { ZEPHIR_INIT_VAR(&_50$$44); object_init_ex(&_50$$44, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_VAR(&_51$$44); ZEPHIR_CONCAT_SV(&_51$$44, "Bind value is required for array type placeholder: ", &name); - ZEPHIR_CALL_METHOD(NULL, &_50$$44, "__construct", NULL, 32, &_51$$44); + ZEPHIR_CALL_METHOD(NULL, &_50$$44, "__construct", NULL, 33, &_51$$44); zephir_check_call_status(); zephir_throw_exception_debug(&_50$$44, "phalcon/Mvc/Model/Query.zep", 1912); ZEPHIR_MM_RESTORE(); @@ -3439,7 +3285,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression) object_init_ex(&_52$$45, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_VAR(&_53$$45); ZEPHIR_CONCAT_SV(&_53$$45, "Bind type requires an array in placeholder: ", &name); - ZEPHIR_CALL_METHOD(NULL, &_52$$45, "__construct", NULL, 32, &_53$$45); + ZEPHIR_CALL_METHOD(NULL, &_52$$45, "__construct", NULL, 33, &_53$$45); zephir_check_call_status(); zephir_throw_exception_debug(&_52$$45, "phalcon/Mvc/Model/Query.zep", 1918); ZEPHIR_MM_RESTORE(); @@ -3450,7 +3296,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression) object_init_ex(&_54$$46, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_VAR(&_55$$46); ZEPHIR_CONCAT_SV(&_55$$46, "At least one value must be bound in placeholder: ", &name); - ZEPHIR_CALL_METHOD(NULL, &_54$$46, "__construct", NULL, 32, &_55$$46); + ZEPHIR_CALL_METHOD(NULL, &_54$$46, "__construct", NULL, 33, &_55$$46); zephir_check_call_status(); zephir_throw_exception_debug(&_54$$46, "phalcon/Mvc/Model/Query.zep", 1924); ZEPHIR_MM_RESTORE(); @@ -3471,7 +3317,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression) object_init_ex(&_58$$47, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_VAR(&_59$$47); ZEPHIR_CONCAT_SV(&_59$$47, "Unknown bind type: ", &bindType); - ZEPHIR_CALL_METHOD(NULL, &_58$$47, "__construct", NULL, 32, &_59$$47); + ZEPHIR_CALL_METHOD(NULL, &_58$$47, "__construct", NULL, 33, &_59$$47); zephir_check_call_status(); zephir_throw_exception_debug(&_58$$47, "phalcon/Mvc/Model/Query.zep", 1939); ZEPHIR_MM_RESTORE(); @@ -3654,19 +3500,19 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression) ZEPHIR_INIT_VAR(&_79$$66); zephir_create_array(&_79$$66, 2, 0); add_assoc_stringl_ex(&_79$$66, SL("type"), SL("literal")); - ZEPHIR_OBS_VAR(&_80$$66); + zephir_memory_observe(&_80$$66); zephir_array_fetch_string(&_80$$66, &expr, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2115); zephir_array_update_string(&_79$$66, SL("value"), &_80$$66, PH_COPY | PH_SEPARATE); ZEPHIR_CPY_WRT(&exprReturn, &_79$$66); break; } if (ZEPHIR_IS_LONG(&exprType, 350)) { - ZEPHIR_CALL_METHOD(&exprReturn, this_ptr, "getfunctioncall", NULL, 459, &expr); + ZEPHIR_CALL_METHOD(&exprReturn, this_ptr, "getfunctioncall", NULL, 460, &expr); zephir_check_call_status(); break; } if (ZEPHIR_IS_LONG(&exprType, 409)) { - ZEPHIR_CALL_METHOD(&exprReturn, this_ptr, "getcaseexpression", NULL, 460, &expr); + ZEPHIR_CALL_METHOD(&exprReturn, this_ptr, "getcaseexpression", NULL, 461, &expr); zephir_check_call_status(); break; } @@ -3675,7 +3521,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression) zephir_create_array(&_81$$69, 2, 0); add_assoc_stringl_ex(&_81$$69, SL("type"), SL("select")); ZVAL_BOOL(&_83$$69, 1); - ZEPHIR_CALL_METHOD(&_82$$69, this_ptr, "_prepareselect", NULL, 449, &expr, &_83$$69); + ZEPHIR_CALL_METHOD(&_82$$69, this_ptr, "_prepareselect", NULL, 450, &expr, &_83$$69); zephir_check_call_status(); zephir_array_update_string(&_81$$69, SL("value"), &_82$$69, PH_COPY | PH_SEPARATE); ZEPHIR_CPY_WRT(&exprReturn, &_81$$69); @@ -3685,7 +3531,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression) object_init_ex(&_84$$70, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_VAR(&_85$$70); ZEPHIR_CONCAT_SV(&_85$$70, "Unknown expression type ", &exprType); - ZEPHIR_CALL_METHOD(NULL, &_84$$70, "__construct", NULL, 32, &_85$$70); + ZEPHIR_CALL_METHOD(NULL, &_84$$70, "__construct", NULL, 33, &_85$$70); zephir_check_call_status(); zephir_throw_exception_debug(&_84$$70, "phalcon/Mvc/Model/Query.zep", 2138); ZEPHIR_MM_RESTORE(); @@ -3695,7 +3541,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression) RETURN_CCTOR(&exprReturn); } if (zephir_array_isset_string(&expr, SL("domain"))) { - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getqualified", NULL, 458, &expr); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getqualified", NULL, 459, &expr); zephir_check_call_status(); RETURN_MM(); } @@ -3708,7 +3554,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression) { ZEPHIR_INIT_NVAR(&exprListItem); ZVAL_COPY(&exprListItem, _86$$72); - ZEPHIR_CALL_METHOD(&_88$$73, this_ptr, "getexpression", NULL, 457, &exprListItem); + ZEPHIR_CALL_METHOD(&_88$$73, this_ptr, "getexpression", NULL, 458, &exprListItem); zephir_check_call_status(); zephir_array_append(&listItems, &_88$$73, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2158); } ZEND_HASH_FOREACH_END(); @@ -3723,7 +3569,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getExpression) } ZEPHIR_CALL_METHOD(&exprListItem, &expr, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_89$$74, this_ptr, "getexpression", NULL, 457, &exprListItem); + ZEPHIR_CALL_METHOD(&_89$$74, this_ptr, "getexpression", NULL, 458, &exprListItem); zephir_check_call_status(); zephir_array_append(&listItems, &_89$$74, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2158); ZEPHIR_CALL_METHOD(NULL, &expr, "next", NULL, 0); @@ -3765,20 +3611,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getFunctionCall) ZVAL_UNDEF(&_7$$10); ZVAL_UNDEF(&_8$$10); ZVAL_UNDEF(&_9$$11); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(expr) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &expr_param); ZEPHIR_OBS_COPY_OR_DUP(&expr, expr_param); - - - ZEPHIR_OBS_VAR(&arguments); + zephir_memory_observe(&arguments); if (zephir_array_isset_string_fetch(&arguments, &expr, SL("arguments"), 0)) { if (zephir_array_isset_string(&expr, SL("distinct"))) { distinct = 1; @@ -3794,7 +3634,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getFunctionCall) { ZEPHIR_INIT_NVAR(&argument); ZVAL_COPY(&argument, _0$$6); - ZEPHIR_CALL_METHOD(&_2$$7, this_ptr, "getcallargument", &_3, 461, &argument); + ZEPHIR_CALL_METHOD(&_2$$7, this_ptr, "getcallargument", &_3, 462, &argument); zephir_check_call_status(); zephir_array_append(&functionArgs, &_2$$7, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2191); } ZEND_HASH_FOREACH_END(); @@ -3809,7 +3649,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getFunctionCall) } ZEPHIR_CALL_METHOD(&argument, &arguments, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_4$$8, this_ptr, "getcallargument", &_3, 461, &argument); + ZEPHIR_CALL_METHOD(&_4$$8, this_ptr, "getcallargument", &_3, 462, &argument); zephir_check_call_status(); zephir_array_append(&functionArgs, &_4$$8, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2191); ZEPHIR_CALL_METHOD(NULL, &arguments, "next", NULL, 0); @@ -3820,7 +3660,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getFunctionCall) } else { ZEPHIR_INIT_VAR(&_5$$9); zephir_create_array(&_5$$9, 1, 0); - ZEPHIR_CALL_METHOD(&_6$$9, this_ptr, "getcallargument", &_3, 461, &arguments); + ZEPHIR_CALL_METHOD(&_6$$9, this_ptr, "getcallargument", &_3, 462, &arguments); zephir_check_call_status(); zephir_array_fast_append(&_5$$9, &_6$$9); ZEPHIR_CPY_WRT(&functionArgs, &_5$$9); @@ -3828,7 +3668,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getFunctionCall) if (distinct) { zephir_create_array(return_value, 4, 0); add_assoc_stringl_ex(return_value, SL("type"), SL("functionCall")); - ZEPHIR_OBS_VAR(&_7$$10); + zephir_memory_observe(&_7$$10); zephir_array_fetch_string(&_7$$10, &expr, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2203); zephir_array_update_string(return_value, SL("name"), &_7$$10, PH_COPY | PH_SEPARATE); zephir_array_update_string(return_value, SL("arguments"), &functionArgs, PH_COPY | PH_SEPARATE); @@ -3839,7 +3679,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getFunctionCall) } else { zephir_create_array(return_value, 3, 0); add_assoc_stringl_ex(return_value, SL("type"), SL("functionCall")); - ZEPHIR_OBS_VAR(&_9$$11); + zephir_memory_observe(&_9$$11); zephir_array_fetch_string(&_9$$11, &expr, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2210); zephir_array_update_string(return_value, SL("name"), &_9$$11, PH_COPY | PH_SEPARATE); zephir_array_update_string(return_value, SL("arguments"), &functionArgs, PH_COPY | PH_SEPARATE); @@ -3848,7 +3688,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getFunctionCall) } zephir_create_array(return_value, 2, 0); add_assoc_stringl_ex(return_value, SL("type"), SL("functionCall")); - ZEPHIR_OBS_VAR(&_10); + zephir_memory_observe(&_10); zephir_array_fetch_string(&_10, &expr, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2219); zephir_array_update_string(return_value, SL("name"), &_10, PH_COPY | PH_SEPARATE); RETURN_MM(); @@ -3874,19 +3714,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getGroupClause) ZVAL_UNDEF(&_4$$5); ZVAL_UNDEF(&_5$$6); ZVAL_UNDEF(&_6$$6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(group) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &group_param); ZEPHIR_OBS_COPY_OR_DUP(&group, group_param); - - if (zephir_array_isset_long(&group, 0)) { ZEPHIR_INIT_VAR(&groupParts); array_init(&groupParts); @@ -3896,7 +3730,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getGroupClause) { ZEPHIR_INIT_NVAR(&groupItem); ZVAL_COPY(&groupItem, _0$$3); - ZEPHIR_CALL_METHOD(&_2$$4, this_ptr, "getexpression", &_3, 457, &groupItem); + ZEPHIR_CALL_METHOD(&_2$$4, this_ptr, "getexpression", &_3, 458, &groupItem); zephir_check_call_status(); zephir_array_append(&groupParts, &_2$$4, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2237); } ZEND_HASH_FOREACH_END(); @@ -3911,7 +3745,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getGroupClause) } ZEPHIR_CALL_METHOD(&groupItem, &group, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_4$$5, this_ptr, "getexpression", &_3, 457, &groupItem); + ZEPHIR_CALL_METHOD(&_4$$5, this_ptr, "getexpression", &_3, 458, &groupItem); zephir_check_call_status(); zephir_array_append(&groupParts, &_4$$5, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 2237); ZEPHIR_CALL_METHOD(NULL, &group, "next", NULL, 0); @@ -3922,7 +3756,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getGroupClause) } else { ZEPHIR_INIT_VAR(&_5$$6); zephir_create_array(&_5$$6, 1, 0); - ZEPHIR_CALL_METHOD(&_6$$6, this_ptr, "getexpression", &_3, 457, &group); + ZEPHIR_CALL_METHOD(&_6$$6, this_ptr, "getexpression", &_3, 458, &group); zephir_check_call_status(); zephir_array_fast_append(&_5$$6, &_6$$6); ZEPHIR_CPY_WRT(&groupParts, &_5$$6); @@ -3947,30 +3781,24 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getLimitClause) ZVAL_UNDEF(&offset); ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_1$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(limitClause) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &limitClause_param); ZEPHIR_OBS_COPY_OR_DUP(&limitClause, limitClause_param); - - ZEPHIR_INIT_VAR(&limit); array_init(&limit); - ZEPHIR_OBS_VAR(&number); + zephir_memory_observe(&number); if (zephir_array_isset_string_fetch(&number, &limitClause, SL("number"), 0)) { - ZEPHIR_CALL_METHOD(&_0$$3, this_ptr, "getexpression", NULL, 457, &number); + ZEPHIR_CALL_METHOD(&_0$$3, this_ptr, "getexpression", NULL, 458, &number); zephir_check_call_status(); zephir_array_update_string(&limit, SL("number"), &_0$$3, PH_COPY | PH_SEPARATE); } - ZEPHIR_OBS_VAR(&offset); + zephir_memory_observe(&offset); if (zephir_array_isset_string_fetch(&offset, &limitClause, SL("offset"), 0)) { - ZEPHIR_CALL_METHOD(&_1$$4, this_ptr, "getexpression", NULL, 457, &offset); + ZEPHIR_CALL_METHOD(&_1$$4, this_ptr, "getexpression", NULL, 458, &offset); zephir_check_call_status(); zephir_array_update_string(&limit, SL("offset"), &_1$$4, PH_COPY | PH_SEPARATE); } @@ -3986,7 +3814,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoin) zend_long ZEPHIR_LAST_CALL_STATUS; zval join; zval *manager, manager_sub, *join_param = NULL, qualified, modelName, source, model, schema, _0$$3; - zval *this_ptr = getThis(); ZVAL_UNDEF(&manager_sub); ZVAL_UNDEF(&qualified); @@ -3996,25 +3823,19 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoin) ZVAL_UNDEF(&schema); ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&join); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(manager, phalcon_mvc_model_managerinterface_ce) Z_PARAM_ARRAY(join) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &manager, &join_param); zephir_get_arrval(&join, join_param); - - - ZEPHIR_OBS_VAR(&qualified); + zephir_memory_observe(&qualified); if (zephir_array_isset_string_fetch(&qualified, &join, SL("qualified"), 0)) { zephir_array_fetch_string(&_0$$3, &qualified, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 2275); if (ZEPHIR_IS_LONG(&_0$$3, 355)) { - ZEPHIR_OBS_VAR(&modelName); + zephir_memory_observe(&modelName); zephir_array_fetch_string(&modelName, &qualified, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2276); ZEPHIR_CALL_METHOD(&model, manager, "load", NULL, 0, &modelName); zephir_check_call_status(); @@ -4050,20 +3871,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoinType) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(join) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &join_param); zephir_get_arrval(&join, join_param); - - - ZEPHIR_OBS_VAR(&type); + zephir_memory_observe(&type); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&type, &join, SL("type"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted SELECT AST", "phalcon/Mvc/Model/Query.zep", 2302); return; @@ -4091,7 +3906,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoinType) zephir_read_property(&_1, this_ptr, ZEND_STRL("phql"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_2); ZEPHIR_CONCAT_SVSV(&_2, "Unknown join type ", &type, ", when preparing: ", &_1); - ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 32, &_2); + ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 33, &_2); zephir_check_call_status(); zephir_throw_exception_debug(&_0, "phalcon/Mvc/Model/Query.zep", 2324); ZEPHIR_MM_RESTORE(); @@ -4226,19 +4041,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins) ZVAL_UNDEF(&_97$$75); ZVAL_UNDEF(&_99$$78); ZVAL_UNDEF(&_101$$82); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(select) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &select_param); zephir_get_arrval(&select, select_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("models"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&models, &_0); zephir_read_property(&_0, this_ptr, ZEND_STRL("sqlAliases"), PH_NOISY_CC | PH_READONLY); @@ -4266,7 +4075,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins) array_init(&joinPrepared); zephir_read_property(&_0, this_ptr, ZEND_STRL("manager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&manager, &_0); - ZEPHIR_OBS_VAR(&tables); + zephir_memory_observe(&tables); zephir_array_fetch_string(&tables, &select, SL("tables"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2360); if (!(zephir_array_isset_long(&tables, 0))) { ZEPHIR_INIT_VAR(&selectTables); @@ -4275,7 +4084,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins) } else { ZEPHIR_CPY_WRT(&selectTables, &tables); } - ZEPHIR_OBS_VAR(&joins); + zephir_memory_observe(&joins); zephir_array_fetch_string(&joins, &select, SL("joins"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2368); if (!(zephir_array_isset_long(&joins, 0))) { ZEPHIR_INIT_VAR(&selectJoins); @@ -4290,7 +4099,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins) { ZEPHIR_INIT_NVAR(&joinItem); ZVAL_COPY(&joinItem, _1); - ZEPHIR_CALL_METHOD(&joinData, this_ptr, "getjoin", &_3, 462, &manager, &joinItem); + ZEPHIR_CALL_METHOD(&joinData, this_ptr, "getjoin", &_3, 463, &manager, &joinItem); zephir_check_call_status(); ZEPHIR_OBS_NVAR(&source); zephir_array_fetch_string(&source, &joinData, SL("source"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2382); @@ -4304,7 +4113,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins) zephir_create_array(&completeSource, 2, 0); zephir_array_fast_append(&completeSource, &source); zephir_array_fast_append(&completeSource, &schema); - ZEPHIR_CALL_METHOD(&joinType, this_ptr, "getjointype", &_4, 463, &joinItem); + ZEPHIR_CALL_METHOD(&joinType, this_ptr, "getjointype", &_4, 464, &joinItem); zephir_check_call_status(); ZEPHIR_OBS_NVAR(&aliasExpr); if (zephir_array_isset_string_fetch(&aliasExpr, &joinItem, SL("alias"), 0)) { @@ -4316,7 +4125,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins) zephir_read_property(&_6$$9, this_ptr, ZEND_STRL("phql"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_NVAR(&_7$$9); ZEPHIR_CONCAT_SVSV(&_7$$9, "Cannot use '", &alias, "' as join alias because it was already used, when preparing: ", &_6$$9); - ZEPHIR_CALL_METHOD(NULL, &_5$$9, "__construct", &_8, 32, &_7$$9); + ZEPHIR_CALL_METHOD(NULL, &_5$$9, "__construct", &_8, 33, &_7$$9); zephir_check_call_status(); zephir_throw_exception_debug(&_5$$9, "phalcon/Mvc/Model/Query.zep", 2405); ZEPHIR_MM_RESTORE(); @@ -4339,7 +4148,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins) zephir_read_property(&_10$$11, this_ptr, ZEND_STRL("phql"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_NVAR(&_11$$11); ZEPHIR_CONCAT_SVSV(&_11$$11, "Cannot use '", &realModelName, "' as join alias because it was already used, when preparing: ", &_10$$11); - ZEPHIR_CALL_METHOD(NULL, &_9$$11, "__construct", &_8, 32, &_11$$11); + ZEPHIR_CALL_METHOD(NULL, &_9$$11, "__construct", &_8, 33, &_11$$11); zephir_check_call_status(); zephir_throw_exception_debug(&_9$$11, "phalcon/Mvc/Model/Query.zep", 2464); ZEPHIR_MM_RESTORE(); @@ -4368,7 +4177,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins) } ZEPHIR_CALL_METHOD(&joinItem, &selectJoins, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&joinData, this_ptr, "getjoin", &_3, 462, &manager, &joinItem); + ZEPHIR_CALL_METHOD(&joinData, this_ptr, "getjoin", &_3, 463, &manager, &joinItem); zephir_check_call_status(); ZEPHIR_OBS_NVAR(&source); zephir_array_fetch_string(&source, &joinData, SL("source"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2382); @@ -4383,7 +4192,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins) zephir_array_fast_append(&_12$$12, &source); zephir_array_fast_append(&_12$$12, &schema); ZEPHIR_CPY_WRT(&completeSource, &_12$$12); - ZEPHIR_CALL_METHOD(&joinType, this_ptr, "getjointype", &_4, 463, &joinItem); + ZEPHIR_CALL_METHOD(&joinType, this_ptr, "getjointype", &_4, 464, &joinItem); zephir_check_call_status(); ZEPHIR_OBS_NVAR(&aliasExpr); if (zephir_array_isset_string_fetch(&aliasExpr, &joinItem, SL("alias"), 0)) { @@ -4395,7 +4204,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins) zephir_read_property(&_14$$14, this_ptr, ZEND_STRL("phql"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_NVAR(&_15$$14); ZEPHIR_CONCAT_SVSV(&_15$$14, "Cannot use '", &alias, "' as join alias because it was already used, when preparing: ", &_14$$14); - ZEPHIR_CALL_METHOD(NULL, &_13$$14, "__construct", &_8, 32, &_15$$14); + ZEPHIR_CALL_METHOD(NULL, &_13$$14, "__construct", &_8, 33, &_15$$14); zephir_check_call_status(); zephir_throw_exception_debug(&_13$$14, "phalcon/Mvc/Model/Query.zep", 2405); ZEPHIR_MM_RESTORE(); @@ -4418,7 +4227,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins) zephir_read_property(&_17$$16, this_ptr, ZEND_STRL("phql"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_NVAR(&_18$$16); ZEPHIR_CONCAT_SVSV(&_18$$16, "Cannot use '", &realModelName, "' as join alias because it was already used, when preparing: ", &_17$$16); - ZEPHIR_CALL_METHOD(NULL, &_16$$16, "__construct", &_8, 32, &_18$$16); + ZEPHIR_CALL_METHOD(NULL, &_16$$16, "__construct", &_8, 33, &_18$$16); zephir_check_call_status(); zephir_throw_exception_debug(&_16$$16, "phalcon/Mvc/Model/Query.zep", 2464); ZEPHIR_MM_RESTORE(); @@ -4460,7 +4269,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins) ZVAL_COPY(&joinItem, _19); ZEPHIR_OBS_NVAR(&joinExpr); if (zephir_array_isset_string_fetch(&joinExpr, &joinItem, SL("conditions"), 0)) { - ZEPHIR_CALL_METHOD(&_23$$18, this_ptr, "getexpression", &_24, 457, &joinExpr); + ZEPHIR_CALL_METHOD(&_23$$18, this_ptr, "getexpression", &_24, 458, &joinExpr); zephir_check_call_status(); zephir_array_update_zval(&joinPreCondition, &joinAliasName, &_23$$18, PH_COPY | PH_SEPARATE); } @@ -4480,7 +4289,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins) zephir_check_call_status(); ZEPHIR_OBS_NVAR(&joinExpr); if (zephir_array_isset_string_fetch(&joinExpr, &joinItem, SL("conditions"), 0)) { - ZEPHIR_CALL_METHOD(&_25$$20, this_ptr, "getexpression", &_24, 457, &joinExpr); + ZEPHIR_CALL_METHOD(&_25$$20, this_ptr, "getexpression", &_24, 458, &joinExpr); zephir_check_call_status(); zephir_array_update_zval(&joinPreCondition, &joinAliasName, &_25$$20, PH_COPY | PH_SEPARATE); } @@ -4635,7 +4444,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins) zephir_read_property(&_53$$31, this_ptr, ZEND_STRL("phql"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_NVAR(&_54$$31); ZEPHIR_CONCAT_SVSVSV(&_54$$31, "There is more than one relation between models '", &fromModelName, "' and '", &joinModel, "', the join must be done using an alias, when preparing: ", &_53$$31); - ZEPHIR_CALL_METHOD(NULL, &_52$$31, "__construct", &_8, 32, &_54$$31); + ZEPHIR_CALL_METHOD(NULL, &_52$$31, "__construct", &_8, 33, &_54$$31); zephir_check_call_status(); zephir_throw_exception_debug(&_52$$31, "phalcon/Mvc/Model/Query.zep", 2611); ZEPHIR_MM_RESTORE(); @@ -4651,10 +4460,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins) ZEPHIR_CALL_METHOD(&_55$$32, &relation, "isthrough", NULL, 0); zephir_check_call_status(); if (!(zephir_is_true(&_55$$32))) { - ZEPHIR_CALL_METHOD(&sqlJoin, this_ptr, "getsinglejoin", &_56, 464, &joinType, &joinSource, &modelAlias, &joinAlias, &relation); + ZEPHIR_CALL_METHOD(&sqlJoin, this_ptr, "getsinglejoin", &_56, 465, &joinType, &joinSource, &modelAlias, &joinAlias, &relation); zephir_check_call_status(); } else { - ZEPHIR_CALL_METHOD(&sqlJoin, this_ptr, "getmultijoin", &_57, 465, &joinType, &joinSource, &modelAlias, &joinAlias, &relation); + ZEPHIR_CALL_METHOD(&sqlJoin, this_ptr, "getmultijoin", &_57, 466, &joinType, &joinSource, &modelAlias, &joinAlias, &relation); zephir_check_call_status(); } if (zephir_array_isset_long(&sqlJoin, 0)) { @@ -4741,7 +4550,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins) zephir_read_property(&_67$$45, this_ptr, ZEND_STRL("phql"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_NVAR(&_68$$45); ZEPHIR_CONCAT_SVSVSV(&_68$$45, "There is more than one relation between models '", &fromModelName, "' and '", &joinModel, "', the join must be done using an alias, when preparing: ", &_67$$45); - ZEPHIR_CALL_METHOD(NULL, &_66$$45, "__construct", &_8, 32, &_68$$45); + ZEPHIR_CALL_METHOD(NULL, &_66$$45, "__construct", &_8, 33, &_68$$45); zephir_check_call_status(); zephir_throw_exception_debug(&_66$$45, "phalcon/Mvc/Model/Query.zep", 2611); ZEPHIR_MM_RESTORE(); @@ -4757,10 +4566,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins) ZEPHIR_CALL_METHOD(&_69$$46, &relation, "isthrough", NULL, 0); zephir_check_call_status(); if (!(zephir_is_true(&_69$$46))) { - ZEPHIR_CALL_METHOD(&sqlJoin, this_ptr, "getsinglejoin", &_56, 464, &joinType, &joinSource, &modelAlias, &joinAlias, &relation); + ZEPHIR_CALL_METHOD(&sqlJoin, this_ptr, "getsinglejoin", &_56, 465, &joinType, &joinSource, &modelAlias, &joinAlias, &relation); zephir_check_call_status(); } else { - ZEPHIR_CALL_METHOD(&sqlJoin, this_ptr, "getmultijoin", &_57, 465, &joinType, &joinSource, &modelAlias, &joinAlias, &relation); + ZEPHIR_CALL_METHOD(&sqlJoin, this_ptr, "getmultijoin", &_57, 466, &joinType, &joinSource, &modelAlias, &joinAlias, &relation); zephir_check_call_status(); } if (zephir_array_isset_long(&sqlJoin, 0)) { @@ -4865,7 +4674,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins) zephir_read_property(&_83$$60, this_ptr, ZEND_STRL("phql"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_NVAR(&_84$$60); ZEPHIR_CONCAT_SVSVSV(&_84$$60, "There is more than one relation between models '", &fromModelName, "' and '", &joinModel, "', the join must be done using an alias, when preparing: ", &_83$$60); - ZEPHIR_CALL_METHOD(NULL, &_82$$60, "__construct", &_8, 32, &_84$$60); + ZEPHIR_CALL_METHOD(NULL, &_82$$60, "__construct", &_8, 33, &_84$$60); zephir_check_call_status(); zephir_throw_exception_debug(&_82$$60, "phalcon/Mvc/Model/Query.zep", 2611); ZEPHIR_MM_RESTORE(); @@ -4881,10 +4690,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins) ZEPHIR_CALL_METHOD(&_85$$61, &relation, "isthrough", NULL, 0); zephir_check_call_status(); if (!(zephir_is_true(&_85$$61))) { - ZEPHIR_CALL_METHOD(&sqlJoin, this_ptr, "getsinglejoin", &_56, 464, &joinType, &joinSource, &modelAlias, &joinAlias, &relation); + ZEPHIR_CALL_METHOD(&sqlJoin, this_ptr, "getsinglejoin", &_56, 465, &joinType, &joinSource, &modelAlias, &joinAlias, &relation); zephir_check_call_status(); } else { - ZEPHIR_CALL_METHOD(&sqlJoin, this_ptr, "getmultijoin", &_57, 465, &joinType, &joinSource, &modelAlias, &joinAlias, &relation); + ZEPHIR_CALL_METHOD(&sqlJoin, this_ptr, "getmultijoin", &_57, 466, &joinType, &joinSource, &modelAlias, &joinAlias, &relation); zephir_check_call_status(); } if (zephir_array_isset_long(&sqlJoin, 0)) { @@ -4971,7 +4780,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins) zephir_read_property(&_95$$74, this_ptr, ZEND_STRL("phql"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_NVAR(&_96$$74); ZEPHIR_CONCAT_SVSVSV(&_96$$74, "There is more than one relation between models '", &fromModelName, "' and '", &joinModel, "', the join must be done using an alias, when preparing: ", &_95$$74); - ZEPHIR_CALL_METHOD(NULL, &_94$$74, "__construct", &_8, 32, &_96$$74); + ZEPHIR_CALL_METHOD(NULL, &_94$$74, "__construct", &_8, 33, &_96$$74); zephir_check_call_status(); zephir_throw_exception_debug(&_94$$74, "phalcon/Mvc/Model/Query.zep", 2611); ZEPHIR_MM_RESTORE(); @@ -4987,10 +4796,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getJoins) ZEPHIR_CALL_METHOD(&_97$$75, &relation, "isthrough", NULL, 0); zephir_check_call_status(); if (!(zephir_is_true(&_97$$75))) { - ZEPHIR_CALL_METHOD(&sqlJoin, this_ptr, "getsinglejoin", &_56, 464, &joinType, &joinSource, &modelAlias, &joinAlias, &relation); + ZEPHIR_CALL_METHOD(&sqlJoin, this_ptr, "getsinglejoin", &_56, 465, &joinType, &joinSource, &modelAlias, &joinAlias, &relation); zephir_check_call_status(); } else { - ZEPHIR_CALL_METHOD(&sqlJoin, this_ptr, "getmultijoin", &_57, 465, &joinType, &joinSource, &modelAlias, &joinAlias, &relation); + ZEPHIR_CALL_METHOD(&sqlJoin, this_ptr, "getmultijoin", &_57, 466, &joinType, &joinSource, &modelAlias, &joinAlias, &relation); zephir_check_call_status(); } if (zephir_array_isset_long(&sqlJoin, 0)) { @@ -5119,8 +4928,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getMultiJoin) ZVAL_UNDEF(&_26$$8); ZVAL_UNDEF(&_27$$8); ZVAL_UNDEF(&_28$$8); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(5, 5) Z_PARAM_STR(joinType) Z_PARAM_ZVAL(joinSource) @@ -5128,10 +4935,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getMultiJoin) Z_PARAM_STR(joinAlias) Z_PARAM_OBJECT_OF_CLASS(relation, phalcon_mvc_model_relationinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 5, 0, &joinType_param, &joinSource, &modelAlias_param, &joinAlias_param, &relation); if (UNEXPECTED(Z_TYPE_P(joinType_param) != IS_STRING && Z_TYPE_P(joinType_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'joinType' must be of the type string")); @@ -5144,8 +4949,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getMultiJoin) } zephir_get_strval(&modelAlias, modelAlias_param); zephir_get_strval(&joinAlias, joinAlias_param); - - ZEPHIR_INIT_VAR(&sqlJoins); array_init(&sqlJoins); ZEPHIR_CALL_METHOD(&fields, relation, "getfields", NULL, 0); @@ -5189,7 +4992,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getMultiJoin) zephir_read_property(&_6$$5, this_ptr, ZEND_STRL("phql"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_NVAR(&_7$$5); ZEPHIR_CONCAT_SVSVSV(&_7$$5, "The number of fields must be equal to the number of referenced fields in join ", &modelAlias, "-", &joinAlias, ", when preparing: ", &_6$$5); - ZEPHIR_CALL_METHOD(NULL, &_5$$5, "__construct", &_8, 32, &_7$$5); + ZEPHIR_CALL_METHOD(NULL, &_5$$5, "__construct", &_8, 33, &_7$$5); zephir_check_call_status(); zephir_throw_exception_debug(&_5$$5, "phalcon/Mvc/Model/Query.zep", 2770); ZEPHIR_MM_RESTORE(); @@ -5206,7 +5009,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getMultiJoin) add_assoc_long_ex(&_10$$4, SL("type"), 355); zephir_array_update_string(&_10$$4, SL("domain"), &modelAlias, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_10$$4, SL("name"), &field, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(&_9$$4, this_ptr, "getqualified", &_11, 458, &_10$$4); + ZEPHIR_CALL_METHOD(&_9$$4, this_ptr, "getqualified", &_11, 459, &_10$$4); zephir_check_call_status(); zephir_array_update_string(&sqlEqualsJoinCondition, SL("left"), &_9$$4, PH_COPY | PH_SEPARATE); ZEPHIR_INIT_NVAR(&_12$$4); @@ -5214,7 +5017,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getMultiJoin) add_assoc_stringl_ex(&_12$$4, SL("type"), SL("qualified")); zephir_array_update_string(&_12$$4, SL("domain"), &joinAlias, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_12$$4, SL("name"), &referencedFields, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(&_9$$4, this_ptr, "getqualified", &_11, 458, &_12$$4); + ZEPHIR_CALL_METHOD(&_9$$4, this_ptr, "getqualified", &_11, 459, &_12$$4); zephir_check_call_status(); zephir_array_update_string(&sqlEqualsJoinCondition, SL("right"), &_9$$4, PH_COPY | PH_SEPARATE); } ZEND_HASH_FOREACH_END(); @@ -5237,7 +5040,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getMultiJoin) zephir_read_property(&_14$$7, this_ptr, ZEND_STRL("phql"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_NVAR(&_15$$7); ZEPHIR_CONCAT_SVSVSV(&_15$$7, "The number of fields must be equal to the number of referenced fields in join ", &modelAlias, "-", &joinAlias, ", when preparing: ", &_14$$7); - ZEPHIR_CALL_METHOD(NULL, &_13$$7, "__construct", &_8, 32, &_15$$7); + ZEPHIR_CALL_METHOD(NULL, &_13$$7, "__construct", &_8, 33, &_15$$7); zephir_check_call_status(); zephir_throw_exception_debug(&_13$$7, "phalcon/Mvc/Model/Query.zep", 2770); ZEPHIR_MM_RESTORE(); @@ -5254,7 +5057,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getMultiJoin) add_assoc_long_ex(&_18$$6, SL("type"), 355); zephir_array_update_string(&_18$$6, SL("domain"), &modelAlias, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_18$$6, SL("name"), &field, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(&_17$$6, this_ptr, "getqualified", &_11, 458, &_18$$6); + ZEPHIR_CALL_METHOD(&_17$$6, this_ptr, "getqualified", &_11, 459, &_18$$6); zephir_check_call_status(); zephir_array_update_string(&_16$$6, SL("left"), &_17$$6, PH_COPY | PH_SEPARATE); ZEPHIR_INIT_NVAR(&_19$$6); @@ -5262,7 +5065,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getMultiJoin) add_assoc_stringl_ex(&_19$$6, SL("type"), SL("qualified")); zephir_array_update_string(&_19$$6, SL("domain"), &joinAlias, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_19$$6, SL("name"), &referencedFields, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(&_17$$6, this_ptr, "getqualified", &_11, 458, &_19$$6); + ZEPHIR_CALL_METHOD(&_17$$6, this_ptr, "getqualified", &_11, 459, &_19$$6); zephir_check_call_status(); zephir_array_update_string(&_16$$6, SL("right"), &_17$$6, PH_COPY | PH_SEPARATE); ZEPHIR_CPY_WRT(&sqlEqualsJoinCondition, &_16$$6); @@ -5294,7 +5097,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getMultiJoin) add_assoc_long_ex(&_25$$8, SL("type"), 355); zephir_array_update_string(&_25$$8, SL("domain"), &modelAlias, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_25$$8, SL("name"), &fields, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(&_24$$8, this_ptr, "getqualified", &_11, 458, &_25$$8); + ZEPHIR_CALL_METHOD(&_24$$8, this_ptr, "getqualified", &_11, 459, &_25$$8); zephir_check_call_status(); zephir_array_update_string(&_23$$8, SL("left"), &_24$$8, PH_COPY | PH_SEPARATE); ZEPHIR_INIT_VAR(&_26$$8); @@ -5302,7 +5105,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getMultiJoin) add_assoc_stringl_ex(&_26$$8, SL("type"), SL("qualified")); zephir_array_update_string(&_26$$8, SL("domain"), &intermediateModelName, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_26$$8, SL("name"), &intermediateFields, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(&_24$$8, this_ptr, "getqualified", &_11, 458, &_26$$8); + ZEPHIR_CALL_METHOD(&_24$$8, this_ptr, "getqualified", &_11, 459, &_26$$8); zephir_check_call_status(); zephir_array_update_string(&_23$$8, SL("right"), &_24$$8, PH_COPY | PH_SEPARATE); zephir_array_fast_append(&_22$$8, &_23$$8); @@ -5323,7 +5126,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getMultiJoin) add_assoc_long_ex(&_27$$8, SL("type"), 355); zephir_array_update_string(&_27$$8, SL("domain"), &intermediateModelName, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_27$$8, SL("name"), &intermediateReferencedFields, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(&_24$$8, this_ptr, "getqualified", &_11, 458, &_27$$8); + ZEPHIR_CALL_METHOD(&_24$$8, this_ptr, "getqualified", &_11, 459, &_27$$8); zephir_check_call_status(); zephir_array_update_string(&_23$$8, SL("left"), &_24$$8, PH_COPY | PH_SEPARATE); ZEPHIR_INIT_VAR(&_28$$8); @@ -5331,7 +5134,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getMultiJoin) add_assoc_stringl_ex(&_28$$8, SL("type"), SL("qualified")); zephir_array_update_string(&_28$$8, SL("domain"), &referencedModelName, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_28$$8, SL("name"), &referencedFields, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(&_24$$8, this_ptr, "getqualified", &_11, 458, &_28$$8); + ZEPHIR_CALL_METHOD(&_24$$8, this_ptr, "getqualified", &_11, 459, &_28$$8); zephir_check_call_status(); zephir_array_update_string(&_23$$8, SL("right"), &_24$$8, PH_COPY | PH_SEPARATE); zephir_array_fast_append(&_22$$8, &_23$$8); @@ -5375,18 +5178,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getOrderClause) ZVAL_UNDEF(&_13$$14); ZVAL_UNDEF(&orderParts); ZVAL_UNDEF(&orderPartSort); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(order) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &order); - - if (!(zephir_array_isset_long(order, 0))) { ZEPHIR_INIT_VAR(&orderColumns); zephir_create_array(&orderColumns, 1, 0); @@ -5403,7 +5200,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getOrderClause) ZEPHIR_INIT_NVAR(&orderItem); ZVAL_COPY(&orderItem, _0); zephir_array_fetch_string(&_2$$5, &orderItem, SL("column"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 2894); - ZEPHIR_CALL_METHOD(&orderPartExpr, this_ptr, "getexpression", &_3, 457, &_2$$5); + ZEPHIR_CALL_METHOD(&orderPartExpr, this_ptr, "getexpression", &_3, 458, &_2$$5); zephir_check_call_status(); if (zephir_array_isset_string_fetch(&orderSort, &orderItem, SL("sort"), 1)) { if (ZEPHIR_IS_LONG(&orderSort, 327)) { @@ -5442,7 +5239,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getOrderClause) ZEPHIR_CALL_METHOD(&orderItem, &orderColumns, "current", NULL, 0); zephir_check_call_status(); zephir_array_fetch_string(&_8$$10, &orderItem, SL("column"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query.zep", 2894); - ZEPHIR_CALL_METHOD(&orderPartExpr, this_ptr, "getexpression", &_3, 457, &_8$$10); + ZEPHIR_CALL_METHOD(&orderPartExpr, this_ptr, "getexpression", &_3, 458, &_8$$10); zephir_check_call_status(); ZEPHIR_OBS_NVAR(&orderSort); if (zephir_array_isset_string_fetch(&orderSort, &orderItem, SL("sort"), 0)) { @@ -5543,20 +5340,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getQualified) ZVAL_UNDEF(&_38$$27); ZVAL_UNDEF(&_39$$27); ZVAL_UNDEF(&_40$$27); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(expr) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &expr_param); ZEPHIR_OBS_COPY_OR_DUP(&expr, expr_param); - - - ZEPHIR_OBS_VAR(&columnName); + zephir_memory_observe(&columnName); zephir_array_fetch_string(&columnName, &expr, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 2926); zephir_read_property(&_0, this_ptr, ZEND_STRL("nestingLevel"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&nestingLevel, &_0); @@ -5586,18 +5377,18 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getQualified) } zephir_read_property(&_6, this_ptr, ZEND_STRL("metaData"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&metaData, &_6); - ZEPHIR_OBS_VAR(&columnDomain); + zephir_memory_observe(&columnDomain); if (zephir_array_isset_string_fetch(&columnDomain, &expr, SL("domain"), 0)) { zephir_read_property(&_7$$6, this_ptr, ZEND_STRL("sqlAliases"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&sqlAliases, &_7$$6); - ZEPHIR_OBS_VAR(&source); + zephir_memory_observe(&source); if (UNEXPECTED(!(zephir_array_isset_fetch(&source, &sqlAliases, &columnDomain, 0)))) { ZEPHIR_INIT_VAR(&_8$$7); object_init_ex(&_8$$7, phalcon_mvc_model_exception_ce); zephir_read_property(&_9$$7, this_ptr, ZEND_STRL("phql"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_10$$7); ZEPHIR_CONCAT_SVSV(&_10$$7, "Unknown model or alias '", &columnDomain, "' (11), when preparing: ", &_9$$7); - ZEPHIR_CALL_METHOD(NULL, &_8$$7, "__construct", NULL, 32, &_10$$7); + ZEPHIR_CALL_METHOD(NULL, &_8$$7, "__construct", NULL, 33, &_10$$7); zephir_check_call_status(); zephir_throw_exception_debug(&_8$$7, "phalcon/Mvc/Model/Query.zep", 2960); ZEPHIR_MM_RESTORE(); @@ -5606,14 +5397,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getQualified) if (ZEPHIR_GLOBAL(orm).column_renaming) { zephir_read_property(&_11$$8, this_ptr, ZEND_STRL("sqlAliasesModelsInstances"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&sqlAliasesModelsInstances, &_11$$8); - ZEPHIR_OBS_VAR(&model); + zephir_memory_observe(&model); if (UNEXPECTED(!(zephir_array_isset_fetch(&model, &sqlAliasesModelsInstances, &columnDomain, 0)))) { ZEPHIR_INIT_VAR(&_12$$9); object_init_ex(&_12$$9, phalcon_mvc_model_exception_ce); zephir_read_property(&_13$$9, this_ptr, ZEND_STRL("phql"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_14$$9); ZEPHIR_CONCAT_SVSV(&_14$$9, "There is no model related to model or alias '", &columnDomain, "', when executing: ", &_13$$9); - ZEPHIR_CALL_METHOD(NULL, &_12$$9, "__construct", NULL, 32, &_14$$9); + ZEPHIR_CALL_METHOD(NULL, &_12$$9, "__construct", NULL, 33, &_14$$9); zephir_check_call_status(); zephir_throw_exception_debug(&_12$$9, "phalcon/Mvc/Model/Query.zep", 2979); ZEPHIR_MM_RESTORE(); @@ -5626,14 +5417,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getQualified) ZVAL_NULL(&columnMap); } if (Z_TYPE_P(&columnMap) == IS_ARRAY) { - ZEPHIR_OBS_VAR(&realColumnName); + zephir_memory_observe(&realColumnName); if (UNEXPECTED(!(zephir_array_isset_fetch(&realColumnName, &columnMap, &columnName, 0)))) { ZEPHIR_INIT_VAR(&_15$$12); object_init_ex(&_15$$12, phalcon_mvc_model_exception_ce); zephir_read_property(&_16$$12, this_ptr, ZEND_STRL("phql"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_17$$12); ZEPHIR_CONCAT_SVSVSV(&_17$$12, "Column '", &columnName, "' doesn't belong to the model or alias '", &columnDomain, "', when executing: ", &_16$$12); - ZEPHIR_CALL_METHOD(NULL, &_15$$12, "__construct", NULL, 32, &_17$$12); + ZEPHIR_CALL_METHOD(NULL, &_15$$12, "__construct", NULL, 33, &_17$$12); zephir_check_call_status(); zephir_throw_exception_debug(&_15$$12, "phalcon/Mvc/Model/Query.zep", 2991); ZEPHIR_MM_RESTORE(); @@ -5663,7 +5454,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getQualified) zephir_read_property(&_24$$17, this_ptr, ZEND_STRL("phql"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_NVAR(&_25$$17); ZEPHIR_CONCAT_SVSV(&_25$$17, "The column '", &columnName, "' is ambiguous, when preparing: ", &_24$$17); - ZEPHIR_CALL_METHOD(NULL, &_23$$17, "__construct", NULL, 32, &_25$$17); + ZEPHIR_CALL_METHOD(NULL, &_23$$17, "__construct", NULL, 33, &_25$$17); zephir_check_call_status(); zephir_throw_exception_debug(&_23$$17, "phalcon/Mvc/Model/Query.zep", 3014); ZEPHIR_MM_RESTORE(); @@ -5693,7 +5484,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getQualified) zephir_read_property(&_29$$20, this_ptr, ZEND_STRL("phql"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_NVAR(&_30$$20); ZEPHIR_CONCAT_SVSV(&_30$$20, "The column '", &columnName, "' is ambiguous, when preparing: ", &_29$$20); - ZEPHIR_CALL_METHOD(NULL, &_28$$20, "__construct", NULL, 32, &_30$$20); + ZEPHIR_CALL_METHOD(NULL, &_28$$20, "__construct", NULL, 33, &_30$$20); zephir_check_call_status(); zephir_throw_exception_debug(&_28$$20, "phalcon/Mvc/Model/Query.zep", 3014); ZEPHIR_MM_RESTORE(); @@ -5712,7 +5503,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getQualified) zephir_read_property(&_32$$21, this_ptr, ZEND_STRL("phql"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_33$$21); ZEPHIR_CONCAT_SVSV(&_33$$21, "Column '", &columnName, "' doesn't belong to any of the selected models (1), when preparing: ", &_32$$21); - ZEPHIR_CALL_METHOD(NULL, &_31$$21, "__construct", NULL, 32, &_33$$21); + ZEPHIR_CALL_METHOD(NULL, &_31$$21, "__construct", NULL, 33, &_33$$21); zephir_check_call_status(); zephir_throw_exception_debug(&_31$$21, "phalcon/Mvc/Model/Query.zep", 3028); ZEPHIR_MM_RESTORE(); @@ -5733,7 +5524,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getQualified) zephir_read_property(&_36$$23, this_ptr, ZEND_STRL("phql"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_37$$23); ZEPHIR_CONCAT_SVSV(&_37$$23, "Can't obtain model's source from models list: '", &className, "', when preparing: ", &_36$$23); - ZEPHIR_CALL_METHOD(NULL, &_35$$23, "__construct", NULL, 32, &_37$$23); + ZEPHIR_CALL_METHOD(NULL, &_35$$23, "__construct", NULL, 33, &_37$$23); zephir_check_call_status(); zephir_throw_exception_debug(&_35$$23, "phalcon/Mvc/Model/Query.zep", 3050); ZEPHIR_MM_RESTORE(); @@ -5754,7 +5545,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getQualified) zephir_read_property(&_39$$27, this_ptr, ZEND_STRL("phql"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_40$$27); ZEPHIR_CONCAT_SVSV(&_40$$27, "Column '", &columnName, "' doesn't belong to any of the selected models (3), when preparing: ", &_39$$27); - ZEPHIR_CALL_METHOD(NULL, &_38$$27, "__construct", NULL, 32, &_40$$27); + ZEPHIR_CALL_METHOD(NULL, &_38$$27, "__construct", NULL, 33, &_40$$27); zephir_check_call_status(); zephir_throw_exception_debug(&_38$$27, "phalcon/Mvc/Model/Query.zep", 3069); ZEPHIR_MM_RESTORE(); @@ -5792,7 +5583,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getReadConnection) ZVAL_UNDEF(&intermediate); ZVAL_UNDEF(&bindParams); ZVAL_UNDEF(&bindTypes); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 4) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) @@ -5801,10 +5591,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getReadConnection) Z_PARAM_ARRAY(bindParams) Z_PARAM_ARRAY(bindTypes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 3, &model, &intermediate_param, &bindParams_param, &bindTypes_param); if (!intermediate_param) { ZEPHIR_INIT_VAR(&intermediate); @@ -5823,8 +5611,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getReadConnection) } else { zephir_get_arrval(&bindTypes, bindTypes_param); } - - ZEPHIR_INIT_VAR(&connection); ZVAL_NULL(&connection); zephir_read_property(&_0, this_ptr, ZEND_STRL("transaction"), PH_NOISY_CC | PH_READONLY); @@ -5880,24 +5666,18 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getRelatedRecords) ZVAL_UNDEF(&bindTypes); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(4, 4) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) Z_PARAM_ARRAY(intermediate) Z_PARAM_ARRAY(bindParams) Z_PARAM_ARRAY(bindTypes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 4, 0, &model, &intermediate_param, &bindParams_param, &bindTypes_param); zephir_get_arrval(&intermediate, intermediate_param); zephir_get_arrval(&bindParams, bindParams_param); zephir_get_arrval(&bindTypes, bindTypes_param); - - ZEPHIR_INIT_VAR(&selectIr); zephir_create_array(&selectIr, 3, 0); ZEPHIR_INIT_VAR(&_0); @@ -5913,33 +5693,33 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getRelatedRecords) zephir_array_update_string(&_1, SL("column"), &_3, PH_COPY | PH_SEPARATE); zephir_array_fast_append(&_0, &_1); zephir_array_update_string(&selectIr, SL("columns"), &_0, PH_COPY | PH_SEPARATE); - ZEPHIR_OBS_VAR(&_4); + zephir_memory_observe(&_4); zephir_array_fetch_string(&_4, &intermediate, SL("models"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3143); zephir_array_update_string(&selectIr, SL("models"), &_4, PH_COPY | PH_SEPARATE); ZEPHIR_OBS_NVAR(&_4); zephir_array_fetch_string(&_4, &intermediate, SL("tables"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3145); zephir_array_update_string(&selectIr, SL("tables"), &_4, PH_COPY | PH_SEPARATE); - ZEPHIR_OBS_VAR(&whereConditions); + zephir_memory_observe(&whereConditions); if (zephir_array_isset_string_fetch(&whereConditions, &intermediate, SL("where"), 0)) { zephir_array_update_string(&selectIr, SL("where"), &whereConditions, PH_COPY | PH_SEPARATE); } - ZEPHIR_OBS_VAR(&limitConditions); + zephir_memory_observe(&limitConditions); if (zephir_array_isset_string_fetch(&limitConditions, &intermediate, SL("limit"), 0)) { zephir_array_update_string(&selectIr, SL("limit"), &limitConditions, PH_COPY | PH_SEPARATE); } ZEPHIR_INIT_VAR(&query); object_init_ex(&query, phalcon_mvc_model_query_ce); - ZEPHIR_CALL_METHOD(NULL, &query, "__construct", NULL, 466); + ZEPHIR_CALL_METHOD(NULL, &query, "__construct", NULL, 467); zephir_check_call_status(); zephir_read_property(&_5, this_ptr, ZEND_STRL("container"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_METHOD(NULL, &query, "setdi", NULL, 467, &_5); + ZEPHIR_CALL_METHOD(NULL, &query, "setdi", NULL, 468, &_5); zephir_check_call_status(); ZVAL_LONG(&_6, 309); - ZEPHIR_CALL_METHOD(NULL, &query, "settype", NULL, 468, &_6); + ZEPHIR_CALL_METHOD(NULL, &query, "settype", NULL, 469, &_6); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &query, "setintermediate", NULL, 469, &selectIr); + ZEPHIR_CALL_METHOD(NULL, &query, "setintermediate", NULL, 470, &selectIr); zephir_check_call_status(); - ZEPHIR_RETURN_CALL_METHOD(&query, "execute", NULL, 470, &bindParams, &bindTypes); + ZEPHIR_RETURN_CALL_METHOD(&query, "execute", NULL, 471, &bindParams, &bindTypes); zephir_check_call_status(); RETURN_MM(); } @@ -5991,27 +5771,21 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSelectColumn) ZVAL_UNDEF(&_16$$15); ZVAL_UNDEF(&_17$$16); ZVAL_UNDEF(&_18$$18); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(column) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &column_param); ZEPHIR_OBS_COPY_OR_DUP(&column, column_param); - - - ZEPHIR_OBS_VAR(&columnType); + zephir_memory_observe(&columnType); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&columnType, &column, SL("type"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted SELECT AST", "phalcon/Mvc/Model/Query.zep", 3185); return; } ZEPHIR_INIT_VAR(&sqlColumns); array_init(&sqlColumns); - ZEPHIR_OBS_VAR(&eager); + zephir_memory_observe(&eager); zephir_array_isset_string_fetch(&eager, &column, SL("eager"), 0); if (ZEPHIR_IS_LONG(&columnType, 352)) { zephir_read_property(&_0$$4, this_ptr, ZEND_STRL("models"), PH_NOISY_CC | PH_READONLY); @@ -6032,7 +5806,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSelectColumn) add_assoc_stringl_ex(&sqlColumn, SL("type"), SL("object")); zephir_array_update_string(&sqlColumn, SL("model"), &modelName, PH_COPY | PH_SEPARATE); zephir_array_update_string(&sqlColumn, SL("column"), &source, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_FUNCTION(&_5$$5, "lcfirst", &_6, 76, &modelName); + ZEPHIR_CALL_FUNCTION(&_5$$5, "lcfirst", &_6, 77, &modelName); zephir_check_call_status(); zephir_array_update_string(&sqlColumn, SL("balias"), &_5$$5, PH_COPY | PH_SEPARATE); if (Z_TYPE_P(&eager) != IS_NULL) { @@ -6060,7 +5834,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSelectColumn) add_assoc_stringl_ex(&_8$$7, SL("type"), SL("object")); zephir_array_update_string(&_8$$7, SL("model"), &modelName, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_8$$7, SL("column"), &source, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_FUNCTION(&_9$$7, "lcfirst", &_6, 76, &modelName); + ZEPHIR_CALL_FUNCTION(&_9$$7, "lcfirst", &_6, 77, &modelName); zephir_check_call_status(); zephir_array_update_string(&_8$$7, SL("balias"), &_9$$7, PH_COPY | PH_SEPARATE); ZEPHIR_CPY_WRT(&sqlColumn, &_8$$7); @@ -6085,7 +5859,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSelectColumn) if (ZEPHIR_IS_LONG(&columnType, 353)) { zephir_read_property(&_11$$10, this_ptr, ZEND_STRL("sqlAliases"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&sqlAliases, &_11$$10); - ZEPHIR_OBS_VAR(&columnDomain); + zephir_memory_observe(&columnDomain); zephir_array_fetch_string(&columnDomain, &column, SL("column"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3231); ZEPHIR_OBS_NVAR(&source); if (UNEXPECTED(!(zephir_array_isset_fetch(&source, &sqlAliases, &columnDomain, 0)))) { @@ -6094,14 +5868,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSelectColumn) zephir_read_property(&_13$$11, this_ptr, ZEND_STRL("phql"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_14$$11); ZEPHIR_CONCAT_SVSV(&_14$$11, "Unknown model or alias '", &columnDomain, "' (2), when preparing: ", &_13$$11); - ZEPHIR_CALL_METHOD(NULL, &_12$$11, "__construct", NULL, 32, &_14$$11); + ZEPHIR_CALL_METHOD(NULL, &_12$$11, "__construct", NULL, 33, &_14$$11); zephir_check_call_status(); zephir_throw_exception_debug(&_12$$11, "phalcon/Mvc/Model/Query.zep", 3236); ZEPHIR_MM_RESTORE(); return; } ZEPHIR_CPY_WRT(&sqlColumnAlias, &source); - ZEPHIR_OBS_VAR(&preparedAlias); + zephir_memory_observe(&preparedAlias); zephir_array_isset_string_fetch(&preparedAlias, &column, SL("balias"), 0); zephir_read_property(&_11$$10, this_ptr, ZEND_STRL("sqlAliasesModels"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&sqlAliasesModels, &_11$$10); @@ -6109,7 +5883,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSelectColumn) zephir_array_fetch(&modelName, &sqlAliasesModels, &columnDomain, PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3250); if (Z_TYPE_P(&preparedAlias) != IS_STRING) { if (ZEPHIR_IS_EQUAL(&columnDomain, &modelName)) { - ZEPHIR_CALL_FUNCTION(&preparedAlias, "lcfirst", &_6, 76, &modelName); + ZEPHIR_CALL_FUNCTION(&preparedAlias, "lcfirst", &_6, 77, &modelName); zephir_check_call_status(); } else { ZEPHIR_CPY_WRT(&preparedAlias, &columnDomain); @@ -6135,11 +5909,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSelectColumn) zephir_create_array(&_17$$16, 1, 0); add_assoc_stringl_ex(&_17$$16, SL("type"), SL("scalar")); ZEPHIR_CPY_WRT(&sqlColumn, &_17$$16); - ZEPHIR_OBS_VAR(&columnData); + zephir_memory_observe(&columnData); zephir_array_fetch_string(&columnData, &column, SL("column"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3294); - ZEPHIR_CALL_METHOD(&sqlExprColumn, this_ptr, "getexpression", NULL, 457, &columnData); + ZEPHIR_CALL_METHOD(&sqlExprColumn, this_ptr, "getexpression", NULL, 458, &columnData); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&balias); + zephir_memory_observe(&balias); if (zephir_array_isset_string_fetch(&balias, &sqlExprColumn, SL("balias"), 0)) { zephir_array_update_string(&sqlColumn, SL("balias"), &balias, PH_COPY | PH_SEPARATE); zephir_array_update_string(&sqlColumn, SL("sqlAlias"), &balias, PH_COPY | PH_SEPARATE); @@ -6157,7 +5931,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSelectColumn) object_init_ex(&_19, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_VAR(&_20); ZEPHIR_CONCAT_SV(&_20, "Unknown type of column ", &columnType); - ZEPHIR_CALL_METHOD(NULL, &_19, "__construct", NULL, 32, &_20); + ZEPHIR_CALL_METHOD(NULL, &_19, "__construct", NULL, 33, &_20); zephir_check_call_status(); zephir_throw_exception_debug(&_19, "phalcon/Mvc/Model/Query.zep", 3316); ZEPHIR_MM_RESTORE(); @@ -6213,8 +5987,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSingleJoin) ZVAL_UNDEF(&_20$$7); ZVAL_UNDEF(&_22$$7); ZVAL_UNDEF(&_23$$7); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(5, 5) Z_PARAM_STR(joinType) Z_PARAM_ZVAL(joinSource) @@ -6222,10 +5994,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSingleJoin) Z_PARAM_STR(joinAlias) Z_PARAM_OBJECT_OF_CLASS(relation, phalcon_mvc_model_relationinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 5, 0, &joinType_param, &joinSource, &modelAlias_param, &joinAlias_param, &relation); if (UNEXPECTED(Z_TYPE_P(joinType_param) != IS_STRING && Z_TYPE_P(joinType_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'joinType' must be of the type string")); @@ -6238,8 +6008,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSingleJoin) } zephir_get_strval(&modelAlias, modelAlias_param); zephir_get_strval(&joinAlias, joinAlias_param); - - ZEPHIR_INIT_VAR(&sqlJoinConditions); ZVAL_NULL(&sqlJoinConditions); ZEPHIR_CALL_METHOD(&fields, relation, "getfields", NULL, 0); @@ -6258,7 +6026,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSingleJoin) add_assoc_long_ex(&_3$$3, SL("type"), 355); zephir_array_update_string(&_3$$3, SL("domain"), &modelAlias, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_3$$3, SL("name"), &fields, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(&_2$$3, this_ptr, "getqualified", NULL, 458, &_3$$3); + ZEPHIR_CALL_METHOD(&_2$$3, this_ptr, "getqualified", NULL, 459, &_3$$3); zephir_check_call_status(); zephir_array_update_string(&_1$$3, SL("left"), &_2$$3, PH_COPY | PH_SEPARATE); ZEPHIR_INIT_VAR(&_4$$3); @@ -6266,7 +6034,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSingleJoin) add_assoc_stringl_ex(&_4$$3, SL("type"), SL("qualified")); zephir_array_update_string(&_4$$3, SL("domain"), &joinAlias, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_4$$3, SL("name"), &referencedFields, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(&_2$$3, this_ptr, "getqualified", NULL, 458, &_4$$3); + ZEPHIR_CALL_METHOD(&_2$$3, this_ptr, "getqualified", NULL, 459, &_4$$3); zephir_check_call_status(); zephir_array_update_string(&_1$$3, SL("right"), &_2$$3, PH_COPY | PH_SEPARATE); zephir_array_fast_append(&_0$$3, &_1$$3); @@ -6293,7 +6061,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSingleJoin) zephir_read_property(&_10$$6, this_ptr, ZEND_STRL("phql"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_NVAR(&_11$$6); ZEPHIR_CONCAT_SVSVSV(&_11$$6, "The number of fields must be equal to the number of referenced fields in join ", &modelAlias, "-", &joinAlias, ", when preparing: ", &_10$$6); - ZEPHIR_CALL_METHOD(NULL, &_9$$6, "__construct", &_12, 32, &_11$$6); + ZEPHIR_CALL_METHOD(NULL, &_9$$6, "__construct", &_12, 33, &_11$$6); zephir_check_call_status(); zephir_throw_exception_debug(&_9$$6, "phalcon/Mvc/Model/Query.zep", 3378); ZEPHIR_MM_RESTORE(); @@ -6308,7 +6076,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSingleJoin) add_assoc_long_ex(&_15$$5, SL("type"), 355); zephir_array_update_string(&_15$$5, SL("domain"), &modelAlias, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_15$$5, SL("name"), &field, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(&_14$$5, this_ptr, "getqualified", NULL, 458, &_15$$5); + ZEPHIR_CALL_METHOD(&_14$$5, this_ptr, "getqualified", NULL, 459, &_15$$5); zephir_check_call_status(); zephir_array_update_string(&_13$$5, SL("left"), &_14$$5, PH_COPY | PH_SEPARATE); ZEPHIR_INIT_NVAR(&_16$$5); @@ -6316,7 +6084,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSingleJoin) add_assoc_stringl_ex(&_16$$5, SL("type"), SL("qualified")); zephir_array_update_string(&_16$$5, SL("domain"), &joinAlias, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_16$$5, SL("name"), &referencedField, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(&_14$$5, this_ptr, "getqualified", NULL, 458, &_16$$5); + ZEPHIR_CALL_METHOD(&_14$$5, this_ptr, "getqualified", NULL, 459, &_16$$5); zephir_check_call_status(); zephir_array_update_string(&_13$$5, SL("right"), &_14$$5, PH_COPY | PH_SEPARATE); zephir_array_append(&sqlJoinPartialConditions, &_13$$5, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3403); @@ -6341,7 +6109,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSingleJoin) zephir_read_property(&_18$$8, this_ptr, ZEND_STRL("phql"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_NVAR(&_19$$8); ZEPHIR_CONCAT_SVSVSV(&_19$$8, "The number of fields must be equal to the number of referenced fields in join ", &modelAlias, "-", &joinAlias, ", when preparing: ", &_18$$8); - ZEPHIR_CALL_METHOD(NULL, &_17$$8, "__construct", &_12, 32, &_19$$8); + ZEPHIR_CALL_METHOD(NULL, &_17$$8, "__construct", &_12, 33, &_19$$8); zephir_check_call_status(); zephir_throw_exception_debug(&_17$$8, "phalcon/Mvc/Model/Query.zep", 3378); ZEPHIR_MM_RESTORE(); @@ -6356,7 +6124,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSingleJoin) add_assoc_long_ex(&_22$$7, SL("type"), 355); zephir_array_update_string(&_22$$7, SL("domain"), &modelAlias, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_22$$7, SL("name"), &field, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(&_21$$7, this_ptr, "getqualified", NULL, 458, &_22$$7); + ZEPHIR_CALL_METHOD(&_21$$7, this_ptr, "getqualified", NULL, 459, &_22$$7); zephir_check_call_status(); zephir_array_update_string(&_20$$7, SL("left"), &_21$$7, PH_COPY | PH_SEPARATE); ZEPHIR_INIT_NVAR(&_23$$7); @@ -6364,7 +6132,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getSingleJoin) add_assoc_stringl_ex(&_23$$7, SL("type"), SL("qualified")); zephir_array_update_string(&_23$$7, SL("domain"), &joinAlias, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_23$$7, SL("name"), &referencedField, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(&_21$$7, this_ptr, "getqualified", NULL, 458, &_23$$7); + ZEPHIR_CALL_METHOD(&_21$$7, this_ptr, "getqualified", NULL, 459, &_23$$7); zephir_check_call_status(); zephir_array_update_string(&_20$$7, SL("right"), &_21$$7, PH_COPY | PH_SEPARATE); zephir_array_append(&sqlJoinPartialConditions, &_20$$7, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3403); @@ -6393,7 +6161,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getTable) zend_long ZEPHIR_LAST_CALL_STATUS; zval qualifiedName; zval *manager, manager_sub, *qualifiedName_param = NULL, modelName, model, source, schema; - zval *this_ptr = getThis(); ZVAL_UNDEF(&manager_sub); ZVAL_UNDEF(&modelName); @@ -6401,21 +6168,15 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getTable) ZVAL_UNDEF(&source); ZVAL_UNDEF(&schema); ZVAL_UNDEF(&qualifiedName); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(manager, phalcon_mvc_model_managerinterface_ce) Z_PARAM_ARRAY(qualifiedName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &manager, &qualifiedName_param); zephir_get_arrval(&qualifiedName, qualifiedName_param); - - - ZEPHIR_OBS_VAR(&modelName); + zephir_memory_observe(&modelName); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&modelName, &qualifiedName, SL("name"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted SELECT AST", "phalcon/Mvc/Model/Query.zep", 3428); return; @@ -6455,7 +6216,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getWriteConnection) ZVAL_UNDEF(&intermediate); ZVAL_UNDEF(&bindParams); ZVAL_UNDEF(&bindTypes); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 4) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) @@ -6464,10 +6224,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getWriteConnection) Z_PARAM_ARRAY(bindParams) Z_PARAM_ARRAY(bindTypes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 3, &model, &intermediate_param, &bindParams_param, &bindTypes_param); if (!intermediate_param) { ZEPHIR_INIT_VAR(&intermediate); @@ -6486,8 +6244,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, getWriteConnection) } else { zephir_get_arrval(&bindTypes, bindTypes_param); } - - ZEPHIR_INIT_VAR(&connection); ZVAL_NULL(&connection); zephir_read_property(&_0, this_ptr, ZEND_STRL("transaction"), PH_NOISY_CC | PH_READONLY); @@ -6559,18 +6315,17 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareDelete) ZVAL_UNDEF(&_9$$17); ZVAL_UNDEF(&_10$$17); ZVAL_UNDEF(&_11$$18); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("ast"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&ast, &_0); - ZEPHIR_OBS_VAR(&delete); + zephir_memory_observe(&delete); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&delete, &ast, SL("delete"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted DELETE AST", "phalcon/Mvc/Model/Query.zep", 3488); return; } - ZEPHIR_OBS_VAR(&tables); + zephir_memory_observe(&tables); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&tables, &delete, SL("tables"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted DELETE AST", "phalcon/Mvc/Model/Query.zep", 3492); return; @@ -6704,16 +6459,16 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareDelete) array_init(&sqlDelete); zephir_array_update_string(&sqlDelete, SL("tables"), &sqlTables, PH_COPY | PH_SEPARATE); zephir_array_update_string(&sqlDelete, SL("models"), &sqlModels, PH_COPY | PH_SEPARATE); - ZEPHIR_OBS_VAR(&where); + zephir_memory_observe(&where); if (zephir_array_isset_string_fetch(&where, &ast, SL("where"), 0)) { ZVAL_BOOL(&_10$$17, 1); - ZEPHIR_CALL_METHOD(&_9$$17, this_ptr, "getexpression", NULL, 457, &where, &_10$$17); + ZEPHIR_CALL_METHOD(&_9$$17, this_ptr, "getexpression", NULL, 458, &where, &_10$$17); zephir_check_call_status(); zephir_array_update_string(&sqlDelete, SL("where"), &_9$$17, PH_COPY | PH_SEPARATE); } - ZEPHIR_OBS_VAR(&limit); + zephir_memory_observe(&limit); if (zephir_array_isset_string_fetch(&limit, &ast, SL("limit"), 0)) { - ZEPHIR_CALL_METHOD(&_11$$18, this_ptr, "getlimitclause", NULL, 471, &limit); + ZEPHIR_CALL_METHOD(&_11$$18, this_ptr, "getlimitclause", NULL, 472, &limit); zephir_check_call_status(); zephir_array_update_string(&sqlDelete, SL("limit"), &_11$$18, PH_COPY | PH_SEPARATE); } @@ -6770,9 +6525,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareInsert) ZVAL_UNDEF(&_26$$13); ZVAL_UNDEF(&_5$$7); ZVAL_UNDEF(&_10$$8); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("ast"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&ast, &_0); @@ -6784,7 +6538,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareInsert) ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted INSERT AST", "phalcon/Mvc/Model/Query.zep", 3590); return; } - ZEPHIR_OBS_VAR(&qualifiedName); + zephir_memory_observe(&qualifiedName); zephir_array_fetch_string(&qualifiedName, &ast, SL("qualifiedName"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3593); if (UNEXPECTED(!(zephir_array_isset_string(&qualifiedName, SL("name"))))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted INSERT AST", "phalcon/Mvc/Model/Query.zep", 3597); @@ -6792,7 +6546,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareInsert) } zephir_read_property(&_0, this_ptr, ZEND_STRL("manager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&manager, &_0); - ZEPHIR_OBS_VAR(&modelName); + zephir_memory_observe(&modelName); zephir_array_fetch_string(&modelName, &qualifiedName, SL("name"), PH_NOISY, "phalcon/Mvc/Model/Query.zep", 3601); ZEPHIR_CALL_METHOD(&model, &manager, "load", NULL, 0, &modelName); zephir_check_call_status(); @@ -6827,7 +6581,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareInsert) } else { ZVAL_BOOL(&_8$$7, 0); } - ZEPHIR_CALL_METHOD(&_7$$7, this_ptr, "getexpression", &_9, 457, &exprValue, &_8$$7); + ZEPHIR_CALL_METHOD(&_7$$7, this_ptr, "getexpression", &_9, 458, &exprValue, &_8$$7); zephir_check_call_status(); zephir_array_update_string(&_5$$7, SL("value"), &_7$$7, PH_COPY | PH_SEPARATE); zephir_array_append(&exprValues, &_5$$7, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3619); @@ -6853,7 +6607,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareInsert) } else { ZVAL_BOOL(&_13$$8, 0); } - ZEPHIR_CALL_METHOD(&_12$$8, this_ptr, "getexpression", &_9, 457, &exprValue, &_13$$8); + ZEPHIR_CALL_METHOD(&_12$$8, this_ptr, "getexpression", &_9, 458, &exprValue, &_13$$8); zephir_check_call_status(); zephir_array_update_string(&_10$$8, SL("value"), &_12$$8, PH_COPY | PH_SEPARATE); zephir_array_append(&exprValues, &_10$$8, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 3619); @@ -6868,7 +6622,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareInsert) zephir_array_update_string(&sqlInsert, SL("table"), &source, PH_COPY | PH_SEPARATE); zephir_read_property(&_0, this_ptr, ZEND_STRL("metaData"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&metaData, &_0); - ZEPHIR_OBS_VAR(&fields); + zephir_memory_observe(&fields); if (zephir_array_isset_string_fetch(&fields, &ast, SL("fields"), 0)) { ZEPHIR_INIT_VAR(&sqlFields); array_init(&sqlFields); @@ -6888,7 +6642,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareInsert) zephir_read_property(&_19$$11, this_ptr, ZEND_STRL("phql"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_NVAR(&_20$$11); ZEPHIR_CONCAT_SVSVSV(&_20$$11, "The model '", &modelName, "' doesn't have the attribute '", &name, "', when preparing: ", &_19$$11); - ZEPHIR_CALL_METHOD(NULL, &_18$$11, "__construct", &_21, 32, &_20$$11); + ZEPHIR_CALL_METHOD(NULL, &_18$$11, "__construct", &_21, 33, &_20$$11); zephir_check_call_status(); zephir_throw_exception_debug(&_18$$11, "phalcon/Mvc/Model/Query.zep", 3639); ZEPHIR_MM_RESTORE(); @@ -6917,7 +6671,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareInsert) zephir_read_property(&_25$$13, this_ptr, ZEND_STRL("phql"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_NVAR(&_26$$13); ZEPHIR_CONCAT_SVSVSV(&_26$$13, "The model '", &modelName, "' doesn't have the attribute '", &name, "', when preparing: ", &_25$$13); - ZEPHIR_CALL_METHOD(NULL, &_24$$13, "__construct", &_21, 32, &_26$$13); + ZEPHIR_CALL_METHOD(NULL, &_24$$13, "__construct", &_21, 33, &_26$$13); zephir_check_call_status(); zephir_throw_exception_debug(&_24$$13, "phalcon/Mvc/Model/Query.zep", 3639); ZEPHIR_MM_RESTORE(); @@ -7094,17 +6848,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect) ZVAL_UNDEF(&_93$$73); ZVAL_UNDEF(&_99$$81); ZVAL_UNDEF(&_102$$88); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(ast) Z_PARAM_BOOL(merge) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 2, &ast, &merge_param); if (!ast) { ast = &ast_sub; @@ -7115,24 +6866,21 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect) if (!merge_param) { merge = 0; } else { - merge = zephir_get_boolval(merge_param); - } - - + } if (ZEPHIR_IS_EMPTY(ast)) { zephir_read_property(&_0$$3, this_ptr, ZEND_STRL("ast"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(ast, &_0$$3); } - ZEPHIR_OBS_VAR(&select); + zephir_memory_observe(&select); if (!(zephir_array_isset_string_fetch(&select, ast, SL("select"), 0))) { ZEPHIR_CPY_WRT(&select, ast); } - ZEPHIR_OBS_VAR(&tables); + zephir_memory_observe(&tables); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&tables, &select, SL("tables"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted SELECT AST", "phalcon/Mvc/Model/Query.zep", 3682); return; } - ZEPHIR_OBS_VAR(&columns); + zephir_memory_observe(&columns); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&columns, &select, SL("columns"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted SELECT AST", "phalcon/Mvc/Model/Query.zep", 3686); return; @@ -7217,7 +6965,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect) zephir_read_property(&_6$$17, this_ptr, ZEND_STRL("phql"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_NVAR(&_7$$17); ZEPHIR_CONCAT_SVSV(&_7$$17, "Alias '", &alias, "' is used more than once, when preparing: ", &_6$$17); - ZEPHIR_CALL_METHOD(NULL, &_5$$17, "__construct", &_8, 32, &_7$$17); + ZEPHIR_CALL_METHOD(NULL, &_5$$17, "__construct", &_8, 33, &_7$$17); zephir_check_call_status(); zephir_throw_exception_debug(&_5$$17, "phalcon/Mvc/Model/Query.zep", 3793); ZEPHIR_MM_RESTORE(); @@ -7288,7 +7036,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect) zephir_read_property(&_18$$27, this_ptr, ZEND_STRL("phql"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_NVAR(&_19$$27); ZEPHIR_CONCAT_SVSVSV(&_19$$27, "Can't find a relationship between '", &modelName, "' and '", &relationModel, "' when preparing: ", &_18$$27); - ZEPHIR_CALL_METHOD(NULL, &_17$$27, "__construct", &_8, 32, &_19$$27); + ZEPHIR_CALL_METHOD(NULL, &_17$$27, "__construct", &_8, 33, &_19$$27); zephir_check_call_status(); zephir_throw_exception_debug(&_17$$27, "phalcon/Mvc/Model/Query.zep", 3851); ZEPHIR_MM_RESTORE(); @@ -7365,7 +7113,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect) zephir_read_property(&_30$$31, this_ptr, ZEND_STRL("phql"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_NVAR(&_31$$31); ZEPHIR_CONCAT_SVSVSV(&_31$$31, "Can't find a relationship between '", &modelName, "' and '", &relationModel, "' when preparing: ", &_30$$31); - ZEPHIR_CALL_METHOD(NULL, &_29$$31, "__construct", &_8, 32, &_31$$31); + ZEPHIR_CALL_METHOD(NULL, &_29$$31, "__construct", &_8, 33, &_31$$31); zephir_check_call_status(); zephir_throw_exception_debug(&_29$$31, "phalcon/Mvc/Model/Query.zep", 3851); ZEPHIR_MM_RESTORE(); @@ -7451,7 +7199,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect) zephir_read_property(&_39$$36, this_ptr, ZEND_STRL("phql"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_NVAR(&_40$$36); ZEPHIR_CONCAT_SVSV(&_40$$36, "Alias '", &alias, "' is used more than once, when preparing: ", &_39$$36); - ZEPHIR_CALL_METHOD(NULL, &_38$$36, "__construct", &_8, 32, &_40$$36); + ZEPHIR_CALL_METHOD(NULL, &_38$$36, "__construct", &_8, 33, &_40$$36); zephir_check_call_status(); zephir_throw_exception_debug(&_38$$36, "phalcon/Mvc/Model/Query.zep", 3793); ZEPHIR_MM_RESTORE(); @@ -7523,7 +7271,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect) zephir_read_property(&_51$$46, this_ptr, ZEND_STRL("phql"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_NVAR(&_52$$46); ZEPHIR_CONCAT_SVSVSV(&_52$$46, "Can't find a relationship between '", &modelName, "' and '", &relationModel, "' when preparing: ", &_51$$46); - ZEPHIR_CALL_METHOD(NULL, &_50$$46, "__construct", &_8, 32, &_52$$46); + ZEPHIR_CALL_METHOD(NULL, &_50$$46, "__construct", &_8, 33, &_52$$46); zephir_check_call_status(); zephir_throw_exception_debug(&_50$$46, "phalcon/Mvc/Model/Query.zep", 3851); ZEPHIR_MM_RESTORE(); @@ -7600,7 +7348,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect) zephir_read_property(&_63$$50, this_ptr, ZEND_STRL("phql"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_NVAR(&_64$$50); ZEPHIR_CONCAT_SVSVSV(&_64$$50, "Can't find a relationship between '", &modelName, "' and '", &relationModel, "' when preparing: ", &_63$$50); - ZEPHIR_CALL_METHOD(NULL, &_62$$50, "__construct", &_8, 32, &_64$$50); + ZEPHIR_CALL_METHOD(NULL, &_62$$50, "__construct", &_8, 33, &_64$$50); zephir_check_call_status(); zephir_throw_exception_debug(&_62$$50, "phalcon/Mvc/Model/Query.zep", 3851); ZEPHIR_MM_RESTORE(); @@ -7660,17 +7408,17 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect) zephir_update_property_zval(this_ptr, ZEND_STRL("sqlModelsAliases"), &sqlModelsAliases); zephir_update_property_zval(this_ptr, ZEND_STRL("sqlAliasesModelsInstances"), &sqlAliasesModelsInstances); } else { - ZEPHIR_OBS_VAR(&tempModels); + zephir_memory_observe(&tempModels); zephir_read_property(&tempModels, this_ptr, ZEND_STRL("models"), PH_NOISY_CC); - ZEPHIR_OBS_VAR(&tempModelsInstances); + zephir_memory_observe(&tempModelsInstances); zephir_read_property(&tempModelsInstances, this_ptr, ZEND_STRL("modelsInstances"), PH_NOISY_CC); - ZEPHIR_OBS_VAR(&tempSqlAliases); + zephir_memory_observe(&tempSqlAliases); zephir_read_property(&tempSqlAliases, this_ptr, ZEND_STRL("sqlAliases"), PH_NOISY_CC); - ZEPHIR_OBS_VAR(&tempSqlAliasesModels); + zephir_memory_observe(&tempSqlAliasesModels); zephir_read_property(&tempSqlAliasesModels, this_ptr, ZEND_STRL("sqlAliasesModels"), PH_NOISY_CC); - ZEPHIR_OBS_VAR(&tempSqlModelsAliases); + zephir_memory_observe(&tempSqlModelsAliases); zephir_read_property(&tempSqlModelsAliases, this_ptr, ZEND_STRL("sqlModelsAliases"), PH_NOISY_CC); - ZEPHIR_OBS_VAR(&tempSqlAliasesModelsInstances); + zephir_memory_observe(&tempSqlAliasesModelsInstances); zephir_read_property(&tempSqlAliasesModelsInstances, this_ptr, ZEND_STRL("sqlAliasesModelsInstances"), PH_NOISY_CC); ZEPHIR_INIT_VAR(&_69$$52); zephir_read_property(&_70$$52, this_ptr, ZEND_STRL("models"), PH_NOISY_CC | PH_READONLY); @@ -7697,7 +7445,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect) zephir_fast_array_merge(&_79$$52, &_80$$52, &sqlAliasesModelsInstances); zephir_update_property_zval(this_ptr, ZEND_STRL("sqlAliasesModelsInstances"), &_79$$52); } - ZEPHIR_OBS_VAR(&joins); + zephir_memory_observe(&joins); zephir_array_isset_string_fetch(&joins, &select, SL("joins"), 0); if (zephir_fast_count_int(&joins)) { if (zephir_fast_count_int(&automaticJoins)) { @@ -7710,12 +7458,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect) zephir_array_update_string(&select, SL("joins"), &automaticJoins, PH_COPY | PH_SEPARATE); } } - ZEPHIR_CALL_METHOD(&sqlJoins, this_ptr, "getjoins", NULL, 472, &select); + ZEPHIR_CALL_METHOD(&sqlJoins, this_ptr, "getjoins", NULL, 473, &select); zephir_check_call_status(); } else { if (zephir_fast_count_int(&automaticJoins)) { zephir_array_update_string(&select, SL("joins"), &automaticJoins, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(&sqlJoins, this_ptr, "getjoins", NULL, 472, &select); + ZEPHIR_CALL_METHOD(&sqlJoins, this_ptr, "getjoins", NULL, 473, &select); zephir_check_call_status(); } else { ZEPHIR_INIT_NVAR(&sqlJoins); @@ -7731,7 +7479,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect) { ZEPHIR_INIT_NVAR(&column); ZVAL_COPY(&column, _82); - ZEPHIR_CALL_METHOD(&_84$$60, this_ptr, "getselectcolumn", &_85, 473, &column); + ZEPHIR_CALL_METHOD(&_84$$60, this_ptr, "getselectcolumn", &_85, 474, &column); zephir_check_call_status(); zephir_is_iterable(&_84$$60, 0, "phalcon/Mvc/Model/Query.zep", 3969); if (Z_TYPE_P(&_84$$60) == IS_ARRAY) { @@ -7816,7 +7564,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect) } ZEPHIR_CALL_METHOD(&column, &selectColumns, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_94$$75, this_ptr, "getselectcolumn", &_85, 473, &column); + ZEPHIR_CALL_METHOD(&_94$$75, this_ptr, "getselectcolumn", &_85, 474, &column); zephir_check_call_status(); zephir_is_iterable(&_94$$75, 0, "phalcon/Mvc/Model/Query.zep", 3969); if (Z_TYPE_P(&_94$$75) == IS_ARRAY) { @@ -7894,7 +7642,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect) } } ZEPHIR_INIT_NVAR(&column); - ZEPHIR_OBS_VAR(&_103); + zephir_memory_observe(&_103); zephir_read_property(&_103, this_ptr, ZEND_STRL("nestingLevel"), PH_NOISY_CC); zephir_update_property_array(this_ptr, SL("sqlColumnAliases"), &_103, &sqlColumnAliases); ZEPHIR_INIT_VAR(&sqlSelect); @@ -7902,40 +7650,40 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect) zephir_array_update_string(&sqlSelect, SL("models"), &sqlModels, PH_COPY | PH_SEPARATE); zephir_array_update_string(&sqlSelect, SL("tables"), &sqlTables, PH_COPY | PH_SEPARATE); zephir_array_update_string(&sqlSelect, SL("columns"), &sqlColumns, PH_COPY | PH_SEPARATE); - ZEPHIR_OBS_VAR(&distinct); + zephir_memory_observe(&distinct); if (zephir_array_isset_string_fetch(&distinct, &select, SL("distinct"), 0)) { zephir_array_update_string(&sqlSelect, SL("distinct"), &distinct, PH_COPY | PH_SEPARATE); } if (zephir_fast_count_int(&sqlJoins)) { zephir_array_update_string(&sqlSelect, SL("joins"), &sqlJoins, PH_COPY | PH_SEPARATE); } - ZEPHIR_OBS_VAR(&where); + zephir_memory_observe(&where); if (zephir_array_isset_string_fetch(&where, ast, SL("where"), 0)) { - ZEPHIR_CALL_METHOD(&_104$$92, this_ptr, "getexpression", NULL, 457, &where); + ZEPHIR_CALL_METHOD(&_104$$92, this_ptr, "getexpression", NULL, 458, &where); zephir_check_call_status(); zephir_array_update_string(&sqlSelect, SL("where"), &_104$$92, PH_COPY | PH_SEPARATE); } - ZEPHIR_OBS_VAR(&groupBy); + zephir_memory_observe(&groupBy); if (zephir_array_isset_string_fetch(&groupBy, ast, SL("groupBy"), 0)) { - ZEPHIR_CALL_METHOD(&_105$$93, this_ptr, "getgroupclause", NULL, 474, &groupBy); + ZEPHIR_CALL_METHOD(&_105$$93, this_ptr, "getgroupclause", NULL, 475, &groupBy); zephir_check_call_status(); zephir_array_update_string(&sqlSelect, SL("group"), &_105$$93, PH_COPY | PH_SEPARATE); } - ZEPHIR_OBS_VAR(&having); + zephir_memory_observe(&having); if (zephir_array_isset_string_fetch(&having, ast, SL("having"), 0)) { - ZEPHIR_CALL_METHOD(&_106$$94, this_ptr, "getexpression", NULL, 457, &having); + ZEPHIR_CALL_METHOD(&_106$$94, this_ptr, "getexpression", NULL, 458, &having); zephir_check_call_status(); zephir_array_update_string(&sqlSelect, SL("having"), &_106$$94, PH_COPY | PH_SEPARATE); } - ZEPHIR_OBS_VAR(&order); + zephir_memory_observe(&order); if (zephir_array_isset_string_fetch(&order, ast, SL("orderBy"), 0)) { - ZEPHIR_CALL_METHOD(&_107$$95, this_ptr, "getorderclause", NULL, 475, &order); + ZEPHIR_CALL_METHOD(&_107$$95, this_ptr, "getorderclause", NULL, 476, &order); zephir_check_call_status(); zephir_array_update_string(&sqlSelect, SL("order"), &_107$$95, PH_COPY | PH_SEPARATE); } - ZEPHIR_OBS_VAR(&limit); + zephir_memory_observe(&limit); if (zephir_array_isset_string_fetch(&limit, ast, SL("limit"), 0)) { - ZEPHIR_CALL_METHOD(&_108$$96, this_ptr, "getlimitclause", NULL, 471, &limit); + ZEPHIR_CALL_METHOD(&_108$$96, this_ptr, "getlimitclause", NULL, 472, &limit); zephir_check_call_status(); zephir_array_update_string(&sqlSelect, SL("limit"), &_108$$96, PH_COPY | PH_SEPARATE); } @@ -8021,23 +7769,22 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareUpdate) ZVAL_UNDEF(&_28$$23); ZVAL_UNDEF(&_15$$20); ZVAL_UNDEF(&_22$$21); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("ast"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&ast, &_0); - ZEPHIR_OBS_VAR(&update); + zephir_memory_observe(&update); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&update, &ast, SL("update"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted UPDATE AST", "phalcon/Mvc/Model/Query.zep", 4048); return; } - ZEPHIR_OBS_VAR(&tables); + zephir_memory_observe(&tables); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&tables, &update, SL("tables"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted UPDATE AST", "phalcon/Mvc/Model/Query.zep", 4052); return; } - ZEPHIR_OBS_VAR(&values); + zephir_memory_observe(&values); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&values, &update, SL("values"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Corrupted UPDATE AST", "phalcon/Mvc/Model/Query.zep", 4056); return; @@ -8191,7 +7938,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareUpdate) } else { ZVAL_BOOL(&_13$$20, 0); } - ZEPHIR_CALL_METHOD(&_11$$20, this_ptr, "getexpression", &_14, 457, &_12$$20, &_13$$20); + ZEPHIR_CALL_METHOD(&_11$$20, this_ptr, "getexpression", &_14, 458, &_12$$20, &_13$$20); zephir_check_call_status(); zephir_array_append(&sqlFields, &_11$$20, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4138); ZEPHIR_OBS_NVAR(&exprColumn); @@ -8206,7 +7953,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareUpdate) } else { ZVAL_BOOL(&_18$$20, 0); } - ZEPHIR_CALL_METHOD(&_17$$20, this_ptr, "getexpression", &_14, 457, &exprColumn, &_18$$20); + ZEPHIR_CALL_METHOD(&_17$$20, this_ptr, "getexpression", &_14, 458, &exprColumn, &_18$$20); zephir_check_call_status(); zephir_array_update_string(&_15$$20, SL("value"), &_17$$20, PH_COPY | PH_SEPARATE); zephir_array_append(&sqlValues, &_15$$20, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4143); @@ -8228,7 +7975,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareUpdate) } else { ZVAL_BOOL(&_21$$21, 0); } - ZEPHIR_CALL_METHOD(&_19$$21, this_ptr, "getexpression", &_14, 457, &_20$$21, &_21$$21); + ZEPHIR_CALL_METHOD(&_19$$21, this_ptr, "getexpression", &_14, 458, &_20$$21, &_21$$21); zephir_check_call_status(); zephir_array_append(&sqlFields, &_19$$21, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4138); ZEPHIR_OBS_NVAR(&exprColumn); @@ -8243,7 +7990,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareUpdate) } else { ZVAL_BOOL(&_25$$21, 0); } - ZEPHIR_CALL_METHOD(&_24$$21, this_ptr, "getexpression", &_14, 457, &exprColumn, &_25$$21); + ZEPHIR_CALL_METHOD(&_24$$21, this_ptr, "getexpression", &_14, 458, &exprColumn, &_25$$21); zephir_check_call_status(); zephir_array_update_string(&_22$$21, SL("value"), &_24$$21, PH_COPY | PH_SEPARATE); zephir_array_append(&sqlValues, &_22$$21, PH_SEPARATE, "phalcon/Mvc/Model/Query.zep", 4143); @@ -8258,16 +8005,16 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareUpdate) zephir_array_update_string(&sqlUpdate, SL("models"), &sqlModels, PH_COPY | PH_SEPARATE); zephir_array_update_string(&sqlUpdate, SL("fields"), &sqlFields, PH_COPY | PH_SEPARATE); zephir_array_update_string(&sqlUpdate, SL("values"), &sqlValues, PH_COPY | PH_SEPARATE); - ZEPHIR_OBS_VAR(&where); + zephir_memory_observe(&where); if (zephir_array_isset_string_fetch(&where, &ast, SL("where"), 0)) { ZVAL_BOOL(&_27$$22, 1); - ZEPHIR_CALL_METHOD(&_26$$22, this_ptr, "getexpression", &_14, 457, &where, &_27$$22); + ZEPHIR_CALL_METHOD(&_26$$22, this_ptr, "getexpression", &_14, 458, &where, &_27$$22); zephir_check_call_status(); zephir_array_update_string(&sqlUpdate, SL("where"), &_26$$22, PH_COPY | PH_SEPARATE); } - ZEPHIR_OBS_VAR(&limit); + zephir_memory_observe(&limit); if (zephir_array_isset_string_fetch(&limit, &ast, SL("limit"), 0)) { - ZEPHIR_CALL_METHOD(&_28$$23, this_ptr, "getlimitclause", NULL, 471, &limit); + ZEPHIR_CALL_METHOD(&_28$$23, this_ptr, "getlimitclause", NULL, 472, &limit); zephir_check_call_status(); zephir_array_update_string(&sqlUpdate, SL("limit"), &_28$$23, PH_COPY | PH_SEPARATE); } @@ -8298,7 +8045,8 @@ zend_object *zephir_init_properties_Phalcon_Mvc_Model_Query(zend_class_entry *cl ZVAL_UNDEF(&_17$$11); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/mvc/model/query.zep.h b/ext/phalcon/mvc/model/query.zep.h index 2c2e1724d8b..2db0988b7dd 100644 --- a/ext/phalcon/mvc/model/query.zep.h +++ b/ext/phalcon/mvc/model/query.zep.h @@ -58,11 +58,7 @@ zend_object *zephir_init_properties_Phalcon_Mvc_Model_Query(zend_class_entry *cl ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_query___construct, 0, 0, 0) ZEND_ARG_TYPE_INFO(0, phql, IS_STRING, 1) ZEND_ARG_OBJ_INFO(0, container, Phalcon\\Di\\DiInterface, 1) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_query_cache, 0, 1, Phalcon\\Mvc\\Model\\QueryInterface, 0) @@ -73,16 +69,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_query_clean, 0 ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_query_execute, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindParams, 0) -#endif -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindTypes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_query_getcache, 0, 0, Phalcon\\Db\\Adapter\\AdapterInterface, 0) @@ -104,16 +92,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_query_getinter ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_query_getsingleresult, 0, 0, Phalcon\\Mvc\\ModelInterface, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindParams, 0) -#endif -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindTypes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_query_getsql, 0, 0, IS_ARRAY, 0) @@ -247,21 +227,9 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_query_getreadconnection, 0, 1, Phalcon\\Db\\Adapter\\AdapterInterface, 0) ZEND_ARG_OBJ_INFO(0, model, Phalcon\\Mvc\\ModelInterface, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, intermediate, IS_ARRAY, 1, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, intermediate, 1) -#endif -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindParams, 0) -#endif -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindTypes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, intermediate, IS_ARRAY, 1, "[]") +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_query_getrelatedrecords, 0, 4, Phalcon\\Mvc\\Model\\ResultsetInterface, 0) @@ -290,21 +258,9 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_query_getwriteconnection, 0, 1, Phalcon\\Db\\Adapter\\AdapterInterface, 0) ZEND_ARG_OBJ_INFO(0, model, Phalcon\\Mvc\\ModelInterface, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, intermediate, IS_ARRAY, 1, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, intermediate, 1) -#endif -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindParams, 0) -#endif -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindTypes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, intermediate, IS_ARRAY, 1, "[]") +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_query__preparedelete, 0, 0, IS_ARRAY, 0) diff --git a/ext/phalcon/mvc/model/query/builder.zep.c b/ext/phalcon/mvc/model/query/builder.zep.c index 4ae05098955..778b77156f9 100644 --- a/ext/phalcon/mvc/model/query/builder.zep.c +++ b/ext/phalcon/mvc/model/query/builder.zep.c @@ -189,17 +189,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, __construct) ZVAL_UNDEF(&mergedConditions); ZVAL_UNDEF(&mergedParams); ZVAL_UNDEF(&mergedTypes); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(params) Z_PARAM_OBJECT_OF_CLASS_OR_NULL(container, phalcon_di_diinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 2, ¶ms, &container); if (!params) { params = ¶ms_sub; @@ -209,10 +206,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, __construct) container = &container_sub; container = &__$null; } - - if (Z_TYPE_P(params) == IS_ARRAY) { - ZEPHIR_OBS_VAR(&conditions); + zephir_memory_observe(&conditions); if (zephir_array_isset_long_fetch(&conditions, params, 0, 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("conditions"), &conditions); } else { @@ -299,52 +294,52 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, __construct) zephir_update_property_zval(this_ptr, ZEND_STRL("bindParams"), &mergedParams); zephir_update_property_zval(this_ptr, ZEND_STRL("bindTypes"), &mergedTypes); } - ZEPHIR_OBS_VAR(&bind); + zephir_memory_observe(&bind); if (zephir_array_isset_string_fetch(&bind, params, SL("bind"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("bindParams"), &bind); } - ZEPHIR_OBS_VAR(&bindTypes); + zephir_memory_observe(&bindTypes); if (zephir_array_isset_string_fetch(&bindTypes, params, SL("bindTypes"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("bindTypes"), &bindTypes); } - ZEPHIR_OBS_VAR(&distinct); + zephir_memory_observe(&distinct); if (zephir_array_isset_string_fetch(&distinct, params, SL("distinct"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("distinct"), &distinct); } - ZEPHIR_OBS_VAR(&fromClause); + zephir_memory_observe(&fromClause); if (zephir_array_isset_string_fetch(&fromClause, params, SL("models"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("models"), &fromClause); } - ZEPHIR_OBS_VAR(&columns); + zephir_memory_observe(&columns); if (zephir_array_isset_string_fetch(&columns, params, SL("columns"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("columns"), &columns); } - ZEPHIR_OBS_VAR(&joinsClause); + zephir_memory_observe(&joinsClause); if (zephir_array_isset_string_fetch(&joinsClause, params, SL("joins"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("joins"), &joinsClause); } - ZEPHIR_OBS_VAR(&groupClause); + zephir_memory_observe(&groupClause); if (zephir_array_isset_string_fetch(&groupClause, params, SL("group"), 0)) { ZEPHIR_CALL_METHOD(NULL, this_ptr, "groupby", NULL, 0, &groupClause); zephir_check_call_status(); } - ZEPHIR_OBS_VAR(&havingClause); + zephir_memory_observe(&havingClause); if (zephir_array_isset_string_fetch(&havingClause, params, SL("having"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("having"), &havingClause); } - ZEPHIR_OBS_VAR(&orderClause); + zephir_memory_observe(&orderClause); if (zephir_array_isset_string_fetch(&orderClause, params, SL("order"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("order"), &orderClause); } - ZEPHIR_OBS_VAR(&limitClause); + zephir_memory_observe(&limitClause); if (zephir_array_isset_string_fetch(&limitClause, params, SL("limit"), 0)) { if (Z_TYPE_P(&limitClause) == IS_ARRAY) { - ZEPHIR_OBS_VAR(&limit); + zephir_memory_observe(&limit); if (zephir_array_isset_long_fetch(&limit, &limitClause, 0, 0)) { if (Z_TYPE_P(&limit) == IS_LONG) { zephir_update_property_zval(this_ptr, ZEND_STRL("limit"), &limit); } - ZEPHIR_OBS_VAR(&offset); + zephir_memory_observe(&offset); if (zephir_array_isset_long_fetch(&offset, &limitClause, 1, 0)) { if (Z_TYPE_P(&offset) == IS_LONG) { zephir_update_property_zval(this_ptr, ZEND_STRL("offset"), &offset); @@ -409,17 +404,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, addFrom) ZVAL_UNDEF(¤tModel); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$4); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(model) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(alias) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &model_param, &alias_param); zephir_get_strval(&model, model_param); if (!alias_param) { @@ -427,8 +419,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, addFrom) } else { zephir_get_strval(&alias, alias_param); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("models"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&models, &_0); if (Z_TYPE_P(&models) != IS_ARRAY) { @@ -484,18 +474,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, andHaving) ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&bindParams); ZVAL_UNDEF(&bindTypes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(conditions) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(bindParams) Z_PARAM_ARRAY(bindTypes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &conditions_param, &bindParams_param, &bindTypes_param); if (UNEXPECTED(Z_TYPE_P(conditions_param) != IS_STRING && Z_TYPE_P(conditions_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'conditions' must be of the type string")); @@ -518,9 +504,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, andHaving) } else { zephir_get_arrval(&bindTypes, bindTypes_param); } - - - ZEPHIR_OBS_VAR(¤tConditions); + zephir_memory_observe(¤tConditions); zephir_read_property(¤tConditions, this_ptr, ZEND_STRL("having"), PH_NOISY_CC); if (zephir_is_true(¤tConditions)) { ZEPHIR_INIT_VAR(&_0$$3); @@ -561,18 +545,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, andWhere) ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&bindParams); ZVAL_UNDEF(&bindTypes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(conditions) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(bindParams) Z_PARAM_ARRAY(bindTypes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &conditions_param, &bindParams_param, &bindTypes_param); if (UNEXPECTED(Z_TYPE_P(conditions_param) != IS_STRING && Z_TYPE_P(conditions_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'conditions' must be of the type string")); @@ -595,9 +575,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, andWhere) } else { zephir_get_arrval(&bindTypes, bindTypes_param); } - - - ZEPHIR_OBS_VAR(¤tConditions); + zephir_memory_observe(¤tConditions); zephir_read_property(¤tConditions, this_ptr, ZEND_STRL("conditions"), PH_NOISY_CC); if (zephir_is_true(¤tConditions)) { ZEPHIR_INIT_VAR(&_0$$3); @@ -618,22 +596,15 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, autoescape) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *identifier_param = NULL; zval identifier; - zval *this_ptr = getThis(); ZVAL_UNDEF(&identifier); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(identifier) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &identifier_param); zephir_get_strval(&identifier, identifier_param); - - _0 = zephir_memnstr_str(&identifier, SL("["), "phalcon/Mvc/Model/Query/Builder.zep", 418); if (!(_0)) { _0 = zephir_memnstr_str(&identifier, SL("."), "phalcon/Mvc/Model/Query/Builder.zep", 418); @@ -669,8 +640,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, betweenHaving) ZVAL_UNDEF(&minimum_sub); ZVAL_UNDEF(&maximum_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 4) Z_PARAM_STR(expr) Z_PARAM_ZVAL(minimum) @@ -678,10 +647,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, betweenHaving) Z_PARAM_OPTIONAL Z_PARAM_STR(operator) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 1, &expr_param, &minimum, &maximum, &operator_param); if (UNEXPECTED(Z_TYPE_P(expr_param) != IS_STRING && Z_TYPE_P(expr_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'expr' must be of the type string")); @@ -706,8 +673,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, betweenHaving) ZEPHIR_INIT_VAR(&operator); } } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "Having"); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "conditionbetween", NULL, 0, &_0, &operator, &expr, minimum, maximum); @@ -735,8 +700,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, betweenWhere) ZVAL_UNDEF(&minimum_sub); ZVAL_UNDEF(&maximum_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 4) Z_PARAM_STR(expr) Z_PARAM_ZVAL(minimum) @@ -744,10 +707,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, betweenWhere) Z_PARAM_OPTIONAL Z_PARAM_STR(operator) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 1, &expr_param, &minimum, &maximum, &operator_param); if (UNEXPECTED(Z_TYPE_P(expr_param) != IS_STRING && Z_TYPE_P(expr_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'expr' must be of the type string")); @@ -772,8 +733,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, betweenWhere) ZEPHIR_INIT_VAR(&operator); } } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "Where"); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "conditionbetween", NULL, 0, &_0, &operator, &expr, minimum, maximum); @@ -808,17 +767,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, columns) zval *this_ptr = getThis(); ZVAL_UNDEF(&columns_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(columns) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &columns); - - zephir_update_property_zval(this_ptr, ZEND_STRL("columns"), columns); RETURN_THISW(); } @@ -837,17 +789,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, distinct) zval *this_ptr = getThis(); ZVAL_UNDEF(&distinct_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(distinct) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &distinct); - - zephir_update_property_zval(this_ptr, ZEND_STRL("distinct"), distinct); RETURN_THISW(); } @@ -867,18 +812,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, forUpdate) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(forUpdate) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &forUpdate_param); - forUpdate = zephir_get_boolval(forUpdate_param); - - if (forUpdate) { zephir_update_property_zval(this_ptr, ZEND_STRL("forUpdate"), &__$true); } else { @@ -916,17 +853,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, from) zval *this_ptr = getThis(); ZVAL_UNDEF(&models_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(models) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &models); - - zephir_update_property_zval(this_ptr, ZEND_STRL("models"), models); RETURN_THISW(); } @@ -936,9 +866,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, from) */ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getBindParams) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "bindParams"); } @@ -948,9 +875,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getBindParams) */ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getBindTypes) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "bindTypes"); } @@ -962,9 +886,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getBindTypes) */ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getColumns) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "columns"); } @@ -974,9 +895,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getColumns) */ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getDI) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "container"); } @@ -986,9 +904,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getDI) */ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getDistinct) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "distinct"); } @@ -1000,9 +915,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getDistinct) */ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getFrom) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "models"); } @@ -1012,9 +924,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getFrom) */ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getGroupBy) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "group"); } @@ -1024,9 +933,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getGroupBy) */ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getHaving) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "having"); } @@ -1036,9 +942,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getHaving) */ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getJoins) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "joins"); } @@ -1050,9 +953,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getJoins) */ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getLimit) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "limit"); } @@ -1070,9 +970,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getModels) ZVAL_UNDEF(&models); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("models"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&models, &_0); @@ -1082,7 +981,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getModels) } if (_1) { ZEPHIR_MAKE_REF(&models); - ZEPHIR_RETURN_CALL_FUNCTION("reset", NULL, 476, &models); + ZEPHIR_RETURN_CALL_FUNCTION("reset", NULL, 477, &models); ZEPHIR_UNREF(&models); zephir_check_call_status(); RETURN_MM(); @@ -1095,9 +994,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getModels) */ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getOffset) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "offset"); } @@ -1109,9 +1005,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getOffset) */ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getOrderBy) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "order"); } @@ -1121,14 +1014,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getOrderBy) */ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getPhql) { - zend_string *_13$$26, *_22$$35, *_33$$43; - zend_ulong _12$$26, _21$$35, _32$$43; - zval _3$$8; - zend_bool noPrimary = 0, _87$$86; + zend_string *_12$$26, *_21$$35, *_32$$43; + zend_ulong _11$$26, _20$$35, _31$$43; + zval _2$$8; + zend_bool noPrimary = 0, _86$$86; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zval __$null, container, models, conditions, model, metaData, modelInstance, primaryKeys, firstPrimaryKey, columnMap, modelAlias, attributeField, phql, column, columns, selectedColumns, selectedColumn, selectedModel, selectedModels, columnAlias, modelColumnAlias, joins, join, joinModel, joinConditions, joinAlias, joinType, group, groupItems, groupItem, having, order, orderItems, orderItem, limit, number, offset, forUpdate, distinct, _0, _2$$8, _4$$17, _5$$17, _6$$19, _7$$13, _8$$13, _9$$13, *_10$$26, _11$$26, _18$$26, _14$$29, _15$$29, _16$$32, _17$$32, *_19$$35, _20$$35, _27$$35, _23$$37, _24$$38, _25$$40, _26$$41, _28$$42, _29$$42, *_30$$43, _31$$43, _38$$43, _39$$43, _34$$45, _35$$45, _36$$48, _37$$48, _40$$50, _41$$50, *_42$$51, _43$$51, _44$$53, _45$$53, _46$$54, _47$$54, _48$$55, _49$$55, _50$$56, _51$$58, _52$$58, _53$$59, _54$$59, _55$$60, _56$$60, _57$$61, _58$$63, *_59$$64, _60$$64, _63$$64, _64$$64, _61$$65, _62$$66, _65$$68, *_66$$70, _67$$70, _78$$70, _79$$70, itemExplode$$73, _68$$73, _69$$73, _70$$73, _71$$73, _72$$71, itemExplode$$76, _73$$76, _74$$76, _75$$76, _76$$76, _77$$74, _80$$77, _81$$83, _82$$86, _83$$86, _84$$86, _85$$86, _86$$86, _88$$87, _89$$87, _90$$87, _91$$87, _92$$87; + zval __$null, container, models, conditions, model, metaData, modelInstance, primaryKeys, firstPrimaryKey, columnMap, modelAlias, attributeField, phql, column, columns, selectedColumns, selectedColumn, selectedModel, selectedModels, columnAlias, modelColumnAlias, joins, join, joinModel, joinConditions, joinAlias, joinType, group, groupItems, groupItem, having, order, orderItems, orderItem, limit, number, offset, forUpdate, distinct, _0, _1$$8, _3$$17, _4$$17, _5$$19, _6$$13, _7$$13, _8$$13, *_9$$26, _10$$26, _17$$26, _13$$29, _14$$29, _15$$32, _16$$32, *_18$$35, _19$$35, _26$$35, _22$$37, _23$$38, _24$$40, _25$$41, _27$$42, _28$$42, *_29$$43, _30$$43, _37$$43, _38$$43, _33$$45, _34$$45, _35$$48, _36$$48, _39$$50, _40$$50, *_41$$51, _42$$51, _43$$53, _44$$53, _45$$54, _46$$54, _47$$55, _48$$55, _49$$56, _50$$58, _51$$58, _52$$59, _53$$59, _54$$60, _55$$60, _56$$61, _57$$63, *_58$$64, _59$$64, _62$$64, _63$$64, _60$$65, _61$$66, _64$$68, *_65$$70, _66$$70, _77$$70, _78$$70, itemExplode$$73, _67$$73, _68$$73, _69$$73, _70$$73, _71$$71, itemExplode$$76, _72$$76, _73$$76, _74$$76, _75$$76, _76$$74, _79$$77, _80$$83, _81$$86, _82$$86, _83$$86, _84$$86, _85$$86, _87$$87, _88$$87, _89$$87, _90$$87, _91$$87; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_1 = NULL; zval *this_ptr = getThis(); ZVAL_NULL(&__$null); @@ -1171,94 +1063,93 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getPhql) ZVAL_UNDEF(&forUpdate); ZVAL_UNDEF(&distinct); ZVAL_UNDEF(&_0); - ZVAL_UNDEF(&_2$$8); + ZVAL_UNDEF(&_1$$8); + ZVAL_UNDEF(&_3$$17); ZVAL_UNDEF(&_4$$17); - ZVAL_UNDEF(&_5$$17); - ZVAL_UNDEF(&_6$$19); + ZVAL_UNDEF(&_5$$19); + ZVAL_UNDEF(&_6$$13); ZVAL_UNDEF(&_7$$13); ZVAL_UNDEF(&_8$$13); - ZVAL_UNDEF(&_9$$13); - ZVAL_UNDEF(&_11$$26); - ZVAL_UNDEF(&_18$$26); + ZVAL_UNDEF(&_10$$26); + ZVAL_UNDEF(&_17$$26); + ZVAL_UNDEF(&_13$$29); ZVAL_UNDEF(&_14$$29); - ZVAL_UNDEF(&_15$$29); + ZVAL_UNDEF(&_15$$32); ZVAL_UNDEF(&_16$$32); - ZVAL_UNDEF(&_17$$32); - ZVAL_UNDEF(&_20$$35); - ZVAL_UNDEF(&_27$$35); - ZVAL_UNDEF(&_23$$37); - ZVAL_UNDEF(&_24$$38); - ZVAL_UNDEF(&_25$$40); - ZVAL_UNDEF(&_26$$41); + ZVAL_UNDEF(&_19$$35); + ZVAL_UNDEF(&_26$$35); + ZVAL_UNDEF(&_22$$37); + ZVAL_UNDEF(&_23$$38); + ZVAL_UNDEF(&_24$$40); + ZVAL_UNDEF(&_25$$41); + ZVAL_UNDEF(&_27$$42); ZVAL_UNDEF(&_28$$42); - ZVAL_UNDEF(&_29$$42); - ZVAL_UNDEF(&_31$$43); + ZVAL_UNDEF(&_30$$43); + ZVAL_UNDEF(&_37$$43); ZVAL_UNDEF(&_38$$43); - ZVAL_UNDEF(&_39$$43); + ZVAL_UNDEF(&_33$$45); ZVAL_UNDEF(&_34$$45); - ZVAL_UNDEF(&_35$$45); + ZVAL_UNDEF(&_35$$48); ZVAL_UNDEF(&_36$$48); - ZVAL_UNDEF(&_37$$48); + ZVAL_UNDEF(&_39$$50); ZVAL_UNDEF(&_40$$50); - ZVAL_UNDEF(&_41$$50); - ZVAL_UNDEF(&_43$$51); + ZVAL_UNDEF(&_42$$51); + ZVAL_UNDEF(&_43$$53); ZVAL_UNDEF(&_44$$53); - ZVAL_UNDEF(&_45$$53); + ZVAL_UNDEF(&_45$$54); ZVAL_UNDEF(&_46$$54); - ZVAL_UNDEF(&_47$$54); + ZVAL_UNDEF(&_47$$55); ZVAL_UNDEF(&_48$$55); - ZVAL_UNDEF(&_49$$55); - ZVAL_UNDEF(&_50$$56); + ZVAL_UNDEF(&_49$$56); + ZVAL_UNDEF(&_50$$58); ZVAL_UNDEF(&_51$$58); - ZVAL_UNDEF(&_52$$58); + ZVAL_UNDEF(&_52$$59); ZVAL_UNDEF(&_53$$59); - ZVAL_UNDEF(&_54$$59); + ZVAL_UNDEF(&_54$$60); ZVAL_UNDEF(&_55$$60); - ZVAL_UNDEF(&_56$$60); - ZVAL_UNDEF(&_57$$61); - ZVAL_UNDEF(&_58$$63); - ZVAL_UNDEF(&_60$$64); + ZVAL_UNDEF(&_56$$61); + ZVAL_UNDEF(&_57$$63); + ZVAL_UNDEF(&_59$$64); + ZVAL_UNDEF(&_62$$64); ZVAL_UNDEF(&_63$$64); - ZVAL_UNDEF(&_64$$64); - ZVAL_UNDEF(&_61$$65); - ZVAL_UNDEF(&_62$$66); - ZVAL_UNDEF(&_65$$68); - ZVAL_UNDEF(&_67$$70); + ZVAL_UNDEF(&_60$$65); + ZVAL_UNDEF(&_61$$66); + ZVAL_UNDEF(&_64$$68); + ZVAL_UNDEF(&_66$$70); + ZVAL_UNDEF(&_77$$70); ZVAL_UNDEF(&_78$$70); - ZVAL_UNDEF(&_79$$70); ZVAL_UNDEF(&itemExplode$$73); + ZVAL_UNDEF(&_67$$73); ZVAL_UNDEF(&_68$$73); ZVAL_UNDEF(&_69$$73); ZVAL_UNDEF(&_70$$73); - ZVAL_UNDEF(&_71$$73); - ZVAL_UNDEF(&_72$$71); + ZVAL_UNDEF(&_71$$71); ZVAL_UNDEF(&itemExplode$$76); + ZVAL_UNDEF(&_72$$76); ZVAL_UNDEF(&_73$$76); ZVAL_UNDEF(&_74$$76); ZVAL_UNDEF(&_75$$76); - ZVAL_UNDEF(&_76$$76); - ZVAL_UNDEF(&_77$$74); - ZVAL_UNDEF(&_80$$77); - ZVAL_UNDEF(&_81$$83); + ZVAL_UNDEF(&_76$$74); + ZVAL_UNDEF(&_79$$77); + ZVAL_UNDEF(&_80$$83); + ZVAL_UNDEF(&_81$$86); ZVAL_UNDEF(&_82$$86); ZVAL_UNDEF(&_83$$86); ZVAL_UNDEF(&_84$$86); ZVAL_UNDEF(&_85$$86); - ZVAL_UNDEF(&_86$$86); + ZVAL_UNDEF(&_87$$87); ZVAL_UNDEF(&_88$$87); ZVAL_UNDEF(&_89$$87); ZVAL_UNDEF(&_90$$87); ZVAL_UNDEF(&_91$$87); - ZVAL_UNDEF(&_92$$87); - ZVAL_UNDEF(&_3$$8); - - - ZEPHIR_MM_GROW(); + ZVAL_UNDEF(&_2$$8); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("container"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&container, &_0); if (Z_TYPE_P(&container) != IS_OBJECT) { - ZEPHIR_CALL_CE_STATIC(&container, phalcon_di_di_ce, "getdefault", &_1, 0); + ZEPHIR_CALL_CE_STATIC(&container, phalcon_di_di_ce, "getdefault", NULL, 0); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("container"), &container); } @@ -1283,27 +1174,27 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getPhql) ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Cannot build the query. Invalid condition", "phalcon/Mvc/Model/Query/Builder.zep", 700); return; } - ZEPHIR_OBS_VAR(&model); + zephir_memory_observe(&model); zephir_array_fetch_long(&model, &models, 0, PH_NOISY, "phalcon/Mvc/Model/Query/Builder.zep", 703); } else { ZEPHIR_CPY_WRT(&model, &models); } - ZEPHIR_INIT_VAR(&_2$$8); - ZVAL_STRING(&_2$$8, "modelsMetadata"); - ZEPHIR_CALL_METHOD(&metaData, &container, "getshared", NULL, 0, &_2$$8); + ZEPHIR_INIT_VAR(&_1$$8); + ZVAL_STRING(&_1$$8, "modelsMetadata"); + ZEPHIR_CALL_METHOD(&metaData, &container, "getshared", NULL, 0, &_1$$8); zephir_check_call_status(); - ZEPHIR_INIT_VAR(&_3$$8); - zephir_create_array(&_3$$8, 2, 0); - zephir_array_fast_append(&_3$$8, &__$null); - zephir_array_fast_append(&_3$$8, &container); + ZEPHIR_INIT_VAR(&_2$$8); + zephir_create_array(&_2$$8, 2, 0); + zephir_array_fast_append(&_2$$8, &__$null); + zephir_array_fast_append(&_2$$8, &container); ZEPHIR_INIT_VAR(&modelInstance); - ZEPHIR_LAST_CALL_STATUS = zephir_create_instance_params(&modelInstance, &model, &_3$$8); + ZEPHIR_LAST_CALL_STATUS = zephir_create_instance_params(&modelInstance, &model, &_2$$8); zephir_check_call_status(); noPrimary = 1; ZEPHIR_CALL_METHOD(&primaryKeys, &metaData, "getprimarykeyattributes", NULL, 0, &modelInstance); zephir_check_call_status(); if (zephir_fast_count_int(&primaryKeys)) { - ZEPHIR_OBS_VAR(&firstPrimaryKey); + zephir_memory_observe(&firstPrimaryKey); if (zephir_array_isset_long_fetch(&firstPrimaryKey, &primaryKeys, 0, 0)) { if (ZEPHIR_GLOBAL(orm).column_renaming) { ZEPHIR_CALL_METHOD(&columnMap, &metaData, "getcolumnmap", NULL, 0, &modelInstance); @@ -1313,15 +1204,15 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getPhql) ZVAL_NULL(&columnMap); } if (Z_TYPE_P(&columnMap) == IS_ARRAY) { - ZEPHIR_OBS_VAR(&attributeField); + zephir_memory_observe(&attributeField); if (UNEXPECTED(!(zephir_array_isset_fetch(&attributeField, &columnMap, &firstPrimaryKey, 0)))) { + ZEPHIR_INIT_VAR(&_3$$17); + object_init_ex(&_3$$17, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_VAR(&_4$$17); - object_init_ex(&_4$$17, phalcon_mvc_model_exception_ce); - ZEPHIR_INIT_VAR(&_5$$17); - ZEPHIR_CONCAT_SVS(&_5$$17, "Column '", &firstPrimaryKey, "' isn't part of the column map"); - ZEPHIR_CALL_METHOD(NULL, &_4$$17, "__construct", NULL, 32, &_5$$17); + ZEPHIR_CONCAT_SVS(&_4$$17, "Column '", &firstPrimaryKey, "' isn't part of the column map"); + ZEPHIR_CALL_METHOD(NULL, &_3$$17, "__construct", NULL, 33, &_4$$17); zephir_check_call_status(); - zephir_throw_exception_debug(&_4$$17, "phalcon/Mvc/Model/Query/Builder.zep", 739); + zephir_throw_exception_debug(&_3$$17, "phalcon/Mvc/Model/Query/Builder.zep", 739); ZEPHIR_MM_RESTORE(); return; } @@ -1329,17 +1220,17 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getPhql) ZEPHIR_CPY_WRT(&attributeField, &firstPrimaryKey); } if (Z_TYPE_P(&conditions) == IS_STRING) { - ZEPHIR_INIT_VAR(&_6$$19); - ZEPHIR_CONCAT_SVS(&_6$$19, "'", &conditions, "'"); - ZEPHIR_CPY_WRT(&conditions, &_6$$19); + ZEPHIR_INIT_VAR(&_5$$19); + ZEPHIR_CONCAT_SVS(&_5$$19, "'", &conditions, "'"); + ZEPHIR_CPY_WRT(&conditions, &_5$$19); } - ZEPHIR_CALL_METHOD(&_7$$13, this_ptr, "autoescape", NULL, 477, &model); + ZEPHIR_CALL_METHOD(&_6$$13, this_ptr, "autoescape", NULL, 478, &model); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_8$$13, this_ptr, "autoescape", NULL, 477, &attributeField); + ZEPHIR_CALL_METHOD(&_7$$13, this_ptr, "autoescape", NULL, 478, &attributeField); zephir_check_call_status(); - ZEPHIR_INIT_VAR(&_9$$13); - ZEPHIR_CONCAT_VSVSV(&_9$$13, &_7$$13, ".", &_8$$13, " = ", &conditions); - ZEPHIR_CPY_WRT(&conditions, &_9$$13); + ZEPHIR_INIT_VAR(&_8$$13); + ZEPHIR_CONCAT_VSVSV(&_8$$13, &_6$$13, ".", &_7$$13, " = ", &conditions); + ZEPHIR_CPY_WRT(&conditions, &_8$$13); noPrimary = 0; } } @@ -1369,33 +1260,33 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getPhql) array_init(&selectedColumns); zephir_is_iterable(&columns, 0, "phalcon/Mvc/Model/Query/Builder.zep", 799); if (Z_TYPE_P(&columns) == IS_ARRAY) { - ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&columns), _12$$26, _13$$26, _10$$26) + ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&columns), _11$$26, _12$$26, _9$$26) { ZEPHIR_INIT_NVAR(&columnAlias); - if (_13$$26 != NULL) { - ZVAL_STR_COPY(&columnAlias, _13$$26); + if (_12$$26 != NULL) { + ZVAL_STR_COPY(&columnAlias, _12$$26); } else { - ZVAL_LONG(&columnAlias, _12$$26); + ZVAL_LONG(&columnAlias, _11$$26); } ZEPHIR_INIT_NVAR(&column); - ZVAL_COPY(&column, _10$$26); + ZVAL_COPY(&column, _9$$26); if (Z_TYPE_P(&columnAlias) == IS_LONG) { zephir_array_append(&selectedColumns, &column, PH_SEPARATE, "phalcon/Mvc/Model/Query/Builder.zep", 793); } else { - ZEPHIR_CALL_METHOD(&_14$$29, this_ptr, "autoescape", NULL, 477, &columnAlias); + ZEPHIR_CALL_METHOD(&_13$$29, this_ptr, "autoescape", NULL, 478, &columnAlias); zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_15$$29); - ZEPHIR_CONCAT_VSV(&_15$$29, &column, " AS ", &_14$$29); - zephir_array_append(&selectedColumns, &_15$$29, PH_SEPARATE, "phalcon/Mvc/Model/Query/Builder.zep", 795); + ZEPHIR_INIT_NVAR(&_14$$29); + ZEPHIR_CONCAT_VSV(&_14$$29, &column, " AS ", &_13$$29); + zephir_array_append(&selectedColumns, &_14$$29, PH_SEPARATE, "phalcon/Mvc/Model/Query/Builder.zep", 795); } } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &columns, "rewind", NULL, 0); zephir_check_call_status(); while (1) { - ZEPHIR_CALL_METHOD(&_11$$26, &columns, "valid", NULL, 0); + ZEPHIR_CALL_METHOD(&_10$$26, &columns, "valid", NULL, 0); zephir_check_call_status(); - if (!zend_is_true(&_11$$26)) { + if (!zend_is_true(&_10$$26)) { break; } ZEPHIR_CALL_METHOD(&columnAlias, &columns, "key", NULL, 0); @@ -1405,11 +1296,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getPhql) if (Z_TYPE_P(&columnAlias) == IS_LONG) { zephir_array_append(&selectedColumns, &column, PH_SEPARATE, "phalcon/Mvc/Model/Query/Builder.zep", 793); } else { - ZEPHIR_CALL_METHOD(&_16$$32, this_ptr, "autoescape", NULL, 477, &columnAlias); + ZEPHIR_CALL_METHOD(&_15$$32, this_ptr, "autoescape", NULL, 478, &columnAlias); zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_17$$32); - ZEPHIR_CONCAT_VSV(&_17$$32, &column, " AS ", &_16$$32); - zephir_array_append(&selectedColumns, &_17$$32, PH_SEPARATE, "phalcon/Mvc/Model/Query/Builder.zep", 795); + ZEPHIR_INIT_NVAR(&_16$$32); + ZEPHIR_CONCAT_VSV(&_16$$32, &column, " AS ", &_15$$32); + zephir_array_append(&selectedColumns, &_16$$32, PH_SEPARATE, "phalcon/Mvc/Model/Query/Builder.zep", 795); } ZEPHIR_CALL_METHOD(NULL, &columns, "next", NULL, 0); zephir_check_call_status(); @@ -1417,9 +1308,9 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getPhql) } ZEPHIR_INIT_NVAR(&column); ZEPHIR_INIT_NVAR(&columnAlias); - ZEPHIR_INIT_VAR(&_18$$26); - zephir_fast_join_str(&_18$$26, SL(", "), &selectedColumns); - zephir_concat_self(&phql, &_18$$26); + ZEPHIR_INIT_VAR(&_17$$26); + zephir_fast_join_str(&_17$$26, SL(", "), &selectedColumns); + zephir_concat_self(&phql, &_17$$26); } else { zephir_concat_self(&phql, &columns); } @@ -1429,25 +1320,25 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getPhql) array_init(&selectedColumns); zephir_is_iterable(&models, 0, "phalcon/Mvc/Model/Query/Builder.zep", 820); if (Z_TYPE_P(&models) == IS_ARRAY) { - ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&models), _21$$35, _22$$35, _19$$35) + ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&models), _20$$35, _21$$35, _18$$35) { ZEPHIR_INIT_NVAR(&modelColumnAlias); - if (_22$$35 != NULL) { - ZVAL_STR_COPY(&modelColumnAlias, _22$$35); + if (_21$$35 != NULL) { + ZVAL_STR_COPY(&modelColumnAlias, _21$$35); } else { - ZVAL_LONG(&modelColumnAlias, _21$$35); + ZVAL_LONG(&modelColumnAlias, _20$$35); } ZEPHIR_INIT_NVAR(&model); - ZVAL_COPY(&model, _19$$35); + ZVAL_COPY(&model, _18$$35); ZEPHIR_INIT_NVAR(&selectedColumn); if (Z_TYPE_P(&modelColumnAlias) == IS_LONG) { - ZEPHIR_CALL_METHOD(&_23$$37, this_ptr, "autoescape", NULL, 477, &model); + ZEPHIR_CALL_METHOD(&_22$$37, this_ptr, "autoescape", NULL, 478, &model); zephir_check_call_status(); - ZEPHIR_CONCAT_VS(&selectedColumn, &_23$$37, ".*"); + ZEPHIR_CONCAT_VS(&selectedColumn, &_22$$37, ".*"); } else { - ZEPHIR_CALL_METHOD(&_24$$38, this_ptr, "autoescape", NULL, 477, &modelColumnAlias); + ZEPHIR_CALL_METHOD(&_23$$38, this_ptr, "autoescape", NULL, 478, &modelColumnAlias); zephir_check_call_status(); - ZEPHIR_CONCAT_VS(&selectedColumn, &_24$$38, ".*"); + ZEPHIR_CONCAT_VS(&selectedColumn, &_23$$38, ".*"); } zephir_array_append(&selectedColumns, &selectedColumn, PH_SEPARATE, "phalcon/Mvc/Model/Query/Builder.zep", 817); } ZEND_HASH_FOREACH_END(); @@ -1455,9 +1346,9 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getPhql) ZEPHIR_CALL_METHOD(NULL, &models, "rewind", NULL, 0); zephir_check_call_status(); while (1) { - ZEPHIR_CALL_METHOD(&_20$$35, &models, "valid", NULL, 0); + ZEPHIR_CALL_METHOD(&_19$$35, &models, "valid", NULL, 0); zephir_check_call_status(); - if (!zend_is_true(&_20$$35)) { + if (!zend_is_true(&_19$$35)) { break; } ZEPHIR_CALL_METHOD(&modelColumnAlias, &models, "key", NULL, 0); @@ -1466,13 +1357,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getPhql) zephir_check_call_status(); ZEPHIR_INIT_NVAR(&selectedColumn); if (Z_TYPE_P(&modelColumnAlias) == IS_LONG) { - ZEPHIR_CALL_METHOD(&_25$$40, this_ptr, "autoescape", NULL, 477, &model); + ZEPHIR_CALL_METHOD(&_24$$40, this_ptr, "autoescape", NULL, 478, &model); zephir_check_call_status(); - ZEPHIR_CONCAT_VS(&selectedColumn, &_25$$40, ".*"); + ZEPHIR_CONCAT_VS(&selectedColumn, &_24$$40, ".*"); } else { - ZEPHIR_CALL_METHOD(&_26$$41, this_ptr, "autoescape", NULL, 477, &modelColumnAlias); + ZEPHIR_CALL_METHOD(&_25$$41, this_ptr, "autoescape", NULL, 478, &modelColumnAlias); zephir_check_call_status(); - ZEPHIR_CONCAT_VS(&selectedColumn, &_26$$41, ".*"); + ZEPHIR_CONCAT_VS(&selectedColumn, &_25$$41, ".*"); } zephir_array_append(&selectedColumns, &selectedColumn, PH_SEPARATE, "phalcon/Mvc/Model/Query/Builder.zep", 817); ZEPHIR_CALL_METHOD(NULL, &models, "next", NULL, 0); @@ -1481,15 +1372,15 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getPhql) } ZEPHIR_INIT_NVAR(&model); ZEPHIR_INIT_NVAR(&modelColumnAlias); - ZEPHIR_INIT_VAR(&_27$$35); - zephir_fast_join_str(&_27$$35, SL(", "), &selectedColumns); - zephir_concat_self(&phql, &_27$$35); + ZEPHIR_INIT_VAR(&_26$$35); + zephir_fast_join_str(&_26$$35, SL(", "), &selectedColumns); + zephir_concat_self(&phql, &_26$$35); } else { - ZEPHIR_CALL_METHOD(&_28$$42, this_ptr, "autoescape", NULL, 477, &models); + ZEPHIR_CALL_METHOD(&_27$$42, this_ptr, "autoescape", NULL, 478, &models); zephir_check_call_status(); - ZEPHIR_INIT_VAR(&_29$$42); - ZEPHIR_CONCAT_VS(&_29$$42, &_28$$42, ".*"); - zephir_concat_self(&phql, &_29$$42); + ZEPHIR_INIT_VAR(&_28$$42); + ZEPHIR_CONCAT_VS(&_28$$42, &_27$$42, ".*"); + zephir_concat_self(&phql, &_28$$42); } } if (Z_TYPE_P(&models) == IS_ARRAY) { @@ -1497,25 +1388,25 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getPhql) array_init(&selectedModels); zephir_is_iterable(&models, 0, "phalcon/Mvc/Model/Query/Builder.zep", 842); if (Z_TYPE_P(&models) == IS_ARRAY) { - ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&models), _32$$43, _33$$43, _30$$43) + ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&models), _31$$43, _32$$43, _29$$43) { ZEPHIR_INIT_NVAR(&modelAlias); - if (_33$$43 != NULL) { - ZVAL_STR_COPY(&modelAlias, _33$$43); + if (_32$$43 != NULL) { + ZVAL_STR_COPY(&modelAlias, _32$$43); } else { - ZVAL_LONG(&modelAlias, _32$$43); + ZVAL_LONG(&modelAlias, _31$$43); } ZEPHIR_INIT_NVAR(&model); - ZVAL_COPY(&model, _30$$43); + ZVAL_COPY(&model, _29$$43); if (Z_TYPE_P(&modelAlias) == IS_STRING) { - ZEPHIR_CALL_METHOD(&_34$$45, this_ptr, "autoescape", NULL, 477, &model); + ZEPHIR_CALL_METHOD(&_33$$45, this_ptr, "autoescape", NULL, 478, &model); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_35$$45, this_ptr, "autoescape", NULL, 477, &modelAlias); + ZEPHIR_CALL_METHOD(&_34$$45, this_ptr, "autoescape", NULL, 478, &modelAlias); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&selectedModel); - ZEPHIR_CONCAT_VSV(&selectedModel, &_34$$45, " AS ", &_35$$45); + ZEPHIR_CONCAT_VSV(&selectedModel, &_33$$45, " AS ", &_34$$45); } else { - ZEPHIR_CALL_METHOD(&selectedModel, this_ptr, "autoescape", NULL, 477, &model); + ZEPHIR_CALL_METHOD(&selectedModel, this_ptr, "autoescape", NULL, 478, &model); zephir_check_call_status(); } zephir_array_append(&selectedModels, &selectedModel, PH_SEPARATE, "phalcon/Mvc/Model/Query/Builder.zep", 839); @@ -1524,9 +1415,9 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getPhql) ZEPHIR_CALL_METHOD(NULL, &models, "rewind", NULL, 0); zephir_check_call_status(); while (1) { - ZEPHIR_CALL_METHOD(&_31$$43, &models, "valid", NULL, 0); + ZEPHIR_CALL_METHOD(&_30$$43, &models, "valid", NULL, 0); zephir_check_call_status(); - if (!zend_is_true(&_31$$43)) { + if (!zend_is_true(&_30$$43)) { break; } ZEPHIR_CALL_METHOD(&modelAlias, &models, "key", NULL, 0); @@ -1534,14 +1425,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getPhql) ZEPHIR_CALL_METHOD(&model, &models, "current", NULL, 0); zephir_check_call_status(); if (Z_TYPE_P(&modelAlias) == IS_STRING) { - ZEPHIR_CALL_METHOD(&_36$$48, this_ptr, "autoescape", NULL, 477, &model); + ZEPHIR_CALL_METHOD(&_35$$48, this_ptr, "autoescape", NULL, 478, &model); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_37$$48, this_ptr, "autoescape", NULL, 477, &modelAlias); + ZEPHIR_CALL_METHOD(&_36$$48, this_ptr, "autoescape", NULL, 478, &modelAlias); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&selectedModel); - ZEPHIR_CONCAT_VSV(&selectedModel, &_36$$48, " AS ", &_37$$48); + ZEPHIR_CONCAT_VSV(&selectedModel, &_35$$48, " AS ", &_36$$48); } else { - ZEPHIR_CALL_METHOD(&selectedModel, this_ptr, "autoescape", NULL, 477, &model); + ZEPHIR_CALL_METHOD(&selectedModel, this_ptr, "autoescape", NULL, 478, &model); zephir_check_call_status(); } zephir_array_append(&selectedModels, &selectedModel, PH_SEPARATE, "phalcon/Mvc/Model/Query/Builder.zep", 839); @@ -1551,27 +1442,27 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getPhql) } ZEPHIR_INIT_NVAR(&model); ZEPHIR_INIT_NVAR(&modelAlias); + ZEPHIR_INIT_VAR(&_37$$43); + zephir_fast_join_str(&_37$$43, SL(", "), &selectedModels); ZEPHIR_INIT_VAR(&_38$$43); - zephir_fast_join_str(&_38$$43, SL(", "), &selectedModels); - ZEPHIR_INIT_VAR(&_39$$43); - ZEPHIR_CONCAT_SV(&_39$$43, " FROM ", &_38$$43); - zephir_concat_self(&phql, &_39$$43); + ZEPHIR_CONCAT_SV(&_38$$43, " FROM ", &_37$$43); + zephir_concat_self(&phql, &_38$$43); } else { - ZEPHIR_CALL_METHOD(&_40$$50, this_ptr, "autoescape", NULL, 477, &models); + ZEPHIR_CALL_METHOD(&_39$$50, this_ptr, "autoescape", NULL, 478, &models); zephir_check_call_status(); - ZEPHIR_INIT_VAR(&_41$$50); - ZEPHIR_CONCAT_SV(&_41$$50, " FROM ", &_40$$50); - zephir_concat_self(&phql, &_41$$50); + ZEPHIR_INIT_VAR(&_40$$50); + ZEPHIR_CONCAT_SV(&_40$$50, " FROM ", &_39$$50); + zephir_concat_self(&phql, &_40$$50); } zephir_read_property(&_0, this_ptr, ZEND_STRL("joins"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&joins, &_0); if (Z_TYPE_P(&joins) == IS_ARRAY) { zephir_is_iterable(&joins, 0, "phalcon/Mvc/Model/Query/Builder.zep", 897); if (Z_TYPE_P(&joins) == IS_ARRAY) { - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&joins), _42$$51) + ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&joins), _41$$51) { ZEPHIR_INIT_NVAR(&join); - ZVAL_COPY(&join, _42$$51); + ZVAL_COPY(&join, _41$$51); ZEPHIR_OBS_NVAR(&joinModel); zephir_array_fetch_long(&joinModel, &join, 0, PH_NOISY, "phalcon/Mvc/Model/Query/Builder.zep", 857); ZEPHIR_OBS_NVAR(&joinConditions); @@ -1581,38 +1472,38 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getPhql) ZEPHIR_OBS_NVAR(&joinType); zephir_array_fetch_long(&joinType, &join, 3, PH_NOISY, "phalcon/Mvc/Model/Query/Builder.zep", 872); if (zephir_is_true(&joinType)) { - ZEPHIR_CALL_METHOD(&_44$$53, this_ptr, "autoescape", NULL, 477, &joinModel); + ZEPHIR_CALL_METHOD(&_43$$53, this_ptr, "autoescape", NULL, 478, &joinModel); zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_45$$53); - ZEPHIR_CONCAT_SVSV(&_45$$53, " ", &joinType, " JOIN ", &_44$$53); - zephir_concat_self(&phql, &_45$$53); + ZEPHIR_INIT_NVAR(&_44$$53); + ZEPHIR_CONCAT_SVSV(&_44$$53, " ", &joinType, " JOIN ", &_43$$53); + zephir_concat_self(&phql, &_44$$53); } else { - ZEPHIR_CALL_METHOD(&_46$$54, this_ptr, "autoescape", NULL, 477, &joinModel); + ZEPHIR_CALL_METHOD(&_45$$54, this_ptr, "autoescape", NULL, 478, &joinModel); zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_47$$54); - ZEPHIR_CONCAT_SV(&_47$$54, " JOIN ", &_46$$54); - zephir_concat_self(&phql, &_47$$54); + ZEPHIR_INIT_NVAR(&_46$$54); + ZEPHIR_CONCAT_SV(&_46$$54, " JOIN ", &_45$$54); + zephir_concat_self(&phql, &_46$$54); } if (zephir_is_true(&joinAlias)) { - ZEPHIR_CALL_METHOD(&_48$$55, this_ptr, "autoescape", NULL, 477, &joinAlias); + ZEPHIR_CALL_METHOD(&_47$$55, this_ptr, "autoescape", NULL, 478, &joinAlias); zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_49$$55); - ZEPHIR_CONCAT_SV(&_49$$55, " AS ", &_48$$55); - zephir_concat_self(&phql, &_49$$55); + ZEPHIR_INIT_NVAR(&_48$$55); + ZEPHIR_CONCAT_SV(&_48$$55, " AS ", &_47$$55); + zephir_concat_self(&phql, &_48$$55); } if (zephir_is_true(&joinConditions)) { - ZEPHIR_INIT_NVAR(&_50$$56); - ZEPHIR_CONCAT_SV(&_50$$56, " ON ", &joinConditions); - zephir_concat_self(&phql, &_50$$56); + ZEPHIR_INIT_NVAR(&_49$$56); + ZEPHIR_CONCAT_SV(&_49$$56, " ON ", &joinConditions); + zephir_concat_self(&phql, &_49$$56); } } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &joins, "rewind", NULL, 0); zephir_check_call_status(); while (1) { - ZEPHIR_CALL_METHOD(&_43$$51, &joins, "valid", NULL, 0); + ZEPHIR_CALL_METHOD(&_42$$51, &joins, "valid", NULL, 0); zephir_check_call_status(); - if (!zend_is_true(&_43$$51)) { + if (!zend_is_true(&_42$$51)) { break; } ZEPHIR_CALL_METHOD(&join, &joins, "current", NULL, 0); @@ -1626,29 +1517,29 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getPhql) ZEPHIR_OBS_NVAR(&joinType); zephir_array_fetch_long(&joinType, &join, 3, PH_NOISY, "phalcon/Mvc/Model/Query/Builder.zep", 872); if (zephir_is_true(&joinType)) { - ZEPHIR_CALL_METHOD(&_51$$58, this_ptr, "autoescape", NULL, 477, &joinModel); + ZEPHIR_CALL_METHOD(&_50$$58, this_ptr, "autoescape", NULL, 478, &joinModel); zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_52$$58); - ZEPHIR_CONCAT_SVSV(&_52$$58, " ", &joinType, " JOIN ", &_51$$58); - zephir_concat_self(&phql, &_52$$58); + ZEPHIR_INIT_NVAR(&_51$$58); + ZEPHIR_CONCAT_SVSV(&_51$$58, " ", &joinType, " JOIN ", &_50$$58); + zephir_concat_self(&phql, &_51$$58); } else { - ZEPHIR_CALL_METHOD(&_53$$59, this_ptr, "autoescape", NULL, 477, &joinModel); + ZEPHIR_CALL_METHOD(&_52$$59, this_ptr, "autoescape", NULL, 478, &joinModel); zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_54$$59); - ZEPHIR_CONCAT_SV(&_54$$59, " JOIN ", &_53$$59); - zephir_concat_self(&phql, &_54$$59); + ZEPHIR_INIT_NVAR(&_53$$59); + ZEPHIR_CONCAT_SV(&_53$$59, " JOIN ", &_52$$59); + zephir_concat_self(&phql, &_53$$59); } if (zephir_is_true(&joinAlias)) { - ZEPHIR_CALL_METHOD(&_55$$60, this_ptr, "autoescape", NULL, 477, &joinAlias); + ZEPHIR_CALL_METHOD(&_54$$60, this_ptr, "autoescape", NULL, 478, &joinAlias); zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_56$$60); - ZEPHIR_CONCAT_SV(&_56$$60, " AS ", &_55$$60); - zephir_concat_self(&phql, &_56$$60); + ZEPHIR_INIT_NVAR(&_55$$60); + ZEPHIR_CONCAT_SV(&_55$$60, " AS ", &_54$$60); + zephir_concat_self(&phql, &_55$$60); } if (zephir_is_true(&joinConditions)) { - ZEPHIR_INIT_NVAR(&_57$$61); - ZEPHIR_CONCAT_SV(&_57$$61, " ON ", &joinConditions); - zephir_concat_self(&phql, &_57$$61); + ZEPHIR_INIT_NVAR(&_56$$61); + ZEPHIR_CONCAT_SV(&_56$$61, " ON ", &joinConditions); + zephir_concat_self(&phql, &_56$$61); } ZEPHIR_CALL_METHOD(NULL, &joins, "next", NULL, 0); zephir_check_call_status(); @@ -1658,9 +1549,9 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getPhql) } if (Z_TYPE_P(&conditions) == IS_STRING) { if (!(ZEPHIR_IS_EMPTY(&conditions))) { - ZEPHIR_INIT_VAR(&_58$$63); - ZEPHIR_CONCAT_SV(&_58$$63, " WHERE ", &conditions); - zephir_concat_self(&phql, &_58$$63); + ZEPHIR_INIT_VAR(&_57$$63); + ZEPHIR_CONCAT_SV(&_57$$63, " WHERE ", &conditions); + zephir_concat_self(&phql, &_57$$63); } } zephir_read_property(&_0, this_ptr, ZEND_STRL("group"), PH_NOISY_CC | PH_READONLY); @@ -1670,46 +1561,46 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getPhql) array_init(&groupItems); zephir_is_iterable(&group, 0, "phalcon/Mvc/Model/Query/Builder.zep", 917); if (Z_TYPE_P(&group) == IS_ARRAY) { - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&group), _59$$64) + ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&group), _58$$64) { ZEPHIR_INIT_NVAR(&groupItem); - ZVAL_COPY(&groupItem, _59$$64); - ZEPHIR_CALL_METHOD(&_61$$65, this_ptr, "autoescape", NULL, 477, &groupItem); + ZVAL_COPY(&groupItem, _58$$64); + ZEPHIR_CALL_METHOD(&_60$$65, this_ptr, "autoescape", NULL, 478, &groupItem); zephir_check_call_status(); - zephir_array_append(&groupItems, &_61$$65, PH_SEPARATE, "phalcon/Mvc/Model/Query/Builder.zep", 914); + zephir_array_append(&groupItems, &_60$$65, PH_SEPARATE, "phalcon/Mvc/Model/Query/Builder.zep", 914); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &group, "rewind", NULL, 0); zephir_check_call_status(); while (1) { - ZEPHIR_CALL_METHOD(&_60$$64, &group, "valid", NULL, 0); + ZEPHIR_CALL_METHOD(&_59$$64, &group, "valid", NULL, 0); zephir_check_call_status(); - if (!zend_is_true(&_60$$64)) { + if (!zend_is_true(&_59$$64)) { break; } ZEPHIR_CALL_METHOD(&groupItem, &group, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_62$$66, this_ptr, "autoescape", NULL, 477, &groupItem); + ZEPHIR_CALL_METHOD(&_61$$66, this_ptr, "autoescape", NULL, 478, &groupItem); zephir_check_call_status(); - zephir_array_append(&groupItems, &_62$$66, PH_SEPARATE, "phalcon/Mvc/Model/Query/Builder.zep", 914); + zephir_array_append(&groupItems, &_61$$66, PH_SEPARATE, "phalcon/Mvc/Model/Query/Builder.zep", 914); ZEPHIR_CALL_METHOD(NULL, &group, "next", NULL, 0); zephir_check_call_status(); } } ZEPHIR_INIT_NVAR(&groupItem); + ZEPHIR_INIT_VAR(&_62$$64); + zephir_fast_join_str(&_62$$64, SL(", "), &groupItems); ZEPHIR_INIT_VAR(&_63$$64); - zephir_fast_join_str(&_63$$64, SL(", "), &groupItems); - ZEPHIR_INIT_VAR(&_64$$64); - ZEPHIR_CONCAT_SV(&_64$$64, " GROUP BY ", &_63$$64); - zephir_concat_self(&phql, &_64$$64); + ZEPHIR_CONCAT_SV(&_63$$64, " GROUP BY ", &_62$$64); + zephir_concat_self(&phql, &_63$$64); } zephir_read_property(&_0, this_ptr, ZEND_STRL("having"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&having, &_0); if (Z_TYPE_P(&having) != IS_NULL) { if (!(ZEPHIR_IS_EMPTY(&having))) { - ZEPHIR_INIT_VAR(&_65$$68); - ZEPHIR_CONCAT_SV(&_65$$68, " HAVING ", &having); - zephir_concat_self(&phql, &_65$$68); + ZEPHIR_INIT_VAR(&_64$$68); + ZEPHIR_CONCAT_SV(&_64$$68, " HAVING ", &having); + zephir_concat_self(&phql, &_64$$68); } } zephir_read_property(&_0, this_ptr, ZEND_STRL("order"), PH_NOISY_CC | PH_READONLY); @@ -1720,10 +1611,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getPhql) array_init(&orderItems); zephir_is_iterable(&order, 0, "phalcon/Mvc/Model/Query/Builder.zep", 961); if (Z_TYPE_P(&order) == IS_ARRAY) { - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&order), _66$$70) + ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&order), _65$$70) { ZEPHIR_INIT_NVAR(&orderItem); - ZVAL_COPY(&orderItem, _66$$70); + ZVAL_COPY(&orderItem, _65$$70); if (Z_TYPE_P(&orderItem) == IS_LONG) { zephir_array_append(&orderItems, &orderItem, PH_SEPARATE, "phalcon/Mvc/Model/Query/Builder.zep", 944); continue; @@ -1731,26 +1622,26 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getPhql) if (zephir_memnstr_str(&orderItem, SL(" "), "phalcon/Mvc/Model/Query/Builder.zep", 949) != 0) { ZEPHIR_INIT_NVAR(&itemExplode$$73); zephir_fast_explode_str(&itemExplode$$73, SL(" "), &orderItem, LONG_MAX); - zephir_array_fetch_long(&_69$$73, &itemExplode$$73, 0, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query/Builder.zep", 953); - ZEPHIR_CALL_METHOD(&_68$$73, this_ptr, "autoescape", NULL, 477, &_69$$73); + zephir_array_fetch_long(&_68$$73, &itemExplode$$73, 0, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query/Builder.zep", 953); + ZEPHIR_CALL_METHOD(&_67$$73, this_ptr, "autoescape", NULL, 478, &_68$$73); zephir_check_call_status(); - zephir_array_fetch_long(&_70$$73, &itemExplode$$73, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query/Builder.zep", 953); - ZEPHIR_INIT_NVAR(&_71$$73); - ZEPHIR_CONCAT_VSV(&_71$$73, &_68$$73, " ", &_70$$73); - zephir_array_append(&orderItems, &_71$$73, PH_SEPARATE, "phalcon/Mvc/Model/Query/Builder.zep", 953); + zephir_array_fetch_long(&_69$$73, &itemExplode$$73, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query/Builder.zep", 953); + ZEPHIR_INIT_NVAR(&_70$$73); + ZEPHIR_CONCAT_VSV(&_70$$73, &_67$$73, " ", &_69$$73); + zephir_array_append(&orderItems, &_70$$73, PH_SEPARATE, "phalcon/Mvc/Model/Query/Builder.zep", 953); continue; } - ZEPHIR_CALL_METHOD(&_72$$71, this_ptr, "autoescape", NULL, 477, &orderItem); + ZEPHIR_CALL_METHOD(&_71$$71, this_ptr, "autoescape", NULL, 478, &orderItem); zephir_check_call_status(); - zephir_array_append(&orderItems, &_72$$71, PH_SEPARATE, "phalcon/Mvc/Model/Query/Builder.zep", 958); + zephir_array_append(&orderItems, &_71$$71, PH_SEPARATE, "phalcon/Mvc/Model/Query/Builder.zep", 958); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &order, "rewind", NULL, 0); zephir_check_call_status(); while (1) { - ZEPHIR_CALL_METHOD(&_67$$70, &order, "valid", NULL, 0); + ZEPHIR_CALL_METHOD(&_66$$70, &order, "valid", NULL, 0); zephir_check_call_status(); - if (!zend_is_true(&_67$$70)) { + if (!zend_is_true(&_66$$70)) { break; } ZEPHIR_CALL_METHOD(&orderItem, &order, "current", NULL, 0); @@ -1762,32 +1653,32 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getPhql) if (zephir_memnstr_str(&orderItem, SL(" "), "phalcon/Mvc/Model/Query/Builder.zep", 949) != 0) { ZEPHIR_INIT_NVAR(&itemExplode$$76); zephir_fast_explode_str(&itemExplode$$76, SL(" "), &orderItem, LONG_MAX); - zephir_array_fetch_long(&_74$$76, &itemExplode$$76, 0, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query/Builder.zep", 953); - ZEPHIR_CALL_METHOD(&_73$$76, this_ptr, "autoescape", NULL, 477, &_74$$76); + zephir_array_fetch_long(&_73$$76, &itemExplode$$76, 0, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query/Builder.zep", 953); + ZEPHIR_CALL_METHOD(&_72$$76, this_ptr, "autoescape", NULL, 478, &_73$$76); zephir_check_call_status(); - zephir_array_fetch_long(&_75$$76, &itemExplode$$76, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query/Builder.zep", 953); - ZEPHIR_INIT_NVAR(&_76$$76); - ZEPHIR_CONCAT_VSV(&_76$$76, &_73$$76, " ", &_75$$76); - zephir_array_append(&orderItems, &_76$$76, PH_SEPARATE, "phalcon/Mvc/Model/Query/Builder.zep", 953); + zephir_array_fetch_long(&_74$$76, &itemExplode$$76, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Query/Builder.zep", 953); + ZEPHIR_INIT_NVAR(&_75$$76); + ZEPHIR_CONCAT_VSV(&_75$$76, &_72$$76, " ", &_74$$76); + zephir_array_append(&orderItems, &_75$$76, PH_SEPARATE, "phalcon/Mvc/Model/Query/Builder.zep", 953); continue; } - ZEPHIR_CALL_METHOD(&_77$$74, this_ptr, "autoescape", NULL, 477, &orderItem); + ZEPHIR_CALL_METHOD(&_76$$74, this_ptr, "autoescape", NULL, 478, &orderItem); zephir_check_call_status(); - zephir_array_append(&orderItems, &_77$$74, PH_SEPARATE, "phalcon/Mvc/Model/Query/Builder.zep", 958); + zephir_array_append(&orderItems, &_76$$74, PH_SEPARATE, "phalcon/Mvc/Model/Query/Builder.zep", 958); ZEPHIR_CALL_METHOD(NULL, &order, "next", NULL, 0); zephir_check_call_status(); } } ZEPHIR_INIT_NVAR(&orderItem); + ZEPHIR_INIT_VAR(&_77$$70); + zephir_fast_join_str(&_77$$70, SL(", "), &orderItems); ZEPHIR_INIT_VAR(&_78$$70); - zephir_fast_join_str(&_78$$70, SL(", "), &orderItems); - ZEPHIR_INIT_VAR(&_79$$70); - ZEPHIR_CONCAT_SV(&_79$$70, " ORDER BY ", &_78$$70); - zephir_concat_self(&phql, &_79$$70); + ZEPHIR_CONCAT_SV(&_78$$70, " ORDER BY ", &_77$$70); + zephir_concat_self(&phql, &_78$$70); } else { - ZEPHIR_INIT_VAR(&_80$$77); - ZEPHIR_CONCAT_SV(&_80$$77, " ORDER BY ", &order); - zephir_concat_self(&phql, &_80$$77); + ZEPHIR_INIT_VAR(&_79$$77); + ZEPHIR_CONCAT_SV(&_79$$77, " ORDER BY ", &order); + zephir_concat_self(&phql, &_79$$77); } } zephir_read_property(&_0, this_ptr, ZEND_STRL("limit"), PH_NOISY_CC | PH_READONLY); @@ -1798,7 +1689,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getPhql) if (Z_TYPE_P(&limit) == IS_ARRAY) { ZEPHIR_OBS_NVAR(&number); zephir_array_fetch_string(&number, &limit, SL("number"), PH_NOISY, "phalcon/Mvc/Model/Query/Builder.zep", 975); - ZEPHIR_OBS_VAR(&offset); + zephir_memory_observe(&offset); if (zephir_array_isset_string_fetch(&offset, &limit, SL("offset"), 0)) { if (!(zephir_is_numeric(&offset))) { ZEPHIR_INIT_NVAR(&offset); @@ -1808,8 +1699,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getPhql) } else { if (zephir_is_numeric(&limit)) { ZEPHIR_CPY_WRT(&number, &limit); - zephir_read_property(&_81$$83, this_ptr, ZEND_STRL("offset"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CPY_WRT(&offset, &_81$$83); + zephir_read_property(&_80$$83, this_ptr, ZEND_STRL("offset"), PH_NOISY_CC | PH_READONLY); + ZEPHIR_CPY_WRT(&offset, &_80$$83); if (Z_TYPE_P(&offset) != IS_NULL) { if (!(zephir_is_numeric(&offset))) { ZEPHIR_INIT_NVAR(&offset); @@ -1820,34 +1711,34 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getPhql) } if (zephir_is_numeric(&number)) { zephir_concat_self_str(&phql, SL(" LIMIT :APL0:")); - ZVAL_LONG(&_82$$86, 10); - ZEPHIR_CALL_FUNCTION(&_83$$86, "intval", NULL, 41, &number, &_82$$86); + ZVAL_LONG(&_81$$86, 10); + ZEPHIR_CALL_FUNCTION(&_82$$86, "intval", NULL, 42, &number, &_81$$86); zephir_check_call_status(); + ZEPHIR_INIT_VAR(&_83$$86); + ZVAL_STRING(&_83$$86, "APL0"); + zephir_update_property_array(this_ptr, SL("bindParams"), &_83$$86, &_82$$86); ZEPHIR_INIT_VAR(&_84$$86); ZVAL_STRING(&_84$$86, "APL0"); - zephir_update_property_array(this_ptr, SL("bindParams"), &_84$$86, &_83$$86); ZEPHIR_INIT_VAR(&_85$$86); - ZVAL_STRING(&_85$$86, "APL0"); - ZEPHIR_INIT_VAR(&_86$$86); - ZVAL_LONG(&_86$$86, 1); - zephir_update_property_array(this_ptr, SL("bindTypes"), &_85$$86, &_86$$86); - _87$$86 = zephir_is_numeric(&offset); - if (_87$$86) { - _87$$86 = !ZEPHIR_IS_LONG_IDENTICAL(&offset, 0); + ZVAL_LONG(&_85$$86, 1); + zephir_update_property_array(this_ptr, SL("bindTypes"), &_84$$86, &_85$$86); + _86$$86 = zephir_is_numeric(&offset); + if (_86$$86) { + _86$$86 = !ZEPHIR_IS_LONG_IDENTICAL(&offset, 0); } - if (_87$$86) { + if (_86$$86) { zephir_concat_self_str(&phql, SL(" OFFSET :APL1:")); - ZVAL_LONG(&_88$$87, 10); - ZEPHIR_CALL_FUNCTION(&_89$$87, "intval", NULL, 41, &offset, &_88$$87); + ZVAL_LONG(&_87$$87, 10); + ZEPHIR_CALL_FUNCTION(&_88$$87, "intval", NULL, 42, &offset, &_87$$87); zephir_check_call_status(); + ZEPHIR_INIT_VAR(&_89$$87); + ZVAL_STRING(&_89$$87, "APL1"); + zephir_update_property_array(this_ptr, SL("bindParams"), &_89$$87, &_88$$87); ZEPHIR_INIT_VAR(&_90$$87); ZVAL_STRING(&_90$$87, "APL1"); - zephir_update_property_array(this_ptr, SL("bindParams"), &_90$$87, &_89$$87); ZEPHIR_INIT_VAR(&_91$$87); - ZVAL_STRING(&_91$$87, "APL1"); - ZEPHIR_INIT_VAR(&_92$$87); - ZVAL_LONG(&_92$$87, 1); - zephir_update_property_array(this_ptr, SL("bindTypes"), &_91$$87, &_92$$87); + ZVAL_LONG(&_91$$87, 1); + zephir_update_property_array(this_ptr, SL("bindTypes"), &_90$$87, &_91$$87); } } } @@ -1883,11 +1774,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getQuery) ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_5$$6); ZVAL_UNDEF(&_2); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_CALL_METHOD(&phql, this_ptr, "getphql", NULL, 478); + ZEPHIR_CALL_METHOD(&phql, this_ptr, "getphql", NULL, 479); zephir_check_call_status(); zephir_read_property(&_0, this_ptr, ZEND_STRL("container"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&container, &_0); @@ -1916,7 +1806,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getQuery) ZEPHIR_CALL_METHOD(NULL, &query, "setbindtypes", NULL, 0, &bindTypes); zephir_check_call_status(); } - ZEPHIR_OBS_VAR(&_4); + zephir_memory_observe(&_4); zephir_read_property(&_4, this_ptr, ZEND_STRL("sharedLock"), PH_NOISY_CC); if (((Z_TYPE_P(&_4) == IS_TRUE || Z_TYPE_P(&_4) == IS_FALSE) == 1)) { zephir_read_property(&_5$$6, this_ptr, ZEND_STRL("sharedLock"), PH_NOISY_CC | PH_READONLY); @@ -1933,9 +1823,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getQuery) */ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getWhere) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "conditions"); } @@ -1964,19 +1851,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, groupBy) ZVAL_UNDEF(&_1$$4); ZVAL_UNDEF(&_2$$4); ZVAL_UNDEF(&_3$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(group) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &group); ZEPHIR_SEPARATE_PARAM(group); - - if (Z_TYPE_P(group) == IS_STRING) { if (zephir_memnstr_str(group, SL(","), "phalcon/Mvc/Model/Query/Builder.zep", 1088)) { ZEPHIR_INIT_VAR(&_0$$4); @@ -2024,18 +1905,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, having) ZVAL_UNDEF(&_1$$5); ZVAL_UNDEF(&bindParams); ZVAL_UNDEF(&bindTypes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(conditions) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(bindParams) Z_PARAM_ARRAY(bindTypes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &conditions_param, &bindParams_param, &bindTypes_param); zephir_get_strval(&conditions, conditions_param); if (!bindParams_param) { @@ -2050,10 +1927,9 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, having) } else { zephir_get_arrval(&bindTypes, bindTypes_param); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("having"), &conditions); - zephir_read_property(¤tBindParams, this_ptr, ZEND_STRL("bindParams"), PH_NOISY_CC | PH_READONLY); + zephir_memory_observe(¤tBindParams); + zephir_read_property(¤tBindParams, this_ptr, ZEND_STRL("bindParams"), PH_NOISY_CC); if (Z_TYPE_P(¤tBindParams) == IS_ARRAY) { ZEPHIR_INIT_VAR(&_0$$3); zephir_add_function(&_0$$3, ¤tBindParams, &bindParams); @@ -2061,7 +1937,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, having) } else { zephir_update_property_zval(this_ptr, ZEND_STRL("bindParams"), &bindParams); } - zephir_read_property(¤tBindTypes, this_ptr, ZEND_STRL("bindTypes"), PH_NOISY_CC | PH_READONLY); + zephir_memory_observe(¤tBindTypes); + zephir_read_property(¤tBindTypes, this_ptr, ZEND_STRL("bindTypes"), PH_NOISY_CC); if (Z_TYPE_P(¤tBindTypes) == IS_ARRAY) { ZEPHIR_INIT_VAR(&_1$$5); zephir_add_function(&_1$$5, ¤tBindTypes, &bindTypes); @@ -2092,18 +1969,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, inHaving) ZVAL_UNDEF(&operator); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&values); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(expr) Z_PARAM_ARRAY(values) Z_PARAM_OPTIONAL Z_PARAM_STR(operator) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &expr_param, &values_param, &operator_param); if (UNEXPECTED(Z_TYPE_P(expr_param) != IS_STRING && Z_TYPE_P(expr_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'expr' must be of the type string")); @@ -2129,8 +2002,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, inHaving) ZEPHIR_INIT_VAR(&operator); } } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "Having"); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "conditionin", NULL, 0, &_0, &operator, &expr, &values); @@ -2174,7 +2045,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, innerJoin) ZVAL_UNDEF(&alias); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(model) @@ -2182,10 +2052,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, innerJoin) Z_PARAM_STR_OR_NULL(conditions) Z_PARAM_STR_OR_NULL(alias) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &model_param, &conditions_param, &alias_param); if (UNEXPECTED(Z_TYPE_P(model_param) != IS_STRING && Z_TYPE_P(model_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'model' must be of the type string")); @@ -2206,8 +2074,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, innerJoin) } else { zephir_get_strval(&alias, alias_param); } - - ZEPHIR_INIT_VAR(&_0); zephir_create_array(&_0, 4, 0); zephir_array_fast_append(&_0, &model); @@ -2243,18 +2109,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, inWhere) ZVAL_UNDEF(&operator); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&values); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(expr) Z_PARAM_ARRAY(values) Z_PARAM_OPTIONAL Z_PARAM_STR(operator) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &expr_param, &values_param, &operator_param); if (UNEXPECTED(Z_TYPE_P(expr_param) != IS_STRING && Z_TYPE_P(expr_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'expr' must be of the type string")); @@ -2280,8 +2142,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, inWhere) ZEPHIR_INIT_VAR(&operator); } } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "Where"); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "conditionin", NULL, 0, &_0, &operator, &expr, &values); @@ -2333,7 +2193,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, join) ZVAL_UNDEF(&alias); ZVAL_UNDEF(&type); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 4) Z_PARAM_STR(model) @@ -2342,10 +2201,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, join) Z_PARAM_STR_OR_NULL(alias) Z_PARAM_STR_OR_NULL(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 3, &model_param, &conditions_param, &alias_param, &type_param); if (UNEXPECTED(Z_TYPE_P(model_param) != IS_STRING && Z_TYPE_P(model_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'model' must be of the type string")); @@ -2371,8 +2228,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, join) } else { zephir_get_strval(&type, type_param); } - - ZEPHIR_INIT_VAR(&_0); zephir_create_array(&_0, 4, 0); zephir_array_fast_append(&_0, &model); @@ -2407,7 +2262,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, leftJoin) ZVAL_UNDEF(&alias); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(model) @@ -2415,10 +2269,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, leftJoin) Z_PARAM_STR_OR_NULL(conditions) Z_PARAM_STR_OR_NULL(alias) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &model_param, &conditions_param, &alias_param); if (UNEXPECTED(Z_TYPE_P(model_param) != IS_STRING && Z_TYPE_P(model_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'model' must be of the type string")); @@ -2439,8 +2291,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, leftJoin) } else { zephir_get_strval(&alias, alias_param); } - - ZEPHIR_INIT_VAR(&_0); zephir_create_array(&_0, 4, 0); zephir_array_fast_append(&_0, &model); @@ -2475,38 +2325,32 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, limit) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2$$4); ZVAL_UNDEF(&_3$$4); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_LONG(limit) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(offset) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &limit_param, &offset); - limit = zephir_get_intval(limit_param); if (!offset) { offset = &offset_sub; offset = &__$null; } - - ZVAL_LONG(&_0, limit); - ZEPHIR_CALL_FUNCTION(&_1, "abs", NULL, 283, &_0); + ZEPHIR_CALL_FUNCTION(&_1, "abs", NULL, 284, &_0); zephir_check_call_status(); limit = zephir_get_numberval(&_1); if (UNEXPECTED(limit == 0)) { RETURN_THIS(); } - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, limit); zephir_update_property_zval(this_ptr, ZEND_STRL("limit"), &_0); if (zephir_is_numeric(offset)) { ZVAL_LONG(&_2$$4, zephir_get_intval(offset)); - ZEPHIR_CALL_FUNCTION(&_3$$4, "abs", NULL, 283, &_2$$4); + ZEPHIR_CALL_FUNCTION(&_3$$4, "abs", NULL, 284, &_2$$4); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("offset"), &_3$$4); } @@ -2533,8 +2377,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, notBetweenHaving) ZVAL_UNDEF(&minimum_sub); ZVAL_UNDEF(&maximum_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 4) Z_PARAM_STR(expr) Z_PARAM_ZVAL(minimum) @@ -2542,10 +2384,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, notBetweenHaving) Z_PARAM_OPTIONAL Z_PARAM_STR(operator) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 1, &expr_param, &minimum, &maximum, &operator_param); if (UNEXPECTED(Z_TYPE_P(expr_param) != IS_STRING && Z_TYPE_P(expr_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'expr' must be of the type string")); @@ -2570,8 +2410,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, notBetweenHaving) ZEPHIR_INIT_VAR(&operator); } } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "Having"); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "conditionnotbetween", NULL, 0, &_0, &operator, &expr, minimum, maximum); @@ -2599,8 +2437,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, notBetweenWhere) ZVAL_UNDEF(&minimum_sub); ZVAL_UNDEF(&maximum_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 4) Z_PARAM_STR(expr) Z_PARAM_ZVAL(minimum) @@ -2608,10 +2444,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, notBetweenWhere) Z_PARAM_OPTIONAL Z_PARAM_STR(operator) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 1, &expr_param, &minimum, &maximum, &operator_param); if (UNEXPECTED(Z_TYPE_P(expr_param) != IS_STRING && Z_TYPE_P(expr_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'expr' must be of the type string")); @@ -2636,8 +2470,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, notBetweenWhere) ZEPHIR_INIT_VAR(&operator); } } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "Where"); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "conditionnotbetween", NULL, 0, &_0, &operator, &expr, minimum, maximum); @@ -2665,18 +2497,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, notInHaving) ZVAL_UNDEF(&operator); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&values); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(expr) Z_PARAM_ARRAY(values) Z_PARAM_OPTIONAL Z_PARAM_STR(operator) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &expr_param, &values_param, &operator_param); if (UNEXPECTED(Z_TYPE_P(expr_param) != IS_STRING && Z_TYPE_P(expr_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'expr' must be of the type string")); @@ -2702,8 +2530,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, notInHaving) ZEPHIR_INIT_VAR(&operator); } } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "Having"); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "conditionnotin", NULL, 0, &_0, &operator, &expr, &values); @@ -2731,18 +2557,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, notInWhere) ZVAL_UNDEF(&operator); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&values); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(expr) Z_PARAM_ARRAY(values) Z_PARAM_OPTIONAL Z_PARAM_STR(operator) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &expr_param, &values_param, &operator_param); if (UNEXPECTED(Z_TYPE_P(expr_param) != IS_STRING && Z_TYPE_P(expr_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'expr' must be of the type string")); @@ -2768,8 +2590,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, notInWhere) ZEPHIR_INIT_VAR(&operator); } } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "Where"); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "conditionnotin", NULL, 0, &_0, &operator, &expr, &values); @@ -2791,19 +2611,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, offset) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(offset) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &offset_param); - offset = zephir_get_intval(offset_param); - - - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, offset); zephir_update_property_zval(this_ptr, ZEND_STRL("offset"), &_0); RETURN_THISW(); @@ -2826,17 +2638,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, orderBy) zval *this_ptr = getThis(); ZVAL_UNDEF(&orderBy_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(orderBy) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &orderBy); - - zephir_update_property_zval(this_ptr, ZEND_STRL("order"), orderBy); RETURN_THISW(); } @@ -2869,18 +2674,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, orHaving) ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&bindParams); ZVAL_UNDEF(&bindTypes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(conditions) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(bindParams) Z_PARAM_ARRAY(bindTypes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &conditions_param, &bindParams_param, &bindTypes_param); if (UNEXPECTED(Z_TYPE_P(conditions_param) != IS_STRING && Z_TYPE_P(conditions_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'conditions' must be of the type string")); @@ -2903,9 +2704,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, orHaving) } else { zephir_get_arrval(&bindTypes, bindTypes_param); } - - - ZEPHIR_OBS_VAR(¤tConditions); + zephir_memory_observe(¤tConditions); zephir_read_property(¤tConditions, this_ptr, ZEND_STRL("having"), PH_NOISY_CC); if (zephir_is_true(¤tConditions)) { ZEPHIR_INIT_VAR(&_0$$3); @@ -2946,18 +2745,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, orWhere) ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&bindParams); ZVAL_UNDEF(&bindTypes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(conditions) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(bindParams) Z_PARAM_ARRAY(bindTypes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &conditions_param, &bindParams_param, &bindTypes_param); if (UNEXPECTED(Z_TYPE_P(conditions_param) != IS_STRING && Z_TYPE_P(conditions_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'conditions' must be of the type string")); @@ -2980,9 +2775,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, orWhere) } else { zephir_get_arrval(&bindTypes, bindTypes_param); } - - - ZEPHIR_OBS_VAR(¤tConditions); + zephir_memory_observe(¤tConditions); zephir_read_property(¤tConditions, this_ptr, ZEND_STRL("conditions"), PH_NOISY_CC); if (zephir_is_true(¤tConditions)) { ZEPHIR_INIT_VAR(&_0$$3); @@ -3018,7 +2811,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, rightJoin) ZVAL_UNDEF(&alias); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(model) @@ -3026,10 +2818,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, rightJoin) Z_PARAM_STR_OR_NULL(conditions) Z_PARAM_STR_OR_NULL(alias) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &model_param, &conditions_param, &alias_param); if (UNEXPECTED(Z_TYPE_P(model_param) != IS_STRING && Z_TYPE_P(model_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'model' must be of the type string")); @@ -3050,8 +2840,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, rightJoin) } else { zephir_get_strval(&alias, alias_param); } - - ZEPHIR_INIT_VAR(&_0); zephir_create_array(&_0, 4, 0); zephir_array_fast_append(&_0, &model); @@ -3078,28 +2866,22 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, setBindParams) ZVAL_UNDEF(&bindParams); ZVAL_UNDEF(¤tBindParams); ZVAL_UNDEF(&_0$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(bindParams) Z_PARAM_OPTIONAL Z_PARAM_BOOL(merge) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &bindParams_param, &merge_param); ZEPHIR_OBS_COPY_OR_DUP(&bindParams, bindParams_param); if (!merge_param) { merge = 0; } else { - merge = zephir_get_boolval(merge_param); - } - - + } if (merge) { - zephir_read_property(¤tBindParams, this_ptr, ZEND_STRL("bindParams"), PH_NOISY_CC | PH_READONLY); + zephir_memory_observe(¤tBindParams); + zephir_read_property(¤tBindParams, this_ptr, ZEND_STRL("bindParams"), PH_NOISY_CC); if (Z_TYPE_P(¤tBindParams) == IS_ARRAY) { ZEPHIR_INIT_VAR(&_0$$4); zephir_add_function(&_0$$4, ¤tBindParams, &bindParams); @@ -3127,28 +2909,22 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, setBindTypes) ZVAL_UNDEF(&bindTypes); ZVAL_UNDEF(¤tBindTypes); ZVAL_UNDEF(&_0$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(bindTypes) Z_PARAM_OPTIONAL Z_PARAM_BOOL(merge) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &bindTypes_param, &merge_param); ZEPHIR_OBS_COPY_OR_DUP(&bindTypes, bindTypes_param); if (!merge_param) { merge = 0; } else { - merge = zephir_get_boolval(merge_param); - } - - + } if (UNEXPECTED(merge)) { - zephir_read_property(¤tBindTypes, this_ptr, ZEND_STRL("bindTypes"), PH_NOISY_CC | PH_READONLY); + zephir_memory_observe(¤tBindTypes); + zephir_read_property(¤tBindTypes, this_ptr, ZEND_STRL("bindTypes"), PH_NOISY_CC); if (Z_TYPE_P(¤tBindTypes) == IS_ARRAY) { ZEPHIR_INIT_VAR(&_0$$4); zephir_add_function(&_0$$4, ¤tBindTypes, &bindTypes); @@ -3171,17 +2947,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, setDI) zval *this_ptr = getThis(); ZVAL_UNDEF(&container_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(container, phalcon_di_diinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &container); - - zephir_update_property_zval(this_ptr, ZEND_STRL("container"), container); } @@ -3217,18 +2986,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, where) ZVAL_UNDEF(&_1$$7); ZVAL_UNDEF(&bindParams); ZVAL_UNDEF(&bindTypes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(conditions) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(bindParams) Z_PARAM_ARRAY(bindTypes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &conditions_param, &bindParams_param, &bindTypes_param); zephir_get_strval(&conditions, conditions_param); if (!bindParams_param) { @@ -3243,11 +3008,9 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, where) } else { zephir_get_arrval(&bindTypes, bindTypes_param); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("conditions"), &conditions); if (zephir_fast_count_int(&bindParams) > 0) { - ZEPHIR_OBS_VAR(¤tBindParams); + zephir_memory_observe(¤tBindParams); zephir_read_property(¤tBindParams, this_ptr, ZEND_STRL("bindParams"), PH_NOISY_CC); if (Z_TYPE_P(¤tBindParams) == IS_ARRAY) { ZEPHIR_INIT_VAR(&_0$$4); @@ -3299,8 +3062,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, conditionBetween) ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(5, 5) Z_PARAM_STR(clause) Z_PARAM_STR(operator) @@ -3308,10 +3069,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, conditionBetween) Z_PARAM_ZVAL(minimum) Z_PARAM_ZVAL(maximum) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 5, 0, &clause_param, &operator_param, &expr_param, &minimum, &maximum); if (UNEXPECTED(Z_TYPE_P(clause_param) != IS_STRING && Z_TYPE_P(clause_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'clause' must be of the type string")); @@ -3340,8 +3099,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, conditionBetween) } else { ZEPHIR_INIT_VAR(&expr); } - - _0 = !ZEPHIR_IS_STRING_IDENTICAL(&operator, "and"); if (_0) { _0 = !ZEPHIR_IS_STRING_IDENTICAL(&operator, "or"); @@ -3351,9 +3108,9 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, conditionBetween) object_init_ex(&_1$$3, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_VAR(&_2$$3); ZVAL_STRING(&_2$$3, "Operator % is not available."); - ZEPHIR_CALL_FUNCTION(&_3$$3, "sprintf", NULL, 116, &_2$$3, &operator); + ZEPHIR_CALL_FUNCTION(&_3$$3, "sprintf", NULL, 117, &_2$$3, &operator); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 32, &_3$$3); + ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 33, &_3$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_1$$3, "phalcon/Mvc/Model/Query/Builder.zep", 1571); ZEPHIR_MM_RESTORE(); @@ -3362,7 +3119,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, conditionBetween) ZEPHIR_INIT_VAR(&_4); ZEPHIR_CONCAT_VV(&_4, &operator, &clause); ZEPHIR_CPY_WRT(&operatorMethod, &_4); - ZEPHIR_OBS_VAR(&hiddenParam); + zephir_memory_observe(&hiddenParam); zephir_read_property(&hiddenParam, this_ptr, ZEND_STRL("hiddenParamNumber"), PH_NOISY_CC); ZEPHIR_INIT_VAR(&nextHiddenParam); ZVAL_LONG(&nextHiddenParam, (zephir_get_numberval(&hiddenParam) + 1)); @@ -3378,7 +3135,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, conditionBetween) zephir_array_update_zval(&_6, &maximumKey, maximum, PH_COPY); ZEPHIR_CALL_METHOD_ZVAL(NULL, this_ptr, &operatorMethod, NULL, 0, &_5, &_6); zephir_check_call_status(); - ZEPHIR_SEPARATE(&nextHiddenParam); + SEPARATE_ZVAL(&nextHiddenParam); zephir_increment(&nextHiddenParam); zephir_update_property_zval(this_ptr, ZEND_STRL("hiddenParamNumber"), &nextHiddenParam); RETURN_THIS(); @@ -3421,18 +3178,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, conditionIn) ZVAL_UNDEF(&_9$$5); ZVAL_UNDEF(&_11$$6); ZVAL_UNDEF(&values); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(4, 4) Z_PARAM_STR(clause) Z_PARAM_STR(operator) Z_PARAM_STR(expr) Z_PARAM_ARRAY(values) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 4, 0, &clause_param, &operator_param, &expr_param, &values_param); if (UNEXPECTED(Z_TYPE_P(clause_param) != IS_STRING && Z_TYPE_P(clause_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'clause' must be of the type string")); @@ -3462,8 +3215,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, conditionIn) ZEPHIR_INIT_VAR(&expr); } ZEPHIR_OBS_COPY_OR_DUP(&values, values_param); - - _0 = !ZEPHIR_IS_STRING_IDENTICAL(&operator, "and"); if (_0) { _0 = !ZEPHIR_IS_STRING_IDENTICAL(&operator, "or"); @@ -3473,9 +3224,9 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, conditionIn) object_init_ex(&_1$$3, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_VAR(&_2$$3); ZVAL_STRING(&_2$$3, "Operator % is not available."); - ZEPHIR_CALL_FUNCTION(&_3$$3, "sprintf", NULL, 116, &_2$$3, &operator); + ZEPHIR_CALL_FUNCTION(&_3$$3, "sprintf", NULL, 117, &_2$$3, &operator); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 32, &_3$$3); + ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 33, &_3$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_1$$3, "phalcon/Mvc/Model/Query/Builder.zep", 1619); ZEPHIR_MM_RESTORE(); @@ -3491,7 +3242,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, conditionIn) zephir_check_call_status(); RETURN_THIS(); } - ZEPHIR_OBS_VAR(&_6); + zephir_memory_observe(&_6); zephir_read_property(&_6, this_ptr, ZEND_STRL("hiddenParamNumber"), PH_NOISY_CC); hiddenParam = zephir_get_intval(&_6); ZEPHIR_INIT_VAR(&bindParams); @@ -3547,7 +3298,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, conditionIn) ZEPHIR_CONCAT_VSVS(&_14, &expr, " IN (", &_13, ")"); ZEPHIR_CALL_METHOD_ZVAL(NULL, this_ptr, &operatorMethod, NULL, 0, &_14, &bindParams); zephir_check_call_status(); - ZEPHIR_INIT_ZVAL_NREF(_15); + ZVAL_UNDEF(&_15); ZVAL_LONG(&_15, hiddenParam); zephir_update_property_zval(this_ptr, ZEND_STRL("hiddenParamNumber"), &_15); RETURN_THIS(); @@ -3582,8 +3333,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, conditionNotBetween) ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(5, 5) Z_PARAM_STR(clause) Z_PARAM_STR(operator) @@ -3591,10 +3340,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, conditionNotBetween) Z_PARAM_ZVAL(minimum) Z_PARAM_ZVAL(maximum) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 5, 0, &clause_param, &operator_param, &expr_param, &minimum, &maximum); if (UNEXPECTED(Z_TYPE_P(clause_param) != IS_STRING && Z_TYPE_P(clause_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'clause' must be of the type string")); @@ -3623,8 +3370,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, conditionNotBetween) } else { ZEPHIR_INIT_VAR(&expr); } - - _0 = !ZEPHIR_IS_STRING_IDENTICAL(&operator, "and"); if (_0) { _0 = !ZEPHIR_IS_STRING_IDENTICAL(&operator, "or"); @@ -3634,9 +3379,9 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, conditionNotBetween) object_init_ex(&_1$$3, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_VAR(&_2$$3); ZVAL_STRING(&_2$$3, "Operator % is not available."); - ZEPHIR_CALL_FUNCTION(&_3$$3, "sprintf", NULL, 116, &_2$$3, &operator); + ZEPHIR_CALL_FUNCTION(&_3$$3, "sprintf", NULL, 117, &_2$$3, &operator); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 32, &_3$$3); + ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 33, &_3$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_1$$3, "phalcon/Mvc/Model/Query/Builder.zep", 1673); ZEPHIR_MM_RESTORE(); @@ -3645,7 +3390,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, conditionNotBetween) ZEPHIR_INIT_VAR(&_4); ZEPHIR_CONCAT_VV(&_4, &operator, &clause); ZEPHIR_CPY_WRT(&operatorMethod, &_4); - ZEPHIR_OBS_VAR(&hiddenParam); + zephir_memory_observe(&hiddenParam); zephir_read_property(&hiddenParam, this_ptr, ZEND_STRL("hiddenParamNumber"), PH_NOISY_CC); ZEPHIR_INIT_VAR(&nextHiddenParam); ZVAL_LONG(&nextHiddenParam, (zephir_get_numberval(&hiddenParam) + 1)); @@ -3661,7 +3406,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, conditionNotBetween) zephir_array_update_zval(&_6, &maximumKey, maximum, PH_COPY); ZEPHIR_CALL_METHOD_ZVAL(NULL, this_ptr, &operatorMethod, NULL, 0, &_5, &_6); zephir_check_call_status(); - ZEPHIR_SEPARATE(&nextHiddenParam); + SEPARATE_ZVAL(&nextHiddenParam); zephir_increment(&nextHiddenParam); zephir_update_property_zval(this_ptr, ZEND_STRL("hiddenParamNumber"), &nextHiddenParam); RETURN_THIS(); @@ -3704,18 +3449,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, conditionNotIn) ZVAL_UNDEF(&_9$$5); ZVAL_UNDEF(&_11$$6); ZVAL_UNDEF(&values); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(4, 4) Z_PARAM_STR(clause) Z_PARAM_STR(operator) Z_PARAM_STR(expr) Z_PARAM_ARRAY(values) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 4, 0, &clause_param, &operator_param, &expr_param, &values_param); if (UNEXPECTED(Z_TYPE_P(clause_param) != IS_STRING && Z_TYPE_P(clause_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'clause' must be of the type string")); @@ -3745,8 +3486,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, conditionNotIn) ZEPHIR_INIT_VAR(&expr); } ZEPHIR_OBS_COPY_OR_DUP(&values, values_param); - - _0 = !ZEPHIR_IS_STRING_IDENTICAL(&operator, "and"); if (_0) { _0 = !ZEPHIR_IS_STRING_IDENTICAL(&operator, "or"); @@ -3756,9 +3495,9 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, conditionNotIn) object_init_ex(&_1$$3, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_VAR(&_2$$3); ZVAL_STRING(&_2$$3, "Operator % is not available."); - ZEPHIR_CALL_FUNCTION(&_3$$3, "sprintf", NULL, 116, &_2$$3, &operator); + ZEPHIR_CALL_FUNCTION(&_3$$3, "sprintf", NULL, 117, &_2$$3, &operator); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 32, &_3$$3); + ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 33, &_3$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_1$$3, "phalcon/Mvc/Model/Query/Builder.zep", 1720); ZEPHIR_MM_RESTORE(); @@ -3774,7 +3513,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, conditionNotIn) zephir_check_call_status(); RETURN_THIS(); } - ZEPHIR_OBS_VAR(&_6); + zephir_memory_observe(&_6); zephir_read_property(&_6, this_ptr, ZEND_STRL("hiddenParamNumber"), PH_NOISY_CC); hiddenParam = zephir_get_intval(&_6); ZEPHIR_INIT_VAR(&bindParams); @@ -3830,7 +3569,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, conditionNotIn) ZEPHIR_CONCAT_VSVS(&_14, &expr, " NOT IN (", &_13, ")"); ZEPHIR_CALL_METHOD_ZVAL(NULL, this_ptr, &operatorMethod, NULL, 0, &_14, &bindParams); zephir_check_call_status(); - ZEPHIR_INIT_ZVAL_NREF(_15); + ZVAL_UNDEF(&_15); ZVAL_LONG(&_15, hiddenParam); zephir_update_property_zval(this_ptr, ZEND_STRL("hiddenParamNumber"), &_15); RETURN_THIS(); @@ -3850,7 +3589,8 @@ zend_object *zephir_init_properties_Phalcon_Mvc_Model_Query_Builder(zend_class_e ZVAL_UNDEF(&_7$$6); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/mvc/model/query/builder.zep.h b/ext/phalcon/mvc/model/query/builder.zep.h index 658158f2b54..6f39e578615 100644 --- a/ext/phalcon/mvc/model/query/builder.zep.h +++ b/ext/phalcon/mvc/model/query/builder.zep.h @@ -69,30 +69,14 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_query_builder_andhaving, 0, 1, Phalcon\\Mvc\\Model\\Query\\BuilderInterface, 0) ZEND_ARG_TYPE_INFO(0, conditions, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindParams, 0) -#endif -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindTypes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_query_builder_andwhere, 0, 1, Phalcon\\Mvc\\Model\\Query\\BuilderInterface, 0) ZEND_ARG_TYPE_INFO(0, conditions, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindParams, 0) -#endif -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindTypes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_query_builder_autoescape, 0, 1, IS_STRING, 0) @@ -183,16 +167,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_query_builder_having, 0, 1, Phalcon\\Mvc\\Model\\Query\\BuilderInterface, 0) ZEND_ARG_TYPE_INFO(0, conditions, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindParams, 0) -#endif -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindTypes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_query_builder_inhaving, 0, 2, Phalcon\\Mvc\\Model\\Query\\BuilderInterface, 0) @@ -267,30 +243,14 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_query_builder_orhaving, 0, 1, Phalcon\\Mvc\\Model\\Query\\BuilderInterface, 0) ZEND_ARG_TYPE_INFO(0, conditions, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindParams, 0) -#endif -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindTypes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_query_builder_orwhere, 0, 1, Phalcon\\Mvc\\Model\\Query\\BuilderInterface, 0) ZEND_ARG_TYPE_INFO(0, conditions, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindParams, 0) -#endif -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindTypes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_query_builder_rightjoin, 0, 1, Phalcon\\Mvc\\Model\\Query\\BuilderInterface, 0) @@ -316,16 +276,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_query_builder_where, 0, 1, Phalcon\\Mvc\\Model\\Query\\BuilderInterface, 0) ZEND_ARG_TYPE_INFO(0, conditions, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindParams, 0) -#endif -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindTypes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_query_builder_conditionbetween, 0, 5, Phalcon\\Mvc\\Model\\Query\\BuilderInterface, 0) @@ -375,44 +327,20 @@ ZEPHIR_INIT_FUNCS(phalcon_mvc_model_query_builder_method_entry) { PHP_ME(Phalcon_Mvc_Model_Query_Builder, from, arginfo_phalcon_mvc_model_query_builder_from, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Query_Builder, getBindParams, arginfo_phalcon_mvc_model_query_builder_getbindparams, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Query_Builder, getBindTypes, arginfo_phalcon_mvc_model_query_builder_getbindtypes, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Mvc_Model_Query_Builder, getColumns, arginfo_phalcon_mvc_model_query_builder_getcolumns, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Mvc_Model_Query_Builder, getColumns, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Mvc_Model_Query_Builder, getColumns, arginfo_phalcon_mvc_model_query_builder_getcolumns, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Query_Builder, getDI, arginfo_phalcon_mvc_model_query_builder_getdi, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Query_Builder, getDistinct, arginfo_phalcon_mvc_model_query_builder_getdistinct, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Mvc_Model_Query_Builder, getFrom, arginfo_phalcon_mvc_model_query_builder_getfrom, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Mvc_Model_Query_Builder, getFrom, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Mvc_Model_Query_Builder, getFrom, arginfo_phalcon_mvc_model_query_builder_getfrom, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Query_Builder, getGroupBy, arginfo_phalcon_mvc_model_query_builder_getgroupby, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Query_Builder, getHaving, arginfo_phalcon_mvc_model_query_builder_gethaving, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Query_Builder, getJoins, arginfo_phalcon_mvc_model_query_builder_getjoins, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Mvc_Model_Query_Builder, getLimit, arginfo_phalcon_mvc_model_query_builder_getlimit, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Mvc_Model_Query_Builder, getLimit, NULL, ZEND_ACC_PUBLIC) -#endif -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Mvc_Model_Query_Builder, getModels, arginfo_phalcon_mvc_model_query_builder_getmodels, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Mvc_Model_Query_Builder, getModels, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Mvc_Model_Query_Builder, getLimit, arginfo_phalcon_mvc_model_query_builder_getlimit, ZEND_ACC_PUBLIC) +PHP_ME(Phalcon_Mvc_Model_Query_Builder, getModels, arginfo_phalcon_mvc_model_query_builder_getmodels, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Query_Builder, getOffset, arginfo_phalcon_mvc_model_query_builder_getoffset, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Mvc_Model_Query_Builder, getOrderBy, arginfo_phalcon_mvc_model_query_builder_getorderby, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Mvc_Model_Query_Builder, getOrderBy, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Mvc_Model_Query_Builder, getOrderBy, arginfo_phalcon_mvc_model_query_builder_getorderby, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Query_Builder, getPhql, arginfo_phalcon_mvc_model_query_builder_getphql, ZEND_ACC_FINAL|ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Query_Builder, getQuery, arginfo_phalcon_mvc_model_query_builder_getquery, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Mvc_Model_Query_Builder, getWhere, arginfo_phalcon_mvc_model_query_builder_getwhere, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Mvc_Model_Query_Builder, getWhere, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Mvc_Model_Query_Builder, getWhere, arginfo_phalcon_mvc_model_query_builder_getwhere, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Query_Builder, groupBy, arginfo_phalcon_mvc_model_query_builder_groupby, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Query_Builder, having, arginfo_phalcon_mvc_model_query_builder_having, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Query_Builder, inHaving, arginfo_phalcon_mvc_model_query_builder_inhaving, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/mvc/model/query/builderinterface.zep.h b/ext/phalcon/mvc/model/query/builderinterface.zep.h index 2e4a39459f8..64f2a281a02 100644 --- a/ext/phalcon/mvc/model/query/builderinterface.zep.h +++ b/ext/phalcon/mvc/model/query/builderinterface.zep.h @@ -10,16 +10,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_query_builderinterface_andwhere, 0, 1, Phalcon\\Mvc\\Model\\Query\\BuilderInterface, 0) ZEND_ARG_TYPE_INFO(0, conditions, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindParams, 0) -#endif -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindTypes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_query_builderinterface_betweenwhere, 0, 3, Phalcon\\Mvc\\Model\\Query\\BuilderInterface, 0) @@ -93,16 +85,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_query_builderinterface_having, 0, 1, Phalcon\\Mvc\\Model\\Query\\BuilderInterface, 0) ZEND_ARG_TYPE_INFO(0, conditions, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindParams, 0) -#endif -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindTypes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_query_builderinterface_innerjoin, 0, 1, Phalcon\\Mvc\\Model\\Query\\BuilderInterface, 0) @@ -160,16 +144,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_query_builderinterface_orwhere, 0, 1, Phalcon\\Mvc\\Model\\Query\\BuilderInterface, 0) ZEND_ARG_TYPE_INFO(0, conditions, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindParams, 0) -#endif -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindTypes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_query_builderinterface_rightjoin, 0, 1, Phalcon\\Mvc\\Model\\Query\\BuilderInterface, 0) @@ -190,16 +166,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_query_builderinterface_where, 0, 1, Phalcon\\Mvc\\Model\\Query\\BuilderInterface, 0) ZEND_ARG_TYPE_INFO(0, conditions, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindParams, 0) -#endif -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindTypes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_mvc_model_query_builderinterface_method_entry) { diff --git a/ext/phalcon/mvc/model/query/lang.zep.c b/ext/phalcon/mvc/model/query/lang.zep.c index 4cf218bcb46..7492e955dfc 100644 --- a/ext/phalcon/mvc/model/query/lang.zep.c +++ b/ext/phalcon/mvc/model/query/lang.zep.c @@ -59,18 +59,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Lang, parsePHQL) zend_long ZEPHIR_LAST_CALL_STATUS; zval *phql_param = NULL; zval phql; - zval *this_ptr = getThis(); ZVAL_UNDEF(&phql); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(phql) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &phql_param); if (UNEXPECTED(Z_TYPE_P(phql_param) != IS_STRING && Z_TYPE_P(phql_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'phql' must be of the type string")); @@ -81,8 +76,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Lang, parsePHQL) } else { ZEPHIR_INIT_VAR(&phql); } - - ZEPHIR_LAST_CALL_STATUS = phql_parse_phql(return_value, &phql); zephir_check_call_status(); RETURN_MM(); diff --git a/ext/phalcon/mvc/model/query/status.zep.c b/ext/phalcon/mvc/model/query/status.zep.c index 1d3e0769757..faea4243bc8 100644 --- a/ext/phalcon/mvc/model/query/status.zep.c +++ b/ext/phalcon/mvc/model/query/status.zep.c @@ -82,24 +82,17 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Status, __construct) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); ZVAL_NULL(&__$null); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_BOOL(success) Z_PARAM_OPTIONAL Z_PARAM_OBJECT_OF_CLASS_OR_NULL(model, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 1, &success_param, &model); - success = zephir_get_boolval(success_param); if (!model) { model = &model_sub; model = &__$null; } - - if (success) { zephir_update_property_zval(this_ptr, ZEND_STRL("success"), &__$true); } else { @@ -120,9 +113,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Status, getMessages) ZVAL_UNDEF(&model); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("model"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&model, &_0); @@ -140,9 +132,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Status, getMessages) */ PHP_METHOD(Phalcon_Mvc_Model_Query_Status, getModel) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "model"); } @@ -152,9 +141,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Status, getModel) */ PHP_METHOD(Phalcon_Mvc_Model_Query_Status, success) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "success"); } diff --git a/ext/phalcon/mvc/model/queryinterface.zep.h b/ext/phalcon/mvc/model/queryinterface.zep.h index 7b43cbb2424..75b0704c5c8 100644 --- a/ext/phalcon/mvc/model/queryinterface.zep.h +++ b/ext/phalcon/mvc/model/queryinterface.zep.h @@ -8,16 +8,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_queryinterface_ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_queryinterface_execute, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindParams, 0) -#endif -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindTypes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_queryinterface_getbindparams, 0, 0, IS_ARRAY, 0) @@ -33,16 +25,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_queryinterface ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_model_queryinterface_getsingleresult, 0, 0, Phalcon\\Mvc\\ModelInterface, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindParams, 0) -#endif -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, bindTypes, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindParams, IS_ARRAY, 0, "[]") +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bindTypes, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_queryinterface_getuniquerow, 0, 0, _IS_BOOL, 0) diff --git a/ext/phalcon/mvc/model/relation.zep.c b/ext/phalcon/mvc/model/relation.zep.c index a79f88d60ac..5c738654f46 100644 --- a/ext/phalcon/mvc/model/relation.zep.c +++ b/ext/phalcon/mvc/model/relation.zep.c @@ -13,10 +13,10 @@ #include "kernel/main.h" #include "kernel/object.h" -#include "kernel/memory.h" #include "kernel/operators.h" #include "ext/spl/spl_exceptions.h" #include "kernel/exception.h" +#include "kernel/memory.h" #include "kernel/array.h" #include "kernel/fcall.h" @@ -114,8 +114,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Relation, __construct) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&referencedModel); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(4, 5) Z_PARAM_LONG(type) Z_PARAM_STR(referencedModel) @@ -124,12 +122,9 @@ PHP_METHOD(Phalcon_Mvc_Model_Relation, __construct) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 4, 1, &type_param, &referencedModel_param, &fields, &referencedFields, &options_param); - type = zephir_get_intval(type_param); if (UNEXPECTED(Z_TYPE_P(referencedModel_param) != IS_STRING && Z_TYPE_P(referencedModel_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'referencedModel' must be of the type string")); RETURN_MM_NULL(); @@ -145,9 +140,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Relation, __construct) } else { zephir_get_arrval(&options, options_param); } - - - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, type); zephir_update_property_zval(this_ptr, ZEND_STRL("type"), &_0); zephir_update_property_zval(this_ptr, ZEND_STRL("referencedModel"), &referencedModel); @@ -164,9 +157,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Relation, __construct) */ PHP_METHOD(Phalcon_Mvc_Model_Relation, getFields) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "fields"); } @@ -185,15 +175,15 @@ PHP_METHOD(Phalcon_Mvc_Model_Relation, getForeignKey) ZVAL_UNDEF(&options); ZVAL_UNDEF(&foreignKey); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("options"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&options, &_0); - if (zephir_array_isset_string_fetch(&foreignKey, &options, SL("foreignKey"), 1)) { + zephir_memory_observe(&foreignKey); + if (zephir_array_isset_string_fetch(&foreignKey, &options, SL("foreignKey"), 0)) { if (zephir_is_true(&foreignKey)) { - RETURN_CTOR(&foreignKey); + RETURN_CCTOR(&foreignKey); } } RETURN_MM_BOOL(0); @@ -206,9 +196,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Relation, getForeignKey) */ PHP_METHOD(Phalcon_Mvc_Model_Relation, getIntermediateFields) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "intermediateFields"); } @@ -218,9 +205,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Relation, getIntermediateFields) */ PHP_METHOD(Phalcon_Mvc_Model_Relation, getIntermediateModel) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "intermediateModel"); } @@ -232,9 +216,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Relation, getIntermediateModel) */ PHP_METHOD(Phalcon_Mvc_Model_Relation, getIntermediateReferencedFields) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "intermediateReferencedFields"); } @@ -253,15 +234,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Relation, getOption) ZVAL_UNDEF(&name); ZVAL_UNDEF(&option); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -272,13 +249,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Relation, getOption) } else { ZEPHIR_INIT_VAR(&name); } - - + zephir_memory_observe(&option); zephir_read_property(&_0, this_ptr, ZEND_STRL("options"), PH_NOISY_CC | PH_READONLY); - if (!(zephir_array_isset_fetch(&option, &_0, &name, 1))) { + if (!(zephir_array_isset_fetch(&option, &_0, &name, 0))) { RETURN_MM_NULL(); } - RETURN_CTOR(&option); + RETURN_CCTOR(&option); } /** @@ -286,9 +262,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Relation, getOption) */ PHP_METHOD(Phalcon_Mvc_Model_Relation, getOptions) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "options"); } @@ -308,13 +281,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Relation, getParams) ZVAL_UNDEF(&options); ZVAL_UNDEF(¶ms); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("options"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&options, &_0); - ZEPHIR_OBS_VAR(¶ms); + zephir_memory_observe(¶ms); if (zephir_array_isset_string_fetch(¶ms, &options, SL("params"), 0)) { if (zephir_is_true(¶ms)) { if (zephir_is_callable(¶ms)) { @@ -333,9 +305,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Relation, getParams) */ PHP_METHOD(Phalcon_Mvc_Model_Relation, getType) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "type"); } @@ -347,9 +316,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Relation, getType) */ PHP_METHOD(Phalcon_Mvc_Model_Relation, getReferencedFields) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "referencedFields"); } @@ -359,9 +325,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Relation, getReferencedFields) */ PHP_METHOD(Phalcon_Mvc_Model_Relation, getReferencedModel) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "referencedModel"); } @@ -372,18 +335,20 @@ PHP_METHOD(Phalcon_Mvc_Model_Relation, getReferencedModel) PHP_METHOD(Phalcon_Mvc_Model_Relation, isForeignKey) { zval foreignKey, _0; + zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *this_ptr = getThis(); ZVAL_UNDEF(&foreignKey); ZVAL_UNDEF(&_0); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - + zephir_memory_observe(&foreignKey); zephir_read_property(&_0, this_ptr, ZEND_STRL("options"), PH_NOISY_CC | PH_READONLY); - if (!(zephir_array_isset_string_fetch(&foreignKey, &_0, SL("foreignKey"), 1))) { - RETURN_BOOL(0); + if (!(zephir_array_isset_string_fetch(&foreignKey, &_0, SL("foreignKey"), 0))) { + RETURN_MM_BOOL(0); } - RETURN_BOOL(zephir_get_boolval(&foreignKey)); + RETURN_MM_BOOL(zephir_get_boolval(&foreignKey)); } /** @@ -398,9 +363,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Relation, isThrough) ZVAL_UNDEF(&type); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("type"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&type, &_0); @@ -423,16 +387,16 @@ PHP_METHOD(Phalcon_Mvc_Model_Relation, isReusable) ZVAL_UNDEF(&options); ZVAL_UNDEF(&reusable); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("options"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&options, &_0); - if (!(zephir_array_isset_string_fetch(&reusable, &options, SL("reusable"), 1))) { + zephir_memory_observe(&reusable); + if (!(zephir_array_isset_string_fetch(&reusable, &options, SL("reusable"), 0))) { RETURN_MM_BOOL(0); } - RETURN_CTOR(&reusable); + RETURN_CCTOR(&reusable); } /** @@ -452,17 +416,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Relation, setIntermediateRelation) ZVAL_UNDEF(&intermediateFields_sub); ZVAL_UNDEF(&intermediateReferencedFields_sub); ZVAL_UNDEF(&intermediateModel); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_ZVAL(intermediateFields) Z_PARAM_STR(intermediateModel) Z_PARAM_ZVAL(intermediateReferencedFields) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &intermediateFields, &intermediateModel_param, &intermediateReferencedFields); if (UNEXPECTED(Z_TYPE_P(intermediateModel_param) != IS_STRING && Z_TYPE_P(intermediateModel_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'intermediateModel' must be of the type string")); @@ -473,8 +433,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Relation, setIntermediateRelation) } else { ZEPHIR_INIT_VAR(&intermediateModel); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("intermediateFields"), intermediateFields); zephir_update_property_zval(this_ptr, ZEND_STRL("intermediateModel"), &intermediateModel); zephir_update_property_zval(this_ptr, ZEND_STRL("intermediateReferencedFields"), intermediateReferencedFields); @@ -489,7 +447,8 @@ zend_object *zephir_init_properties_Phalcon_Mvc_Model_Relation(zend_class_entry ZVAL_UNDEF(&_1$$3); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/mvc/model/relation.zep.h b/ext/phalcon/mvc/model/relation.zep.h index 64212bbe561..32ed7512792 100644 --- a/ext/phalcon/mvc/model/relation.zep.h +++ b/ext/phalcon/mvc/model/relation.zep.h @@ -26,11 +26,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_relation___construct, 0, 0, 4) ZEND_ARG_TYPE_INFO(0, referencedModel, IS_STRING, 0) ZEND_ARG_INFO(0, fields) ZEND_ARG_INFO(0, referencedFields) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_relation_getfields, 0, 0, 0) @@ -87,40 +83,16 @@ ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_mvc_model_relation_method_entry) { PHP_ME(Phalcon_Mvc_Model_Relation, __construct, arginfo_phalcon_mvc_model_relation___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Mvc_Model_Relation, getFields, arginfo_phalcon_mvc_model_relation_getfields, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Mvc_Model_Relation, getFields, NULL, ZEND_ACC_PUBLIC) -#endif -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Mvc_Model_Relation, getForeignKey, arginfo_phalcon_mvc_model_relation_getforeignkey, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Mvc_Model_Relation, getForeignKey, NULL, ZEND_ACC_PUBLIC) -#endif -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Mvc_Model_Relation, getIntermediateFields, arginfo_phalcon_mvc_model_relation_getintermediatefields, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Mvc_Model_Relation, getIntermediateFields, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Mvc_Model_Relation, getFields, arginfo_phalcon_mvc_model_relation_getfields, ZEND_ACC_PUBLIC) +PHP_ME(Phalcon_Mvc_Model_Relation, getForeignKey, arginfo_phalcon_mvc_model_relation_getforeignkey, ZEND_ACC_PUBLIC) +PHP_ME(Phalcon_Mvc_Model_Relation, getIntermediateFields, arginfo_phalcon_mvc_model_relation_getintermediatefields, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Relation, getIntermediateModel, arginfo_phalcon_mvc_model_relation_getintermediatemodel, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Mvc_Model_Relation, getIntermediateReferencedFields, arginfo_phalcon_mvc_model_relation_getintermediatereferencedfields, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Mvc_Model_Relation, getIntermediateReferencedFields, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Mvc_Model_Relation, getIntermediateReferencedFields, arginfo_phalcon_mvc_model_relation_getintermediatereferencedfields, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Relation, getOption, arginfo_phalcon_mvc_model_relation_getoption, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Relation, getOptions, arginfo_phalcon_mvc_model_relation_getoptions, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Mvc_Model_Relation, getParams, arginfo_phalcon_mvc_model_relation_getparams, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Mvc_Model_Relation, getParams, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Mvc_Model_Relation, getParams, arginfo_phalcon_mvc_model_relation_getparams, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Relation, getType, arginfo_phalcon_mvc_model_relation_gettype, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Mvc_Model_Relation, getReferencedFields, arginfo_phalcon_mvc_model_relation_getreferencedfields, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Mvc_Model_Relation, getReferencedFields, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Mvc_Model_Relation, getReferencedFields, arginfo_phalcon_mvc_model_relation_getreferencedfields, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Relation, getReferencedModel, arginfo_phalcon_mvc_model_relation_getreferencedmodel, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Relation, isForeignKey, arginfo_phalcon_mvc_model_relation_isforeignkey, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Relation, isThrough, arginfo_phalcon_mvc_model_relation_isthrough, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/mvc/model/resultset.zep.c b/ext/phalcon/mvc/model/resultset.zep.c index e6809661f3b..7949a7f2476 100644 --- a/ext/phalcon/mvc/model/resultset.zep.c +++ b/ext/phalcon/mvc/model/resultset.zep.c @@ -171,26 +171,21 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset, __construct) ZVAL_UNDEF(&_12$$9); ZVAL_UNDEF(&_10); ZVAL_UNDEF(&_7$$5); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ZVAL(result) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(cache) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &result, &cache); if (!cache) { cache = &cache_sub; cache = &__$null; } - - if (Z_TYPE_P(result) != IS_OBJECT) { - ZEPHIR_INIT_ZVAL_NREF(_0$$3); + ZVAL_UNDEF(&_0$$3); ZVAL_LONG(&_0$$3, 0); zephir_update_property_zval(this_ptr, ZEND_STRL("count"), &_0$$3); ZEPHIR_INIT_VAR(&_1$$3); @@ -202,13 +197,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset, __construct) if (Z_TYPE_P(cache) != IS_NULL) { ZEPHIR_INIT_VAR(&_2$$4); ZVAL_STRING(&_2$$4, "Phalcon\\Cache\\CacheInterface"); - ZEPHIR_CALL_FUNCTION(&_3$$4, "is_a", NULL, 86, cache, &_2$$4); + ZEPHIR_CALL_FUNCTION(&_3$$4, "is_a", NULL, 87, cache, &_2$$4); zephir_check_call_status(); _4$$4 = !ZEPHIR_IS_TRUE_IDENTICAL(&_3$$4); if (_4$$4) { ZEPHIR_INIT_NVAR(&_2$$4); ZVAL_STRING(&_2$$4, "Psr\\SimpleCache\\CacheInterface"); - ZEPHIR_CALL_FUNCTION(&_5$$4, "is_a", NULL, 86, cache, &_2$$4); + ZEPHIR_CALL_FUNCTION(&_5$$4, "is_a", NULL, 87, cache, &_2$$4); zephir_check_call_status(); _4$$4 = !ZEPHIR_IS_TRUE_IDENTICAL(&_5$$4); } @@ -217,7 +212,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset, __construct) object_init_ex(&_6$$5, phalcon_mvc_model_exception_ce); ZEPHIR_INIT_VAR(&_7$$5); ZEPHIR_CONCAT_SS(&_7$$5, "Cache service must be an object implementing ", "Phalcon\\Cache\\CacheInterface or Psr\\SimpleCache\\CacheInterface"); - ZEPHIR_CALL_METHOD(NULL, &_6$$5, "__construct", NULL, 32, &_7$$5); + ZEPHIR_CALL_METHOD(NULL, &_6$$5, "__construct", NULL, 33, &_7$$5); zephir_check_call_status(); zephir_throw_exception_debug(&_6$$5, "phalcon/Mvc/Model/Resultset.zep", 165); ZEPHIR_MM_RESTORE(); @@ -264,9 +259,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset, __construct) */ PHP_METHOD(Phalcon_Mvc_Model_Resultset, count) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "count"); } @@ -293,28 +285,23 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset, delete) ZVAL_UNDEF(&_6$$3); ZVAL_UNDEF(&_7$$8); ZVAL_UNDEF(&_4$$6); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_OBJECT_OF_CLASS_OR_NULL(conditionCallback, zend_ce_closure) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &conditionCallback); if (!conditionCallback) { conditionCallback = &conditionCallback_sub; conditionCallback = &__$null; } - - ZEPHIR_INIT_VAR(&connection); ZVAL_NULL(&connection); result = 1; transaction = 0; - ZEPHIR_CALL_METHOD(NULL, this_ptr, "rewind", NULL, 91); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "rewind", NULL, 92); zephir_check_call_status(); while (1) { ZEPHIR_CALL_METHOD(&_0, this_ptr, "valid", &_1, 0); @@ -399,21 +386,15 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset, filter) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&records); ZVAL_UNDEF(&_3$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(filter) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &filter); - - ZEPHIR_INIT_VAR(&records); array_init(&records); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "rewind", NULL, 91); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "rewind", NULL, 92); zephir_check_call_status(); while (1) { ZEPHIR_CALL_METHOD(&_0, this_ptr, "valid", &_1, 0); @@ -450,9 +431,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset, filter) */ PHP_METHOD(Phalcon_Mvc_Model_Resultset, getCache) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "cache"); } @@ -491,16 +469,15 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset, getFirst) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("count"), PH_NOISY_CC | PH_READONLY); if (ZEPHIR_IS_LONG(&_0, 0)) { RETURN_MM_NULL(); } ZVAL_LONG(&_1, 0); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "seek", NULL, 92, &_1); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "seek", NULL, 93, &_1); zephir_check_call_status(); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "current", NULL, 0); zephir_check_call_status(); @@ -512,9 +489,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset, getFirst) */ PHP_METHOD(Phalcon_Mvc_Model_Resultset, getHydrateMode) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "hydrateMode"); } @@ -531,9 +505,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset, getLast) ZVAL_UNDEF(&count); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("count"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&count, &_0); @@ -541,7 +514,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset, getLast) RETURN_MM_NULL(); } ZVAL_LONG(&_0, (zephir_get_numberval(&count) - 1)); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "seek", NULL, 92, &_0); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "seek", NULL, 93, &_0); zephir_check_call_status(); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "current", NULL, 0); zephir_check_call_status(); @@ -553,9 +526,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset, getLast) */ PHP_METHOD(Phalcon_Mvc_Model_Resultset, getMessages) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "errorMessages"); } @@ -571,16 +541,17 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset, getType) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); - ZEPHIR_OBS_VAR(&_1); + zephir_memory_observe(&_1); zephir_read_property(&_1, this_ptr, ZEND_STRL("rows"), PH_NOISY_CC); if (Z_TYPE_P(&_1) == IS_ARRAY) { + ZEPHIR_INIT_NVAR(&_0); ZVAL_LONG(&_0, 0); } else { + ZEPHIR_INIT_NVAR(&_0); ZVAL_LONG(&_0, 1); } RETURN_CCTOR(&_0); @@ -591,9 +562,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset, getType) */ PHP_METHOD(Phalcon_Mvc_Model_Resultset, isFresh) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "isFresh"); } @@ -622,13 +590,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset, jsonSerialize) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_4$$4); ZVAL_UNDEF(&records); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&records); array_init(&records); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "rewind", NULL, 91); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "rewind", NULL, 92); zephir_check_call_status(); while (1) { ZEPHIR_CALL_METHOD(&_0, this_ptr, "valid", &_1, 0); @@ -666,9 +633,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset, key) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&_0, this_ptr, "valid", NULL, 0); zephir_check_call_status(); @@ -690,13 +656,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset, next) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("pointer"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_1, (zephir_get_numberval(&_0) + 1)); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "seek", NULL, 92, &_1); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "seek", NULL, 93, &_1); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -714,24 +679,18 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset, offsetGet) ZVAL_UNDEF(&index_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(index) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &index); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("count"), PH_NOISY_CC | PH_READONLY); if (UNEXPECTED(ZEPHIR_GE(index, &_0))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The index does not exist in the cursor", "phalcon/Mvc/Model/Resultset.zep", 498); return; } - ZEPHIR_CALL_METHOD(NULL, this_ptr, "seek", NULL, 92, index); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "seek", NULL, 93, index); zephir_check_call_status(); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "current", NULL, 0); zephir_check_call_status(); @@ -748,17 +707,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset, offsetExists) ZVAL_UNDEF(&index_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(index) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &index); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("count"), PH_NOISY_CC | PH_READONLY); RETURN_BOOL(ZEPHIR_LT(index, &_0)); } @@ -766,28 +718,20 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset, offsetExists) /** * Resultsets cannot be changed. It has only been implemented to meet the definition of the ArrayAccess interface * - * @param int index + * @param int offset * @param \Phalcon\Mvc\ModelInterface value */ PHP_METHOD(Phalcon_Mvc_Model_Resultset, offsetSet) { - zval *index, index_sub, *value, value_sub; - zval *this_ptr = getThis(); + zval *offset, offset_sub, *value, value_sub; - ZVAL_UNDEF(&index_sub); + ZVAL_UNDEF(&offset_sub); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) - Z_PARAM_ZVAL(index) + Z_PARAM_ZVAL(offset) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - zephir_fetch_params_without_memory_grow(2, 0, &index, &value); - - + zephir_fetch_params_without_memory_grow(2, 0, &offset, &value); ZEPHIR_THROW_EXCEPTION_DEBUG_STRW(phalcon_mvc_model_exception_ce, "Cursor is an immutable ArrayAccess object", "phalcon/Mvc/Model/Resultset.zep", 525); return; } @@ -798,20 +742,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset, offsetSet) PHP_METHOD(Phalcon_Mvc_Model_Resultset, offsetUnset) { zval *offset, offset_sub; - zval *this_ptr = getThis(); ZVAL_UNDEF(&offset_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(offset) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &offset); - - ZEPHIR_THROW_EXCEPTION_DEBUG_STRW(phalcon_mvc_model_exception_ce, "Cursor is an immutable ArrayAccess object", "phalcon/Mvc/Model/Resultset.zep", 533); return; } @@ -827,12 +763,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset, rewind) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZVAL_LONG(&_0, 0); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "seek", NULL, 92, &_0); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "seek", NULL, 93, &_0); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -865,18 +800,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset, seek) ZVAL_UNDEF(&_8$$6); ZVAL_UNDEF(&_10$$7); ZVAL_UNDEF(&_12$$8); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(position) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &position); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("pointer"), PH_NOISY_CC | PH_READONLY); _1 = !ZEPHIR_IS_EQUAL(&_0, position); if (!(_1)) { @@ -884,10 +813,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset, seek) _1 = Z_TYPE_P(&_2) == IS_NULL; } if (_1) { - ZEPHIR_OBS_VAR(&_3$$3); + zephir_memory_observe(&_3$$3); zephir_read_property(&_3$$3, this_ptr, ZEND_STRL("rows"), PH_NOISY_CC); if (Z_TYPE_P(&_3$$3) == IS_ARRAY) { - ZEPHIR_OBS_VAR(&row); + zephir_memory_observe(&row); zephir_read_property(&_4$$4, this_ptr, ZEND_STRL("rows"), PH_NOISY_CC | PH_READONLY); if (zephir_array_isset_fetch(&row, &_4$$4, position, 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("row"), &row); @@ -944,19 +873,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset, setHydrateMode) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(hydrateMode) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &hydrateMode_param); - hydrateMode = zephir_get_intval(hydrateMode_param); - - - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, hydrateMode); zephir_update_property_zval(this_ptr, ZEND_STRL("hydrateMode"), &_0); RETURN_THISW(); @@ -973,18 +894,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset, setIsFresh) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(isFresh) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &isFresh_param); - isFresh = zephir_get_boolval(isFresh_param); - - if (isFresh) { zephir_update_property_zval(this_ptr, ZEND_STRL("isFresh"), &__$true); } else { @@ -1018,28 +931,23 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset, update) ZVAL_UNDEF(&_6$$3); ZVAL_UNDEF(&_7$$8); ZVAL_UNDEF(&_4$$6); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ZVAL(data) Z_PARAM_OPTIONAL Z_PARAM_OBJECT_OF_CLASS_OR_NULL(conditionCallback, zend_ce_closure) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &data, &conditionCallback); if (!conditionCallback) { conditionCallback = &conditionCallback_sub; conditionCallback = &__$null; } - - ZEPHIR_INIT_VAR(&connection); ZVAL_NULL(&connection); transaction = 0; - ZEPHIR_CALL_METHOD(NULL, this_ptr, "rewind", NULL, 91); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "rewind", NULL, 92); zephir_check_call_status(); while (1) { ZEPHIR_CALL_METHOD(&_0, this_ptr, "valid", &_1, 0); @@ -1106,9 +1014,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset, valid) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - zephir_read_property(&_0, this_ptr, ZEND_STRL("pointer"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_1, this_ptr, ZEND_STRL("count"), PH_NOISY_CC | PH_READONLY); RETURN_BOOL(ZEPHIR_LT(&_0, &_1)); @@ -1122,7 +1027,8 @@ zend_object *zephir_init_properties_Phalcon_Mvc_Model_Resultset(zend_class_entry ZVAL_UNDEF(&_1$$3); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/mvc/model/resultset.zep.h b/ext/phalcon/mvc/model/resultset.zep.h index cf912c1c505..511502e45ef 100644 --- a/ext/phalcon/mvc/model/resultset.zep.h +++ b/ext/phalcon/mvc/model/resultset.zep.h @@ -75,11 +75,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_resultset_next, 0, 0, IS_VOID, 0) ZEND_END_ARG_INFO() -#if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_resultset_offsetget, 0, 1, IS_MIXED, 0) -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_resultset_offsetget, 0, 0, 1) -#endif ZEND_ARG_INFO(0, index) ZEND_END_ARG_INFO() @@ -89,7 +85,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_resultset_offsetset, 0, 2, IS_VOID, 0) - ZEND_ARG_INFO(0, index) + ZEND_ARG_INFO(0, offset) ZEND_ARG_INFO(0, value) ZEND_END_ARG_INFO() @@ -131,11 +127,7 @@ ZEPHIR_INIT_FUNCS(phalcon_mvc_model_resultset_method_entry) { PHP_ME(Phalcon_Mvc_Model_Resultset, delete, arginfo_phalcon_mvc_model_resultset_delete, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Resultset, filter, arginfo_phalcon_mvc_model_resultset_filter, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Resultset, getCache, arginfo_phalcon_mvc_model_resultset_getcache, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Mvc_Model_Resultset, getFirst, arginfo_phalcon_mvc_model_resultset_getfirst, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Mvc_Model_Resultset, getFirst, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Mvc_Model_Resultset, getFirst, arginfo_phalcon_mvc_model_resultset_getfirst, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Resultset, getHydrateMode, arginfo_phalcon_mvc_model_resultset_gethydratemode, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Resultset, getLast, arginfo_phalcon_mvc_model_resultset_getlast, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Resultset, getMessages, arginfo_phalcon_mvc_model_resultset_getmessages, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/mvc/model/resultset/complex.zep.c b/ext/phalcon/mvc/model/resultset/complex.zep.c index 30ec41f4e8a..bcf7613417f 100644 --- a/ext/phalcon/mvc/model/resultset/complex.zep.c +++ b/ext/phalcon/mvc/model/resultset/complex.zep.c @@ -66,7 +66,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Complex, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *columnTypes, columnTypes_sub, *result = NULL, result_sub, *cache = NULL, cache_sub, __$null; zval *this_ptr = getThis(); @@ -74,7 +73,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Complex, __construct) ZVAL_UNDEF(&result_sub); ZVAL_UNDEF(&cache_sub); ZVAL_NULL(&__$null); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_ZVAL(columnTypes) @@ -82,10 +80,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Complex, __construct) Z_PARAM_OBJECT_OF_CLASS_OR_NULL(result, phalcon_db_resultinterface_ce) Z_PARAM_ZVAL_OR_NULL(cache) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &columnTypes, &result, &cache); if (!result) { result = &result_sub; @@ -95,10 +91,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Complex, __construct) cache = &cache_sub; cache = &__$null; } - - zephir_update_property_zval(this_ptr, ZEND_STRL("columnTypes"), columnTypes); - ZEPHIR_CALL_PARENT(NULL, phalcon_mvc_model_resultset_complex_ce, getThis(), "__construct", &_0, 0, result, cache); + ZEPHIR_CALL_PARENT(NULL, phalcon_mvc_model_resultset_complex_ce, getThis(), "__construct", NULL, 0, result, cache); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -161,9 +155,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Complex, current) ZVAL_UNDEF(&_31$$39); ZVAL_UNDEF(&_32$$45); ZVAL_UNDEF(&_33$$45); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("activeRow"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&activeRow, &_0); @@ -497,13 +490,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Complex, toArray) ZVAL_UNDEF(¤t); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&records); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&records); array_init(&records); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "rewind", NULL, 91); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "rewind", NULL, 92); zephir_check_call_status(); while (1) { ZEPHIR_CALL_METHOD(&_0, this_ptr, "valid", &_1, 0); @@ -511,7 +503,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Complex, toArray) if (!(zephir_is_true(&_0))) { break; } - ZEPHIR_CALL_METHOD(¤t, this_ptr, "current", &_2, 479); + ZEPHIR_CALL_METHOD(¤t, this_ptr, "current", &_2, 480); zephir_check_call_status(); zephir_array_append(&records, ¤t, PH_SEPARATE, "phalcon/Mvc/Model/Resultset/Complex.zep", 279); ZEPHIR_CALL_METHOD(NULL, this_ptr, "next", &_3, 0); @@ -526,25 +518,23 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Complex, toArray) PHP_METHOD(Phalcon_Mvc_Model_Resultset_Complex, serialize) { zval data; - zval container, serializer, _1, _2, _3, _4$$4, _5$$4; + zval container, serializer, _0, _1, _2, _3$$4, _4$$4; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *this_ptr = getThis(); ZVAL_UNDEF(&container); ZVAL_UNDEF(&serializer); + ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); - ZVAL_UNDEF(&_3); + ZVAL_UNDEF(&_3$$4); ZVAL_UNDEF(&_4$$4); - ZVAL_UNDEF(&_5$$4); ZVAL_UNDEF(&data); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_CALL_CE_STATIC(&container, phalcon_di_di_ce, "getdefault", &_0, 0); + ZEPHIR_CALL_CE_STATIC(&container, phalcon_di_di_ce, "getdefault", NULL, 0); zephir_check_call_status(); if (Z_TYPE_P(&container) == IS_NULL) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The dependency injector container is not valid", "phalcon/Mvc/Model/Resultset/Complex.zep", 299); @@ -552,28 +542,28 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Complex, serialize) } ZEPHIR_INIT_VAR(&data); zephir_create_array(&data, 4, 0); - ZEPHIR_OBS_VAR(&_1); - zephir_read_property(&_1, this_ptr, ZEND_STRL("cache"), PH_NOISY_CC); - zephir_array_update_string(&data, SL("cache"), &_1, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_METHOD(&_2, this_ptr, "toarray", NULL, 0); + zephir_memory_observe(&_0); + zephir_read_property(&_0, this_ptr, ZEND_STRL("cache"), PH_NOISY_CC); + zephir_array_update_string(&data, SL("cache"), &_0, PH_COPY | PH_SEPARATE); + ZEPHIR_CALL_METHOD(&_1, this_ptr, "toarray", NULL, 0); zephir_check_call_status(); - zephir_array_update_string(&data, SL("rows"), &_2, PH_COPY | PH_SEPARATE); - ZEPHIR_OBS_NVAR(&_1); - zephir_read_property(&_1, this_ptr, ZEND_STRL("columnTypes"), PH_NOISY_CC); - zephir_array_update_string(&data, SL("columnTypes"), &_1, PH_COPY | PH_SEPARATE); - ZEPHIR_OBS_NVAR(&_1); - zephir_read_property(&_1, this_ptr, ZEND_STRL("hydrateMode"), PH_NOISY_CC); - zephir_array_update_string(&data, SL("hydrateMode"), &_1, PH_COPY | PH_SEPARATE); - ZEPHIR_INIT_VAR(&_3); - ZVAL_STRING(&_3, "serializer"); - ZEPHIR_CALL_METHOD(&_2, &container, "has", NULL, 0, &_3); + zephir_array_update_string(&data, SL("rows"), &_1, PH_COPY | PH_SEPARATE); + ZEPHIR_OBS_NVAR(&_0); + zephir_read_property(&_0, this_ptr, ZEND_STRL("columnTypes"), PH_NOISY_CC); + zephir_array_update_string(&data, SL("columnTypes"), &_0, PH_COPY | PH_SEPARATE); + ZEPHIR_OBS_NVAR(&_0); + zephir_read_property(&_0, this_ptr, ZEND_STRL("hydrateMode"), PH_NOISY_CC); + zephir_array_update_string(&data, SL("hydrateMode"), &_0, PH_COPY | PH_SEPARATE); + ZEPHIR_INIT_VAR(&_2); + ZVAL_STRING(&_2, "serializer"); + ZEPHIR_CALL_METHOD(&_1, &container, "has", NULL, 0, &_2); zephir_check_call_status(); - if (zephir_is_true(&_2)) { - ZEPHIR_INIT_VAR(&_5$$4); - ZVAL_STRING(&_5$$4, "serializer"); - ZEPHIR_CALL_METHOD(&_4$$4, &container, "getshared", NULL, 0, &_5$$4); + if (zephir_is_true(&_1)) { + ZEPHIR_INIT_VAR(&_4$$4); + ZVAL_STRING(&_4$$4, "serializer"); + ZEPHIR_CALL_METHOD(&_3$$4, &container, "getshared", NULL, 0, &_4$$4); zephir_check_call_status(); - ZEPHIR_CPY_WRT(&serializer, &_4$$4); + ZEPHIR_CPY_WRT(&serializer, &_3$$4); ZEPHIR_CALL_METHOD(NULL, &serializer, "setdata", NULL, 0, &data); zephir_check_call_status(); ZEPHIR_RETURN_CALL_METHOD(&serializer, "serialize", NULL, 0); @@ -592,8 +582,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Complex, unserialize) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; - zval *data, data_sub, __$true, __$false, resultset, container, serializer, _1, _2, _5, _6, _7, _8, _9, _10, _3$$4, _4$$4; + zval *data, data_sub, __$true, __$false, resultset, container, serializer, _0, _1, _4, _5, _6, _7, _8, _9, _2$$4, _3$$4; zval *this_ptr = getThis(); ZVAL_UNDEF(&data_sub); @@ -602,49 +591,43 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Complex, unserialize) ZVAL_UNDEF(&resultset); ZVAL_UNDEF(&container); ZVAL_UNDEF(&serializer); + ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - ZVAL_UNDEF(&_2); + ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_6); ZVAL_UNDEF(&_7); ZVAL_UNDEF(&_8); ZVAL_UNDEF(&_9); - ZVAL_UNDEF(&_10); + ZVAL_UNDEF(&_2$$4); ZVAL_UNDEF(&_3$$4); - ZVAL_UNDEF(&_4$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &data); - - if (1) { zephir_update_property_zval(this_ptr, ZEND_STRL("disableHydration"), &__$true); } else { zephir_update_property_zval(this_ptr, ZEND_STRL("disableHydration"), &__$false); } - ZEPHIR_CALL_CE_STATIC(&container, phalcon_di_di_ce, "getdefault", &_0, 0); + ZEPHIR_CALL_CE_STATIC(&container, phalcon_di_di_ce, "getdefault", NULL, 0); zephir_check_call_status(); if (Z_TYPE_P(&container) == IS_NULL) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The dependency injector container is not valid", "phalcon/Mvc/Model/Resultset/Complex.zep", 335); return; } - ZEPHIR_INIT_VAR(&_2); - ZVAL_STRING(&_2, "serializer"); - ZEPHIR_CALL_METHOD(&_1, &container, "has", NULL, 0, &_2); + ZEPHIR_INIT_VAR(&_1); + ZVAL_STRING(&_1, "serializer"); + ZEPHIR_CALL_METHOD(&_0, &container, "has", NULL, 0, &_1); zephir_check_call_status(); - if (zephir_is_true(&_1)) { - ZEPHIR_INIT_VAR(&_4$$4); - ZVAL_STRING(&_4$$4, "serializer"); - ZEPHIR_CALL_METHOD(&_3$$4, &container, "getshared", NULL, 0, &_4$$4); + if (zephir_is_true(&_0)) { + ZEPHIR_INIT_VAR(&_3$$4); + ZVAL_STRING(&_3$$4, "serializer"); + ZEPHIR_CALL_METHOD(&_2$$4, &container, "getshared", NULL, 0, &_3$$4); zephir_check_call_status(); - ZEPHIR_CPY_WRT(&serializer, &_3$$4); + ZEPHIR_CPY_WRT(&serializer, &_2$$4); ZEPHIR_CALL_METHOD(NULL, &serializer, "unserialize", NULL, 0, data); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&resultset, &serializer, "getdata", NULL, 0); @@ -657,18 +640,18 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Complex, unserialize) ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Invalid serialization data", "phalcon/Mvc/Model/Resultset/Complex.zep", 348); return; } - zephir_array_fetch_string(&_5, &resultset, SL("rows"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Complex.zep", 351); - zephir_update_property_zval(this_ptr, ZEND_STRL("rows"), &_5); - zephir_array_fetch_string(&_6, &resultset, SL("rows"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Complex.zep", 352); - ZEPHIR_INIT_ZVAL_NREF(_7); - ZVAL_LONG(&_7, zephir_fast_count_int(&_6)); - zephir_update_property_zval(this_ptr, ZEND_STRL("count"), &_7); - zephir_array_fetch_string(&_8, &resultset, SL("cache"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Complex.zep", 353); - zephir_update_property_zval(this_ptr, ZEND_STRL("cache"), &_8); - zephir_array_fetch_string(&_9, &resultset, SL("columnTypes"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Complex.zep", 354); - zephir_update_property_zval(this_ptr, ZEND_STRL("columnTypes"), &_9); - zephir_array_fetch_string(&_10, &resultset, SL("hydrateMode"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Complex.zep", 355); - zephir_update_property_zval(this_ptr, ZEND_STRL("hydrateMode"), &_10); + zephir_array_fetch_string(&_4, &resultset, SL("rows"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Complex.zep", 351); + zephir_update_property_zval(this_ptr, ZEND_STRL("rows"), &_4); + zephir_array_fetch_string(&_5, &resultset, SL("rows"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Complex.zep", 352); + ZVAL_UNDEF(&_6); + ZVAL_LONG(&_6, zephir_fast_count_int(&_5)); + zephir_update_property_zval(this_ptr, ZEND_STRL("count"), &_6); + zephir_array_fetch_string(&_7, &resultset, SL("cache"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Complex.zep", 353); + zephir_update_property_zval(this_ptr, ZEND_STRL("cache"), &_7); + zephir_array_fetch_string(&_8, &resultset, SL("columnTypes"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Complex.zep", 354); + zephir_update_property_zval(this_ptr, ZEND_STRL("columnTypes"), &_8); + zephir_array_fetch_string(&_9, &resultset, SL("hydrateMode"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Complex.zep", 355); + zephir_update_property_zval(this_ptr, ZEND_STRL("hydrateMode"), &_9); ZEPHIR_MM_RESTORE(); } @@ -684,9 +667,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Complex, __serialize) ZVAL_UNDEF(&columnTypes); ZVAL_UNDEF(&hydrateMode); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&records, this_ptr, "toarray", NULL, 0); zephir_check_call_status(); @@ -720,19 +702,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Complex, __unserialize) ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &data_param); zephir_get_arrval(&data, data_param); - - if (1) { zephir_update_property_zval(this_ptr, ZEND_STRL("disableHydration"), &__$true); } else { @@ -741,7 +717,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Complex, __unserialize) zephir_array_fetch_string(&_0, &data, SL("rows"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Complex.zep", 386); zephir_update_property_zval(this_ptr, ZEND_STRL("rows"), &_0); zephir_array_fetch_string(&_1, &data, SL("rows"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Complex.zep", 387); - ZEPHIR_INIT_ZVAL_NREF(_2); + ZVAL_UNDEF(&_2); ZVAL_LONG(&_2, zephir_fast_count_int(&_1)); zephir_update_property_zval(this_ptr, ZEND_STRL("count"), &_2); zephir_array_fetch_string(&_3, &data, SL("cache"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Complex.zep", 388); diff --git a/ext/phalcon/mvc/model/resultset/complex.zep.h b/ext/phalcon/mvc/model/resultset/complex.zep.h index 7c88947f648..a1f09db4de7 100644 --- a/ext/phalcon/mvc/model/resultset/complex.zep.h +++ b/ext/phalcon/mvc/model/resultset/complex.zep.h @@ -17,11 +17,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_resultset_complex___construct, ZEND_ARG_INFO(0, cache) ZEND_END_ARG_INFO() -#if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_resultset_complex_current, 0, 0, IS_MIXED, 0) -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_resultset_complex_current, 0, 0, 0) -#endif ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_resultset_complex_toarray, 0, 0, IS_ARRAY, 0) diff --git a/ext/phalcon/mvc/model/resultset/simple.zep.c b/ext/phalcon/mvc/model/resultset/simple.zep.c index 57553a725c8..b1f36eccd7c 100644 --- a/ext/phalcon/mvc/model/resultset/simple.zep.c +++ b/ext/phalcon/mvc/model/resultset/simple.zep.c @@ -67,7 +67,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Simple, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zend_bool keepSnapshots; zval *columnMap, columnMap_sub, *model, model_sub, *result, result_sub, *cache = NULL, cache_sub, *keepSnapshots_param = NULL, __$true, __$false, __$null; zval *this_ptr = getThis(); @@ -79,7 +78,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Simple, __construct) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); ZVAL_NULL(&__$null); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 5) Z_PARAM_ZVAL(columnMap) @@ -89,10 +87,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Simple, __construct) Z_PARAM_ZVAL_OR_NULL(cache) Z_PARAM_BOOL(keepSnapshots) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 2, &columnMap, &model, &result, &cache, &keepSnapshots_param); if (!cache) { cache = &cache_sub; @@ -101,10 +97,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Simple, __construct) if (!keepSnapshots_param) { keepSnapshots = 0; } else { - keepSnapshots = zephir_get_boolval(keepSnapshots_param); - } - - + } zephir_update_property_zval(this_ptr, ZEND_STRL("model"), model); zephir_update_property_zval(this_ptr, ZEND_STRL("columnMap"), columnMap); if (keepSnapshots) { @@ -112,7 +105,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Simple, __construct) } else { zephir_update_property_zval(this_ptr, ZEND_STRL("keepSnapshots"), &__$false); } - ZEPHIR_CALL_PARENT(NULL, phalcon_mvc_model_resultset_simple_ce, getThis(), "__construct", &_0, 0, result, cache); + ZEPHIR_CALL_PARENT(NULL, phalcon_mvc_model_resultset_simple_ce, getThis(), "__construct", NULL, 0, result, cache); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -124,9 +117,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Simple, current) { zend_class_entry *_6$$6; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zephir_fcall_cache_entry *_7 = NULL, *_11 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval __$true, __$false, row, hydrateMode, columnMap, activeRow, modelName, _0, _1$$6, _3$$6, _4$$6, _5$$6, _2$$7, _8$$9, _9$$9, _10$$9; + zval __$true, __$false, row, hydrateMode, columnMap, activeRow, modelName, _0, _1$$6, _3$$6, _4$$6, _5$$6, _2$$7, _7$$9, _8$$9, _9$$9; zval *this_ptr = getThis(); ZVAL_BOOL(&__$true, 1); @@ -142,12 +134,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Simple, current) ZVAL_UNDEF(&_4$$6); ZVAL_UNDEF(&_5$$6); ZVAL_UNDEF(&_2$$7); + ZVAL_UNDEF(&_7$$9); ZVAL_UNDEF(&_8$$9); ZVAL_UNDEF(&_9$$9); - ZVAL_UNDEF(&_10$$9); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("activeRow"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&activeRow, &_0); @@ -171,7 +162,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Simple, current) do { if (ZEPHIR_IS_LONG(&hydrateMode, 0)) { if (ZEPHIR_GLOBAL(orm).late_state_binding) { - ZEPHIR_OBS_VAR(&_1$$6); + zephir_memory_observe(&_1$$6); zephir_read_property(&_1$$6, this_ptr, ZEND_STRL("model"), PH_NOISY_CC); if (zephir_instance_of_ev(&_1$$6, phalcon_mvc_model_ce)) { zephir_read_property(&_2$$7, this_ptr, ZEND_STRL("model"), PH_NOISY_CC | PH_READONLY); @@ -188,15 +179,15 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Simple, current) ZEPHIR_CALL_CE_STATIC(&activeRow, _6$$6, "cloneresultmap", NULL, 0, &_3$$6, &row, &columnMap, &_5$$6, &_4$$6); zephir_check_call_status(); } else { - zephir_read_property(&_8$$9, this_ptr, ZEND_STRL("model"), PH_NOISY_CC | PH_READONLY); - zephir_read_property(&_9$$9, this_ptr, ZEND_STRL("keepSnapshots"), PH_NOISY_CC | PH_READONLY); - ZVAL_LONG(&_10$$9, 0); - ZEPHIR_CALL_CE_STATIC(&activeRow, phalcon_mvc_model_ce, "cloneresultmap", &_7, 0, &_8$$9, &row, &columnMap, &_10$$9, &_9$$9); + zephir_read_property(&_7$$9, this_ptr, ZEND_STRL("model"), PH_NOISY_CC | PH_READONLY); + zephir_read_property(&_8$$9, this_ptr, ZEND_STRL("keepSnapshots"), PH_NOISY_CC | PH_READONLY); + ZVAL_LONG(&_9$$9, 0); + ZEPHIR_CALL_CE_STATIC(&activeRow, phalcon_mvc_model_ce, "cloneresultmap", NULL, 0, &_7$$9, &row, &columnMap, &_9$$9, &_8$$9); zephir_check_call_status(); } break; } - ZEPHIR_CALL_CE_STATIC(&activeRow, phalcon_mvc_model_ce, "cloneresultmaphydrate", &_11, 0, &row, &columnMap, &hydrateMode); + ZEPHIR_CALL_CE_STATIC(&activeRow, phalcon_mvc_model_ce, "cloneresultmaphydrate", NULL, 0, &row, &columnMap, &hydrateMode); zephir_check_call_status(); break; } while(0); @@ -213,13 +204,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Simple, current) */ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Simple, toArray) { - zend_string *_9$$8, *_22$$17; - zend_ulong _8$$8, _21$$17; + zend_string *_9$$8, *_22$$19; + zend_ulong _8$$8, _21$$19; zval renamedRecords, renamed; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zephir_fcall_cache_entry *_12 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *renameColumns_param = NULL, __$null, result, records, record, renamedKey, key, value, columnMap, _2, _0$$3, _3$$5, *_4$$7, _5$$7, *_6$$8, _7$$8, _10$$10, _11$$10, _13$$12, _14$$12, _15$$14, _16$$14, _17$$16, _18$$16, *_19$$17, _20$$17, _23$$19, _24$$19, _25$$21, _26$$21, _27$$23, _28$$23, _29$$25, _30$$25; + zval *renameColumns_param = NULL, __$null, result, records, record, renamedKey, key, value, columnMap, _2, _0$$3, _3$$5, *_4$$7, _5$$7, *_6$$8, _7$$8, _10$$11, _11$$11, _13$$13, _14$$13, _15$$16, _16$$16, _17$$18, _18$$18, *_19$$19, _20$$19, _23$$22, _24$$22, _25$$24, _26$$24, _27$$27, _28$$27, _29$$29, _30$$29; zend_bool renameColumns, _1; zval *this_ptr = getThis(); @@ -236,44 +227,37 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Simple, toArray) ZVAL_UNDEF(&_3$$5); ZVAL_UNDEF(&_5$$7); ZVAL_UNDEF(&_7$$8); - ZVAL_UNDEF(&_10$$10); - ZVAL_UNDEF(&_11$$10); - ZVAL_UNDEF(&_13$$12); - ZVAL_UNDEF(&_14$$12); - ZVAL_UNDEF(&_15$$14); - ZVAL_UNDEF(&_16$$14); - ZVAL_UNDEF(&_17$$16); - ZVAL_UNDEF(&_18$$16); - ZVAL_UNDEF(&_20$$17); - ZVAL_UNDEF(&_23$$19); - ZVAL_UNDEF(&_24$$19); - ZVAL_UNDEF(&_25$$21); - ZVAL_UNDEF(&_26$$21); - ZVAL_UNDEF(&_27$$23); - ZVAL_UNDEF(&_28$$23); - ZVAL_UNDEF(&_29$$25); - ZVAL_UNDEF(&_30$$25); + ZVAL_UNDEF(&_10$$11); + ZVAL_UNDEF(&_11$$11); + ZVAL_UNDEF(&_13$$13); + ZVAL_UNDEF(&_14$$13); + ZVAL_UNDEF(&_15$$16); + ZVAL_UNDEF(&_16$$16); + ZVAL_UNDEF(&_17$$18); + ZVAL_UNDEF(&_18$$18); + ZVAL_UNDEF(&_20$$19); + ZVAL_UNDEF(&_23$$22); + ZVAL_UNDEF(&_24$$22); + ZVAL_UNDEF(&_25$$24); + ZVAL_UNDEF(&_26$$24); + ZVAL_UNDEF(&_27$$27); + ZVAL_UNDEF(&_28$$27); + ZVAL_UNDEF(&_29$$29); + ZVAL_UNDEF(&_30$$29); ZVAL_UNDEF(&renamedRecords); ZVAL_UNDEF(&renamed); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_BOOL(renameColumns) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &renameColumns_param); if (!renameColumns_param) { renameColumns = 1; } else { - renameColumns = zephir_get_boolval(renameColumns_param); - } - - - ZEPHIR_OBS_VAR(&records); + } + zephir_memory_observe(&records); zephir_read_property(&records, this_ptr, ZEND_STRL("rows"), PH_NOISY_CC); if (Z_TYPE_P(&records) != IS_ARRAY) { zephir_read_property(&_0$$3, this_ptr, ZEND_STRL("result"), PH_NOISY_CC | PH_READONLY); @@ -290,7 +274,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Simple, toArray) } _1 = renameColumns; if (_1) { - ZEPHIR_OBS_VAR(&_2); + zephir_memory_observe(&_2); zephir_read_property(&_2, this_ptr, ZEND_STRL("model"), PH_NOISY_CC); _1 = !(zephir_instance_of_ev(&_2, phalcon_mvc_model_row_ce)); } @@ -303,7 +287,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Simple, toArray) ZEPHIR_INIT_VAR(&renamedRecords); array_init(&renamedRecords); if (Z_TYPE_P(&records) == IS_ARRAY) { - zephir_is_iterable(&records, 0, "phalcon/Mvc/Model/Resultset/Simple.zep", 240); + zephir_is_iterable(&records, 0, "phalcon/Mvc/Model/Resultset/Simple.zep", 242); if (Z_TYPE_P(&records) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&records), _4$$7) { @@ -311,7 +295,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Simple, toArray) ZVAL_COPY(&record, _4$$7); ZEPHIR_INIT_NVAR(&renamed); array_init(&renamed); - zephir_is_iterable(&record, 0, "phalcon/Mvc/Model/Resultset/Simple.zep", 238); + zephir_is_iterable(&record, 0, "phalcon/Mvc/Model/Resultset/Simple.zep", 240); if (Z_TYPE_P(&record) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&record), _8$$8, _9$$8, _6$$8) { @@ -323,33 +307,35 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Simple, toArray) } ZEPHIR_INIT_NVAR(&value); ZVAL_COPY(&value, _6$$8); - ZEPHIR_OBS_NVAR(&renamedKey); - if (UNEXPECTED(!(zephir_array_isset_fetch(&renamedKey, &columnMap, &key, 0)))) { - ZEPHIR_INIT_NVAR(&_10$$10); - object_init_ex(&_10$$10, phalcon_mvc_model_exception_ce); - ZEPHIR_INIT_NVAR(&_11$$10); - ZEPHIR_CONCAT_SVS(&_11$$10, "Column '", &key, "' is not part of the column map"); - ZEPHIR_CALL_METHOD(NULL, &_10$$10, "__construct", &_12, 32, &_11$$10); - zephir_check_call_status(); - zephir_throw_exception_debug(&_10$$10, "phalcon/Mvc/Model/Resultset/Simple.zep", 221); - ZEPHIR_MM_RESTORE(); - return; - } - if (Z_TYPE_P(&renamedKey) == IS_ARRAY) { + if (Z_TYPE_P(&key) == IS_STRING) { ZEPHIR_OBS_NVAR(&renamedKey); - if (UNEXPECTED(!(zephir_array_isset_long_fetch(&renamedKey, &renamedKey, 0, 0)))) { - ZEPHIR_INIT_NVAR(&_13$$12); - object_init_ex(&_13$$12, phalcon_mvc_model_exception_ce); - ZEPHIR_INIT_NVAR(&_14$$12); - ZEPHIR_CONCAT_SVS(&_14$$12, "Column '", &key, "' is not part of the column map"); - ZEPHIR_CALL_METHOD(NULL, &_13$$12, "__construct", &_12, 32, &_14$$12); + if (UNEXPECTED(!(zephir_array_isset_fetch(&renamedKey, &columnMap, &key, 0)))) { + ZEPHIR_INIT_NVAR(&_10$$11); + object_init_ex(&_10$$11, phalcon_mvc_model_exception_ce); + ZEPHIR_INIT_NVAR(&_11$$11); + ZEPHIR_CONCAT_SVS(&_11$$11, "Column '", &key, "' is not part of the column map"); + ZEPHIR_CALL_METHOD(NULL, &_10$$11, "__construct", &_12, 33, &_11$$11); zephir_check_call_status(); - zephir_throw_exception_debug(&_13$$12, "phalcon/Mvc/Model/Resultset/Simple.zep", 228); + zephir_throw_exception_debug(&_10$$11, "phalcon/Mvc/Model/Resultset/Simple.zep", 222); ZEPHIR_MM_RESTORE(); return; } + if (Z_TYPE_P(&renamedKey) == IS_ARRAY) { + ZEPHIR_OBS_NVAR(&renamedKey); + if (UNEXPECTED(!(zephir_array_isset_long_fetch(&renamedKey, &renamedKey, 0, 0)))) { + ZEPHIR_INIT_NVAR(&_13$$13); + object_init_ex(&_13$$13, phalcon_mvc_model_exception_ce); + ZEPHIR_INIT_NVAR(&_14$$13); + ZEPHIR_CONCAT_SVS(&_14$$13, "Column '", &key, "' is not part of the column map"); + ZEPHIR_CALL_METHOD(NULL, &_13$$13, "__construct", &_12, 33, &_14$$13); + zephir_check_call_status(); + zephir_throw_exception_debug(&_13$$13, "phalcon/Mvc/Model/Resultset/Simple.zep", 229); + ZEPHIR_MM_RESTORE(); + return; + } + } + zephir_array_update_zval(&renamed, &renamedKey, &value, PH_COPY | PH_SEPARATE); } - zephir_array_update_zval(&renamed, &renamedKey, &value, PH_COPY | PH_SEPARATE); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &record, "rewind", NULL, 0); @@ -364,40 +350,42 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Simple, toArray) zephir_check_call_status(); ZEPHIR_CALL_METHOD(&value, &record, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_OBS_NVAR(&renamedKey); - if (UNEXPECTED(!(zephir_array_isset_fetch(&renamedKey, &columnMap, &key, 0)))) { - ZEPHIR_INIT_NVAR(&_15$$14); - object_init_ex(&_15$$14, phalcon_mvc_model_exception_ce); - ZEPHIR_INIT_NVAR(&_16$$14); - ZEPHIR_CONCAT_SVS(&_16$$14, "Column '", &key, "' is not part of the column map"); - ZEPHIR_CALL_METHOD(NULL, &_15$$14, "__construct", &_12, 32, &_16$$14); - zephir_check_call_status(); - zephir_throw_exception_debug(&_15$$14, "phalcon/Mvc/Model/Resultset/Simple.zep", 221); - ZEPHIR_MM_RESTORE(); - return; - } - if (Z_TYPE_P(&renamedKey) == IS_ARRAY) { + if (Z_TYPE_P(&key) == IS_STRING) { ZEPHIR_OBS_NVAR(&renamedKey); - if (UNEXPECTED(!(zephir_array_isset_long_fetch(&renamedKey, &renamedKey, 0, 0)))) { - ZEPHIR_INIT_NVAR(&_17$$16); - object_init_ex(&_17$$16, phalcon_mvc_model_exception_ce); - ZEPHIR_INIT_NVAR(&_18$$16); - ZEPHIR_CONCAT_SVS(&_18$$16, "Column '", &key, "' is not part of the column map"); - ZEPHIR_CALL_METHOD(NULL, &_17$$16, "__construct", &_12, 32, &_18$$16); + if (UNEXPECTED(!(zephir_array_isset_fetch(&renamedKey, &columnMap, &key, 0)))) { + ZEPHIR_INIT_NVAR(&_15$$16); + object_init_ex(&_15$$16, phalcon_mvc_model_exception_ce); + ZEPHIR_INIT_NVAR(&_16$$16); + ZEPHIR_CONCAT_SVS(&_16$$16, "Column '", &key, "' is not part of the column map"); + ZEPHIR_CALL_METHOD(NULL, &_15$$16, "__construct", &_12, 33, &_16$$16); zephir_check_call_status(); - zephir_throw_exception_debug(&_17$$16, "phalcon/Mvc/Model/Resultset/Simple.zep", 228); + zephir_throw_exception_debug(&_15$$16, "phalcon/Mvc/Model/Resultset/Simple.zep", 222); ZEPHIR_MM_RESTORE(); return; } + if (Z_TYPE_P(&renamedKey) == IS_ARRAY) { + ZEPHIR_OBS_NVAR(&renamedKey); + if (UNEXPECTED(!(zephir_array_isset_long_fetch(&renamedKey, &renamedKey, 0, 0)))) { + ZEPHIR_INIT_NVAR(&_17$$18); + object_init_ex(&_17$$18, phalcon_mvc_model_exception_ce); + ZEPHIR_INIT_NVAR(&_18$$18); + ZEPHIR_CONCAT_SVS(&_18$$18, "Column '", &key, "' is not part of the column map"); + ZEPHIR_CALL_METHOD(NULL, &_17$$18, "__construct", &_12, 33, &_18$$18); + zephir_check_call_status(); + zephir_throw_exception_debug(&_17$$18, "phalcon/Mvc/Model/Resultset/Simple.zep", 229); + ZEPHIR_MM_RESTORE(); + return; + } + } + zephir_array_update_zval(&renamed, &renamedKey, &value, PH_COPY | PH_SEPARATE); } - zephir_array_update_zval(&renamed, &renamedKey, &value, PH_COPY | PH_SEPARATE); ZEPHIR_CALL_METHOD(NULL, &record, "next", NULL, 0); zephir_check_call_status(); } } ZEPHIR_INIT_NVAR(&value); ZEPHIR_INIT_NVAR(&key); - zephir_array_append(&renamedRecords, &renamed, PH_SEPARATE, "phalcon/Mvc/Model/Resultset/Simple.zep", 238); + zephir_array_append(&renamedRecords, &renamed, PH_SEPARATE, "phalcon/Mvc/Model/Resultset/Simple.zep", 240); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &records, "rewind", NULL, 0); @@ -412,93 +400,97 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Simple, toArray) zephir_check_call_status(); ZEPHIR_INIT_NVAR(&renamed); array_init(&renamed); - zephir_is_iterable(&record, 0, "phalcon/Mvc/Model/Resultset/Simple.zep", 238); + zephir_is_iterable(&record, 0, "phalcon/Mvc/Model/Resultset/Simple.zep", 240); if (Z_TYPE_P(&record) == IS_ARRAY) { - ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&record), _21$$17, _22$$17, _19$$17) + ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&record), _21$$19, _22$$19, _19$$19) { ZEPHIR_INIT_NVAR(&key); - if (_22$$17 != NULL) { - ZVAL_STR_COPY(&key, _22$$17); + if (_22$$19 != NULL) { + ZVAL_STR_COPY(&key, _22$$19); } else { - ZVAL_LONG(&key, _21$$17); + ZVAL_LONG(&key, _21$$19); } ZEPHIR_INIT_NVAR(&value); - ZVAL_COPY(&value, _19$$17); - ZEPHIR_OBS_NVAR(&renamedKey); - if (UNEXPECTED(!(zephir_array_isset_fetch(&renamedKey, &columnMap, &key, 0)))) { - ZEPHIR_INIT_NVAR(&_23$$19); - object_init_ex(&_23$$19, phalcon_mvc_model_exception_ce); - ZEPHIR_INIT_NVAR(&_24$$19); - ZEPHIR_CONCAT_SVS(&_24$$19, "Column '", &key, "' is not part of the column map"); - ZEPHIR_CALL_METHOD(NULL, &_23$$19, "__construct", &_12, 32, &_24$$19); - zephir_check_call_status(); - zephir_throw_exception_debug(&_23$$19, "phalcon/Mvc/Model/Resultset/Simple.zep", 221); - ZEPHIR_MM_RESTORE(); - return; - } - if (Z_TYPE_P(&renamedKey) == IS_ARRAY) { + ZVAL_COPY(&value, _19$$19); + if (Z_TYPE_P(&key) == IS_STRING) { ZEPHIR_OBS_NVAR(&renamedKey); - if (UNEXPECTED(!(zephir_array_isset_long_fetch(&renamedKey, &renamedKey, 0, 0)))) { - ZEPHIR_INIT_NVAR(&_25$$21); - object_init_ex(&_25$$21, phalcon_mvc_model_exception_ce); - ZEPHIR_INIT_NVAR(&_26$$21); - ZEPHIR_CONCAT_SVS(&_26$$21, "Column '", &key, "' is not part of the column map"); - ZEPHIR_CALL_METHOD(NULL, &_25$$21, "__construct", &_12, 32, &_26$$21); + if (UNEXPECTED(!(zephir_array_isset_fetch(&renamedKey, &columnMap, &key, 0)))) { + ZEPHIR_INIT_NVAR(&_23$$22); + object_init_ex(&_23$$22, phalcon_mvc_model_exception_ce); + ZEPHIR_INIT_NVAR(&_24$$22); + ZEPHIR_CONCAT_SVS(&_24$$22, "Column '", &key, "' is not part of the column map"); + ZEPHIR_CALL_METHOD(NULL, &_23$$22, "__construct", &_12, 33, &_24$$22); zephir_check_call_status(); - zephir_throw_exception_debug(&_25$$21, "phalcon/Mvc/Model/Resultset/Simple.zep", 228); + zephir_throw_exception_debug(&_23$$22, "phalcon/Mvc/Model/Resultset/Simple.zep", 222); ZEPHIR_MM_RESTORE(); return; } + if (Z_TYPE_P(&renamedKey) == IS_ARRAY) { + ZEPHIR_OBS_NVAR(&renamedKey); + if (UNEXPECTED(!(zephir_array_isset_long_fetch(&renamedKey, &renamedKey, 0, 0)))) { + ZEPHIR_INIT_NVAR(&_25$$24); + object_init_ex(&_25$$24, phalcon_mvc_model_exception_ce); + ZEPHIR_INIT_NVAR(&_26$$24); + ZEPHIR_CONCAT_SVS(&_26$$24, "Column '", &key, "' is not part of the column map"); + ZEPHIR_CALL_METHOD(NULL, &_25$$24, "__construct", &_12, 33, &_26$$24); + zephir_check_call_status(); + zephir_throw_exception_debug(&_25$$24, "phalcon/Mvc/Model/Resultset/Simple.zep", 229); + ZEPHIR_MM_RESTORE(); + return; + } + } + zephir_array_update_zval(&renamed, &renamedKey, &value, PH_COPY | PH_SEPARATE); } - zephir_array_update_zval(&renamed, &renamedKey, &value, PH_COPY | PH_SEPARATE); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &record, "rewind", NULL, 0); zephir_check_call_status(); while (1) { - ZEPHIR_CALL_METHOD(&_20$$17, &record, "valid", NULL, 0); + ZEPHIR_CALL_METHOD(&_20$$19, &record, "valid", NULL, 0); zephir_check_call_status(); - if (!zend_is_true(&_20$$17)) { + if (!zend_is_true(&_20$$19)) { break; } ZEPHIR_CALL_METHOD(&key, &record, "key", NULL, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&value, &record, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_OBS_NVAR(&renamedKey); - if (UNEXPECTED(!(zephir_array_isset_fetch(&renamedKey, &columnMap, &key, 0)))) { - ZEPHIR_INIT_NVAR(&_27$$23); - object_init_ex(&_27$$23, phalcon_mvc_model_exception_ce); - ZEPHIR_INIT_NVAR(&_28$$23); - ZEPHIR_CONCAT_SVS(&_28$$23, "Column '", &key, "' is not part of the column map"); - ZEPHIR_CALL_METHOD(NULL, &_27$$23, "__construct", &_12, 32, &_28$$23); - zephir_check_call_status(); - zephir_throw_exception_debug(&_27$$23, "phalcon/Mvc/Model/Resultset/Simple.zep", 221); - ZEPHIR_MM_RESTORE(); - return; - } - if (Z_TYPE_P(&renamedKey) == IS_ARRAY) { + if (Z_TYPE_P(&key) == IS_STRING) { ZEPHIR_OBS_NVAR(&renamedKey); - if (UNEXPECTED(!(zephir_array_isset_long_fetch(&renamedKey, &renamedKey, 0, 0)))) { - ZEPHIR_INIT_NVAR(&_29$$25); - object_init_ex(&_29$$25, phalcon_mvc_model_exception_ce); - ZEPHIR_INIT_NVAR(&_30$$25); - ZEPHIR_CONCAT_SVS(&_30$$25, "Column '", &key, "' is not part of the column map"); - ZEPHIR_CALL_METHOD(NULL, &_29$$25, "__construct", &_12, 32, &_30$$25); + if (UNEXPECTED(!(zephir_array_isset_fetch(&renamedKey, &columnMap, &key, 0)))) { + ZEPHIR_INIT_NVAR(&_27$$27); + object_init_ex(&_27$$27, phalcon_mvc_model_exception_ce); + ZEPHIR_INIT_NVAR(&_28$$27); + ZEPHIR_CONCAT_SVS(&_28$$27, "Column '", &key, "' is not part of the column map"); + ZEPHIR_CALL_METHOD(NULL, &_27$$27, "__construct", &_12, 33, &_28$$27); zephir_check_call_status(); - zephir_throw_exception_debug(&_29$$25, "phalcon/Mvc/Model/Resultset/Simple.zep", 228); + zephir_throw_exception_debug(&_27$$27, "phalcon/Mvc/Model/Resultset/Simple.zep", 222); ZEPHIR_MM_RESTORE(); return; } + if (Z_TYPE_P(&renamedKey) == IS_ARRAY) { + ZEPHIR_OBS_NVAR(&renamedKey); + if (UNEXPECTED(!(zephir_array_isset_long_fetch(&renamedKey, &renamedKey, 0, 0)))) { + ZEPHIR_INIT_NVAR(&_29$$29); + object_init_ex(&_29$$29, phalcon_mvc_model_exception_ce); + ZEPHIR_INIT_NVAR(&_30$$29); + ZEPHIR_CONCAT_SVS(&_30$$29, "Column '", &key, "' is not part of the column map"); + ZEPHIR_CALL_METHOD(NULL, &_29$$29, "__construct", &_12, 33, &_30$$29); + zephir_check_call_status(); + zephir_throw_exception_debug(&_29$$29, "phalcon/Mvc/Model/Resultset/Simple.zep", 229); + ZEPHIR_MM_RESTORE(); + return; + } + } + zephir_array_update_zval(&renamed, &renamedKey, &value, PH_COPY | PH_SEPARATE); } - zephir_array_update_zval(&renamed, &renamedKey, &value, PH_COPY | PH_SEPARATE); ZEPHIR_CALL_METHOD(NULL, &record, "next", NULL, 0); zephir_check_call_status(); } } ZEPHIR_INIT_NVAR(&value); ZEPHIR_INIT_NVAR(&key); - zephir_array_append(&renamedRecords, &renamed, PH_SEPARATE, "phalcon/Mvc/Model/Resultset/Simple.zep", 238); + zephir_array_append(&renamedRecords, &renamed, PH_SEPARATE, "phalcon/Mvc/Model/Resultset/Simple.zep", 240); ZEPHIR_CALL_METHOD(NULL, &records, "next", NULL, 0); zephir_check_call_status(); } @@ -516,62 +508,60 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Simple, toArray) PHP_METHOD(Phalcon_Mvc_Model_Resultset_Simple, serialize) { zval data; - zval container, serializer, _1, _2, _3, _4, _5$$4, _6$$4; + zval container, serializer, _0, _1, _2, _3, _4$$4, _5$$4; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *this_ptr = getThis(); ZVAL_UNDEF(&container); ZVAL_UNDEF(&serializer); + ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); - ZVAL_UNDEF(&_4); + ZVAL_UNDEF(&_4$$4); ZVAL_UNDEF(&_5$$4); - ZVAL_UNDEF(&_6$$4); ZVAL_UNDEF(&data); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_CALL_CE_STATIC(&container, phalcon_di_di_ce, "getdefault", &_0, 0); + ZEPHIR_CALL_CE_STATIC(&container, phalcon_di_di_ce, "getdefault", NULL, 0); zephir_check_call_status(); if (Z_TYPE_P(&container) == IS_NULL) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The dependency injector container is not valid", "phalcon/Mvc/Model/Resultset/Simple.zep", 260); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The dependency injector container is not valid", "phalcon/Mvc/Model/Resultset/Simple.zep", 262); return; } ZEPHIR_INIT_VAR(&data); zephir_create_array(&data, 6, 0); - ZEPHIR_OBS_VAR(&_1); - zephir_read_property(&_1, this_ptr, ZEND_STRL("model"), PH_NOISY_CC); - zephir_array_update_string(&data, SL("model"), &_1, PH_COPY | PH_SEPARATE); - ZEPHIR_OBS_NVAR(&_1); - zephir_read_property(&_1, this_ptr, ZEND_STRL("cache"), PH_NOISY_CC); - zephir_array_update_string(&data, SL("cache"), &_1, PH_COPY | PH_SEPARATE); - ZVAL_BOOL(&_3, 0); - ZEPHIR_CALL_METHOD(&_2, this_ptr, "toarray", NULL, 0, &_3); + zephir_memory_observe(&_0); + zephir_read_property(&_0, this_ptr, ZEND_STRL("model"), PH_NOISY_CC); + zephir_array_update_string(&data, SL("model"), &_0, PH_COPY | PH_SEPARATE); + ZEPHIR_OBS_NVAR(&_0); + zephir_read_property(&_0, this_ptr, ZEND_STRL("cache"), PH_NOISY_CC); + zephir_array_update_string(&data, SL("cache"), &_0, PH_COPY | PH_SEPARATE); + ZVAL_BOOL(&_2, 0); + ZEPHIR_CALL_METHOD(&_1, this_ptr, "toarray", NULL, 0, &_2); zephir_check_call_status(); - zephir_array_update_string(&data, SL("rows"), &_2, PH_COPY | PH_SEPARATE); - ZEPHIR_OBS_NVAR(&_1); - zephir_read_property(&_1, this_ptr, ZEND_STRL("columnMap"), PH_NOISY_CC); - zephir_array_update_string(&data, SL("columnMap"), &_1, PH_COPY | PH_SEPARATE); - ZEPHIR_OBS_NVAR(&_1); - zephir_read_property(&_1, this_ptr, ZEND_STRL("hydrateMode"), PH_NOISY_CC); - zephir_array_update_string(&data, SL("hydrateMode"), &_1, PH_COPY | PH_SEPARATE); - ZEPHIR_OBS_NVAR(&_1); - zephir_read_property(&_1, this_ptr, ZEND_STRL("keepSnapshots"), PH_NOISY_CC); - zephir_array_update_string(&data, SL("keepSnapshots"), &_1, PH_COPY | PH_SEPARATE); - ZEPHIR_INIT_VAR(&_4); - ZVAL_STRING(&_4, "serializer"); - ZEPHIR_CALL_METHOD(&_2, &container, "has", NULL, 0, &_4); + zephir_array_update_string(&data, SL("rows"), &_1, PH_COPY | PH_SEPARATE); + ZEPHIR_OBS_NVAR(&_0); + zephir_read_property(&_0, this_ptr, ZEND_STRL("columnMap"), PH_NOISY_CC); + zephir_array_update_string(&data, SL("columnMap"), &_0, PH_COPY | PH_SEPARATE); + ZEPHIR_OBS_NVAR(&_0); + zephir_read_property(&_0, this_ptr, ZEND_STRL("hydrateMode"), PH_NOISY_CC); + zephir_array_update_string(&data, SL("hydrateMode"), &_0, PH_COPY | PH_SEPARATE); + ZEPHIR_OBS_NVAR(&_0); + zephir_read_property(&_0, this_ptr, ZEND_STRL("keepSnapshots"), PH_NOISY_CC); + zephir_array_update_string(&data, SL("keepSnapshots"), &_0, PH_COPY | PH_SEPARATE); + ZEPHIR_INIT_VAR(&_3); + ZVAL_STRING(&_3, "serializer"); + ZEPHIR_CALL_METHOD(&_1, &container, "has", NULL, 0, &_3); zephir_check_call_status(); - if (zephir_is_true(&_2)) { - ZEPHIR_INIT_VAR(&_6$$4); - ZVAL_STRING(&_6$$4, "serializer"); - ZEPHIR_CALL_METHOD(&_5$$4, &container, "getshared", NULL, 0, &_6$$4); + if (zephir_is_true(&_1)) { + ZEPHIR_INIT_VAR(&_5$$4); + ZVAL_STRING(&_5$$4, "serializer"); + ZEPHIR_CALL_METHOD(&_4$$4, &container, "getshared", NULL, 0, &_5$$4); zephir_check_call_status(); - ZEPHIR_CPY_WRT(&serializer, &_5$$4); + ZEPHIR_CPY_WRT(&serializer, &_4$$4); ZEPHIR_CALL_METHOD(NULL, &serializer, "setdata", NULL, 0, &data); zephir_check_call_status(); ZEPHIR_RETURN_CALL_METHOD(&serializer, "serialize", NULL, 0); @@ -591,8 +581,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Simple, unserialize) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; - zval *data, data_sub, resultset, keepSnapshots, container, serializer, _1, _2, _5, _6, _7, _8, _9, _10, _11, _3$$4, _4$$4; + zval *data, data_sub, resultset, keepSnapshots, container, serializer, _0, _1, _4, _5, _6, _7, _8, _9, _10, _2$$4, _3$$4; zval *this_ptr = getThis(); ZVAL_UNDEF(&data_sub); @@ -600,45 +589,39 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Simple, unserialize) ZVAL_UNDEF(&keepSnapshots); ZVAL_UNDEF(&container); ZVAL_UNDEF(&serializer); + ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - ZVAL_UNDEF(&_2); + ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_6); ZVAL_UNDEF(&_7); ZVAL_UNDEF(&_8); ZVAL_UNDEF(&_9); ZVAL_UNDEF(&_10); - ZVAL_UNDEF(&_11); + ZVAL_UNDEF(&_2$$4); ZVAL_UNDEF(&_3$$4); - ZVAL_UNDEF(&_4$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &data); - - - ZEPHIR_CALL_CE_STATIC(&container, phalcon_di_di_ce, "getdefault", &_0, 0); + ZEPHIR_CALL_CE_STATIC(&container, phalcon_di_di_ce, "getdefault", NULL, 0); zephir_check_call_status(); if (Z_TYPE_P(&container) == IS_NULL) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The dependency injector container is not valid", "phalcon/Mvc/Model/Resultset/Simple.zep", 297); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The dependency injector container is not valid", "phalcon/Mvc/Model/Resultset/Simple.zep", 299); return; } - ZEPHIR_INIT_VAR(&_2); - ZVAL_STRING(&_2, "serializer"); - ZEPHIR_CALL_METHOD(&_1, &container, "has", NULL, 0, &_2); + ZEPHIR_INIT_VAR(&_1); + ZVAL_STRING(&_1, "serializer"); + ZEPHIR_CALL_METHOD(&_0, &container, "has", NULL, 0, &_1); zephir_check_call_status(); - if (zephir_is_true(&_1)) { - ZEPHIR_INIT_VAR(&_4$$4); - ZVAL_STRING(&_4$$4, "serializer"); - ZEPHIR_CALL_METHOD(&_3$$4, &container, "getshared", NULL, 0, &_4$$4); + if (zephir_is_true(&_0)) { + ZEPHIR_INIT_VAR(&_3$$4); + ZVAL_STRING(&_3$$4, "serializer"); + ZEPHIR_CALL_METHOD(&_2$$4, &container, "getshared", NULL, 0, &_3$$4); zephir_check_call_status(); - ZEPHIR_CPY_WRT(&serializer, &_3$$4); + ZEPHIR_CPY_WRT(&serializer, &_2$$4); ZEPHIR_CALL_METHOD(NULL, &serializer, "unserialize", NULL, 0, data); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&resultset, &serializer, "getdata", NULL, 0); @@ -648,23 +631,23 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Simple, unserialize) zephir_check_call_status(); } if (UNEXPECTED(Z_TYPE_P(&resultset) != IS_ARRAY)) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Invalid serialization data", "phalcon/Mvc/Model/Resultset/Simple.zep", 310); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "Invalid serialization data", "phalcon/Mvc/Model/Resultset/Simple.zep", 312); return; } - zephir_array_fetch_string(&_5, &resultset, SL("model"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Simple.zep", 313); - zephir_update_property_zval(this_ptr, ZEND_STRL("model"), &_5); - zephir_array_fetch_string(&_6, &resultset, SL("rows"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Simple.zep", 314); - zephir_update_property_zval(this_ptr, ZEND_STRL("rows"), &_6); - zephir_array_fetch_string(&_7, &resultset, SL("rows"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Simple.zep", 315); - ZEPHIR_INIT_ZVAL_NREF(_8); - ZVAL_LONG(&_8, zephir_fast_count_int(&_7)); - zephir_update_property_zval(this_ptr, ZEND_STRL("count"), &_8); - zephir_array_fetch_string(&_9, &resultset, SL("cache"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Simple.zep", 316); - zephir_update_property_zval(this_ptr, ZEND_STRL("cache"), &_9); - zephir_array_fetch_string(&_10, &resultset, SL("columnMap"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Simple.zep", 317); - zephir_update_property_zval(this_ptr, ZEND_STRL("columnMap"), &_10); - zephir_array_fetch_string(&_11, &resultset, SL("hydrateMode"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Simple.zep", 318); - zephir_update_property_zval(this_ptr, ZEND_STRL("hydrateMode"), &_11); + zephir_array_fetch_string(&_4, &resultset, SL("model"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Simple.zep", 315); + zephir_update_property_zval(this_ptr, ZEND_STRL("model"), &_4); + zephir_array_fetch_string(&_5, &resultset, SL("rows"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Simple.zep", 316); + zephir_update_property_zval(this_ptr, ZEND_STRL("rows"), &_5); + zephir_array_fetch_string(&_6, &resultset, SL("rows"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Simple.zep", 317); + ZVAL_UNDEF(&_7); + ZVAL_LONG(&_7, zephir_fast_count_int(&_6)); + zephir_update_property_zval(this_ptr, ZEND_STRL("count"), &_7); + zephir_array_fetch_string(&_8, &resultset, SL("cache"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Simple.zep", 318); + zephir_update_property_zval(this_ptr, ZEND_STRL("cache"), &_8); + zephir_array_fetch_string(&_9, &resultset, SL("columnMap"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Simple.zep", 319); + zephir_update_property_zval(this_ptr, ZEND_STRL("columnMap"), &_9); + zephir_array_fetch_string(&_10, &resultset, SL("hydrateMode"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Simple.zep", 320); + zephir_update_property_zval(this_ptr, ZEND_STRL("hydrateMode"), &_10); if (zephir_array_isset_string_fetch(&keepSnapshots, &resultset, SL("keepSnapshots"), 1)) { zephir_update_property_zval(this_ptr, ZEND_STRL("keepSnapshots"), &keepSnapshots); } @@ -681,12 +664,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Simple, __serialize) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_create_array(return_value, 6, 0); - ZEPHIR_OBS_VAR(&_0); + zephir_memory_observe(&_0); zephir_read_property(&_0, this_ptr, ZEND_STRL("model"), PH_NOISY_CC); zephir_array_update_string(return_value, SL("model"), &_0, PH_COPY | PH_SEPARATE); ZEPHIR_OBS_NVAR(&_0); @@ -724,32 +706,26 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Simple, __unserialize) ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &data_param); zephir_get_arrval(&data, data_param); - - - zephir_array_fetch_string(&_0, &data, SL("model"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Simple.zep", 341); + zephir_array_fetch_string(&_0, &data, SL("model"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Simple.zep", 343); zephir_update_property_zval(this_ptr, ZEND_STRL("model"), &_0); - zephir_array_fetch_string(&_1, &data, SL("rows"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Simple.zep", 342); + zephir_array_fetch_string(&_1, &data, SL("rows"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Simple.zep", 344); zephir_update_property_zval(this_ptr, ZEND_STRL("rows"), &_1); - zephir_array_fetch_string(&_2, &data, SL("rows"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Simple.zep", 343); - ZEPHIR_INIT_ZVAL_NREF(_3); + zephir_array_fetch_string(&_2, &data, SL("rows"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Simple.zep", 345); + ZVAL_UNDEF(&_3); ZVAL_LONG(&_3, zephir_fast_count_int(&_2)); zephir_update_property_zval(this_ptr, ZEND_STRL("count"), &_3); - zephir_array_fetch_string(&_4, &data, SL("cache"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Simple.zep", 344); + zephir_array_fetch_string(&_4, &data, SL("cache"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Simple.zep", 346); zephir_update_property_zval(this_ptr, ZEND_STRL("cache"), &_4); - zephir_array_fetch_string(&_5, &data, SL("columnMap"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Simple.zep", 345); + zephir_array_fetch_string(&_5, &data, SL("columnMap"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Simple.zep", 347); zephir_update_property_zval(this_ptr, ZEND_STRL("columnMap"), &_5); - zephir_array_fetch_string(&_6, &data, SL("hydrateMode"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Simple.zep", 346); + zephir_array_fetch_string(&_6, &data, SL("hydrateMode"), PH_NOISY | PH_READONLY, "phalcon/Mvc/Model/Resultset/Simple.zep", 348); zephir_update_property_zval(this_ptr, ZEND_STRL("hydrateMode"), &_6); if (zephir_array_isset_string_fetch(&keepSnapshots, &data, SL("keepSnapshots"), 1)) { zephir_update_property_zval(this_ptr, ZEND_STRL("keepSnapshots"), &keepSnapshots); diff --git a/ext/phalcon/mvc/model/row.zep.c b/ext/phalcon/mvc/model/row.zep.c index a175e55cb83..249195cf0ad 100644 --- a/ext/phalcon/mvc/model/row.zep.c +++ b/ext/phalcon/mvc/model/row.zep.c @@ -53,10 +53,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Row, jsonSerialize) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *this_ptr = getThis(); - - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "toarray", NULL, 0); zephir_check_call_status(); @@ -81,25 +79,19 @@ PHP_METHOD(Phalcon_Mvc_Model_Row, offsetGet) ZVAL_UNDEF(&index_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(index) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &index); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "offsetexists", NULL, 0, index); zephir_check_call_status(); if (!(zephir_is_true(&_0))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The index does not exist in the row", "phalcon/Mvc/Model/Row.zep", 42); return; } - ZEPHIR_OBS_VAR(&_1); + zephir_memory_observe(&_1); zephir_read_property_zval(&_1, this_ptr, index, PH_NOISY_CC); RETURN_CCTOR(&_1); } @@ -116,46 +108,31 @@ PHP_METHOD(Phalcon_Mvc_Model_Row, offsetExists) zval *this_ptr = getThis(); ZVAL_UNDEF(&index_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(index) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &index); - - RETURN_BOOL(zephir_isset_property_zval(this_ptr, index)); } /** * Rows cannot be changed. It has only been implemented to meet the definition of the ArrayAccess interface * - * @param string|int index + * @param string|int offsetSet * @param ModelInterface value */ PHP_METHOD(Phalcon_Mvc_Model_Row, offsetSet) { - zval index_sub, value_sub; - zval *index, *value; - zval *this_ptr = getThis(); + zval offset_sub, value_sub; + zval *offset, *value; - ZVAL_UNDEF(&index_sub); + ZVAL_UNDEF(&offset_sub); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) - Z_PARAM_ZVAL(index) + Z_PARAM_ZVAL(offset) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - zephir_fetch_params_without_memory_grow(2, 0, &index, &value); - - + zephir_fetch_params_without_memory_grow(2, 0, &offset, &value); ZEPHIR_THROW_EXCEPTION_DEBUG_STRW(phalcon_mvc_model_exception_ce, "Row is an immutable ArrayAccess object", "phalcon/Mvc/Model/Row.zep", 66); return; } @@ -169,20 +146,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Row, offsetUnset) { zval offset_sub; zval *offset; - zval *this_ptr = getThis(); ZVAL_UNDEF(&offset_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(offset) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &offset); - - ZEPHIR_THROW_EXCEPTION_DEBUG_STRW(phalcon_mvc_model_exception_ce, "Row is an immutable ArrayAccess object", "phalcon/Mvc/Model/Row.zep", 76); return; } @@ -205,15 +174,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Row, readAttribute) ZVAL_UNDEF(&attribute); ZVAL_UNDEF(&value); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(attribute) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &attribute_param); if (UNEXPECTED(Z_TYPE_P(attribute_param) != IS_STRING && Z_TYPE_P(attribute_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'attribute' must be of the type string")); @@ -224,13 +189,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Row, readAttribute) } else { ZEPHIR_INIT_VAR(&attribute); } - - - ZEPHIR_OBS_VAR(&value); + zephir_memory_observe(&value); if (!(zephir_fetch_property_zval(&value, this_ptr, &attribute, PH_SILENT_CC))) { RETURN_MM_NULL(); } - RETURN_CTOR(&value); + RETURN_CCTOR(&value); } /** @@ -240,20 +203,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Row, setDirtyState) { zval *dirtyState_param = NULL; zend_long dirtyState; - zval *this_ptr = getThis(); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(dirtyState) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &dirtyState_param); - dirtyState = zephir_get_intval(dirtyState_param); - - RETURN_BOOL(0); } @@ -265,12 +219,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Row, toArray) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *this_ptr = getThis(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - - ZEPHIR_MM_GROW(); - - ZEPHIR_RETURN_CALL_FUNCTION("get_object_vars", NULL, 425, this_ptr); + ZEPHIR_RETURN_CALL_FUNCTION("get_object_vars", NULL, 426, this_ptr); zephir_check_call_status(); RETURN_MM(); } @@ -293,16 +245,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Row, writeAttribute) ZVAL_UNDEF(&attribute); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(attribute) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &attribute_param, &value); if (UNEXPECTED(Z_TYPE_P(attribute_param) != IS_STRING && Z_TYPE_P(attribute_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'attribute' must be of the type string")); @@ -313,8 +261,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Row, writeAttribute) } else { ZEPHIR_INIT_VAR(&attribute); } - - zephir_update_property_zval_zval(this_ptr, &attribute, value); ZEPHIR_MM_RESTORE(); } diff --git a/ext/phalcon/mvc/model/row.zep.h b/ext/phalcon/mvc/model/row.zep.h index ae5b4249926..8002ba40a36 100644 --- a/ext/phalcon/mvc/model/row.zep.h +++ b/ext/phalcon/mvc/model/row.zep.h @@ -16,11 +16,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Row, writeAttribute); ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_row_jsonserialize, 0, 0, IS_ARRAY, 0) ZEND_END_ARG_INFO() -#if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_row_offsetget, 0, 1, IS_MIXED, 0) -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_row_offsetget, 0, 0, 1) -#endif ZEND_ARG_INFO(0, index) ZEND_END_ARG_INFO() @@ -30,7 +26,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_row_offsetset, 0, 2, IS_VOID, 0) - ZEND_ARG_INFO(0, index) + ZEND_ARG_INFO(0, offset) ZEND_ARG_INFO(0, value) ZEND_END_ARG_INFO() diff --git a/ext/phalcon/mvc/model/transaction.zep.c b/ext/phalcon/mvc/model/transaction.zep.c index 423595b625c..9aa885a2e95 100644 --- a/ext/phalcon/mvc/model/transaction.zep.c +++ b/ext/phalcon/mvc/model/transaction.zep.c @@ -133,32 +133,25 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction, __construct) ZVAL_UNDEF(&connection); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&service); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_OBJECT_OF_CLASS(container, phalcon_di_diinterface_ce) Z_PARAM_OPTIONAL Z_PARAM_BOOL(autoBegin) Z_PARAM_STR(service) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &container, &autoBegin_param, &service_param); if (!autoBegin_param) { autoBegin = 0; } else { - autoBegin = zephir_get_boolval(autoBegin_param); - } + } if (!service_param) { ZEPHIR_INIT_VAR(&service); ZVAL_STRING(&service, "db"); } else { zephir_get_strval(&service, service_param); } - - ZEPHIR_INIT_VAR(&_0); array_init(&_0); zephir_update_property_zval(this_ptr, ZEND_STRL("messages"), &_0); @@ -183,9 +176,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction, begin) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("connection"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_METHOD(&_0, "begin", NULL, 0); @@ -205,9 +197,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction, commit) ZVAL_UNDEF(&manager); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("manager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&manager, &_0); @@ -234,13 +225,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction, getConnection) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$4); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("rollbackOnAbort"), PH_NOISY_CC | PH_READONLY); if (zephir_is_true(&_0)) { - ZEPHIR_CALL_FUNCTION(&_1$$3, "connection_aborted", NULL, 480); + ZEPHIR_CALL_FUNCTION(&_1$$3, "connection_aborted", NULL, 481); zephir_check_call_status(); if (zephir_is_true(&_1$$3)) { ZEPHIR_INIT_VAR(&_2$$4); @@ -257,9 +247,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction, getConnection) */ PHP_METHOD(Phalcon_Mvc_Model_Transaction, getMessages) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "messages"); } @@ -274,11 +261,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction, isManaged) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_OBS_VAR(&_0); + zephir_memory_observe(&_0); zephir_read_property(&_0, this_ptr, ZEND_STRL("manager"), PH_NOISY_CC); RETURN_MM_BOOL(Z_TYPE_P(&_0) == IS_OBJECT); } @@ -294,9 +280,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction, isValid) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("connection"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_METHOD(&_0, "isundertransaction", NULL, 0); @@ -325,17 +310,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction, rollback) ZVAL_UNDEF(&_2$$4); ZVAL_UNDEF(&_3$$7); ZVAL_UNDEF(&_4$$7); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(rollbackMessage) Z_PARAM_OBJECT_OF_CLASS_OR_NULL(rollbackRecord, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 2, &rollbackMessage_param, &rollbackRecord); if (!rollbackMessage_param) { ZEPHIR_INIT_VAR(&rollbackMessage); @@ -346,8 +328,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction, rollback) rollbackRecord = &rollbackRecord_sub; rollbackRecord = &__$null; } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("manager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&manager, &_0); if (Z_TYPE_P(&manager) == IS_OBJECT) { @@ -371,7 +351,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction, rollback) ZEPHIR_INIT_VAR(&_3$$7); object_init_ex(&_3$$7, phalcon_mvc_model_transaction_failed_ce); zephir_read_property(&_4$$7, this_ptr, ZEND_STRL("rollbackRecord"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_METHOD(NULL, &_3$$7, "__construct", NULL, 481, &rollbackMessage, &_4$$7); + ZEPHIR_CALL_METHOD(NULL, &_3$$7, "__construct", NULL, 482, &rollbackMessage, &_4$$7); zephir_check_call_status(); zephir_throw_exception_debug(&_3$$7, "phalcon/Mvc/Model/Transaction.zep", 215); ZEPHIR_MM_RESTORE(); @@ -392,18 +372,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction, setIsNewTransaction) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(isNew) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &isNew_param); - isNew = zephir_get_boolval(isNew_param); - - if (isNew) { zephir_update_property_zval(this_ptr, ZEND_STRL("isNewTransaction"), &__$true); } else { @@ -422,18 +394,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction, setRollbackOnAbort) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(rollbackOnAbort) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &rollbackOnAbort_param); - rollbackOnAbort = zephir_get_boolval(rollbackOnAbort_param); - - if (rollbackOnAbort) { zephir_update_property_zval(this_ptr, ZEND_STRL("rollbackOnAbort"), &__$true); } else { @@ -450,17 +414,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction, setRollbackedRecord) zval *this_ptr = getThis(); ZVAL_UNDEF(&record_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(record, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &record); - - zephir_update_property_zval(this_ptr, ZEND_STRL("rollbackRecord"), record); } @@ -473,17 +430,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction, setTransactionManager) zval *this_ptr = getThis(); ZVAL_UNDEF(&manager_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(manager, phalcon_mvc_model_transaction_managerinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &manager); - - zephir_update_property_zval(this_ptr, ZEND_STRL("manager"), manager); } @@ -498,18 +448,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction, throwRollbackException) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(status) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &status_param); - status = zephir_get_boolval(status_param); - - if (status) { zephir_update_property_zval(this_ptr, ZEND_STRL("rollbackThrowException"), &__$true); } else { @@ -526,7 +468,8 @@ zend_object *zephir_init_properties_Phalcon_Mvc_Model_Transaction(zend_class_ent ZVAL_UNDEF(&_1$$3); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/mvc/model/transaction/failed.zep.c b/ext/phalcon/mvc/model/transaction/failed.zep.c index b7f31d9745a..019040f5336 100644 --- a/ext/phalcon/mvc/model/transaction/failed.zep.c +++ b/ext/phalcon/mvc/model/transaction/failed.zep.c @@ -61,17 +61,14 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Failed, __construct) ZVAL_UNDEF(&message); ZVAL_UNDEF(&record_sub); ZVAL_NULL(&__$null); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(message) Z_PARAM_OPTIONAL Z_PARAM_OBJECT_OF_CLASS_OR_NULL(record, phalcon_mvc_modelinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &message_param, &record); 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")); @@ -86,8 +83,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Failed, __construct) record = &record_sub; record = &__$null; } - - zephir_update_property_zval(this_ptr, ZEND_STRL("record"), record); ZEPHIR_CALL_PARENT(NULL, phalcon_mvc_model_transaction_failed_ce, getThis(), "__construct", NULL, 0, &message); zephir_check_call_status(); @@ -101,9 +96,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Failed, __construct) */ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Failed, getRecord) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "record"); } @@ -122,9 +114,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Failed, getRecordMessages) ZVAL_UNDEF(&record); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("record"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&record, &_0); diff --git a/ext/phalcon/mvc/model/transaction/manager.zep.c b/ext/phalcon/mvc/model/transaction/manager.zep.c index 30a25b2eec5..20c34d7b088 100644 --- a/ext/phalcon/mvc/model/transaction/manager.zep.c +++ b/ext/phalcon/mvc/model/transaction/manager.zep.c @@ -120,22 +120,18 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Manager, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *container = NULL, container_sub, __$null; zval *this_ptr = getThis(); ZVAL_UNDEF(&container_sub); ZVAL_NULL(&__$null); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_OBJECT_OF_CLASS_OR_NULL(container, phalcon_di_diinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &container); if (!container) { container = &container_sub; @@ -143,10 +139,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Manager, __construct) } else { ZEPHIR_SEPARATE_PARAM(container); } - - if (!(zephir_is_true(container))) { - ZEPHIR_CALL_CE_STATIC(container, phalcon_di_di_ce, "getdefault", &_0, 0); + ZEPHIR_CALL_CE_STATIC(container, phalcon_di_di_ce, "getdefault", NULL, 0); zephir_check_call_status(); } zephir_update_property_zval(this_ptr, ZEND_STRL("container"), container); @@ -172,9 +166,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Manager, collectTransactions) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("transactions"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&transactions, &_0); @@ -227,9 +220,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Manager, commit) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$5); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("transactions"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&transactions, &_0); @@ -299,24 +291,17 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Manager, get) ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_3$$4); ZVAL_UNDEF(&_2$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_BOOL(autoBegin) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &autoBegin_param); if (!autoBegin_param) { autoBegin = 1; } else { - autoBegin = zephir_get_boolval(autoBegin_param); - } - - + } zephir_read_property(&_0, this_ptr, ZEND_STRL("initialized"), PH_NOISY_CC | PH_READONLY); if (!(zephir_is_true(&_0))) { zephir_read_property(&_1$$3, this_ptr, ZEND_STRL("rollbackPendent"), PH_NOISY_CC | PH_READONLY); @@ -327,7 +312,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Manager, get) ZEPHIR_INIT_VAR(&_3$$4); ZVAL_STRING(&_3$$4, "rollbackPendent"); zephir_array_fast_append(&_2$$4, &_3$$4); - ZEPHIR_CALL_FUNCTION(NULL, "register_shutdown_function", NULL, 482, &_2$$4); + ZEPHIR_CALL_FUNCTION(NULL, "register_shutdown_function", NULL, 483, &_2$$4); zephir_check_call_status(); } if (1) { @@ -351,9 +336,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Manager, get) */ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Manager, getDbService) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "service"); } @@ -363,9 +345,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Manager, getDbService) */ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Manager, getDI) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "container"); } @@ -395,24 +374,17 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Manager, getOrCreateTransaction) ZVAL_UNDEF(&_3$$4); ZVAL_UNDEF(&_4$$6); ZVAL_UNDEF(&_5$$8); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_BOOL(autoBegin) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &autoBegin_param); if (!autoBegin_param) { autoBegin = 1; } else { - autoBegin = zephir_get_boolval(autoBegin_param); - } - - + } zephir_read_property(&_0, this_ptr, ZEND_STRL("container"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&container, &_0); if (UNEXPECTED(Z_TYPE_P(&container) != IS_OBJECT)) { @@ -467,9 +439,9 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Manager, getOrCreateTransaction) } else { ZVAL_BOOL(&_7, 0); } - ZEPHIR_CALL_METHOD(NULL, &transaction, "__construct", NULL, 483, &container, &_7, &_6); + ZEPHIR_CALL_METHOD(NULL, &transaction, "__construct", NULL, 484, &container, &_7, &_6); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &transaction, "settransactionmanager", NULL, 484, this_ptr); + ZEPHIR_CALL_METHOD(NULL, &transaction, "settransactionmanager", NULL, 485, this_ptr); zephir_check_call_status(); zephir_update_property_array_append(this_ptr, SL("transactions"), &transaction); RETURN_ON_FAILURE(zephir_property_incr(this_ptr, SL("number"))); @@ -482,9 +454,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Manager, getOrCreateTransaction) */ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Manager, getRollbackPendent) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "rollbackPendent"); } @@ -498,9 +467,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Manager, has) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - zephir_read_property(&_0, this_ptr, ZEND_STRL("number"), PH_NOISY_CC | PH_READONLY); RETURN_BOOL(ZEPHIR_GT_LONG(&_0, 0)); } @@ -518,18 +484,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Manager, notifyCommit) zval *this_ptr = getThis(); ZVAL_UNDEF(&transaction_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(transaction, phalcon_mvc_model_transactioninterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &transaction); - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "collecttransaction", NULL, 0, transaction); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); @@ -548,18 +508,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Manager, notifyRollback) zval *this_ptr = getThis(); ZVAL_UNDEF(&transaction_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(transaction, phalcon_mvc_model_transactioninterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &transaction); - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "collecttransaction", NULL, 0, transaction); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); @@ -587,24 +541,17 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Manager, rollback) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_5$$6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_BOOL(collect) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &collect_param); if (!collect_param) { collect = 1; } else { - collect = zephir_get_boolval(collect_param); - } - - + } zephir_read_property(&_0, this_ptr, ZEND_STRL("transactions"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&transactions, &_0); zephir_is_iterable(&transactions, 0, "phalcon/Mvc/Model/Transaction/Manager.zep", 294); @@ -669,10 +616,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Manager, rollbackPendent) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *this_ptr = getThis(); - - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(NULL, this_ptr, "rollback", NULL, 0); zephir_check_call_status(); @@ -692,15 +637,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Manager, setDbService) zval *this_ptr = getThis(); ZVAL_UNDEF(&service); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(service) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &service_param); if (UNEXPECTED(Z_TYPE_P(service_param) != IS_STRING && Z_TYPE_P(service_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'service' must be of the type string")); @@ -711,8 +652,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Manager, setDbService) } else { ZEPHIR_INIT_VAR(&service); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("service"), &service); RETURN_THIS(); } @@ -728,17 +667,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Manager, setDI) zval *this_ptr = getThis(); ZVAL_UNDEF(&container_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(container, phalcon_di_diinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &container); - - zephir_update_property_zval(this_ptr, ZEND_STRL("container"), container); } @@ -756,18 +688,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Manager, setRollbackPendent) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(rollbackPendent) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &rollbackPendent_param); - rollbackPendent = zephir_get_boolval(rollbackPendent_param); - - if (rollbackPendent) { zephir_update_property_zval(this_ptr, ZEND_STRL("rollbackPendent"), &__$true); } else { @@ -794,18 +718,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Manager, collectTransaction) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&newTransactions); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(transaction, phalcon_mvc_model_transactioninterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &transaction); - - ZEPHIR_INIT_VAR(&newTransactions); array_init(&newTransactions); zephir_read_property(&_0, this_ptr, ZEND_STRL("transactions"), PH_NOISY_CC | PH_READONLY); @@ -854,7 +772,8 @@ zend_object *zephir_init_properties_Phalcon_Mvc_Model_Transaction_Manager(zend_c ZVAL_UNDEF(&_1$$3); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/mvc/model/transaction/manager.zep.h b/ext/phalcon/mvc/model/transaction/manager.zep.h index 3b5b5344c63..dfb09ebd3db 100644 --- a/ext/phalcon/mvc/model/transaction/manager.zep.h +++ b/ext/phalcon/mvc/model/transaction/manager.zep.h @@ -94,11 +94,7 @@ ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_mvc_model_transaction_manager_method_entry) { PHP_ME(Phalcon_Mvc_Model_Transaction_Manager, __construct, arginfo_phalcon_mvc_model_transaction_manager___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) PHP_ME(Phalcon_Mvc_Model_Transaction_Manager, collectTransactions, arginfo_phalcon_mvc_model_transaction_manager_collecttransactions, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Mvc_Model_Transaction_Manager, commit, arginfo_phalcon_mvc_model_transaction_manager_commit, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Mvc_Model_Transaction_Manager, commit, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Mvc_Model_Transaction_Manager, commit, arginfo_phalcon_mvc_model_transaction_manager_commit, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Transaction_Manager, get, arginfo_phalcon_mvc_model_transaction_manager_get, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Transaction_Manager, getDbService, arginfo_phalcon_mvc_model_transaction_manager_getdbservice, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Transaction_Manager, getDI, arginfo_phalcon_mvc_model_transaction_manager_getdi, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/mvc/model/validationfailed.zep.c b/ext/phalcon/mvc/model/validationfailed.zep.c index c0fb793cb53..99eb7cc1c89 100644 --- a/ext/phalcon/mvc/model/validationfailed.zep.c +++ b/ext/phalcon/mvc/model/validationfailed.zep.c @@ -70,22 +70,16 @@ PHP_METHOD(Phalcon_Mvc_Model_ValidationFailed, __construct) ZVAL_UNDEF(&messageStr); ZVAL_UNDEF(&message); ZVAL_UNDEF(&validationMessages); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(model, phalcon_mvc_modelinterface_ce) Z_PARAM_ARRAY(validationMessages) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &model, &validationMessages_param); ZEPHIR_OBS_COPY_OR_DUP(&validationMessages, validationMessages_param); - - if (zephir_fast_count_int(&validationMessages) > 0) { - ZEPHIR_OBS_VAR(&message); + zephir_memory_observe(&message); zephir_array_fetch_long(&message, &validationMessages, 0, PH_NOISY, "phalcon/Mvc/Model/ValidationFailed.zep", 48); ZEPHIR_CALL_METHOD(&messageStr, &message, "getmessage", NULL, 0); zephir_check_call_status(); @@ -105,9 +99,6 @@ PHP_METHOD(Phalcon_Mvc_Model_ValidationFailed, __construct) */ PHP_METHOD(Phalcon_Mvc_Model_ValidationFailed, getMessages) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "messages"); } @@ -117,9 +108,6 @@ PHP_METHOD(Phalcon_Mvc_Model_ValidationFailed, getMessages) */ PHP_METHOD(Phalcon_Mvc_Model_ValidationFailed, getModel) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "model"); } @@ -132,7 +120,8 @@ zend_object *zephir_init_properties_Phalcon_Mvc_Model_ValidationFailed(zend_clas ZVAL_UNDEF(&_1$$3); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/mvc/modelinterface.zep.h b/ext/phalcon/mvc/modelinterface.zep.h index 965a961c17d..06b1577d364 100644 --- a/ext/phalcon/mvc/modelinterface.zep.h +++ b/ext/phalcon/mvc/modelinterface.zep.h @@ -14,11 +14,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_modelinterface_assign ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_modelinterface_average, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, parameters, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, parameters, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, parameters, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_modelinterface_cloneresult, 0, 2, Phalcon\\Mvc\\ModelInterface, 0) diff --git a/ext/phalcon/mvc/router.zep.c b/ext/phalcon/mvc/router.zep.c index fd80702ee94..da6c0deface 100644 --- a/ext/phalcon/mvc/router.zep.c +++ b/ext/phalcon/mvc/router.zep.c @@ -169,16 +169,12 @@ PHP_METHOD(Phalcon_Mvc_Router, __construct) ZVAL_UNDEF(&routes); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_3$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_BOOL(defaultRoutes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &defaultRoutes_param); if (!defaultRoutes_param) { defaultRoutes = 1; @@ -189,8 +185,6 @@ PHP_METHOD(Phalcon_Mvc_Router, __construct) } defaultRoutes = (Z_TYPE_P(defaultRoutes_param) == IS_TRUE); } - - ZEPHIR_INIT_VAR(&routes); array_init(&routes); if (defaultRoutes) { @@ -201,7 +195,7 @@ PHP_METHOD(Phalcon_Mvc_Router, __construct) add_assoc_long_ex(&_1$$3, SL("controller"), 1); ZEPHIR_INIT_VAR(&_2$$3); ZVAL_STRING(&_2$$3, "#^/([\\w0-9\\_\\-]+)[/]{0,1}$#u"); - ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 100, &_2$$3, &_1$$3); + ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 101, &_2$$3, &_1$$3); zephir_check_call_status(); zephir_array_append(&routes, &_0$$3, PH_SEPARATE, "phalcon/Mvc/Router.zep", 170); ZEPHIR_INIT_NVAR(&_2$$3); @@ -213,7 +207,7 @@ PHP_METHOD(Phalcon_Mvc_Router, __construct) add_assoc_long_ex(&_3$$3, SL("params"), 3); ZEPHIR_INIT_VAR(&_4$$3); ZVAL_STRING(&_4$$3, "#^/([\\w0-9\\_\\-]+)/([\\w0-9\\.\\_]+)(/.*)*$#u"); - ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 100, &_4$$3, &_3$$3); + ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 101, &_4$$3, &_3$$3); zephir_check_call_status(); zephir_array_append(&routes, &_2$$3, PH_SEPARATE, "phalcon/Mvc/Router.zep", 179); } @@ -269,7 +263,6 @@ PHP_METHOD(Phalcon_Mvc_Router, add) ZVAL_NULL(&__$null); ZVAL_UNDEF(&route); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 4) Z_PARAM_STR(pattern) @@ -278,10 +271,8 @@ PHP_METHOD(Phalcon_Mvc_Router, add) Z_PARAM_ZVAL_OR_NULL(httpMethods) Z_PARAM_LONG(position) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 3, &pattern_param, &paths, &httpMethods, &position_param); if (UNEXPECTED(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'pattern' must be of the type string")); @@ -303,13 +294,10 @@ PHP_METHOD(Phalcon_Mvc_Router, add) if (!position_param) { position = 1; } else { - position = zephir_get_intval(position_param); - } - - + } ZEPHIR_INIT_VAR(&route); object_init_ex(&route, phalcon_mvc_router_route_ce); - ZEPHIR_CALL_METHOD(NULL, &route, "__construct", NULL, 100, &pattern, paths, httpMethods); + ZEPHIR_CALL_METHOD(NULL, &route, "__construct", NULL, 101, &pattern, paths, httpMethods); zephir_check_call_status(); ZVAL_LONG(&_0, position); ZEPHIR_CALL_METHOD(NULL, this_ptr, "attach", NULL, 0, &route, &_0); @@ -344,7 +332,6 @@ PHP_METHOD(Phalcon_Mvc_Router, addConnect) ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(pattern) @@ -352,10 +339,8 @@ PHP_METHOD(Phalcon_Mvc_Router, addConnect) Z_PARAM_ZVAL_OR_NULL(paths) Z_PARAM_LONG(position) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &pattern_param, &paths, &position_param); if (UNEXPECTED(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'pattern' must be of the type string")); @@ -373,10 +358,7 @@ PHP_METHOD(Phalcon_Mvc_Router, addConnect) if (!position_param) { position = 1; } else { - position = zephir_get_intval(position_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "CONNECT"); ZVAL_LONG(&_1, position); @@ -412,7 +394,6 @@ PHP_METHOD(Phalcon_Mvc_Router, addDelete) ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(pattern) @@ -420,10 +401,8 @@ PHP_METHOD(Phalcon_Mvc_Router, addDelete) Z_PARAM_ZVAL_OR_NULL(paths) Z_PARAM_LONG(position) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &pattern_param, &paths, &position_param); if (UNEXPECTED(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'pattern' must be of the type string")); @@ -441,10 +420,7 @@ PHP_METHOD(Phalcon_Mvc_Router, addDelete) if (!position_param) { position = 1; } else { - position = zephir_get_intval(position_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "DELETE"); ZVAL_LONG(&_1, position); @@ -480,7 +456,6 @@ PHP_METHOD(Phalcon_Mvc_Router, addGet) ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(pattern) @@ -488,10 +463,8 @@ PHP_METHOD(Phalcon_Mvc_Router, addGet) Z_PARAM_ZVAL_OR_NULL(paths) Z_PARAM_LONG(position) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &pattern_param, &paths, &position_param); if (UNEXPECTED(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'pattern' must be of the type string")); @@ -509,10 +482,7 @@ PHP_METHOD(Phalcon_Mvc_Router, addGet) if (!position_param) { position = 1; } else { - position = zephir_get_intval(position_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "GET"); ZVAL_LONG(&_1, position); @@ -548,7 +518,6 @@ PHP_METHOD(Phalcon_Mvc_Router, addHead) ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(pattern) @@ -556,10 +525,8 @@ PHP_METHOD(Phalcon_Mvc_Router, addHead) Z_PARAM_ZVAL_OR_NULL(paths) Z_PARAM_LONG(position) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &pattern_param, &paths, &position_param); if (UNEXPECTED(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'pattern' must be of the type string")); @@ -577,10 +544,7 @@ PHP_METHOD(Phalcon_Mvc_Router, addHead) if (!position_param) { position = 1; } else { - position = zephir_get_intval(position_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "HEAD"); ZVAL_LONG(&_1, position); @@ -616,7 +580,6 @@ PHP_METHOD(Phalcon_Mvc_Router, addOptions) ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(pattern) @@ -624,10 +587,8 @@ PHP_METHOD(Phalcon_Mvc_Router, addOptions) Z_PARAM_ZVAL_OR_NULL(paths) Z_PARAM_LONG(position) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &pattern_param, &paths, &position_param); if (UNEXPECTED(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'pattern' must be of the type string")); @@ -645,10 +606,7 @@ PHP_METHOD(Phalcon_Mvc_Router, addOptions) if (!position_param) { position = 1; } else { - position = zephir_get_intval(position_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "OPTIONS"); ZVAL_LONG(&_1, position); @@ -684,7 +642,6 @@ PHP_METHOD(Phalcon_Mvc_Router, addPatch) ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(pattern) @@ -692,10 +649,8 @@ PHP_METHOD(Phalcon_Mvc_Router, addPatch) Z_PARAM_ZVAL_OR_NULL(paths) Z_PARAM_LONG(position) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &pattern_param, &paths, &position_param); if (UNEXPECTED(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'pattern' must be of the type string")); @@ -713,10 +668,7 @@ PHP_METHOD(Phalcon_Mvc_Router, addPatch) if (!position_param) { position = 1; } else { - position = zephir_get_intval(position_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "PATCH"); ZVAL_LONG(&_1, position); @@ -752,7 +704,6 @@ PHP_METHOD(Phalcon_Mvc_Router, addPost) ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(pattern) @@ -760,10 +711,8 @@ PHP_METHOD(Phalcon_Mvc_Router, addPost) Z_PARAM_ZVAL_OR_NULL(paths) Z_PARAM_LONG(position) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &pattern_param, &paths, &position_param); if (UNEXPECTED(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'pattern' must be of the type string")); @@ -781,10 +730,7 @@ PHP_METHOD(Phalcon_Mvc_Router, addPost) if (!position_param) { position = 1; } else { - position = zephir_get_intval(position_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "POST"); ZVAL_LONG(&_1, position); @@ -821,7 +767,6 @@ PHP_METHOD(Phalcon_Mvc_Router, addPurge) ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(pattern) @@ -829,10 +774,8 @@ PHP_METHOD(Phalcon_Mvc_Router, addPurge) Z_PARAM_ZVAL_OR_NULL(paths) Z_PARAM_LONG(position) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &pattern_param, &paths, &position_param); if (UNEXPECTED(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'pattern' must be of the type string")); @@ -850,10 +793,7 @@ PHP_METHOD(Phalcon_Mvc_Router, addPurge) if (!position_param) { position = 1; } else { - position = zephir_get_intval(position_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "PURGE"); ZVAL_LONG(&_1, position); @@ -889,7 +829,6 @@ PHP_METHOD(Phalcon_Mvc_Router, addPut) ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(pattern) @@ -897,10 +836,8 @@ PHP_METHOD(Phalcon_Mvc_Router, addPut) Z_PARAM_ZVAL_OR_NULL(paths) Z_PARAM_LONG(position) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &pattern_param, &paths, &position_param); if (UNEXPECTED(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'pattern' must be of the type string")); @@ -918,10 +855,7 @@ PHP_METHOD(Phalcon_Mvc_Router, addPut) if (!position_param) { position = 1; } else { - position = zephir_get_intval(position_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "PUT"); ZVAL_LONG(&_1, position); @@ -957,7 +891,6 @@ PHP_METHOD(Phalcon_Mvc_Router, addTrace) ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(pattern) @@ -965,10 +898,8 @@ PHP_METHOD(Phalcon_Mvc_Router, addTrace) Z_PARAM_ZVAL_OR_NULL(paths) Z_PARAM_LONG(position) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &pattern_param, &paths, &position_param); if (UNEXPECTED(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'pattern' must be of the type string")); @@ -986,10 +917,7 @@ PHP_METHOD(Phalcon_Mvc_Router, addTrace) if (!position_param) { position = 1; } else { - position = zephir_get_intval(position_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "TRACE"); ZVAL_LONG(&_1, position); @@ -1034,25 +962,18 @@ PHP_METHOD(Phalcon_Mvc_Router, attach) ZVAL_UNDEF(&_0$$4); ZVAL_UNDEF(&_2$$4); ZVAL_UNDEF(&_1$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_OBJECT_OF_CLASS(route, phalcon_mvc_router_routeinterface_ce) Z_PARAM_OPTIONAL Z_PARAM_LONG(position) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &route, &position_param); if (!position_param) { position = 1; } else { - position = zephir_get_intval(position_param); - } - - + } do { if (position == 1) { zephir_update_property_array_append(this_ptr, SL("routes"), route); @@ -1085,9 +1006,8 @@ PHP_METHOD(Phalcon_Mvc_Router, clear) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); array_init(&_0); @@ -1100,9 +1020,6 @@ PHP_METHOD(Phalcon_Mvc_Router, clear) */ PHP_METHOD(Phalcon_Mvc_Router, getEventsManager) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "eventsManager"); } @@ -1112,9 +1029,6 @@ PHP_METHOD(Phalcon_Mvc_Router, getEventsManager) */ PHP_METHOD(Phalcon_Mvc_Router, getActionName) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "action"); } @@ -1124,9 +1038,6 @@ PHP_METHOD(Phalcon_Mvc_Router, getActionName) */ PHP_METHOD(Phalcon_Mvc_Router, getControllerName) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "controller"); } @@ -1141,12 +1052,11 @@ PHP_METHOD(Phalcon_Mvc_Router, getDefaults) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_create_array(return_value, 5, 0); - ZEPHIR_OBS_VAR(&_0); + zephir_memory_observe(&_0); zephir_read_property(&_0, this_ptr, ZEND_STRL("defaultNamespace"), PH_NOISY_CC); zephir_array_update_string(return_value, SL("namespace"), &_0, PH_COPY | PH_SEPARATE); ZEPHIR_OBS_NVAR(&_0); @@ -1169,9 +1079,6 @@ PHP_METHOD(Phalcon_Mvc_Router, getDefaults) */ PHP_METHOD(Phalcon_Mvc_Router, getKeyRouteNames) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "keyRouteNames"); } @@ -1181,9 +1088,6 @@ PHP_METHOD(Phalcon_Mvc_Router, getKeyRouteNames) */ PHP_METHOD(Phalcon_Mvc_Router, getKeyRouteIds) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "keyRouteIds"); } @@ -1193,9 +1097,6 @@ PHP_METHOD(Phalcon_Mvc_Router, getKeyRouteIds) */ PHP_METHOD(Phalcon_Mvc_Router, getMatchedRoute) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "matchedRoute"); } @@ -1205,9 +1106,6 @@ PHP_METHOD(Phalcon_Mvc_Router, getMatchedRoute) */ PHP_METHOD(Phalcon_Mvc_Router, getMatches) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "matches"); } @@ -1217,9 +1115,6 @@ PHP_METHOD(Phalcon_Mvc_Router, getMatches) */ PHP_METHOD(Phalcon_Mvc_Router, getModuleName) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "module"); } @@ -1229,9 +1124,6 @@ PHP_METHOD(Phalcon_Mvc_Router, getModuleName) */ PHP_METHOD(Phalcon_Mvc_Router, getNamespaceName) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "namespaceName"); } @@ -1241,9 +1133,6 @@ PHP_METHOD(Phalcon_Mvc_Router, getNamespaceName) */ PHP_METHOD(Phalcon_Mvc_Router, getParams) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "params"); } @@ -1273,19 +1162,13 @@ PHP_METHOD(Phalcon_Mvc_Router, getRouteById) ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(id) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &id); - - - ZEPHIR_OBS_VAR(&key); + zephir_memory_observe(&key); zephir_read_property(&_0, this_ptr, ZEND_STRL("keyRouteIds"), PH_NOISY_CC | PH_READONLY); if (zephir_array_isset_fetch(&key, &_0, id, 0)) { zephir_read_property(&_1$$3, this_ptr, ZEND_STRL("routes"), PH_NOISY_CC | PH_READONLY); @@ -1366,15 +1249,11 @@ PHP_METHOD(Phalcon_Mvc_Router, getRouteByName) ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -1385,9 +1264,7 @@ PHP_METHOD(Phalcon_Mvc_Router, getRouteByName) } else { ZEPHIR_INIT_VAR(&name); } - - - ZEPHIR_OBS_VAR(&key); + zephir_memory_observe(&key); zephir_read_property(&_0, this_ptr, ZEND_STRL("keyRouteNames"), PH_NOISY_CC | PH_READONLY); if (zephir_array_isset_fetch(&key, &_0, &name, 0)) { zephir_read_property(&_1$$3, this_ptr, ZEND_STRL("routes"), PH_NOISY_CC | PH_READONLY); @@ -1453,9 +1330,6 @@ PHP_METHOD(Phalcon_Mvc_Router, getRouteByName) */ PHP_METHOD(Phalcon_Mvc_Router, getRoutes) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "routes"); } @@ -1479,9 +1353,9 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) zval _19$$25, _31$$36, _33$$39, _38$$47, _40$$50, _50$$70, _61$$81, _63$$84, _68$$92, _70$$95; zend_bool _2, _29$$31, _36$$42, _59$$76, _66$$87; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zephir_fcall_cache_entry *_12 = NULL, *_13 = NULL, *_16 = NULL, *_18 = NULL, *_21 = NULL, *_28 = NULL, *_43 = NULL, *_44 = NULL, *_47 = NULL, *_49 = NULL, *_52 = NULL, *_72 = NULL; + zephir_fcall_cache_entry *_12 = NULL, *_13 = NULL, *_16 = NULL, *_18 = NULL, *_21 = NULL, *_28 = NULL, *_43 = NULL, *_44 = NULL, *_47 = NULL, *_49 = NULL, *_52 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *uri_param = NULL, __$true, __$false, __$null, request, currentHostName, routeFound, parts, params, matches, notFoundPaths, vnamespace, module, controller, action, paramsStr, strParams, route, methods, container, hostname, regexHostName, matched, pattern, handledUri, beforeMatch, paths, converters, part, position, matchPosition, converter, eventsManager, _0, _1, _4, _6, _7, *_8, _9, _73, _74, _75, _76, _77, _3$$3, _5$$6, _10$$9, _11$$9, _14$$14, _15$$20, _17$$24, _20$$28, *_22$$30, _23$$30, _26$$32, _27$$32, _30$$36, _32$$39, _34$$43, _35$$43, _37$$47, _39$$50, _41$$54, _42$$54, _45$$59, _46$$65, _48$$69, _51$$73, *_53$$75, _54$$75, _57$$77, _58$$77, _60$$81, _62$$84, _64$$88, _65$$88, _67$$92, _69$$95, _71$$100, _78$$108, _79$$110, _80$$112; + zval *uri_param = NULL, __$true, __$false, __$null, request, currentHostName, routeFound, parts, params, matches, notFoundPaths, vnamespace, module, controller, action, paramsStr, strParams, route, methods, container, hostname, regexHostName, matched, pattern, handledUri, beforeMatch, paths, converters, part, position, matchPosition, converter, eventsManager, _0, _1, _4, _6, _7, *_8, _9, _72, _73, _74, _75, _76, _3$$3, _5$$6, _10$$9, _11$$9, _14$$14, _15$$20, _17$$24, _20$$28, *_22$$30, _23$$30, _26$$32, _27$$32, _30$$36, _32$$39, _34$$43, _35$$43, _37$$47, _39$$50, _41$$54, _42$$54, _45$$59, _46$$65, _48$$69, _51$$73, *_53$$75, _54$$75, _57$$77, _58$$77, _60$$81, _62$$84, _64$$88, _65$$88, _67$$92, _69$$95, _71$$100, _77$$108, _78$$110, _79$$112; zval uri; zval *this_ptr = getThis(); @@ -1524,11 +1398,11 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) ZVAL_UNDEF(&_6); ZVAL_UNDEF(&_7); ZVAL_UNDEF(&_9); + ZVAL_UNDEF(&_72); ZVAL_UNDEF(&_73); ZVAL_UNDEF(&_74); ZVAL_UNDEF(&_75); ZVAL_UNDEF(&_76); - ZVAL_UNDEF(&_77); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_5$$6); ZVAL_UNDEF(&_10$$9); @@ -1562,9 +1436,9 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) ZVAL_UNDEF(&_67$$92); ZVAL_UNDEF(&_69$$95); ZVAL_UNDEF(&_71$$100); - ZVAL_UNDEF(&_78$$108); - ZVAL_UNDEF(&_79$$110); - ZVAL_UNDEF(&_80$$112); + ZVAL_UNDEF(&_77$$108); + ZVAL_UNDEF(&_78$$110); + ZVAL_UNDEF(&_79$$112); ZVAL_UNDEF(&_19$$25); ZVAL_UNDEF(&_31$$36); ZVAL_UNDEF(&_33$$39); @@ -1575,15 +1449,11 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) ZVAL_UNDEF(&_63$$84); ZVAL_UNDEF(&_68$$92); ZVAL_UNDEF(&_70$$95); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(uri) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &uri_param); if (UNEXPECTED(Z_TYPE_P(uri_param) != IS_STRING && Z_TYPE_P(uri_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'uri' must be of the type string")); @@ -1594,10 +1464,8 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) } else { ZEPHIR_INIT_VAR(&uri); } - - ZVAL_LONG(&_0, 5); - ZEPHIR_CALL_FUNCTION(&_1, "parse_url", NULL, 101, &uri, &_0); + ZEPHIR_CALL_FUNCTION(&_1, "parse_url", NULL, 102, &uri, &_0); zephir_check_call_status(); zephir_get_strval(&uri, &_1); zephir_read_property(&_0, this_ptr, ZEND_STRL("removeExtraSlashes"), PH_NOISY_CC | PH_READONLY); @@ -1775,7 +1643,7 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) object_init_ex(&_26$$32, phalcon_mvc_router_exception_ce); ZEPHIR_INIT_NVAR(&_27$$32); ZEPHIR_CONCAT_SV(&_27$$32, "Wrong key in paths: ", &part); - ZEPHIR_CALL_METHOD(NULL, &_26$$32, "__construct", &_28, 32, &_27$$32); + ZEPHIR_CALL_METHOD(NULL, &_26$$32, "__construct", &_28, 33, &_27$$32); zephir_check_call_status(); zephir_throw_exception_debug(&_26$$32, "phalcon/Mvc/Router.zep", 866); ZEPHIR_MM_RESTORE(); @@ -1841,7 +1709,7 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) object_init_ex(&_34$$43, phalcon_mvc_router_exception_ce); ZEPHIR_INIT_NVAR(&_35$$43); ZEPHIR_CONCAT_SV(&_35$$43, "Wrong key in paths: ", &part); - ZEPHIR_CALL_METHOD(NULL, &_34$$43, "__construct", &_28, 32, &_35$$43); + ZEPHIR_CALL_METHOD(NULL, &_34$$43, "__construct", &_28, 33, &_35$$43); zephir_check_call_status(); zephir_throw_exception_debug(&_34$$43, "phalcon/Mvc/Router.zep", 866); ZEPHIR_MM_RESTORE(); @@ -2027,7 +1895,7 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) object_init_ex(&_57$$77, phalcon_mvc_router_exception_ce); ZEPHIR_INIT_NVAR(&_58$$77); ZEPHIR_CONCAT_SV(&_58$$77, "Wrong key in paths: ", &part); - ZEPHIR_CALL_METHOD(NULL, &_57$$77, "__construct", &_28, 32, &_58$$77); + ZEPHIR_CALL_METHOD(NULL, &_57$$77, "__construct", &_28, 33, &_58$$77); zephir_check_call_status(); zephir_throw_exception_debug(&_57$$77, "phalcon/Mvc/Router.zep", 866); ZEPHIR_MM_RESTORE(); @@ -2093,7 +1961,7 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) object_init_ex(&_64$$88, phalcon_mvc_router_exception_ce); ZEPHIR_INIT_NVAR(&_65$$88); ZEPHIR_CONCAT_SV(&_65$$88, "Wrong key in paths: ", &part); - ZEPHIR_CALL_METHOD(NULL, &_64$$88, "__construct", &_28, 32, &_65$$88); + ZEPHIR_CALL_METHOD(NULL, &_64$$88, "__construct", &_28, 33, &_65$$88); zephir_check_call_status(); zephir_throw_exception_debug(&_64$$88, "phalcon/Mvc/Router.zep", 866); ZEPHIR_MM_RESTORE(); @@ -2173,50 +2041,50 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) zephir_read_property(&_71$$100, this_ptr, ZEND_STRL("notFoundPaths"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(¬FoundPaths, &_71$$100); if (Z_TYPE_P(¬FoundPaths) != IS_NULL) { - ZEPHIR_CALL_CE_STATIC(&parts, phalcon_mvc_router_route_ce, "getroutepaths", &_72, 0, ¬FoundPaths); + ZEPHIR_CALL_CE_STATIC(&parts, phalcon_mvc_router_route_ce, "getroutepaths", NULL, 0, ¬FoundPaths); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&routeFound); ZVAL_BOOL(&routeFound, 1); } } - zephir_read_property(&_73, this_ptr, ZEND_STRL("defaultNamespace"), PH_NOISY_CC | PH_READONLY); - zephir_update_property_zval(this_ptr, ZEND_STRL("namespaceName"), &_73); - zephir_read_property(&_74, this_ptr, ZEND_STRL("defaultModule"), PH_NOISY_CC | PH_READONLY); - zephir_update_property_zval(this_ptr, ZEND_STRL("module"), &_74); - zephir_read_property(&_75, this_ptr, ZEND_STRL("defaultController"), PH_NOISY_CC | PH_READONLY); - zephir_update_property_zval(this_ptr, ZEND_STRL("controller"), &_75); - zephir_read_property(&_76, this_ptr, ZEND_STRL("defaultAction"), PH_NOISY_CC | PH_READONLY); - zephir_update_property_zval(this_ptr, ZEND_STRL("action"), &_76); - zephir_read_property(&_77, this_ptr, ZEND_STRL("defaultParams"), PH_NOISY_CC | PH_READONLY); - zephir_update_property_zval(this_ptr, ZEND_STRL("params"), &_77); + zephir_read_property(&_72, this_ptr, ZEND_STRL("defaultNamespace"), PH_NOISY_CC | PH_READONLY); + zephir_update_property_zval(this_ptr, ZEND_STRL("namespaceName"), &_72); + zephir_read_property(&_73, this_ptr, ZEND_STRL("defaultModule"), PH_NOISY_CC | PH_READONLY); + zephir_update_property_zval(this_ptr, ZEND_STRL("module"), &_73); + zephir_read_property(&_74, this_ptr, ZEND_STRL("defaultController"), PH_NOISY_CC | PH_READONLY); + zephir_update_property_zval(this_ptr, ZEND_STRL("controller"), &_74); + zephir_read_property(&_75, this_ptr, ZEND_STRL("defaultAction"), PH_NOISY_CC | PH_READONLY); + zephir_update_property_zval(this_ptr, ZEND_STRL("action"), &_75); + zephir_read_property(&_76, this_ptr, ZEND_STRL("defaultParams"), PH_NOISY_CC | PH_READONLY); + zephir_update_property_zval(this_ptr, ZEND_STRL("params"), &_76); if (zephir_is_true(&routeFound)) { - ZEPHIR_OBS_VAR(&vnamespace); + zephir_memory_observe(&vnamespace); if (zephir_array_isset_string_fetch(&vnamespace, &parts, SL("namespace"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("namespaceName"), &vnamespace); zephir_array_unset_string(&parts, SL("namespace"), PH_SEPARATE); } - ZEPHIR_OBS_VAR(&module); + zephir_memory_observe(&module); if (zephir_array_isset_string_fetch(&module, &parts, SL("module"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("module"), &module); zephir_array_unset_string(&parts, SL("module"), PH_SEPARATE); } - ZEPHIR_OBS_VAR(&controller); + zephir_memory_observe(&controller); if (zephir_array_isset_string_fetch(&controller, &parts, SL("controller"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("controller"), &controller); zephir_array_unset_string(&parts, SL("controller"), PH_SEPARATE); } - ZEPHIR_OBS_VAR(&action); + zephir_memory_observe(&action); if (zephir_array_isset_string_fetch(&action, &parts, SL("action"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("action"), &action); zephir_array_unset_string(&parts, SL("action"), PH_SEPARATE); } - ZEPHIR_OBS_VAR(¶msStr); + zephir_memory_observe(¶msStr); if (zephir_array_isset_string_fetch(¶msStr, &parts, SL("params"), 0)) { if (Z_TYPE_P(¶msStr) == IS_STRING) { - ZEPHIR_INIT_VAR(&_78$$108); - ZVAL_STRING(&_78$$108, "/"); + ZEPHIR_INIT_VAR(&_77$$108); + ZVAL_STRING(&_77$$108, "/"); ZEPHIR_INIT_VAR(&strParams); - zephir_fast_trim(&strParams, ¶msStr, &_78$$108, ZEPHIR_TRIM_BOTH); + zephir_fast_trim(&strParams, ¶msStr, &_77$$108, ZEPHIR_TRIM_BOTH); if (!ZEPHIR_IS_STRING_IDENTICAL(&strParams, "")) { ZEPHIR_INIT_NVAR(¶ms); zephir_fast_explode_str(¶ms, SL("/"), &strParams, LONG_MAX); @@ -2225,17 +2093,17 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) zephir_array_unset_string(&parts, SL("params"), PH_SEPARATE); } if (zephir_fast_count_int(¶ms)) { - ZEPHIR_INIT_VAR(&_79$$110); - zephir_fast_array_merge(&_79$$110, ¶ms, &parts); - zephir_update_property_zval(this_ptr, ZEND_STRL("params"), &_79$$110); + ZEPHIR_INIT_VAR(&_78$$110); + zephir_fast_array_merge(&_78$$110, ¶ms, &parts); + zephir_update_property_zval(this_ptr, ZEND_STRL("params"), &_78$$110); } else { zephir_update_property_zval(this_ptr, ZEND_STRL("params"), &parts); } } if (Z_TYPE_P(&eventsManager) == IS_OBJECT) { - ZEPHIR_INIT_VAR(&_80$$112); - ZVAL_STRING(&_80$$112, "router:afterCheckRoutes"); - ZEPHIR_CALL_METHOD(NULL, &eventsManager, "fire", NULL, 0, &_80$$112, this_ptr); + ZEPHIR_INIT_VAR(&_79$$112); + ZVAL_STRING(&_79$$112, "router:afterCheckRoutes"); + ZEPHIR_CALL_METHOD(NULL, &eventsManager, "fire", NULL, 0, &_79$$112, this_ptr); zephir_check_call_status(); } ZEPHIR_MM_RESTORE(); @@ -2246,9 +2114,6 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) */ PHP_METHOD(Phalcon_Mvc_Router, isExactControllerName) { - zval *this_ptr = getThis(); - - RETURN_BOOL(1); } @@ -2279,18 +2144,12 @@ PHP_METHOD(Phalcon_Mvc_Router, mount) ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_3$$5); ZVAL_UNDEF(&_5$$8); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(group, phalcon_mvc_router_groupinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &group); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("eventsManager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&eventsManager, &_0); if (Z_TYPE_P(&eventsManager) == IS_OBJECT) { @@ -2390,17 +2249,10 @@ PHP_METHOD(Phalcon_Mvc_Router, notFound) zval *this_ptr = getThis(); ZVAL_UNDEF(&paths_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(paths) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &paths); - - _0 = Z_TYPE_P(paths) != IS_ARRAY; if (_0) { _0 = Z_TYPE_P(paths) != IS_STRING; @@ -2428,22 +2280,15 @@ PHP_METHOD(Phalcon_Mvc_Router, removeExtraSlashes) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(remove) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &remove_param); if (UNEXPECTED(Z_TYPE_P(remove_param) != IS_TRUE && Z_TYPE_P(remove_param) != IS_FALSE)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'remove' must be of the type bool")); RETURN_NULL(); } remove = (Z_TYPE_P(remove_param) == IS_TRUE); - - if (remove) { zephir_update_property_zval(this_ptr, ZEND_STRL("removeExtraSlashes"), &__$true); } else { @@ -2467,15 +2312,11 @@ PHP_METHOD(Phalcon_Mvc_Router, setDefaultAction) zval *this_ptr = getThis(); ZVAL_UNDEF(&actionName); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(actionName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &actionName_param); if (UNEXPECTED(Z_TYPE_P(actionName_param) != IS_STRING && Z_TYPE_P(actionName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'actionName' must be of the type string")); @@ -2486,8 +2327,6 @@ PHP_METHOD(Phalcon_Mvc_Router, setDefaultAction) } else { ZEPHIR_INIT_VAR(&actionName); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("defaultAction"), &actionName); RETURN_THIS(); } @@ -2507,15 +2346,11 @@ PHP_METHOD(Phalcon_Mvc_Router, setDefaultController) zval *this_ptr = getThis(); ZVAL_UNDEF(&controllerName); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(controllerName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &controllerName_param); if (UNEXPECTED(Z_TYPE_P(controllerName_param) != IS_STRING && Z_TYPE_P(controllerName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'controllerName' must be of the type string")); @@ -2526,8 +2361,6 @@ PHP_METHOD(Phalcon_Mvc_Router, setDefaultController) } else { ZEPHIR_INIT_VAR(&controllerName); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("defaultController"), &controllerName); RETURN_THIS(); } @@ -2547,15 +2380,11 @@ PHP_METHOD(Phalcon_Mvc_Router, setDefaultModule) zval *this_ptr = getThis(); ZVAL_UNDEF(&moduleName); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(moduleName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &moduleName_param); if (UNEXPECTED(Z_TYPE_P(moduleName_param) != IS_STRING && Z_TYPE_P(moduleName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'moduleName' must be of the type string")); @@ -2566,8 +2395,6 @@ PHP_METHOD(Phalcon_Mvc_Router, setDefaultModule) } else { ZEPHIR_INIT_VAR(&moduleName); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("defaultModule"), &moduleName); RETURN_THIS(); } @@ -2587,15 +2414,11 @@ PHP_METHOD(Phalcon_Mvc_Router, setDefaultNamespace) zval *this_ptr = getThis(); ZVAL_UNDEF(&namespaceName); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(namespaceName) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &namespaceName_param); if (UNEXPECTED(Z_TYPE_P(namespaceName_param) != IS_STRING && Z_TYPE_P(namespaceName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'namespaceName' must be of the type string")); @@ -2606,8 +2429,6 @@ PHP_METHOD(Phalcon_Mvc_Router, setDefaultNamespace) } else { ZEPHIR_INIT_VAR(&namespaceName); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("defaultNamespace"), &namespaceName); RETURN_THIS(); } @@ -2645,33 +2466,32 @@ PHP_METHOD(Phalcon_Mvc_Router, setDefaults) ZVAL_UNDEF(&action); ZVAL_UNDEF(¶ms); ZVAL_UNDEF(&_0$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(defaults) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &defaults_param); ZEPHIR_OBS_COPY_OR_DUP(&defaults, defaults_param); - - - if (zephir_array_isset_string_fetch(&namespaceName, &defaults, SL("namespace"), 1)) { + zephir_memory_observe(&namespaceName); + if (zephir_array_isset_string_fetch(&namespaceName, &defaults, SL("namespace"), 0)) { zephir_cast_to_string(&_0$$3, &namespaceName); zephir_update_property_zval(this_ptr, ZEND_STRL("defaultNamespace"), &_0$$3); } - if (zephir_array_isset_string_fetch(&module, &defaults, SL("module"), 1)) { + zephir_memory_observe(&module); + if (zephir_array_isset_string_fetch(&module, &defaults, SL("module"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("defaultModule"), &module); } - if (zephir_array_isset_string_fetch(&controller, &defaults, SL("controller"), 1)) { + zephir_memory_observe(&controller); + if (zephir_array_isset_string_fetch(&controller, &defaults, SL("controller"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("defaultController"), &controller); } - if (zephir_array_isset_string_fetch(&action, &defaults, SL("action"), 1)) { + zephir_memory_observe(&action); + if (zephir_array_isset_string_fetch(&action, &defaults, SL("action"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("defaultAction"), &action); } - if (zephir_array_isset_string_fetch(¶ms, &defaults, SL("params"), 1)) { + zephir_memory_observe(¶ms); + if (zephir_array_isset_string_fetch(¶ms, &defaults, SL("params"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("defaultParams"), ¶ms); } RETURN_THIS(); @@ -2690,17 +2510,10 @@ PHP_METHOD(Phalcon_Mvc_Router, setEventsManager) zval *this_ptr = getThis(); ZVAL_UNDEF(&eventsManager_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(eventsManager, phalcon_events_managerinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &eventsManager); - - zephir_update_property_zval(this_ptr, ZEND_STRL("eventsManager"), eventsManager); } @@ -2717,19 +2530,13 @@ PHP_METHOD(Phalcon_Mvc_Router, setKeyRouteNames) zval *this_ptr = getThis(); ZVAL_UNDEF(&routeNames); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(routeNames) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &routeNames_param); zephir_get_arrval(&routeNames, routeNames_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("keyRouteNames"), &routeNames); RETURN_THIS(); } @@ -2747,19 +2554,13 @@ PHP_METHOD(Phalcon_Mvc_Router, setKeyRouteIds) zval *this_ptr = getThis(); ZVAL_UNDEF(&routeIds); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(routeIds) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &routeIds_param); zephir_get_arrval(&routeIds, routeIds_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("keyRouteIds"), &routeIds); RETURN_THIS(); } @@ -2771,9 +2572,6 @@ PHP_METHOD(Phalcon_Mvc_Router, setKeyRouteIds) */ PHP_METHOD(Phalcon_Mvc_Router, wasMatched) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "wasMatched"); } @@ -2796,7 +2594,8 @@ zend_object *zephir_init_properties_Phalcon_Mvc_Router(zend_class_entry *class_t ZVAL_UNDEF(&_11$$8); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/mvc/router/annotations.zep.c b/ext/phalcon/mvc/router/annotations.zep.c index 065bb0398bd..02f88e5ca32 100644 --- a/ext/phalcon/mvc/router/annotations.zep.c +++ b/ext/phalcon/mvc/router/annotations.zep.c @@ -99,7 +99,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, addModuleResource) ZVAL_UNDEF(&handler); ZVAL_UNDEF(&prefix); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(module) @@ -107,10 +106,8 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, addModuleResource) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(prefix) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &module_param, &handler_param, &prefix_param); if (UNEXPECTED(Z_TYPE_P(module_param) != IS_STRING && Z_TYPE_P(module_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'module' must be of the type string")); @@ -143,8 +140,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, addModuleResource) ZEPHIR_INIT_VAR(&prefix); } } - - ZEPHIR_INIT_VAR(&_0); zephir_create_array(&_0, 3, 0); zephir_array_fast_append(&_0, &prefix); @@ -169,17 +164,14 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, addResource) ZVAL_UNDEF(&handler); ZVAL_UNDEF(&prefix); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(handler) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(prefix) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &handler_param, &prefix_param); if (UNEXPECTED(Z_TYPE_P(handler_param) != IS_STRING && Z_TYPE_P(handler_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'handler' must be of the type string")); @@ -203,8 +195,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, addResource) ZEPHIR_INIT_VAR(&prefix); } } - - ZEPHIR_INIT_VAR(&_0); zephir_create_array(&_0, 2, 0); zephir_array_fast_append(&_0, &prefix); @@ -218,9 +208,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, addResource) */ PHP_METHOD(Phalcon_Mvc_Router_Annotations, getResources) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "handlers"); } @@ -233,7 +220,7 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, handle) zend_string *_20$$18, *_41$$41; zend_ulong _19$$18, _40$$41; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zephir_fcall_cache_entry *_4 = NULL, *_6 = NULL, *_13 = NULL, *_16 = NULL, *_24 = NULL, *_35 = NULL, *_48 = NULL; + zephir_fcall_cache_entry *_4 = NULL, *_6 = NULL, *_13 = NULL, *_16 = NULL, *_24 = NULL, *_35 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *uri_param = NULL, __$null, annotationsService, handlers, controllerSuffix, scope, prefix, route, compiledPattern, container, handler, controllerName, lowerControllerName, namespaceName, moduleName, handlerAnnotations, classAnnotations, annotations, annotation, methodAnnotations, method, collection, _0, _1, *_2, _3, _5$$6, _7$$6, _8$$6, _9$$7, _10$$7, _11$$4, _12$$12, *_14$$15, _15$$15, *_17$$18, _18$$18, _21$$19, *_22$$19, _23$$19, _25$$23, *_26$$23, _27$$23, _28$$29, _29$$29, _30$$29, _31$$30, _32$$30, _33$$27, _34$$35, *_36$$38, _37$$38, *_38$$41, _39$$41, _42$$42, *_43$$42, _44$$42, _45$$46, *_46$$46, _47$$46; zval uri, sufixed; @@ -291,15 +278,11 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, handle) ZVAL_UNDEF(&_44$$42); ZVAL_UNDEF(&_45$$46); ZVAL_UNDEF(&_47$$46); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(uri) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &uri_param); if (UNEXPECTED(Z_TYPE_P(uri_param) != IS_STRING && Z_TYPE_P(uri_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'uri' must be of the type string")); @@ -310,8 +293,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, handle) } else { ZEPHIR_INIT_VAR(&uri); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("container"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&container, &_0); if (UNEXPECTED(Z_TYPE_P(&container) != IS_OBJECT)) { @@ -340,9 +321,9 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, handle) if (!(ZEPHIR_IS_EMPTY(&prefix))) { ZEPHIR_INIT_NVAR(&route); object_init_ex(&route, phalcon_mvc_router_route_ce); - ZEPHIR_CALL_METHOD(NULL, &route, "__construct", &_4, 100, &prefix); + ZEPHIR_CALL_METHOD(NULL, &route, "__construct", &_4, 101, &prefix); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_5$$6, &route, "getcompiledpattern", &_6, 485); + ZEPHIR_CALL_METHOD(&_5$$6, &route, "getcompiledpattern", &_6, 486); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_7$$6); ZVAL_STRING(&_7$$6, "$#"); @@ -436,7 +417,7 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, handle) zephir_check_call_status(); if (Z_TYPE_P(&methodAnnotations) == IS_ARRAY) { ZEPHIR_INIT_NVAR(&lowerControllerName); - zephir_uncamelize(&lowerControllerName, &controllerName, NULL ); + zephir_uncamelize(&lowerControllerName, &controllerName, NULL ); zephir_is_iterable(&methodAnnotations, 0, "phalcon/Mvc/Router/Annotations.zep", 244); if (Z_TYPE_P(&methodAnnotations) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&methodAnnotations), _19$$18, _20$$18, _17$$18) @@ -554,9 +535,9 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, handle) if (!(ZEPHIR_IS_EMPTY(&prefix))) { ZEPHIR_INIT_NVAR(&route); object_init_ex(&route, phalcon_mvc_router_route_ce); - ZEPHIR_CALL_METHOD(NULL, &route, "__construct", &_4, 100, &prefix); + ZEPHIR_CALL_METHOD(NULL, &route, "__construct", &_4, 101, &prefix); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_28$$29, &route, "getcompiledpattern", &_6, 485); + ZEPHIR_CALL_METHOD(&_28$$29, &route, "getcompiledpattern", &_6, 486); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_29$$29); ZVAL_STRING(&_29$$29, "$#"); @@ -650,7 +631,7 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, handle) zephir_check_call_status(); if (Z_TYPE_P(&methodAnnotations) == IS_ARRAY) { ZEPHIR_INIT_NVAR(&lowerControllerName); - zephir_uncamelize(&lowerControllerName, &controllerName, NULL ); + zephir_uncamelize(&lowerControllerName, &controllerName, NULL ); zephir_is_iterable(&methodAnnotations, 0, "phalcon/Mvc/Router/Annotations.zep", 244); if (Z_TYPE_P(&methodAnnotations) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&methodAnnotations), _40$$41, _41$$41, _38$$41) @@ -753,7 +734,7 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, handle) } } ZEPHIR_INIT_NVAR(&scope); - ZEPHIR_CALL_PARENT(NULL, phalcon_mvc_router_annotations_ce, getThis(), "handle", &_48, 0, &uri); + ZEPHIR_CALL_PARENT(NULL, phalcon_mvc_router_annotations_ce, getThis(), "handle", NULL, 0, &uri); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -803,8 +784,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, processActionAnnotation) ZVAL_UNDEF(&_7$$16); ZVAL_UNDEF(&_10$$18); ZVAL_UNDEF(&_16$$21); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(5, 5) Z_PARAM_STR(module) Z_PARAM_STR(namespaceName) @@ -812,10 +791,8 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, processActionAnnotation) Z_PARAM_STR(action) Z_PARAM_OBJECT_OF_CLASS(annotation, phalcon_annotations_annotation_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 5, 0, &module_param, &namespaceName_param, &controller_param, &action_param, &annotation); if (UNEXPECTED(Z_TYPE_P(module_param) != IS_STRING && Z_TYPE_P(module_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'module' must be of the type string")); @@ -853,8 +830,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, processActionAnnotation) } else { ZEPHIR_INIT_VAR(&action); } - - isRoute = 0; ZEPHIR_INIT_VAR(&methods); ZVAL_NULL(&methods); @@ -886,7 +861,7 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, processActionAnnotation) zephir_read_property(&_2, this_ptr, ZEND_STRL("actionPreformatCallback"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_2) != IS_NULL) { zephir_read_property(&_3$$6, this_ptr, ZEND_STRL("actionPreformatCallback"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&_4$$6, "call_user_func", NULL, 187, &_3$$6, &proxyActionName); + ZEPHIR_CALL_FUNCTION(&_4$$6, "call_user_func", NULL, 188, &_3$$6, &proxyActionName); zephir_check_call_status(); ZEPHIR_CPY_WRT(&proxyActionName, &_4$$6); } @@ -1065,16 +1040,12 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, processControllerAnnotation) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(handler) Z_PARAM_OBJECT_OF_CLASS(annotation, phalcon_annotations_annotation_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &handler_param, &annotation); if (UNEXPECTED(Z_TYPE_P(handler_param) != IS_STRING && Z_TYPE_P(handler_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'handler' must be of the type string")); @@ -1085,8 +1056,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, processControllerAnnotation) } else { ZEPHIR_INIT_VAR(&handler); } - - ZEPHIR_CALL_METHOD(&_0, annotation, "getname", NULL, 0); zephir_check_call_status(); if (ZEPHIR_IS_STRING(&_0, "RoutePrefix")) { @@ -1109,15 +1078,11 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, setActionSuffix) zval *this_ptr = getThis(); ZVAL_UNDEF(&actionSuffix); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(actionSuffix) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &actionSuffix_param); if (UNEXPECTED(Z_TYPE_P(actionSuffix_param) != IS_STRING && Z_TYPE_P(actionSuffix_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'actionSuffix' must be of the type string")); @@ -1128,8 +1093,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, setActionSuffix) } else { ZEPHIR_INIT_VAR(&actionSuffix); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("actionSuffix"), &actionSuffix); ZEPHIR_MM_RESTORE(); } @@ -1172,23 +1135,18 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, setActionPreformatCallback) ZVAL_UNDEF(&callback_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0$$4); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(callback) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &callback); if (!callback) { callback = &callback_sub; callback = &__$null; } - - if (EXPECTED(zephir_is_callable(callback))) { zephir_update_property_zval(this_ptr, ZEND_STRL("actionPreformatCallback"), callback); } else if (Z_TYPE_P(callback) == IS_NULL) { @@ -1208,9 +1166,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, setActionPreformatCallback) */ PHP_METHOD(Phalcon_Mvc_Router_Annotations, getActionPreformatCallback) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "actionPreformatCallback"); } @@ -1226,15 +1181,11 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, setControllerSuffix) zval *this_ptr = getThis(); ZVAL_UNDEF(&controllerSuffix); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(controllerSuffix) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &controllerSuffix_param); if (UNEXPECTED(Z_TYPE_P(controllerSuffix_param) != IS_STRING && Z_TYPE_P(controllerSuffix_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'controllerSuffix' must be of the type string")); @@ -1245,8 +1196,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, setControllerSuffix) } else { ZEPHIR_INIT_VAR(&controllerSuffix); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("controllerSuffix"), &controllerSuffix); ZEPHIR_MM_RESTORE(); } @@ -1271,7 +1220,8 @@ zend_object *zephir_init_properties_Phalcon_Mvc_Router_Annotations(zend_class_en ZVAL_UNDEF(&_13$$9); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/mvc/router/annotations.zep.h b/ext/phalcon/mvc/router/annotations.zep.h index e761e6d0762..c79123b8f99 100644 --- a/ext/phalcon/mvc/router/annotations.zep.h +++ b/ext/phalcon/mvc/router/annotations.zep.h @@ -75,11 +75,7 @@ ZEPHIR_INIT_FUNCS(phalcon_mvc_router_annotations_method_entry) { PHP_ME(Phalcon_Mvc_Router_Annotations, processControllerAnnotation, arginfo_phalcon_mvc_router_annotations_processcontrollerannotation, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Router_Annotations, setActionSuffix, arginfo_phalcon_mvc_router_annotations_setactionsuffix, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Router_Annotations, setActionPreformatCallback, arginfo_phalcon_mvc_router_annotations_setactionpreformatcallback, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Mvc_Router_Annotations, getActionPreformatCallback, arginfo_phalcon_mvc_router_annotations_getactionpreformatcallback, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Mvc_Router_Annotations, getActionPreformatCallback, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Mvc_Router_Annotations, getActionPreformatCallback, arginfo_phalcon_mvc_router_annotations_getactionpreformatcallback, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Router_Annotations, setControllerSuffix, arginfo_phalcon_mvc_router_annotations_setcontrollersuffix, ZEND_ACC_PUBLIC) PHP_FE_END }; diff --git a/ext/phalcon/mvc/router/group.zep.c b/ext/phalcon/mvc/router/group.zep.c index ea0158c28f2..62f0499531d 100644 --- a/ext/phalcon/mvc/router/group.zep.c +++ b/ext/phalcon/mvc/router/group.zep.c @@ -123,23 +123,18 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, __construct) ZVAL_UNDEF(&paths_sub); ZVAL_NULL(&__$null); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(paths) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &paths); if (!paths) { paths = &paths_sub; paths = &__$null; } - - _0 = Z_TYPE_P(paths) == IS_ARRAY; if (!(_0)) { _0 = Z_TYPE_P(paths) == IS_STRING; @@ -184,7 +179,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, add) ZVAL_UNDEF(&paths_sub); ZVAL_UNDEF(&httpMethods_sub); ZVAL_NULL(&__$null); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(pattern) @@ -192,10 +186,8 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, add) Z_PARAM_ZVAL_OR_NULL(paths) Z_PARAM_ZVAL_OR_NULL(httpMethods) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &pattern_param, &paths, &httpMethods); if (UNEXPECTED(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'pattern' must be of the type string")); @@ -214,8 +206,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, add) httpMethods = &httpMethods_sub; httpMethods = &__$null; } - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "addroute", NULL, 0, &pattern, paths, httpMethods); zephir_check_call_status(); RETURN_MM(); @@ -246,17 +236,14 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, addConnect) ZVAL_UNDEF(&paths_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(pattern) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(paths) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &pattern_param, &paths); if (UNEXPECTED(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'pattern' must be of the type string")); @@ -271,8 +258,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, addConnect) paths = &paths_sub; paths = &__$null; } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "CONNECT"); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "addroute", NULL, 0, &pattern, paths, &_0); @@ -305,17 +290,14 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, addDelete) ZVAL_UNDEF(&paths_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(pattern) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(paths) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &pattern_param, &paths); if (UNEXPECTED(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'pattern' must be of the type string")); @@ -330,8 +312,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, addDelete) paths = &paths_sub; paths = &__$null; } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "DELETE"); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "addroute", NULL, 0, &pattern, paths, &_0); @@ -364,17 +344,14 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, addGet) ZVAL_UNDEF(&paths_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(pattern) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(paths) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &pattern_param, &paths); if (UNEXPECTED(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'pattern' must be of the type string")); @@ -389,8 +366,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, addGet) paths = &paths_sub; paths = &__$null; } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "GET"); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "addroute", NULL, 0, &pattern, paths, &_0); @@ -423,17 +398,14 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, addHead) ZVAL_UNDEF(&paths_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(pattern) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(paths) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &pattern_param, &paths); if (UNEXPECTED(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'pattern' must be of the type string")); @@ -448,8 +420,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, addHead) paths = &paths_sub; paths = &__$null; } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "HEAD"); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "addroute", NULL, 0, &pattern, paths, &_0); @@ -482,17 +452,14 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, addOptions) ZVAL_UNDEF(&paths_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(pattern) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(paths) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &pattern_param, &paths); if (UNEXPECTED(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'pattern' must be of the type string")); @@ -507,8 +474,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, addOptions) paths = &paths_sub; paths = &__$null; } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "OPTIONS"); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "addroute", NULL, 0, &pattern, paths, &_0); @@ -541,17 +506,14 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, addPatch) ZVAL_UNDEF(&paths_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(pattern) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(paths) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &pattern_param, &paths); if (UNEXPECTED(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'pattern' must be of the type string")); @@ -566,8 +528,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, addPatch) paths = &paths_sub; paths = &__$null; } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "PATCH"); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "addroute", NULL, 0, &pattern, paths, &_0); @@ -600,17 +560,14 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, addPost) ZVAL_UNDEF(&paths_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(pattern) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(paths) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &pattern_param, &paths); if (UNEXPECTED(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'pattern' must be of the type string")); @@ -625,8 +582,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, addPost) paths = &paths_sub; paths = &__$null; } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "POST"); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "addroute", NULL, 0, &pattern, paths, &_0); @@ -659,17 +614,14 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, addPurge) ZVAL_UNDEF(&paths_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(pattern) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(paths) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &pattern_param, &paths); if (UNEXPECTED(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'pattern' must be of the type string")); @@ -684,8 +636,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, addPurge) paths = &paths_sub; paths = &__$null; } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "PURGE"); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "addroute", NULL, 0, &pattern, paths, &_0); @@ -718,17 +668,14 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, addPut) ZVAL_UNDEF(&paths_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(pattern) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(paths) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &pattern_param, &paths); if (UNEXPECTED(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'pattern' must be of the type string")); @@ -743,8 +690,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, addPut) paths = &paths_sub; paths = &__$null; } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "PUT"); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "addroute", NULL, 0, &pattern, paths, &_0); @@ -777,17 +722,14 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, addTrace) ZVAL_UNDEF(&paths_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(pattern) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(paths) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &pattern_param, &paths); if (UNEXPECTED(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'pattern' must be of the type string")); @@ -802,8 +744,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, addTrace) paths = &paths_sub; paths = &__$null; } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "TRACE"); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "addroute", NULL, 0, &pattern, paths, &_0); @@ -826,17 +766,10 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, beforeMatch) zval *this_ptr = getThis(); ZVAL_UNDEF(&beforeMatch_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(beforeMatch) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &beforeMatch); - - zephir_update_property_zval(this_ptr, ZEND_STRL("beforeMatch"), beforeMatch); RETURN_THISW(); } @@ -851,9 +784,8 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, clear) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); array_init(&_0); @@ -866,9 +798,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, clear) */ PHP_METHOD(Phalcon_Mvc_Router_Group, getBeforeMatch) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "beforeMatch"); } @@ -878,9 +807,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, getBeforeMatch) */ PHP_METHOD(Phalcon_Mvc_Router_Group, getHostname) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "hostname"); } @@ -890,9 +816,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, getHostname) */ PHP_METHOD(Phalcon_Mvc_Router_Group, getPaths) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "paths"); } @@ -902,9 +825,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, getPaths) */ PHP_METHOD(Phalcon_Mvc_Router_Group, getPrefix) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "prefix"); } @@ -914,9 +834,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, getPrefix) */ PHP_METHOD(Phalcon_Mvc_Router_Group, getRoutes) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "routes"); } @@ -936,19 +853,13 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, setHostname) zval *this_ptr = getThis(); ZVAL_UNDEF(&hostname); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(hostname) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &hostname_param); zephir_get_strval(&hostname, hostname_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("hostname"), &hostname); RETURN_THIS(); } @@ -966,17 +877,10 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, setPaths) zval *this_ptr = getThis(); ZVAL_UNDEF(&paths_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(paths) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &paths); - - zephir_update_property_zval(this_ptr, ZEND_STRL("paths"), paths); RETURN_THISW(); } @@ -996,19 +900,13 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, setPrefix) zval *this_ptr = getThis(); ZVAL_UNDEF(&prefix); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(prefix) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &prefix_param); zephir_get_strval(&prefix, prefix_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("prefix"), &prefix); RETURN_THIS(); } @@ -1031,8 +929,7 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, addRoute) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; - zval *pattern_param = NULL, *paths = NULL, paths_sub, *httpMethods = NULL, httpMethods_sub, __$null, mergedPaths, route, defaultPaths, processedPaths, _1, _2; + zval *pattern_param = NULL, *paths = NULL, paths_sub, *httpMethods = NULL, httpMethods_sub, __$null, mergedPaths, route, defaultPaths, processedPaths, _0, _1; zval pattern; zval *this_ptr = getThis(); @@ -1044,9 +941,8 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, addRoute) ZVAL_UNDEF(&route); ZVAL_UNDEF(&defaultPaths); ZVAL_UNDEF(&processedPaths); + ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(pattern) @@ -1054,10 +950,8 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, addRoute) Z_PARAM_ZVAL_OR_NULL(paths) Z_PARAM_ZVAL_OR_NULL(httpMethods) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &pattern_param, &paths, &httpMethods); if (UNEXPECTED(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'pattern' must be of the type string")); @@ -1076,13 +970,11 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, addRoute) httpMethods = &httpMethods_sub; httpMethods = &__$null; } - - - ZEPHIR_OBS_VAR(&defaultPaths); + zephir_memory_observe(&defaultPaths); zephir_read_property(&defaultPaths, this_ptr, ZEND_STRL("paths"), PH_NOISY_CC); if (Z_TYPE_P(&defaultPaths) == IS_ARRAY) { if (Z_TYPE_P(paths) == IS_STRING) { - ZEPHIR_CALL_CE_STATIC(&processedPaths, phalcon_mvc_router_route_ce, "getroutepaths", &_0, 0, paths); + ZEPHIR_CALL_CE_STATIC(&processedPaths, phalcon_mvc_router_route_ce, "getroutepaths", NULL, 0, paths); zephir_check_call_status(); } else { ZEPHIR_CPY_WRT(&processedPaths, paths); @@ -1098,13 +990,13 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, addRoute) } ZEPHIR_INIT_VAR(&route); object_init_ex(&route, phalcon_mvc_router_route_ce); - zephir_read_property(&_1, this_ptr, ZEND_STRL("prefix"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_INIT_VAR(&_2); - ZEPHIR_CONCAT_VV(&_2, &_1, &pattern); - ZEPHIR_CALL_METHOD(NULL, &route, "__construct", NULL, 100, &_2, &mergedPaths, httpMethods); + zephir_read_property(&_0, this_ptr, ZEND_STRL("prefix"), PH_NOISY_CC | PH_READONLY); + ZEPHIR_INIT_VAR(&_1); + ZEPHIR_CONCAT_VV(&_1, &_0, &pattern); + ZEPHIR_CALL_METHOD(NULL, &route, "__construct", NULL, 101, &_1, &mergedPaths, httpMethods); zephir_check_call_status(); zephir_update_property_array_append(this_ptr, SL("routes"), &route); - ZEPHIR_CALL_METHOD(NULL, &route, "setgroup", NULL, 486, this_ptr); + ZEPHIR_CALL_METHOD(NULL, &route, "setgroup", NULL, 487, this_ptr); zephir_check_call_status(); RETURN_CCTOR(&route); } @@ -1117,7 +1009,8 @@ zend_object *zephir_init_properties_Phalcon_Mvc_Router_Group(zend_class_entry *c ZVAL_UNDEF(&_1$$3); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/mvc/router/group.zep.h b/ext/phalcon/mvc/router/group.zep.h index e227225f7d9..e0381296e2a 100644 --- a/ext/phalcon/mvc/router/group.zep.h +++ b/ext/phalcon/mvc/router/group.zep.h @@ -146,17 +146,9 @@ ZEPHIR_INIT_FUNCS(phalcon_mvc_router_group_method_entry) { PHP_ME(Phalcon_Mvc_Router_Group, addTrace, arginfo_phalcon_mvc_router_group_addtrace, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Router_Group, beforeMatch, arginfo_phalcon_mvc_router_group_beforematch, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Router_Group, clear, arginfo_phalcon_mvc_router_group_clear, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Mvc_Router_Group, getBeforeMatch, arginfo_phalcon_mvc_router_group_getbeforematch, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Mvc_Router_Group, getBeforeMatch, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Mvc_Router_Group, getBeforeMatch, arginfo_phalcon_mvc_router_group_getbeforematch, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Router_Group, getHostname, arginfo_phalcon_mvc_router_group_gethostname, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Mvc_Router_Group, getPaths, arginfo_phalcon_mvc_router_group_getpaths, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Mvc_Router_Group, getPaths, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Mvc_Router_Group, getPaths, arginfo_phalcon_mvc_router_group_getpaths, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Router_Group, getPrefix, arginfo_phalcon_mvc_router_group_getprefix, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Router_Group, getRoutes, arginfo_phalcon_mvc_router_group_getroutes, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Router_Group, setHostname, arginfo_phalcon_mvc_router_group_sethostname, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/mvc/router/route.zep.c b/ext/phalcon/mvc/router/route.zep.c index ff891df3584..5c7ec225bc8 100644 --- a/ext/phalcon/mvc/router/route.zep.c +++ b/ext/phalcon/mvc/router/route.zep.c @@ -113,7 +113,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, __construct) ZVAL_UNDEF(&routeId); ZVAL_UNDEF(&uniqueId); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(pattern) @@ -121,10 +120,8 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, __construct) Z_PARAM_ZVAL_OR_NULL(paths) Z_PARAM_ZVAL_OR_NULL(httpMethods) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &pattern_param, &paths, &httpMethods); if (UNEXPECTED(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'pattern' must be of the type string")); @@ -143,19 +140,17 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, __construct) httpMethods = &httpMethods_sub; httpMethods = &__$null; } - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "reconfigure", NULL, 0, &pattern, paths); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, this_ptr, "via", NULL, 0, httpMethods); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&_0); + zephir_memory_observe(&_0); zephir_read_static_property_ce(&_0, phalcon_mvc_router_route_ce, SL("uniqueId"), PH_NOISY_CC); ZEPHIR_CPY_WRT(&uniqueId, &_0); ZEPHIR_CPY_WRT(&routeId, &uniqueId); zephir_cast_to_string(&_1, &routeId); zephir_update_property_zval(this_ptr, ZEND_STRL("id"), &_1); - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, (zephir_get_numberval(&uniqueId) + 1)); zephir_update_static_property_ce(phalcon_mvc_router_route_ce, ZEND_STRL("uniqueId"), &_0); ZEPHIR_MM_RESTORE(); @@ -191,17 +186,10 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, beforeMatch) zval *this_ptr = getThis(); ZVAL_UNDEF(&callback_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(callback) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &callback); - - zephir_update_property_zval(this_ptr, ZEND_STRL("beforeMatch"), callback); RETURN_THISW(); } @@ -215,7 +203,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, compilePattern) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *pattern_param = NULL, _0$$4, _1$$4, _2$$5, _3$$5, _4$$6, _5$$6, _6$$7, _7$$7, _8$$8, _9$$8, _10$$8, _11$$9, _12$$9, _13$$9; zval pattern, idPattern; - zval *this_ptr = getThis(); ZVAL_UNDEF(&pattern); ZVAL_UNDEF(&idPattern); @@ -233,15 +220,11 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, compilePattern) ZVAL_UNDEF(&_11$$9); ZVAL_UNDEF(&_12$$9); ZVAL_UNDEF(&_13$$9); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(pattern) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &pattern_param); if (UNEXPECTED(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'pattern' must be of the type string")); @@ -252,8 +235,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, compilePattern) } else { ZEPHIR_INIT_VAR(&pattern); } - - if (zephir_memnstr_str(&pattern, SL(":"), "phalcon/Mvc/Router/Route.zep", 141)) { ZEPHIR_INIT_VAR(&idPattern); ZVAL_STRING(&idPattern, "/([\\w0-9\\_\\-]+)"); @@ -327,16 +308,12 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, convert) ZVAL_UNDEF(&name); ZVAL_UNDEF(&converter_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(name) Z_PARAM_ZVAL(converter) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &name_param, &converter); 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")); @@ -347,8 +324,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, convert) } else { ZEPHIR_INIT_VAR(&name); } - - zephir_update_property_array(this_ptr, SL("converters"), &name, converter); RETURN_THIS(); } @@ -365,7 +340,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, extractNamedParams) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *pattern_param = NULL, tmp, matches, _1$$10, _2$$10, _3$$10, _18$$15, _19$$15, _20$$15, _22$$15, _23$$15; zval pattern, route, item, variable, regexp, _4$$10, _21$$15, _24$$15, _27$$25, _28$$28; - zval *this_ptr = getThis(); ZVAL_UNDEF(&pattern); ZVAL_UNDEF(&route); @@ -387,15 +361,11 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, extractNamedParams) ZVAL_UNDEF(&_20$$15); ZVAL_UNDEF(&_22$$15); ZVAL_UNDEF(&_23$$15); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(pattern) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &pattern_param); if (UNEXPECTED(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'pattern' must be of the type string")); @@ -406,8 +376,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, extractNamedParams) } else { ZEPHIR_INIT_VAR(&pattern); } - - prevCh = '\0'; bracketCount = 0; parenthesesCount = 0; @@ -618,9 +586,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, extractNamedParams) */ PHP_METHOD(Phalcon_Mvc_Router_Route, getBeforeMatch) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "beforeMatch"); } @@ -630,9 +595,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, getBeforeMatch) */ PHP_METHOD(Phalcon_Mvc_Router_Route, getCompiledPattern) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "compiledPattern"); } @@ -642,9 +604,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, getCompiledPattern) */ PHP_METHOD(Phalcon_Mvc_Router_Route, getConverters) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "converters"); } @@ -654,9 +613,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, getConverters) */ PHP_METHOD(Phalcon_Mvc_Router_Route, getGroup) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "group"); } @@ -666,9 +622,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, getGroup) */ PHP_METHOD(Phalcon_Mvc_Router_Route, getHttpMethods) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "methods"); } @@ -678,9 +631,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, getHttpMethods) */ PHP_METHOD(Phalcon_Mvc_Router_Route, getHostname) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "hostname"); } @@ -690,9 +640,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, getHostname) */ PHP_METHOD(Phalcon_Mvc_Router_Route, getId) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "id"); } @@ -702,9 +649,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, getId) */ PHP_METHOD(Phalcon_Mvc_Router_Route, getMatch) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "match"); } @@ -714,9 +658,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, getMatch) */ PHP_METHOD(Phalcon_Mvc_Router_Route, getName) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "name"); } @@ -726,9 +667,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, getName) */ PHP_METHOD(Phalcon_Mvc_Router_Route, getPaths) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "paths"); } @@ -738,9 +676,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, getPaths) */ PHP_METHOD(Phalcon_Mvc_Router_Route, getPattern) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "pattern"); } @@ -756,12 +691,11 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, getReversedPaths) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("paths"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_RETURN_CALL_FUNCTION("array_flip", NULL, 99, &_0); + ZEPHIR_RETURN_CALL_FUNCTION("array_flip", NULL, 100, &_0); zephir_check_call_status(); RETURN_MM(); } @@ -771,9 +705,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, getReversedPaths) */ PHP_METHOD(Phalcon_Mvc_Router_Route, getRouteId) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "id"); } @@ -786,7 +717,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, getRoutePaths) zend_long _0$$4; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *paths = NULL, paths_sub, __$null, moduleName, controllerName, actionName, parts, routePaths, realClassName, namespaceName; - zval *this_ptr = getThis(); ZVAL_UNDEF(&paths_sub); ZVAL_NULL(&__$null); @@ -797,16 +727,13 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, getRoutePaths) ZVAL_UNDEF(&routePaths); ZVAL_UNDEF(&realClassName); ZVAL_UNDEF(&namespaceName); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(paths) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &paths); if (!paths) { paths = &paths_sub; @@ -814,8 +741,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, getRoutePaths) } else { ZEPHIR_SEPARATE_PARAM(paths); } - - if (Z_TYPE_P(paths) == IS_NULL) { ZEPHIR_INIT_NVAR(paths); array_init(paths); @@ -906,17 +831,10 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, match) zval *this_ptr = getThis(); ZVAL_UNDEF(&callback_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(callback) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &callback); - - zephir_update_property_zval(this_ptr, ZEND_STRL("match"), callback); RETURN_THISW(); } @@ -941,17 +859,14 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, reConfigure) ZVAL_UNDEF(&extracted); ZVAL_UNDEF(&_0$$4); ZVAL_UNDEF(&_1$$4); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(pattern) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(paths) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &pattern_param, &paths); if (UNEXPECTED(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'pattern' must be of the type string")); @@ -966,15 +881,13 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, reConfigure) paths = &paths_sub; paths = &__$null; } - - ZEPHIR_CALL_SELF(&routePaths, "getroutepaths", NULL, 0, paths); zephir_check_call_status(); if (!(zephir_start_with_str(&pattern, SL("#")))) { if (zephir_memnstr_str(&pattern, SL("{"), "phalcon/Mvc/Router/Route.zep", 559)) { ZEPHIR_CALL_METHOD(&extracted, this_ptr, "extractnamedparams", NULL, 0, &pattern); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&pcrePattern); + zephir_memory_observe(&pcrePattern); zephir_array_fetch_long(&pcrePattern, &extracted, 0, PH_NOISY, "phalcon/Mvc/Router/Route.zep", 564); ZEPHIR_INIT_VAR(&_0$$4); zephir_array_fetch_long(&_1$$4, &extracted, 1, PH_NOISY | PH_READONLY, "phalcon/Mvc/Router/Route.zep", 565); @@ -1000,13 +913,9 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, reConfigure) PHP_METHOD(Phalcon_Mvc_Router_Route, reset) { zval _0; - zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, 0); zephir_update_static_property_ce(phalcon_mvc_router_route_ce, ZEND_STRL("uniqueId"), &_0); } @@ -1020,17 +929,10 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, setGroup) zval *this_ptr = getThis(); ZVAL_UNDEF(&group_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(group, phalcon_mvc_router_groupinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &group); - - zephir_update_property_zval(this_ptr, ZEND_STRL("group"), group); RETURN_THISW(); } @@ -1057,18 +959,12 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, setHttpMethods) zval *this_ptr = getThis(); ZVAL_UNDEF(&httpMethods_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(httpMethods) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &httpMethods); - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "via", NULL, 0, httpMethods); zephir_check_call_status(); RETURN_MM(); @@ -1089,15 +985,11 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, setHostname) zval *this_ptr = getThis(); ZVAL_UNDEF(&hostname); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(hostname) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &hostname_param); if (UNEXPECTED(Z_TYPE_P(hostname_param) != IS_STRING && Z_TYPE_P(hostname_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'hostname' must be of the type string")); @@ -1108,8 +1000,6 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, setHostname) } else { ZEPHIR_INIT_VAR(&hostname); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("hostname"), &hostname); RETURN_THIS(); } @@ -1134,19 +1024,13 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, setName) zval *this_ptr = getThis(); ZVAL_UNDEF(&name); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &name_param); zephir_get_strval(&name, name_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("name"), &name); RETURN_THIS(); } @@ -1171,17 +1055,10 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, via) zval *this_ptr = getThis(); ZVAL_UNDEF(&httpMethods_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(httpMethods) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &httpMethods); - - zephir_update_property_zval(this_ptr, ZEND_STRL("methods"), httpMethods); RETURN_THISW(); } @@ -1198,7 +1075,8 @@ zend_object *zephir_init_properties_Phalcon_Mvc_Router_Route(zend_class_entry *c ZVAL_UNDEF(&_5$$5); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/mvc/router/route.zep.h b/ext/phalcon/mvc/router/route.zep.h index 2c8c362178a..b82cfaf78cf 100644 --- a/ext/phalcon/mvc/router/route.zep.h +++ b/ext/phalcon/mvc/router/route.zep.h @@ -140,26 +140,14 @@ ZEPHIR_INIT_FUNCS(phalcon_mvc_router_route_method_entry) { PHP_ME(Phalcon_Mvc_Router_Route, compilePattern, arginfo_phalcon_mvc_router_route_compilepattern, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Router_Route, convert, arginfo_phalcon_mvc_router_route_convert, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Router_Route, extractNamedParams, arginfo_phalcon_mvc_router_route_extractnamedparams, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Mvc_Router_Route, getBeforeMatch, arginfo_phalcon_mvc_router_route_getbeforematch, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Mvc_Router_Route, getBeforeMatch, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Mvc_Router_Route, getBeforeMatch, arginfo_phalcon_mvc_router_route_getbeforematch, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Router_Route, getCompiledPattern, arginfo_phalcon_mvc_router_route_getcompiledpattern, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Router_Route, getConverters, arginfo_phalcon_mvc_router_route_getconverters, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Router_Route, getGroup, arginfo_phalcon_mvc_router_route_getgroup, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Mvc_Router_Route, getHttpMethods, arginfo_phalcon_mvc_router_route_gethttpmethods, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Mvc_Router_Route, getHttpMethods, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Mvc_Router_Route, getHttpMethods, arginfo_phalcon_mvc_router_route_gethttpmethods, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Router_Route, getHostname, arginfo_phalcon_mvc_router_route_gethostname, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Router_Route, getId, arginfo_phalcon_mvc_router_route_getid, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Mvc_Router_Route, getMatch, arginfo_phalcon_mvc_router_route_getmatch, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Mvc_Router_Route, getMatch, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Mvc_Router_Route, getMatch, arginfo_phalcon_mvc_router_route_getmatch, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Router_Route, getName, arginfo_phalcon_mvc_router_route_getname, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Router_Route, getPaths, arginfo_phalcon_mvc_router_route_getpaths, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Router_Route, getPattern, arginfo_phalcon_mvc_router_route_getpattern, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/mvc/url.zep.c b/ext/phalcon/mvc/url.zep.c index 023825c4097..1dd874a2ad2 100644 --- a/ext/phalcon/mvc/url.zep.c +++ b/ext/phalcon/mvc/url.zep.c @@ -80,22 +80,16 @@ PHP_METHOD(Phalcon_Mvc_Url, __construct) ZVAL_UNDEF(&router_sub); ZVAL_NULL(&__$null); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_OBJECT_OF_CLASS_OR_NULL(router, phalcon_mvc_routerinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(0, 1, &router); if (!router) { router = &router_sub; router = &__$null; } - - zephir_update_property_zval(this_ptr, ZEND_STRL("router"), router); } @@ -177,7 +171,6 @@ PHP_METHOD(Phalcon_Mvc_Url, get) ZVAL_UNDEF(&_24$$19); ZVAL_UNDEF(&strUri); ZVAL_UNDEF(&_16$$15); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 4) Z_PARAM_OPTIONAL @@ -186,10 +179,8 @@ PHP_METHOD(Phalcon_Mvc_Url, get) Z_PARAM_BOOL_OR_NULL(local, is_null_true) Z_PARAM_ZVAL_OR_NULL(baseUri) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 4, &uri, &args, &local_param, &baseUri); if (!uri) { uri = &uri_sub; @@ -204,16 +195,13 @@ PHP_METHOD(Phalcon_Mvc_Url, get) if (!local_param) { local = 0; } else { - local = zephir_get_boolval(local_param); - } + } if (!baseUri) { baseUri = &baseUri_sub; ZEPHIR_CPY_WRT(baseUri, &__$null); } else { ZEPHIR_SEPARATE_PARAM(baseUri); } - - if (local == 0) { _0$$3 = Z_TYPE_P(uri) == IS_STRING; if (_0$$3) { @@ -245,7 +233,7 @@ PHP_METHOD(Phalcon_Mvc_Url, get) zephir_check_call_status(); } if (Z_TYPE_P(uri) == IS_ARRAY) { - ZEPHIR_OBS_VAR(&routeName); + zephir_memory_observe(&routeName); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&routeName, uri, SL("for"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_url_exception_ce, "It's necessary to define the route name with the parameter 'for'", "phalcon/Mvc/Url.zep", 126); return; @@ -282,7 +270,7 @@ PHP_METHOD(Phalcon_Mvc_Url, get) object_init_ex(&_12$$14, phalcon_mvc_url_exception_ce); ZEPHIR_INIT_VAR(&_13$$14); ZEPHIR_CONCAT_SVS(&_13$$14, "Cannot obtain a route using the name '", &routeName, "'"); - ZEPHIR_CALL_METHOD(NULL, &_12$$14, "__construct", NULL, 32, &_13$$14); + ZEPHIR_CALL_METHOD(NULL, &_12$$14, "__construct", NULL, 33, &_13$$14); zephir_check_call_status(); zephir_throw_exception_debug(&_12$$14, "phalcon/Mvc/Url.zep", 161); ZEPHIR_MM_RESTORE(); @@ -305,11 +293,11 @@ PHP_METHOD(Phalcon_Mvc_Url, get) ZVAL_STRING(&_18$$15, "#(?= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(uri) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &uri); if (!uri) { uri = &uri_sub; uri = &__$null; } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "getstaticbaseuri", NULL, 0); zephir_check_call_status(); ZVAL_NULL(&_1); @@ -456,9 +435,8 @@ PHP_METHOD(Phalcon_Mvc_Url, getStaticBaseUri) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("staticBaseUri"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_0) != IS_NULL) { @@ -484,15 +462,11 @@ PHP_METHOD(Phalcon_Mvc_Url, setBasePath) zval *this_ptr = getThis(); ZVAL_UNDEF(&basePath); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(basePath) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &basePath_param); if (UNEXPECTED(Z_TYPE_P(basePath_param) != IS_STRING && Z_TYPE_P(basePath_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'basePath' must be of the type string")); @@ -503,8 +477,6 @@ PHP_METHOD(Phalcon_Mvc_Url, setBasePath) } else { ZEPHIR_INIT_VAR(&basePath); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("basePath"), &basePath); RETURN_THIS(); } @@ -527,15 +499,11 @@ PHP_METHOD(Phalcon_Mvc_Url, setBaseUri) ZVAL_UNDEF(&baseUri); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(baseUri) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &baseUri_param); if (UNEXPECTED(Z_TYPE_P(baseUri_param) != IS_STRING && Z_TYPE_P(baseUri_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'baseUri' must be of the type string")); @@ -546,8 +514,6 @@ PHP_METHOD(Phalcon_Mvc_Url, setBaseUri) } else { ZEPHIR_INIT_VAR(&baseUri); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("baseUri"), &baseUri); zephir_read_property(&_0, this_ptr, ZEND_STRL("staticBaseUri"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_0) == IS_NULL) { @@ -571,15 +537,11 @@ PHP_METHOD(Phalcon_Mvc_Url, setStaticBaseUri) zval *this_ptr = getThis(); ZVAL_UNDEF(&staticBaseUri); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(staticBaseUri) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &staticBaseUri_param); if (UNEXPECTED(Z_TYPE_P(staticBaseUri_param) != IS_STRING && Z_TYPE_P(staticBaseUri_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'staticBaseUri' must be of the type string")); @@ -590,8 +552,6 @@ PHP_METHOD(Phalcon_Mvc_Url, setStaticBaseUri) } else { ZEPHIR_INIT_VAR(&staticBaseUri); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("staticBaseUri"), &staticBaseUri); RETURN_THIS(); } @@ -608,24 +568,19 @@ PHP_METHOD(Phalcon_Mvc_Url, path) ZVAL_UNDEF(&path); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(path) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &path_param); if (!path_param) { ZEPHIR_INIT_VAR(&path); } else { zephir_get_strval(&path, path_param); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("basePath"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CONCAT_VV(return_value, &_0, &path); RETURN_MM(); diff --git a/ext/phalcon/mvc/view.zep.c b/ext/phalcon/mvc/view.zep.c index 81e6fc79cea..713cc096e9e 100644 --- a/ext/phalcon/mvc/view.zep.c +++ b/ext/phalcon/mvc/view.zep.c @@ -202,16 +202,12 @@ PHP_METHOD(Phalcon_Mvc_View, __construct) zval *this_ptr = getThis(); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -219,8 +215,6 @@ PHP_METHOD(Phalcon_Mvc_View, __construct) } else { zephir_get_arrval(&options, options_param); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("options"), &options); ZEPHIR_MM_RESTORE(); } @@ -241,15 +235,11 @@ PHP_METHOD(Phalcon_Mvc_View, __get) zval *this_ptr = getThis(); ZVAL_UNDEF(&key); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -260,8 +250,6 @@ PHP_METHOD(Phalcon_Mvc_View, __get) } else { ZEPHIR_INIT_VAR(&key); } - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getvar", NULL, 0, &key); zephir_check_call_status(); RETURN_MM(); @@ -283,15 +271,11 @@ PHP_METHOD(Phalcon_Mvc_View, __isset) ZVAL_UNDEF(&key); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -302,8 +286,6 @@ PHP_METHOD(Phalcon_Mvc_View, __isset) } else { ZEPHIR_INIT_VAR(&key); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("viewParams"), PH_NOISY_CC | PH_READONLY); RETURN_MM_BOOL(zephir_array_isset(&_0, &key)); } @@ -325,16 +307,12 @@ PHP_METHOD(Phalcon_Mvc_View, __set) ZVAL_UNDEF(&key); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(key) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &key_param, &value); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -345,8 +323,6 @@ PHP_METHOD(Phalcon_Mvc_View, __set) } else { ZEPHIR_INIT_VAR(&key); } - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "setvar", NULL, 0, &key, value); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); @@ -362,9 +338,8 @@ PHP_METHOD(Phalcon_Mvc_View, cleanTemplateAfter) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); array_init(&_0); @@ -382,9 +357,8 @@ PHP_METHOD(Phalcon_Mvc_View, cleanTemplateBefore) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); array_init(&_0); @@ -409,17 +383,10 @@ PHP_METHOD(Phalcon_Mvc_View, disableLevel) ZVAL_UNDEF(&level_sub); ZVAL_BOOL(&__$true, 1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(level) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &level); - - if (Z_TYPE_P(level) == IS_ARRAY) { zephir_update_property_zval(this_ptr, ZEND_STRL("disabledLevels"), level); } else { @@ -438,9 +405,6 @@ PHP_METHOD(Phalcon_Mvc_View, disable) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); - - - if (1) { zephir_update_property_zval(this_ptr, ZEND_STRL("disabled"), &__$true); } else { @@ -459,9 +423,6 @@ PHP_METHOD(Phalcon_Mvc_View, enable) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); - - - if (0) { zephir_update_property_zval(this_ptr, ZEND_STRL("disabled"), &__$true); } else { @@ -483,15 +444,11 @@ PHP_METHOD(Phalcon_Mvc_View, exists) zval *this_ptr = getThis(); ZVAL_UNDEF(&view); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(view) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &view_param); if (UNEXPECTED(Z_TYPE_P(view_param) != IS_STRING && Z_TYPE_P(view_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'view' must be of the type string")); @@ -502,8 +459,6 @@ PHP_METHOD(Phalcon_Mvc_View, exists) } else { ZEPHIR_INIT_VAR(&view); } - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "has", NULL, 0, &view); zephir_check_call_status(); RETURN_MM(); @@ -517,12 +472,10 @@ PHP_METHOD(Phalcon_Mvc_View, finish) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *this_ptr = getThis(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - - ZEPHIR_MM_GROW(); - - ZEPHIR_CALL_FUNCTION(NULL, "ob_end_clean", NULL, 488); + ZEPHIR_CALL_FUNCTION(NULL, "ob_end_clean", NULL, 489); zephir_check_call_status(); RETURN_THIS(); } @@ -532,9 +485,6 @@ PHP_METHOD(Phalcon_Mvc_View, finish) */ PHP_METHOD(Phalcon_Mvc_View, getActionName) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "actionName"); } @@ -553,14 +503,13 @@ PHP_METHOD(Phalcon_Mvc_View, getActiveRenderPath) ZVAL_UNDEF(&activeRenderPath); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2$$4); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&_0, this_ptr, "getviewsdirs", NULL, 0); zephir_check_call_status(); viewsDirsCount = zephir_fast_count_int(&_0); - ZEPHIR_OBS_VAR(&activeRenderPath); + zephir_memory_observe(&activeRenderPath); zephir_read_property(&activeRenderPath, this_ptr, ZEND_STRL("activeRenderPaths"), PH_NOISY_CC); if (viewsDirsCount == 1) { _1$$3 = Z_TYPE_P(&activeRenderPath) == IS_ARRAY; @@ -584,9 +533,6 @@ PHP_METHOD(Phalcon_Mvc_View, getActiveRenderPath) */ PHP_METHOD(Phalcon_Mvc_View, getBasePath) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "basePath"); } @@ -596,9 +542,6 @@ PHP_METHOD(Phalcon_Mvc_View, getBasePath) */ PHP_METHOD(Phalcon_Mvc_View, getContent) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "content"); } @@ -608,9 +551,6 @@ PHP_METHOD(Phalcon_Mvc_View, getContent) */ PHP_METHOD(Phalcon_Mvc_View, getControllerName) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "controllerName"); } @@ -620,9 +560,6 @@ PHP_METHOD(Phalcon_Mvc_View, getControllerName) */ PHP_METHOD(Phalcon_Mvc_View, getCurrentRenderLevel) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "currentRenderLevel"); } @@ -632,9 +569,6 @@ PHP_METHOD(Phalcon_Mvc_View, getCurrentRenderLevel) */ PHP_METHOD(Phalcon_Mvc_View, getRegisteredEngines) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "registeredEngines"); } @@ -644,9 +578,6 @@ PHP_METHOD(Phalcon_Mvc_View, getRegisteredEngines) */ PHP_METHOD(Phalcon_Mvc_View, getRenderLevel) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "renderLevel"); } @@ -656,9 +587,6 @@ PHP_METHOD(Phalcon_Mvc_View, getRenderLevel) */ PHP_METHOD(Phalcon_Mvc_View, getEventsManager) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "eventsManager"); } @@ -668,9 +596,6 @@ PHP_METHOD(Phalcon_Mvc_View, getEventsManager) */ PHP_METHOD(Phalcon_Mvc_View, getLayout) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "layout"); } @@ -680,9 +605,6 @@ PHP_METHOD(Phalcon_Mvc_View, getLayout) */ PHP_METHOD(Phalcon_Mvc_View, getLayoutsDir) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "layoutsDir"); } @@ -692,9 +614,6 @@ PHP_METHOD(Phalcon_Mvc_View, getLayoutsDir) */ PHP_METHOD(Phalcon_Mvc_View, getMainView) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "mainView"); } @@ -704,9 +623,6 @@ PHP_METHOD(Phalcon_Mvc_View, getMainView) */ PHP_METHOD(Phalcon_Mvc_View, getParamsToView) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "viewParams"); } @@ -740,17 +656,14 @@ PHP_METHOD(Phalcon_Mvc_View, getPartial) ZVAL_UNDEF(&partialPath); ZVAL_UNDEF(¶ms_sub); ZVAL_NULL(&__$null); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(partialPath) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(params) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &partialPath_param, ¶ms); if (UNEXPECTED(Z_TYPE_P(partialPath_param) != IS_STRING && Z_TYPE_P(partialPath_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'partialPath' must be of the type string")); @@ -765,13 +678,11 @@ PHP_METHOD(Phalcon_Mvc_View, getPartial) params = ¶ms_sub; params = &__$null; } - - - ZEPHIR_CALL_FUNCTION(NULL, "ob_start", NULL, 386); + ZEPHIR_CALL_FUNCTION(NULL, "ob_start", NULL, 387); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, this_ptr, "partial", NULL, 0, &partialPath, params); zephir_check_call_status(); - ZEPHIR_RETURN_CALL_FUNCTION("ob_get_clean", NULL, 393); + ZEPHIR_RETURN_CALL_FUNCTION("ob_get_clean", NULL, 394); zephir_check_call_status(); RETURN_MM(); } @@ -781,9 +692,6 @@ PHP_METHOD(Phalcon_Mvc_View, getPartial) */ PHP_METHOD(Phalcon_Mvc_View, getPartialsDir) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "partialsDir"); } @@ -820,7 +728,6 @@ PHP_METHOD(Phalcon_Mvc_View, getRender) ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(¶ms); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 4) Z_PARAM_STR(controllerName) @@ -829,10 +736,8 @@ PHP_METHOD(Phalcon_Mvc_View, getRender) Z_PARAM_ARRAY(params) Z_PARAM_ZVAL_OR_NULL(configCallback) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 2, &controllerName_param, &actionName_param, ¶ms_param, &configCallback); if (UNEXPECTED(Z_TYPE_P(controllerName_param) != IS_STRING && Z_TYPE_P(controllerName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'controllerName' must be of the type string")); @@ -862,8 +767,6 @@ PHP_METHOD(Phalcon_Mvc_View, getRender) configCallback = &configCallback_sub; configCallback = &__$null; } - - ZEPHIR_INIT_VAR(&view); if (zephir_clone(&view, this_ptr) == FAILURE) { RETURN_MM(); @@ -906,15 +809,11 @@ PHP_METHOD(Phalcon_Mvc_View, getVar) ZVAL_UNDEF(&key); ZVAL_UNDEF(&value); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -925,13 +824,12 @@ PHP_METHOD(Phalcon_Mvc_View, getVar) } else { ZEPHIR_INIT_VAR(&key); } - - + zephir_memory_observe(&value); zephir_read_property(&_0, this_ptr, ZEND_STRL("viewParams"), PH_NOISY_CC | PH_READONLY); - if (!(zephir_array_isset_fetch(&value, &_0, &key, 1))) { + if (!(zephir_array_isset_fetch(&value, &_0, &key, 0))) { RETURN_MM_NULL(); } - RETURN_CTOR(&value); + RETURN_CCTOR(&value); } /** @@ -939,9 +837,6 @@ PHP_METHOD(Phalcon_Mvc_View, getVar) */ PHP_METHOD(Phalcon_Mvc_View, getViewsDir) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "viewsDirs"); } @@ -957,15 +852,14 @@ PHP_METHOD(Phalcon_Mvc_View, getViewsDirs) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_OBS_VAR(&_0); + zephir_memory_observe(&_0); zephir_read_property(&_0, this_ptr, ZEND_STRL("viewsDirs"), PH_NOISY_CC); if (Z_TYPE_P(&_0) == IS_STRING) { zephir_create_array(return_value, 1, 0); - ZEPHIR_OBS_VAR(&_1$$3); + zephir_memory_observe(&_1$$3); zephir_read_property(&_1$$3, this_ptr, ZEND_STRL("viewsDirs"), PH_NOISY_CC); zephir_array_fast_append(return_value, &_1$$3); RETURN_MM(); @@ -1003,15 +897,11 @@ PHP_METHOD(Phalcon_Mvc_View, has) ZVAL_UNDEF(&_14$$9); ZVAL_UNDEF(&_17$$10); ZVAL_UNDEF(&_18$$12); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(view) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &view_param); if (UNEXPECTED(Z_TYPE_P(view_param) != IS_STRING && Z_TYPE_P(view_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'view' must be of the type string")); @@ -1022,11 +912,9 @@ PHP_METHOD(Phalcon_Mvc_View, has) } else { ZEPHIR_INIT_VAR(&view); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("basePath"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&basePath, &_0); - ZEPHIR_OBS_VAR(&engines); + zephir_memory_observe(&engines); zephir_read_property(&engines, this_ptr, ZEND_STRL("registeredEngines"), PH_NOISY_CC); if (ZEPHIR_IS_EMPTY(&engines)) { ZEPHIR_INIT_VAR(&_1$$3); @@ -1155,9 +1043,6 @@ PHP_METHOD(Phalcon_Mvc_View, has) */ PHP_METHOD(Phalcon_Mvc_View, isDisabled) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "disabled"); } @@ -1200,17 +1085,14 @@ PHP_METHOD(Phalcon_Mvc_View, partial) ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(partialPath) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(params) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &partialPath_param, ¶ms); if (UNEXPECTED(Z_TYPE_P(partialPath_param) != IS_STRING && Z_TYPE_P(partialPath_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'partialPath' must be of the type string")); @@ -1225,8 +1107,6 @@ PHP_METHOD(Phalcon_Mvc_View, partial) params = ¶ms_sub; params = &__$null; } - - if (Z_TYPE_P(params) == IS_ARRAY) { zephir_read_property(&_0$$3, this_ptr, ZEND_STRL("viewParams"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&viewParams, &_0$$3); @@ -1281,18 +1161,12 @@ PHP_METHOD(Phalcon_Mvc_View, pick) ZVAL_UNDEF(&layout); ZVAL_UNDEF(&parts); ZVAL_UNDEF(&_0$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(renderView) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &renderView); - - if (Z_TYPE_P(renderView) == IS_ARRAY) { ZEPHIR_CPY_WRT(&pickView, renderView); } else { @@ -1337,19 +1211,13 @@ PHP_METHOD(Phalcon_Mvc_View, registerEngines) zval *this_ptr = getThis(); ZVAL_UNDEF(&engines); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(engines) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &engines_param); ZEPHIR_OBS_COPY_OR_DUP(&engines, engines_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("registeredEngines"), &engines); RETURN_THIS(); } @@ -1375,18 +1243,14 @@ PHP_METHOD(Phalcon_Mvc_View, render) ZVAL_UNDEF(&actionName); ZVAL_UNDEF(&result); ZVAL_UNDEF(¶ms); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(controllerName) Z_PARAM_STR(actionName) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(params) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &controllerName_param, &actionName_param, ¶ms_param); if (UNEXPECTED(Z_TYPE_P(controllerName_param) != IS_STRING && Z_TYPE_P(controllerName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'controllerName' must be of the type string")); @@ -1412,8 +1276,6 @@ PHP_METHOD(Phalcon_Mvc_View, render) } else { zephir_get_arrval(¶ms, params_param); } - - ZEPHIR_CALL_METHOD(&result, this_ptr, "processrender", NULL, 0, &controllerName, &actionName, ¶ms); zephir_check_call_status(); if (!(zephir_is_true(&result))) { @@ -1436,9 +1298,8 @@ PHP_METHOD(Phalcon_Mvc_View, reset) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); if (0) { zephir_update_property_zval(this_ptr, ZEND_STRL("disabled"), &__$true); @@ -1450,7 +1311,7 @@ PHP_METHOD(Phalcon_Mvc_View, reset) } else { zephir_update_property_zval(this_ptr, ZEND_STRL("engines"), &__$false); } - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, 5); zephir_update_property_zval(this_ptr, ZEND_STRL("renderLevel"), &_0); ZEPHIR_INIT_VAR(&_1); @@ -1482,19 +1343,13 @@ PHP_METHOD(Phalcon_Mvc_View, setBasePath) zval *this_ptr = getThis(); ZVAL_UNDEF(&basePath); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(basePath) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &basePath_param); zephir_get_strval(&basePath, basePath_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("basePath"), &basePath); RETURN_THIS(); } @@ -1514,19 +1369,13 @@ PHP_METHOD(Phalcon_Mvc_View, setContent) zval *this_ptr = getThis(); ZVAL_UNDEF(&content); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(content) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &content_param); zephir_get_strval(&content, content_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("content"), &content); RETURN_THIS(); } @@ -1540,17 +1389,10 @@ PHP_METHOD(Phalcon_Mvc_View, setEventsManager) zval *this_ptr = getThis(); ZVAL_UNDEF(&eventsManager_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(eventsManager, phalcon_events_managerinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &eventsManager); - - zephir_update_property_zval(this_ptr, ZEND_STRL("eventsManager"), eventsManager); } @@ -1570,19 +1412,13 @@ PHP_METHOD(Phalcon_Mvc_View, setLayout) zval *this_ptr = getThis(); ZVAL_UNDEF(&layout); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(layout) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &layout_param); zephir_get_strval(&layout, layout_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("layout"), &layout); RETURN_THIS(); } @@ -1604,19 +1440,13 @@ PHP_METHOD(Phalcon_Mvc_View, setLayoutsDir) zval *this_ptr = getThis(); ZVAL_UNDEF(&layoutsDir); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(layoutsDir) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &layoutsDir_param); zephir_get_strval(&layoutsDir, layoutsDir_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("layoutsDir"), &layoutsDir); RETURN_THIS(); } @@ -1638,19 +1468,13 @@ PHP_METHOD(Phalcon_Mvc_View, setMainView) zval *this_ptr = getThis(); ZVAL_UNDEF(&viewPath); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(viewPath) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &viewPath_param); zephir_get_strval(&viewPath, viewPath_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("mainView"), &viewPath); RETURN_THIS(); } @@ -1672,19 +1496,13 @@ PHP_METHOD(Phalcon_Mvc_View, setPartialsDir) zval *this_ptr = getThis(); ZVAL_UNDEF(&partialsDir); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(partialsDir) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &partialsDir_param); zephir_get_strval(&partialsDir, partialsDir_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("partialsDir"), &partialsDir); RETURN_THIS(); } @@ -1705,16 +1523,12 @@ PHP_METHOD(Phalcon_Mvc_View, setParamToView) ZVAL_UNDEF(&key); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(key) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &key_param, &value); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -1725,8 +1539,6 @@ PHP_METHOD(Phalcon_Mvc_View, setParamToView) } else { ZEPHIR_INIT_VAR(&key); } - - zephir_update_property_array(this_ptr, SL("viewParams"), &key, value); RETURN_THIS(); } @@ -1748,19 +1560,11 @@ PHP_METHOD(Phalcon_Mvc_View, setRenderLevel) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(level) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &level_param); - level = zephir_get_intval(level_param); - - - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, level); zephir_update_property_zval(this_ptr, ZEND_STRL("renderLevel"), &_0); RETURN_THISW(); @@ -1778,18 +1582,12 @@ PHP_METHOD(Phalcon_Mvc_View, setTemplateAfter) ZVAL_UNDEF(&templateAfter_sub); ZVAL_UNDEF(&_0$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(templateAfter) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &templateAfter); - - if (Z_TYPE_P(templateAfter) != IS_ARRAY) { ZEPHIR_INIT_VAR(&_0$$3); zephir_create_array(&_0$$3, 1, 0); @@ -1813,18 +1611,12 @@ PHP_METHOD(Phalcon_Mvc_View, setTemplateBefore) ZVAL_UNDEF(&templateBefore_sub); ZVAL_UNDEF(&_0$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(templateBefore) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &templateBefore); - - if (Z_TYPE_P(templateBefore) != IS_ARRAY) { ZEPHIR_INIT_VAR(&_0$$3); zephir_create_array(&_0$$3, 1, 0); @@ -1852,16 +1644,12 @@ PHP_METHOD(Phalcon_Mvc_View, setVar) ZVAL_UNDEF(&key); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(key) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &key_param, &value); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -1872,8 +1660,6 @@ PHP_METHOD(Phalcon_Mvc_View, setVar) } else { ZEPHIR_INIT_VAR(&key); } - - zephir_update_property_array(this_ptr, SL("viewParams"), &key, value); RETURN_THIS(); } @@ -1900,26 +1686,19 @@ PHP_METHOD(Phalcon_Mvc_View, setVars) ZVAL_UNDEF(¶ms); ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(params) Z_PARAM_OPTIONAL Z_PARAM_BOOL(merge) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, ¶ms_param, &merge_param); ZEPHIR_OBS_COPY_OR_DUP(¶ms, params_param); if (!merge_param) { merge = 1; } else { - merge = zephir_get_boolval(merge_param); - } - - + } if (merge) { ZEPHIR_INIT_VAR(&_0$$3); zephir_read_property(&_1$$3, this_ptr, ZEND_STRL("viewParams"), PH_NOISY_CC | PH_READONLY); @@ -1953,18 +1732,12 @@ PHP_METHOD(Phalcon_Mvc_View, setViewsDir) ZVAL_UNDEF(&_3$$5); ZVAL_UNDEF(&_6$$6); ZVAL_UNDEF(&_7$$8); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(viewsDir) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &viewsDir); - - _0 = Z_TYPE_P(viewsDir) != IS_STRING; if (_0) { _0 = Z_TYPE_P(viewsDir) != IS_ARRAY; @@ -1974,7 +1747,7 @@ PHP_METHOD(Phalcon_Mvc_View, setViewsDir) return; } if (Z_TYPE_P(viewsDir) == IS_STRING) { - ZEPHIR_CALL_METHOD(&_1$$4, this_ptr, "getdirseparator", NULL, 489, viewsDir); + ZEPHIR_CALL_METHOD(&_1$$4, this_ptr, "getdirseparator", NULL, 490, viewsDir); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("viewsDirs"), &_1$$4); } else { @@ -1996,7 +1769,7 @@ PHP_METHOD(Phalcon_Mvc_View, setViewsDir) ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_view_exception_ce, "Views directory item must be a string", "phalcon/Mvc/View.zep", 994); return; } - ZEPHIR_CALL_METHOD(&_6$$6, this_ptr, "getdirseparator", NULL, 489, &directory); + ZEPHIR_CALL_METHOD(&_6$$6, this_ptr, "getdirseparator", NULL, 490, &directory); zephir_check_call_status(); zephir_array_update_zval(&newViewsDir, &position, &_6$$6, PH_COPY | PH_SEPARATE); } ZEND_HASH_FOREACH_END(); @@ -2017,7 +1790,7 @@ PHP_METHOD(Phalcon_Mvc_View, setViewsDir) ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_view_exception_ce, "Views directory item must be a string", "phalcon/Mvc/View.zep", 994); return; } - ZEPHIR_CALL_METHOD(&_7$$8, this_ptr, "getdirseparator", NULL, 489, &directory); + ZEPHIR_CALL_METHOD(&_7$$8, this_ptr, "getdirseparator", NULL, 490, &directory); zephir_check_call_status(); zephir_array_update_zval(&newViewsDir, &position, &_7$$8, PH_COPY | PH_SEPARATE); ZEPHIR_CALL_METHOD(NULL, viewsDir, "next", NULL, 0); @@ -2042,11 +1815,10 @@ PHP_METHOD(Phalcon_Mvc_View, start) zval *this_ptr = getThis(); ZVAL_NULL(&__$null); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_CALL_FUNCTION(NULL, "ob_start", NULL, 386); + ZEPHIR_CALL_FUNCTION(NULL, "ob_start", NULL, 387); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("content"), &__$null); RETURN_THIS(); @@ -2069,18 +1841,14 @@ PHP_METHOD(Phalcon_Mvc_View, toString) ZVAL_UNDEF(&result); ZVAL_UNDEF(&_0); ZVAL_UNDEF(¶ms); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(controllerName) Z_PARAM_STR(actionName) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(params) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &controllerName_param, &actionName_param, ¶ms_param); if (UNEXPECTED(Z_TYPE_P(controllerName_param) != IS_STRING && Z_TYPE_P(controllerName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'controllerName' must be of the type string")); @@ -2106,8 +1874,6 @@ PHP_METHOD(Phalcon_Mvc_View, toString) } else { zephir_get_arrval(¶ms, params_param); } - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "start", NULL, 0); zephir_check_call_status(); ZVAL_BOOL(&_0, 0); @@ -2180,8 +1946,6 @@ PHP_METHOD(Phalcon_Mvc_View, engineRender) ZVAL_UNDEF(&_44$$30); ZVAL_UNDEF(&viewPath); ZVAL_UNDEF(&_45$$30); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 4) Z_PARAM_ARRAY(engines) Z_PARAM_STR(viewPath) @@ -2189,21 +1953,15 @@ PHP_METHOD(Phalcon_Mvc_View, engineRender) Z_PARAM_OPTIONAL Z_PARAM_BOOL(mustClean) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 1, &engines_param, &viewPath_param, &silence_param, &mustClean_param); zephir_get_arrval(&engines, engines_param); zephir_get_strval(&viewPath, viewPath_param); - silence = zephir_get_boolval(silence_param); if (!mustClean_param) { mustClean = 1; } else { - mustClean = zephir_get_boolval(mustClean_param); - } - - + } zephir_read_property(&_0, this_ptr, ZEND_STRL("basePath"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&basePath, &_0); zephir_read_property(&_0, this_ptr, ZEND_STRL("viewParams"), PH_NOISY_CC | PH_READONLY); @@ -2220,7 +1978,7 @@ PHP_METHOD(Phalcon_Mvc_View, engineRender) { ZEPHIR_INIT_NVAR(&viewsDir); ZVAL_COPY(&viewsDir, _2); - ZEPHIR_CALL_METHOD(&_4$$3, this_ptr, "isabsolutepath", &_5, 490, &viewPath); + ZEPHIR_CALL_METHOD(&_4$$3, this_ptr, "isabsolutepath", &_5, 491, &viewPath); zephir_check_call_status(); if (!(zephir_is_true(&_4$$3))) { ZEPHIR_INIT_NVAR(&viewsDirPath); @@ -2336,7 +2094,7 @@ PHP_METHOD(Phalcon_Mvc_View, engineRender) } ZEPHIR_CALL_METHOD(&viewsDir, &_1, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_24$$16, this_ptr, "isabsolutepath", &_5, 490, &viewPath); + ZEPHIR_CALL_METHOD(&_24$$16, this_ptr, "isabsolutepath", &_5, 491, &viewPath); zephir_check_call_status(); if (!(zephir_is_true(&_24$$16))) { ZEPHIR_INIT_NVAR(&viewsDirPath); @@ -2457,7 +2215,7 @@ PHP_METHOD(Phalcon_Mvc_View, engineRender) object_init_ex(&_44$$30, phalcon_mvc_view_exception_ce); ZEPHIR_INIT_VAR(&_45$$30); ZEPHIR_CONCAT_SVS(&_45$$30, "View '", &viewPath, "' was not found in any of the views directory"); - ZEPHIR_CALL_METHOD(NULL, &_44$$30, "__construct", NULL, 32, &_45$$30); + ZEPHIR_CALL_METHOD(NULL, &_44$$30, "__construct", NULL, 33, &_45$$30); zephir_check_call_status(); zephir_throw_exception_debug(&_44$$30, "phalcon/Mvc/View.zep", 1115); ZEPHIR_MM_RESTORE(); @@ -2476,23 +2234,16 @@ PHP_METHOD(Phalcon_Mvc_View, isAbsolutePath) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *path_param = NULL, _0; zval path; - zval *this_ptr = getThis(); ZVAL_UNDEF(&path); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(path) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &path_param); zephir_get_strval(&path, path_param); - - ZEPHIR_INIT_VAR(&_0); ZEPHIR_GET_CONSTANT(&_0, "PHP_OS"); if (ZEPHIR_IS_STRING_IDENTICAL(&_0, "WINNT")) { @@ -2551,9 +2302,8 @@ PHP_METHOD(Phalcon_Mvc_View, loadTemplateEngines) ZVAL_UNDEF(&_20$$17); ZVAL_UNDEF(&_15$$11); ZVAL_UNDEF(&_21$$17); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("engines"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&engines, &_0); @@ -2567,7 +2317,7 @@ PHP_METHOD(Phalcon_Mvc_View, loadTemplateEngines) if (ZEPHIR_IS_EMPTY(®isteredEngines)) { ZEPHIR_INIT_VAR(&_2$$4); object_init_ex(&_2$$4, phalcon_mvc_view_engine_php_ce); - ZEPHIR_CALL_METHOD(NULL, &_2$$4, "__construct", NULL, 491, this_ptr, &di); + ZEPHIR_CALL_METHOD(NULL, &_2$$4, "__construct", NULL, 492, this_ptr, &di); zephir_check_call_status(); zephir_array_update_string(&engines, SL(".phtml"), &_2$$4, PH_COPY | PH_SEPARATE); } else { @@ -2593,7 +2343,7 @@ PHP_METHOD(Phalcon_Mvc_View, loadTemplateEngines) ZEPHIR_CALL_CE_STATIC(&_7$$9, _8$$9, "bind", &_9, 0, &engineService, &di); zephir_check_call_status(); ZEPHIR_CPY_WRT(&engineService, &_7$$9); - ZEPHIR_CALL_FUNCTION(&_7$$9, "call_user_func", &_10, 187, &engineService, this_ptr); + ZEPHIR_CALL_FUNCTION(&_7$$9, "call_user_func", &_10, 188, &engineService, this_ptr); zephir_check_call_status(); zephir_array_update_zval(&engines, &extension, &_7$$9, PH_COPY | PH_SEPARATE); } else { @@ -2605,7 +2355,7 @@ PHP_METHOD(Phalcon_Mvc_View, loadTemplateEngines) object_init_ex(&_11$$12, phalcon_mvc_view_exception_ce); ZEPHIR_INIT_NVAR(&_12$$12); ZEPHIR_CONCAT_SV(&_12$$12, "Invalid template engine registration for extension: ", &extension); - ZEPHIR_CALL_METHOD(NULL, &_11$$12, "__construct", &_13, 32, &_12$$12); + ZEPHIR_CALL_METHOD(NULL, &_11$$12, "__construct", &_13, 33, &_12$$12); zephir_check_call_status(); zephir_throw_exception_debug(&_11$$12, "phalcon/Mvc/View.zep", 1187); ZEPHIR_MM_RESTORE(); @@ -2638,7 +2388,7 @@ PHP_METHOD(Phalcon_Mvc_View, loadTemplateEngines) ZEPHIR_CALL_CE_STATIC(&_16$$15, _17$$15, "bind", &_9, 0, &engineService, &di); zephir_check_call_status(); ZEPHIR_CPY_WRT(&engineService, &_16$$15); - ZEPHIR_CALL_FUNCTION(&_16$$15, "call_user_func", &_10, 187, &engineService, this_ptr); + ZEPHIR_CALL_FUNCTION(&_16$$15, "call_user_func", &_10, 188, &engineService, this_ptr); zephir_check_call_status(); zephir_array_update_zval(&engines, &extension, &_16$$15, PH_COPY | PH_SEPARATE); } else { @@ -2650,7 +2400,7 @@ PHP_METHOD(Phalcon_Mvc_View, loadTemplateEngines) object_init_ex(&_18$$18, phalcon_mvc_view_exception_ce); ZEPHIR_INIT_NVAR(&_19$$18); ZEPHIR_CONCAT_SV(&_19$$18, "Invalid template engine registration for extension: ", &extension); - ZEPHIR_CALL_METHOD(NULL, &_18$$18, "__construct", &_13, 32, &_19$$18); + ZEPHIR_CALL_METHOD(NULL, &_18$$18, "__construct", &_13, 33, &_19$$18); zephir_check_call_status(); zephir_throw_exception_debug(&_18$$18, "phalcon/Mvc/View.zep", 1187); ZEPHIR_MM_RESTORE(); @@ -2732,8 +2482,6 @@ PHP_METHOD(Phalcon_Mvc_View, processRender) ZVAL_UNDEF(&_29$$13); ZVAL_UNDEF(&_31$$28); ZVAL_UNDEF(¶ms); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 4) Z_PARAM_STR(controllerName) Z_PARAM_STR(actionName) @@ -2741,10 +2489,8 @@ PHP_METHOD(Phalcon_Mvc_View, processRender) Z_PARAM_ARRAY(params) Z_PARAM_BOOL(fireEvents) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 2, &controllerName_param, &actionName_param, ¶ms_param, &fireEvents_param); if (UNEXPECTED(Z_TYPE_P(controllerName_param) != IS_STRING && Z_TYPE_P(controllerName_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'controllerName' must be of the type string")); @@ -2773,16 +2519,13 @@ PHP_METHOD(Phalcon_Mvc_View, processRender) if (!fireEvents_param) { fireEvents = 1; } else { - fireEvents = zephir_get_boolval(fireEvents_param); - } - - - ZEPHIR_INIT_ZVAL_NREF(_0); + } + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, 0); zephir_update_property_zval(this_ptr, ZEND_STRL("currentRenderLevel"), &_0); zephir_read_property(&_0, this_ptr, ZEND_STRL("disabled"), PH_NOISY_CC | PH_READONLY); if (!ZEPHIR_IS_FALSE_IDENTICAL(&_0)) { - ZEPHIR_CALL_FUNCTION(&_1$$3, "ob_get_contents", NULL, 492); + ZEPHIR_CALL_FUNCTION(&_1$$3, "ob_get_contents", NULL, 493); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("content"), &_1$$3); RETURN_MM_BOOL(0); @@ -2816,7 +2559,7 @@ PHP_METHOD(Phalcon_Mvc_View, processRender) ZEPHIR_OBS_NVAR(&renderView); zephir_array_fetch_long(&renderView, &pickView, 0, PH_NOISY, "phalcon/Mvc/View.zep", 1274); if (Z_TYPE_P(&layoutName) == IS_NULL) { - ZEPHIR_OBS_VAR(&pickViewAction); + zephir_memory_observe(&pickViewAction); if (zephir_array_isset_long_fetch(&pickViewAction, &pickView, 1, 0)) { ZEPHIR_CPY_WRT(&layoutName, &pickViewAction); } @@ -2840,19 +2583,19 @@ PHP_METHOD(Phalcon_Mvc_View, processRender) RETURN_MM_BOOL(0); } } - ZEPHIR_CALL_FUNCTION(&_8, "ob_get_contents", NULL, 492); + ZEPHIR_CALL_FUNCTION(&_8, "ob_get_contents", NULL, 493); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("content"), &_8); silence = 1; zephir_read_property(&_2, this_ptr, ZEND_STRL("disabledLevels"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&disabledLevels, &_2); - ZEPHIR_OBS_VAR(&_9); + zephir_memory_observe(&_9); zephir_read_property(&_9, this_ptr, ZEND_STRL("renderLevel"), PH_NOISY_CC); renderLevel = zephir_get_intval(&_9); if (renderLevel) { if (renderLevel >= 1) { if (!(zephir_array_isset_long(&disabledLevels, 1))) { - ZEPHIR_INIT_ZVAL_NREF(_10$$15); + ZVAL_UNDEF(&_10$$15); ZVAL_LONG(&_10$$15, 1); zephir_update_property_zval(this_ptr, ZEND_STRL("currentRenderLevel"), &_10$$15); if (silence) { @@ -2866,7 +2609,7 @@ PHP_METHOD(Phalcon_Mvc_View, processRender) } if (renderLevel >= 2) { if (!(zephir_array_isset_long(&disabledLevels, 2))) { - ZEPHIR_INIT_ZVAL_NREF(_11$$17); + ZVAL_UNDEF(&_11$$17); ZVAL_LONG(&_11$$17, 2); zephir_update_property_zval(this_ptr, ZEND_STRL("currentRenderLevel"), &_11$$17); zephir_read_property(&_11$$17, this_ptr, ZEND_STRL("templatesBefore"), PH_NOISY_CC | PH_READONLY); @@ -2918,7 +2661,7 @@ PHP_METHOD(Phalcon_Mvc_View, processRender) } if (renderLevel >= 3) { if (!(zephir_array_isset_long(&disabledLevels, 3))) { - ZEPHIR_INIT_ZVAL_NREF(_18$$21); + ZVAL_UNDEF(&_18$$21); ZVAL_LONG(&_18$$21, 3); zephir_update_property_zval(this_ptr, ZEND_STRL("currentRenderLevel"), &_18$$21); ZEPHIR_INIT_VAR(&_19$$21); @@ -2934,7 +2677,7 @@ PHP_METHOD(Phalcon_Mvc_View, processRender) } if (renderLevel >= 4) { if (!(zephir_array_isset_long(&disabledLevels, 4))) { - ZEPHIR_INIT_ZVAL_NREF(_20$$23); + ZVAL_UNDEF(&_20$$23); ZVAL_LONG(&_20$$23, 4); zephir_update_property_zval(this_ptr, ZEND_STRL("currentRenderLevel"), &_20$$23); zephir_read_property(&_20$$23, this_ptr, ZEND_STRL("templatesAfter"), PH_NOISY_CC | PH_READONLY); @@ -2986,7 +2729,7 @@ PHP_METHOD(Phalcon_Mvc_View, processRender) } if (renderLevel >= 5) { if (!(zephir_array_isset_long(&disabledLevels, 5))) { - ZEPHIR_INIT_ZVAL_NREF(_27$$27); + ZVAL_UNDEF(&_27$$27); ZVAL_LONG(&_27$$27, 5); zephir_update_property_zval(this_ptr, ZEND_STRL("currentRenderLevel"), &_27$$27); zephir_read_property(&_27$$27, this_ptr, ZEND_STRL("mainView"), PH_NOISY_CC | PH_READONLY); @@ -2999,7 +2742,7 @@ PHP_METHOD(Phalcon_Mvc_View, processRender) zephir_check_call_status(); } } - ZEPHIR_INIT_ZVAL_NREF(_29$$13); + ZVAL_UNDEF(&_29$$13); ZVAL_LONG(&_29$$13, 0); zephir_update_property_zval(this_ptr, ZEND_STRL("currentRenderLevel"), &_29$$13); } @@ -3024,20 +2767,15 @@ PHP_METHOD(Phalcon_Mvc_View, getDirSeparator) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *directory_param = NULL, _0, _1; zval directory; - zval *this_ptr = getThis(); ZVAL_UNDEF(&directory); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(directory) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &directory_param); if (UNEXPECTED(Z_TYPE_P(directory_param) != IS_STRING && Z_TYPE_P(directory_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'directory' must be of the type string")); @@ -3048,8 +2786,6 @@ PHP_METHOD(Phalcon_Mvc_View, getDirSeparator) } else { ZEPHIR_INIT_VAR(&directory); } - - ZEPHIR_INIT_VAR(&_0); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "/"); @@ -3080,7 +2816,8 @@ zend_object *zephir_init_properties_Phalcon_Mvc_View(zend_class_entry *class_typ ZVAL_UNDEF(&_15$$10); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/mvc/view.zep.h b/ext/phalcon/mvc/view.zep.h index e5e8ac1489a..ba5d65c166f 100644 --- a/ext/phalcon/mvc/view.zep.h +++ b/ext/phalcon/mvc/view.zep.h @@ -64,11 +64,7 @@ PHP_METHOD(Phalcon_Mvc_View, getDirSeparator); zend_object *zephir_init_properties_Phalcon_Mvc_View(zend_class_entry *class_type); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_view___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_view___get, 0, 0, 1) @@ -157,11 +153,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_view_getrender, 0, 2, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, controllerName, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, actionName, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, params, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, params, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, params, IS_ARRAY, 0, "[]") ZEND_ARG_INFO(0, configCallback) ZEND_END_ARG_INFO() @@ -198,11 +190,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_view_render, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, controllerName, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, actionName, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, params, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, params, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, params, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_view_reset, 0, 0, Phalcon\\Mvc\\View, 0) @@ -274,11 +262,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_view_tostring, 0, 2, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, controllerName, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, actionName, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, params, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, params, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, params, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_view_enginerender, 0, 0, 3) @@ -298,11 +282,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_view_processrender, 0, 2, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, controllerName, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, actionName, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, params, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, params, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, params, IS_ARRAY, 0, "[]") ZEND_ARG_TYPE_INFO(0, fireEvents, _IS_BOOL, 0) ZEND_END_ARG_INFO() @@ -326,11 +306,7 @@ ZEPHIR_INIT_FUNCS(phalcon_mvc_view_method_entry) { PHP_ME(Phalcon_Mvc_View, exists, arginfo_phalcon_mvc_view_exists, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_View, finish, arginfo_phalcon_mvc_view_finish, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_View, getActionName, arginfo_phalcon_mvc_view_getactionname, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Mvc_View, getActiveRenderPath, arginfo_phalcon_mvc_view_getactiverenderpath, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Mvc_View, getActiveRenderPath, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Mvc_View, getActiveRenderPath, arginfo_phalcon_mvc_view_getactiverenderpath, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_View, getBasePath, arginfo_phalcon_mvc_view_getbasepath, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_View, getContent, arginfo_phalcon_mvc_view_getcontent, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_View, getControllerName, arginfo_phalcon_mvc_view_getcontrollername, ZEND_ACC_PUBLIC) @@ -346,11 +322,7 @@ ZEPHIR_INIT_FUNCS(phalcon_mvc_view_method_entry) { PHP_ME(Phalcon_Mvc_View, getPartialsDir, arginfo_phalcon_mvc_view_getpartialsdir, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_View, getRender, arginfo_phalcon_mvc_view_getrender, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_View, getVar, arginfo_phalcon_mvc_view_getvar, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Mvc_View, getViewsDir, arginfo_phalcon_mvc_view_getviewsdir, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Mvc_View, getViewsDir, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Mvc_View, getViewsDir, arginfo_phalcon_mvc_view_getviewsdir, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_View, getViewsDirs, arginfo_phalcon_mvc_view_getviewsdirs, ZEND_ACC_PROTECTED) PHP_ME(Phalcon_Mvc_View, has, arginfo_phalcon_mvc_view_has, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_View, isDisabled, arginfo_phalcon_mvc_view_isdisabled, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/mvc/view/engine/abstractengine.zep.c b/ext/phalcon/mvc/view/engine/abstractengine.zep.c index a63e44dca42..f35d2f7e9a8 100644 --- a/ext/phalcon/mvc/view/engine/abstractengine.zep.c +++ b/ext/phalcon/mvc/view/engine/abstractengine.zep.c @@ -58,23 +58,17 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_AbstractEngine, __construct) ZVAL_UNDEF(&view_sub); ZVAL_UNDEF(&container_sub); ZVAL_NULL(&__$null); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_OBJECT_OF_CLASS(view, phalcon_mvc_viewbaseinterface_ce) Z_PARAM_OPTIONAL Z_PARAM_OBJECT_OF_CLASS_OR_NULL(container, phalcon_di_diinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 1, &view, &container); if (!container) { container = &container_sub; container = &__$null; } - - zephir_update_property_zval(this_ptr, ZEND_STRL("view"), view); zephir_update_property_zval(this_ptr, ZEND_STRL("container"), container); } @@ -92,9 +86,8 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_AbstractEngine, getContent) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("view"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_METHOD(&_0, "getcontent", NULL, 0); @@ -109,9 +102,6 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_AbstractEngine, getContent) */ PHP_METHOD(Phalcon_Mvc_View_Engine_AbstractEngine, getView) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "view"); } @@ -136,17 +126,14 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_AbstractEngine, partial) ZVAL_UNDEF(¶ms_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(partialPath) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(params) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &partialPath_param, ¶ms); if (UNEXPECTED(Z_TYPE_P(partialPath_param) != IS_STRING && Z_TYPE_P(partialPath_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'partialPath' must be of the type string")); @@ -161,8 +148,6 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_AbstractEngine, partial) params = ¶ms_sub; params = &__$null; } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("view"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(NULL, &_0, "partial", NULL, 0, &partialPath, params); zephir_check_call_status(); diff --git a/ext/phalcon/mvc/view/engine/php.zep.c b/ext/phalcon/mvc/view/engine/php.zep.c index 950eae97f42..217f95d7d4f 100644 --- a/ext/phalcon/mvc/view/engine/php.zep.c +++ b/ext/phalcon/mvc/view/engine/php.zep.c @@ -62,18 +62,14 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Php, render) ZVAL_UNDEF(&_5$$6); ZVAL_UNDEF(&_6$$7); ZVAL_UNDEF(&_7$$7); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(path) Z_PARAM_ZVAL(params) Z_PARAM_OPTIONAL Z_PARAM_BOOL(mustClean) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &path_param, ¶ms, &mustClean_param); if (UNEXPECTED(Z_TYPE_P(path_param) != IS_STRING && Z_TYPE_P(path_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'path' must be of the type string")); @@ -87,12 +83,9 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Php, render) if (!mustClean_param) { mustClean = 0; } else { - mustClean = zephir_get_boolval(mustClean_param); - } - - + } if (mustClean) { - ZEPHIR_CALL_FUNCTION(NULL, "ob_clean", NULL, 493); + ZEPHIR_CALL_FUNCTION(NULL, "ob_clean", NULL, 494); zephir_check_call_status(); } if (Z_TYPE_P(params) == IS_ARRAY) { @@ -142,7 +135,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Php, render) } if (mustClean) { zephir_read_property(&_6$$7, this_ptr, ZEND_STRL("view"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&_7$$7, "ob_get_contents", NULL, 492); + ZEPHIR_CALL_FUNCTION(&_7$$7, "ob_get_contents", NULL, 493); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &_6$$7, "setcontent", NULL, 0, &_7$$7); zephir_check_call_status(); diff --git a/ext/phalcon/mvc/view/engine/volt.zep.c b/ext/phalcon/mvc/view/engine/volt.zep.c index 41869e31d2e..4e36c8d33f4 100644 --- a/ext/phalcon/mvc/view/engine/volt.zep.c +++ b/ext/phalcon/mvc/view/engine/volt.zep.c @@ -84,17 +84,13 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, callMacro) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&arguments); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(name) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(arguments) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &name_param, &arguments_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")); @@ -111,22 +107,20 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, callMacro) } else { zephir_get_arrval(&arguments, arguments_param); } - - - ZEPHIR_OBS_VAR(¯o); + zephir_memory_observe(¯o); zephir_read_property(&_0, this_ptr, ZEND_STRL("macros"), PH_NOISY_CC | PH_READONLY); if (UNEXPECTED(!(zephir_array_isset_fetch(¯o, &_0, &name, 0)))) { ZEPHIR_INIT_VAR(&_1$$3); object_init_ex(&_1$$3, phalcon_mvc_view_exception_ce); ZEPHIR_INIT_VAR(&_2$$3); ZEPHIR_CONCAT_SVS(&_2$$3, "Macro '", &name, "' does not exist"); - ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 32, &_2$$3); + ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 33, &_2$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_1$$3, "phalcon/Mvc/View/Engine/Volt.zep", 59); ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_RETURN_CALL_FUNCTION("call_user_func", NULL, 187, ¯o, &arguments); + ZEPHIR_RETURN_CALL_FUNCTION("call_user_func", NULL, 188, ¯o, &arguments); zephir_check_call_status(); RETURN_MM(); } @@ -143,22 +137,17 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, convertEncoding) zend_long ZEPHIR_LAST_CALL_STATUS; zval *text_param = NULL, *from_param = NULL, *to_param = NULL; zval text, from, to; - zval *this_ptr = getThis(); ZVAL_UNDEF(&text); ZVAL_UNDEF(&from); ZVAL_UNDEF(&to); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(text) Z_PARAM_STR(from) Z_PARAM_STR(to) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &text_param, &from_param, &to_param); zephir_get_strval(&text, text_param); if (UNEXPECTED(Z_TYPE_P(from_param) != IS_STRING && Z_TYPE_P(from_param) != IS_NULL)) { @@ -179,14 +168,12 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, convertEncoding) } else { ZEPHIR_INIT_VAR(&to); } - - _0 = ZEPHIR_IS_STRING_IDENTICAL(&from, "latin1"); if (!(_0)) { _0 = ZEPHIR_IS_STRING_IDENTICAL(&to, "utf8"); } if (_0) { - ZEPHIR_RETURN_CALL_FUNCTION("utf8_encode", NULL, 494, &text); + ZEPHIR_RETURN_CALL_FUNCTION("utf8_encode", NULL, 495, &text); zephir_check_call_status(); RETURN_MM(); } @@ -195,12 +182,12 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, convertEncoding) _1 = ZEPHIR_IS_STRING_IDENTICAL(&from, "utf8"); } if (_1) { - ZEPHIR_RETURN_CALL_FUNCTION("utf8_decode", NULL, 284, &text); + ZEPHIR_RETURN_CALL_FUNCTION("utf8_decode", NULL, 285, &text); zephir_check_call_status(); RETURN_MM(); } if ((zephir_function_exists_ex(ZEND_STRL("mb_convert_encoding")) == SUCCESS)) { - ZEPHIR_RETURN_CALL_FUNCTION("mb_convert_encoding", NULL, 325, &text, &from, &to); + ZEPHIR_RETURN_CALL_FUNCTION("mb_convert_encoding", NULL, 326, &text, &from, &to); zephir_check_call_status(); RETURN_MM(); } @@ -226,9 +213,8 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, getCompiler) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("compiler"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&compiler, &_0); @@ -236,18 +222,18 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, getCompiler) ZEPHIR_INIT_NVAR(&compiler); object_init_ex(&compiler, phalcon_mvc_view_engine_volt_compiler_ce); zephir_read_property(&_1$$3, this_ptr, ZEND_STRL("view"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_METHOD(NULL, &compiler, "__construct", NULL, 495, &_1$$3); + ZEPHIR_CALL_METHOD(NULL, &compiler, "__construct", NULL, 496, &_1$$3); zephir_check_call_status(); zephir_read_property(&_2$$3, this_ptr, ZEND_STRL("container"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&container, &_2$$3); if (Z_TYPE_P(&container) == IS_OBJECT) { - ZEPHIR_CALL_METHOD(NULL, &compiler, "setdi", NULL, 496, &container); + ZEPHIR_CALL_METHOD(NULL, &compiler, "setdi", NULL, 497, &container); zephir_check_call_status(); } zephir_read_property(&_2$$3, this_ptr, ZEND_STRL("options"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&options, &_2$$3); if (Z_TYPE_P(&options) == IS_ARRAY) { - ZEPHIR_CALL_METHOD(NULL, &compiler, "setoptions", NULL, 497, &options); + ZEPHIR_CALL_METHOD(NULL, &compiler, "setoptions", NULL, 498, &options); zephir_check_call_status(); } zephir_update_property_zval(this_ptr, ZEND_STRL("compiler"), &compiler); @@ -262,9 +248,6 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, getCompiler) */ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, getEventsManager) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "eventsManager"); } @@ -276,9 +259,6 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, getEventsManager) */ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, getOptions) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "options"); } @@ -296,26 +276,19 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, isIncluded) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *needle = NULL, needle_sub, *haystack, haystack_sub, _0$$6, _1$$5; - zval *this_ptr = getThis(); ZVAL_UNDEF(&needle_sub); ZVAL_UNDEF(&haystack_sub); ZVAL_UNDEF(&_0$$6); ZVAL_UNDEF(&_1$$5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ZVAL(needle) Z_PARAM_ZVAL(haystack) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &needle, &haystack); ZEPHIR_SEPARATE_PARAM(needle); - - if (UNEXPECTED(Z_TYPE_P(needle) == IS_NULL)) { ZEPHIR_INIT_NVAR(needle); ZVAL_STRING(needle, ""); @@ -325,7 +298,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, isIncluded) } if (Z_TYPE_P(haystack) == IS_STRING) { if ((zephir_function_exists_ex(ZEND_STRL("mb_strpos")) == SUCCESS)) { - ZEPHIR_CALL_FUNCTION(&_0$$6, "mb_strpos", NULL, 85, haystack, needle); + ZEPHIR_CALL_FUNCTION(&_0$$6, "mb_strpos", NULL, 86, haystack, needle); zephir_check_call_status(); RETURN_MM_BOOL(!ZEPHIR_IS_FALSE_IDENTICAL(&_0$$6)); } @@ -350,22 +323,15 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, length) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *item = NULL, item_sub; - zval *this_ptr = getThis(); ZVAL_UNDEF(&item_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(item) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &item); ZEPHIR_SEPARATE_PARAM(item); - - if (UNEXPECTED(Z_TYPE_P(item) == IS_NULL)) { ZEPHIR_INIT_NVAR(item); ZVAL_STRING(item, ""); @@ -378,7 +344,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, length) RETURN_MM_LONG(zephir_fast_count_int(item)); } if ((zephir_function_exists_ex(ZEND_STRL("mb_strlen")) == SUCCESS)) { - ZEPHIR_RETURN_CALL_FUNCTION("mb_strlen", NULL, 233, item); + ZEPHIR_RETURN_CALL_FUNCTION("mb_strlen", NULL, 234, item); zephir_check_call_status(); RETURN_MM(); } @@ -416,18 +382,12 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, preload) ZVAL_UNDEF(&_8$$5); ZVAL_UNDEF(&_9$$5); ZVAL_UNDEF(&_10$$5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, ¶meters); - - ZEPHIR_INIT_VAR(¶ms); array_init(¶ms); if (Z_TYPE_P(parameters) != IS_ARRAY) { @@ -438,7 +398,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, preload) } else { ZEPHIR_CPY_WRT(¶ms, parameters); } - ZEPHIR_OBS_VAR(&href); + zephir_memory_observe(&href); zephir_array_isset_long_fetch(&href, ¶ms, 0, 0); zephir_read_property(&_1, this_ptr, ZEND_STRL("container"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&container, &_1); @@ -448,7 +408,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, preload) zephir_check_call_status(); if (zephir_is_true(&_2)) { if (zephir_array_isset_long(¶ms, 1)) { - ZEPHIR_OBS_VAR(&attributes); + zephir_memory_observe(&attributes); zephir_array_fetch_long(&attributes, ¶ms, 1, PH_NOISY, "phalcon/Mvc/View/Engine/Volt.zep", 240); } else { ZEPHIR_INIT_VAR(&_4$$7); @@ -470,7 +430,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, preload) zephir_fast_str_replace(&_5$$5, &_6$$5, &_7$$5, &href); ZEPHIR_INIT_VAR(&_8$$5); ZVAL_STRING(&_8$$5, "preload"); - ZEPHIR_CALL_METHOD(NULL, &link, "__construct", NULL, 498, &_8$$5, &_5$$5, &attributes); + ZEPHIR_CALL_METHOD(NULL, &link, "__construct", NULL, 499, &_8$$5, &_5$$5, &attributes); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_8$$5); object_init_ex(&_8$$5, phalcon_html_link_serializer_header_ce); @@ -482,7 +442,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, preload) ZEPHIR_INIT_VAR(&_10$$5); zephir_create_array(&_10$$5, 1, 0); zephir_array_fast_append(&_10$$5, &link); - ZEPHIR_CALL_METHOD(&_9$$5, &_8$$5, "serialize", NULL, 499, &_10$$5); + ZEPHIR_CALL_METHOD(&_9$$5, &_8$$5, "serialize", NULL, 500, &_10$$5); zephir_check_call_status(); ZEPHIR_INIT_VAR(&header); ZEPHIR_CONCAT_SV(&header, "Link: ", &_9$$5); @@ -529,18 +489,14 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, render) ZVAL_UNDEF(&_10$$10); ZVAL_UNDEF(&_11$$11); ZVAL_UNDEF(&_12$$11); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(path) Z_PARAM_ZVAL(params) Z_PARAM_OPTIONAL Z_PARAM_BOOL(mustClean) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &path_param, ¶ms, &mustClean_param); if (UNEXPECTED(Z_TYPE_P(path_param) != IS_STRING && Z_TYPE_P(path_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'path' must be of the type string")); @@ -554,12 +510,9 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, render) if (!mustClean_param) { mustClean = 0; } else { - mustClean = zephir_get_boolval(mustClean_param); - } - - + } if (mustClean) { - ZEPHIR_CALL_FUNCTION(NULL, "ob_clean", NULL, 493); + ZEPHIR_CALL_FUNCTION(NULL, "ob_clean", NULL, 494); zephir_check_call_status(); } ZEPHIR_CALL_METHOD(&compiler, this_ptr, "getcompiler", NULL, 0); @@ -635,7 +588,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, render) } if (mustClean) { zephir_read_property(&_11$$11, this_ptr, ZEND_STRL("view"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_FUNCTION(&_12$$11, "ob_get_contents", NULL, 492); + ZEPHIR_CALL_FUNCTION(&_12$$11, "ob_get_contents", NULL, 493); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, &_11$$11, "setcontent", NULL, 0, &_12$$11); zephir_check_call_status(); @@ -656,17 +609,10 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, setEventsManager) zval *this_ptr = getThis(); ZVAL_UNDEF(&eventsManager_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(eventsManager, phalcon_events_managerinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &eventsManager); - - zephir_update_property_zval(this_ptr, ZEND_STRL("eventsManager"), eventsManager); } @@ -685,19 +631,13 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, setOptions) zval *this_ptr = getThis(); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &options_param); ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("options"), &options); ZEPHIR_MM_RESTORE(); } @@ -713,7 +653,6 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, slice) zephir_fcall_cache_entry *_3 = NULL, *_4 = NULL; zend_long start, ZEPHIR_LAST_CALL_STATUS, position = 0; zval *value, value_sub, *start_param = NULL, *end = NULL, end_sub, __$null, length, _9, _0$$3, _2$$6, _5$$9, _6$$11, _7$$10, _8$$12; - zval *this_ptr = getThis(); ZVAL_UNDEF(&value_sub); ZVAL_UNDEF(&end_sub); @@ -727,7 +666,6 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, slice) ZVAL_UNDEF(&_7$$10); ZVAL_UNDEF(&_8$$12); ZVAL_UNDEF(&slice); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_ZVAL(value) @@ -735,24 +673,19 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, slice) Z_PARAM_LONG(start) Z_PARAM_ZVAL_OR_NULL(end) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &value, &start_param, &end); if (!start_param) { start = 0; } else { - start = zephir_get_intval(start_param); - } + } if (!end) { end = &end_sub; ZEPHIR_CPY_WRT(end, &__$null); } else { ZEPHIR_SEPARATE_PARAM(end); } - - if (Z_TYPE_P(value) == IS_OBJECT) { if (Z_TYPE_P(end) == IS_NULL) { ZEPHIR_INIT_NVAR(end); @@ -792,19 +725,19 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, slice) } if (Z_TYPE_P(value) == IS_ARRAY) { ZVAL_LONG(&_5$$9, start); - ZEPHIR_RETURN_CALL_FUNCTION("array_slice", NULL, 500, value, &_5$$9, &length); + ZEPHIR_RETURN_CALL_FUNCTION("array_slice", NULL, 501, value, &_5$$9, &length); zephir_check_call_status(); RETURN_MM(); } if ((zephir_function_exists_ex(ZEND_STRL("mb_substr")) == SUCCESS)) { if (Z_TYPE_P(&length) != IS_NULL) { ZVAL_LONG(&_6$$11, start); - ZEPHIR_RETURN_CALL_FUNCTION("mb_substr", NULL, 227, value, &_6$$11, &length); + ZEPHIR_RETURN_CALL_FUNCTION("mb_substr", NULL, 228, value, &_6$$11, &length); zephir_check_call_status(); RETURN_MM(); } ZVAL_LONG(&_7$$10, start); - ZEPHIR_RETURN_CALL_FUNCTION("mb_substr", NULL, 227, value, &_7$$10); + ZEPHIR_RETURN_CALL_FUNCTION("mb_substr", NULL, 228, value, &_7$$10); zephir_check_call_status(); RETURN_MM(); } @@ -827,24 +760,17 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, sort) zend_long ZEPHIR_LAST_CALL_STATUS; zval *value_param = NULL; zval value; - zval *this_ptr = getThis(); ZVAL_UNDEF(&value); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &value_param); zephir_get_arrval(&value, value_param); - - ZEPHIR_MAKE_REF(&value); - ZEPHIR_CALL_FUNCTION(NULL, "asort", NULL, 501, &value); + ZEPHIR_CALL_FUNCTION(NULL, "asort", NULL, 502, &value); ZEPHIR_UNREF(&value); zephir_check_call_status(); RETURN_CTOR(&value); @@ -860,7 +786,8 @@ zend_object *zephir_init_properties_Phalcon_Mvc_View_Engine_Volt(zend_class_entr ZVAL_UNDEF(&_3$$4); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/mvc/view/engine/volt.zep.h b/ext/phalcon/mvc/view/engine/volt.zep.h index 6bb91cb4709..c286da06799 100644 --- a/ext/phalcon/mvc/view/engine/volt.zep.h +++ b/ext/phalcon/mvc/view/engine/volt.zep.h @@ -20,11 +20,7 @@ zend_object *zephir_init_properties_Phalcon_Mvc_View_Engine_Volt(zend_class_entr ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_view_engine_volt_callmacro, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, arguments, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, arguments, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, arguments, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_view_engine_volt_convertencoding, 0, 3, IS_STRING, 0) diff --git a/ext/phalcon/mvc/view/engine/volt/compiler.zep.c b/ext/phalcon/mvc/view/engine/volt/compiler.zep.c index 1a87cebae45..36bd26d8cb1 100644 --- a/ext/phalcon/mvc/view/engine/volt/compiler.zep.c +++ b/ext/phalcon/mvc/view/engine/volt/compiler.zep.c @@ -156,22 +156,16 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, __construct) ZVAL_UNDEF(&view_sub); ZVAL_NULL(&__$null); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_OBJECT_OF_CLASS_OR_NULL(view, phalcon_mvc_viewbaseinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(0, 1, &view); if (!view) { view = &view_sub; view = &__$null; } - - zephir_update_property_zval(this_ptr, ZEND_STRL("view"), view); } @@ -190,18 +184,12 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, addExtension) zval *this_ptr = getThis(); ZVAL_UNDEF(&extension_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(extension) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &extension); - - if (UNEXPECTED(Z_TYPE_P(extension) != IS_OBJECT)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_view_engine_volt_exception_ce, "The extension is not valid", "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 160); return; @@ -231,16 +219,12 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, addFilter) ZVAL_UNDEF(&name); ZVAL_UNDEF(&definition_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(name) Z_PARAM_ZVAL(definition) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &name_param, &definition); 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")); @@ -251,8 +235,6 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, addFilter) } else { ZEPHIR_INIT_VAR(&name); } - - zephir_update_property_array(this_ptr, SL("filters"), &name, definition); RETURN_THIS(); } @@ -274,16 +256,12 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, addFunction) ZVAL_UNDEF(&name); ZVAL_UNDEF(&definition_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(name) Z_PARAM_ZVAL(definition) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &name_param, &definition); 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")); @@ -294,8 +272,6 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, addFunction) } else { ZEPHIR_INIT_VAR(&name); } - - zephir_update_property_array(this_ptr, SL("functions"), &name, definition); RETURN_THIS(); } @@ -336,28 +312,22 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, attributeReader) ZVAL_UNDEF(&_11$$11); ZVAL_UNDEF(&_12$$12); ZVAL_UNDEF(&exprCode); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(expr) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &expr_param); ZEPHIR_OBS_COPY_OR_DUP(&expr, expr_param); - - ZEPHIR_INIT_VAR(&exprCode); - ZEPHIR_OBS_VAR(&left); + zephir_memory_observe(&left); zephir_array_fetch_string(&left, &expr, SL("left"), PH_NOISY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 219); zephir_array_fetch_string(&_0, &left, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 221); if (ZEPHIR_IS_LONG(&_0, 265)) { - ZEPHIR_OBS_VAR(&variable); + zephir_memory_observe(&variable); zephir_array_fetch_string(&variable, &left, SL("value"), PH_NOISY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 222); if (ZEPHIR_IS_STRING(&variable, "loop")) { - ZEPHIR_OBS_VAR(&level); + zephir_memory_observe(&level); zephir_read_property(&level, this_ptr, ZEND_STRL("foreachLevel"), PH_NOISY_CC); ZEPHIR_CALL_METHOD(&_1$$4, this_ptr, "getuniqueprefix", NULL, 0); zephir_check_call_status(); @@ -385,9 +355,9 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, attributeReader) } } } else { - ZEPHIR_CALL_METHOD(&leftCode, this_ptr, "expression", NULL, 502, &left); + ZEPHIR_CALL_METHOD(&leftCode, this_ptr, "expression", NULL, 503, &left); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&leftType); + zephir_memory_observe(&leftType); zephir_array_fetch_string(&leftType, &left, SL("type"), PH_NOISY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 244); _9$$8 = !ZEPHIR_IS_LONG(&leftType, '.'); if (_9$$8) { @@ -400,14 +370,14 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, attributeReader) } } zephir_concat_self_str(&exprCode, "->", sizeof("->") - 1); - ZEPHIR_OBS_VAR(&right); + zephir_memory_observe(&right); zephir_array_fetch_string(&right, &expr, SL("right"), PH_NOISY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 255); zephir_array_fetch_string(&_10, &right, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 257); if (ZEPHIR_IS_LONG(&_10, 265)) { zephir_array_fetch_string(&_11$$11, &right, SL("value"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 258); zephir_concat_self(&exprCode, &_11$$11); } else { - ZEPHIR_CALL_METHOD(&_12$$12, this_ptr, "expression", NULL, 502, &right); + ZEPHIR_CALL_METHOD(&_12$$12, this_ptr, "expression", NULL, 503, &right); zephir_check_call_status(); zephir_concat_self(&exprCode, &_12$$12); } @@ -472,17 +442,13 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compile) ZVAL_UNDEF(&_17$$35); ZVAL_UNDEF(&_18$$35); ZVAL_UNDEF(&_11$$26); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(templatePath) Z_PARAM_OPTIONAL Z_PARAM_BOOL(extendsMode) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &templatePath_param, &extendsMode_param); 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")); @@ -496,10 +462,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compile) if (!extendsMode_param) { extendsMode = 0; } else { - extendsMode = zephir_get_boolval(extendsMode_param); - } - - + } if (0) { zephir_update_property_zval(this_ptr, ZEND_STRL("extended"), &__$true); } else { @@ -511,23 +474,23 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compile) zephir_update_property_zval(this_ptr, ZEND_STRL("extendedBlocks"), &__$false); } zephir_update_property_zval(this_ptr, ZEND_STRL("blocks"), &__$null); - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, 0); zephir_update_property_zval(this_ptr, ZEND_STRL("level"), &_0); - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, 0); zephir_update_property_zval(this_ptr, ZEND_STRL("foreachLevel"), &_0); - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, 0); zephir_update_property_zval(this_ptr, ZEND_STRL("blockLevel"), &_0); - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, 0); zephir_update_property_zval(this_ptr, ZEND_STRL("exprLevel"), &_0); ZEPHIR_INIT_VAR(&compilation); ZVAL_NULL(&compilation); zephir_read_property(&_0, this_ptr, ZEND_STRL("options"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&options, &_0); - ZEPHIR_OBS_VAR(&compileAlways); + zephir_memory_observe(&compileAlways); if (!(zephir_array_isset_string_fetch(&compileAlways, &options, SL("always"), 0))) { ZEPHIR_OBS_NVAR(&compileAlways); if (zephir_array_isset_string_fetch(&compileAlways, &options, SL("compileAlways"), 0)) { @@ -545,7 +508,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compile) ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_view_engine_volt_exception_ce, "'always' must be a bool value", "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 319); return; } - ZEPHIR_OBS_VAR(&prefix); + zephir_memory_observe(&prefix); if (!(zephir_array_isset_string_fetch(&prefix, &options, SL("prefix"), 0))) { ZEPHIR_INIT_NVAR(&prefix); ZVAL_STRING(&prefix, ""); @@ -554,7 +517,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compile) ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_view_engine_volt_exception_ce, "'prefix' must be a string", "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 330); return; } - ZEPHIR_OBS_VAR(&compiledPath); + zephir_memory_observe(&compiledPath); if (!(zephir_array_isset_string_fetch(&compiledPath, &options, SL("path"), 0))) { ZEPHIR_OBS_NVAR(&compiledPath); if (zephir_array_isset_string_fetch(&compiledPath, &options, SL("compiledPath"), 0)) { @@ -568,7 +531,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compile) ZVAL_STRING(&compiledPath, ""); } } - ZEPHIR_OBS_VAR(&compiledSeparator); + zephir_memory_observe(&compiledSeparator); if (!(zephir_array_isset_string_fetch(&compiledSeparator, &options, SL("separator"), 0))) { ZEPHIR_OBS_NVAR(&compiledSeparator); if (zephir_array_isset_string_fetch(&compiledSeparator, &options, SL("compiledSeparator"), 0)) { @@ -586,7 +549,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compile) ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_view_engine_volt_exception_ce, "'separator' must be a string", "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 363); return; } - ZEPHIR_OBS_VAR(&compiledExtension); + zephir_memory_observe(&compiledExtension); if (!(zephir_array_isset_string_fetch(&compiledExtension, &options, SL("extension"), 0))) { ZEPHIR_OBS_NVAR(&compiledExtension); if (zephir_array_isset_string_fetch(&compiledExtension, &options, SL("compiledExtension"), 0)) { @@ -604,7 +567,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compile) ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_view_engine_volt_exception_ce, "'extension' must be a string", "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 381); return; } - ZEPHIR_OBS_VAR(&stat); + zephir_memory_observe(&stat); if (!(zephir_array_isset_string_fetch(&stat, &options, SL("stat"), 0))) { ZEPHIR_INIT_NVAR(&stat); ZVAL_BOOL(&stat, 1); @@ -615,7 +578,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compile) } if (Z_TYPE_P(&compiledPath) == IS_STRING) { if (!(ZEPHIR_IS_EMPTY(&compiledPath))) { - ZEPHIR_CALL_FUNCTION(&_10$$22, "realpath", NULL, 74, &templatePath); + ZEPHIR_CALL_FUNCTION(&_10$$22, "realpath", NULL, 75, &templatePath); zephir_check_call_status(); ZEPHIR_INIT_VAR(&templateSepPath); zephir_prepare_virtual_path(&templateSepPath, &_10$$22, &compiledSeparator); @@ -679,7 +642,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compile) object_init_ex(&_17$$35, phalcon_mvc_view_engine_volt_exception_ce); ZEPHIR_INIT_VAR(&_18$$35); ZEPHIR_CONCAT_SVS(&_18$$35, "Extends compilation file ", &compiledTemplatePath, " could not be opened"); - ZEPHIR_CALL_METHOD(NULL, &_17$$35, "__construct", NULL, 503, &_18$$35); + ZEPHIR_CALL_METHOD(NULL, &_17$$35, "__construct", NULL, 504, &_18$$35); zephir_check_call_status(); zephir_throw_exception_debug(&_17$$35, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 478); ZEPHIR_MM_RESTORE(); @@ -723,27 +686,20 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileAutoEscape) ZVAL_UNDEF(&compilation); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ARRAY(statement) Z_PARAM_BOOL(extendsMode) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &statement_param, &extendsMode_param); ZEPHIR_OBS_COPY_OR_DUP(&statement, statement_param); - extendsMode = zephir_get_boolval(extendsMode_param); - - - ZEPHIR_OBS_VAR(&autoescape); + zephir_memory_observe(&autoescape); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&autoescape, &statement, SL("enable"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_view_engine_volt_exception_ce, "Corrupted statement", "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 515); return; } - ZEPHIR_OBS_VAR(&oldAutoescape); + zephir_memory_observe(&oldAutoescape); zephir_read_property(&oldAutoescape, this_ptr, ZEND_STRL("autoescape"), PH_NOISY_CC); zephir_update_property_zval(this_ptr, ZEND_STRL("autoescape"), &autoescape); zephir_array_fetch_string(&_0, &statement, SL("block_statements"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 525); @@ -752,7 +708,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileAutoEscape) } else { ZVAL_BOOL(&_1, 0); } - ZEPHIR_CALL_METHOD(&compilation, this_ptr, "statementlist", NULL, 504, &_0, &_1); + ZEPHIR_CALL_METHOD(&compilation, this_ptr, "statementlist", NULL, 505, &_0, &_1); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("autoescape"), &oldAutoescape); RETURN_CCTOR(&compilation); @@ -770,24 +726,16 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileCall) zend_bool extendsMode; zval *statement_param = NULL, *extendsMode_param = NULL; zval statement; - zval *this_ptr = getThis(); ZVAL_UNDEF(&statement); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ARRAY(statement) Z_PARAM_BOOL(extendsMode) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &statement_param, &extendsMode_param); ZEPHIR_OBS_COPY_OR_DUP(&statement, statement_param); - extendsMode = zephir_get_boolval(extendsMode_param); - - } /** @@ -812,42 +760,35 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileCase) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_0$$4); ZVAL_UNDEF(&_1$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(statement) Z_PARAM_OPTIONAL Z_PARAM_BOOL(caseClause) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &statement_param, &caseClause_param); ZEPHIR_OBS_COPY_OR_DUP(&statement, statement_param); if (!caseClause_param) { caseClause = 1; } else { - caseClause = zephir_get_boolval(caseClause_param); - } - - + } if (UNEXPECTED(caseClause == 0)) { RETURN_MM_STRING(""); } - ZEPHIR_OBS_VAR(&expr); + zephir_memory_observe(&expr); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&expr, &statement, SL("expr"), 0)))) { ZEPHIR_INIT_VAR(&_0$$4); object_init_ex(&_0$$4, phalcon_mvc_view_engine_volt_exception_ce); ZEPHIR_INIT_VAR(&_1$$4); ZVAL_STRING(&_1$$4, "Corrupt statement"); - ZEPHIR_CALL_METHOD(NULL, &_0$$4, "__construct", NULL, 503, &_1$$4, &statement); + ZEPHIR_CALL_METHOD(NULL, &_0$$4, "__construct", NULL, 504, &_1$$4, &statement); zephir_check_call_status(); zephir_throw_exception_debug(&_0$$4, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 568); ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_CALL_METHOD(&_2, this_ptr, "expression", NULL, 502, &expr); + ZEPHIR_CALL_METHOD(&_2, this_ptr, "expression", NULL, 503, &expr); zephir_check_call_status(); ZEPHIR_CONCAT_SVS(return_value, ""); RETURN_MM(); @@ -871,25 +812,19 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileDo) ZVAL_UNDEF(&statement); ZVAL_UNDEF(&expr); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(statement) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &statement_param); ZEPHIR_OBS_COPY_OR_DUP(&statement, statement_param); - - - ZEPHIR_OBS_VAR(&expr); + zephir_memory_observe(&expr); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&expr, &statement, SL("expr"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_view_engine_volt_exception_ce, "Corrupted statement", "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 592); return; } - ZEPHIR_CALL_METHOD(&_0, this_ptr, "expression", NULL, 502, &expr); + ZEPHIR_CALL_METHOD(&_0, this_ptr, "expression", NULL, 503, &expr); zephir_check_call_status(); ZEPHIR_CONCAT_SVS(return_value, ""); RETURN_MM(); @@ -922,40 +857,34 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileEcho) ZVAL_UNDEF(&_5$$4); ZVAL_UNDEF(&_4$$5); ZVAL_UNDEF(&_6$$6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(statement) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &statement_param); ZEPHIR_OBS_COPY_OR_DUP(&statement, statement_param); - - - ZEPHIR_OBS_VAR(&expr); + zephir_memory_observe(&expr); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&expr, &statement, SL("expr"), 0)))) { ZEPHIR_INIT_VAR(&_0$$3); object_init_ex(&_0$$3, phalcon_mvc_view_engine_volt_exception_ce); ZEPHIR_INIT_VAR(&_1$$3); ZVAL_STRING(&_1$$3, "Corrupt statement"); - ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 503, &_1$$3, &statement); + ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 504, &_1$$3, &statement); zephir_check_call_status(); zephir_throw_exception_debug(&_0$$3, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 616); ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "expression", NULL, 502, &expr); + ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "expression", NULL, 503, &expr); zephir_check_call_status(); zephir_array_fetch_string(&_2, &expr, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 624); if (ZEPHIR_IS_LONG(&_2, 350)) { - ZEPHIR_CALL_METHOD(&_3$$4, this_ptr, "istagfactory", NULL, 505, &expr); + ZEPHIR_CALL_METHOD(&_3$$4, this_ptr, "istagfactory", NULL, 506, &expr); zephir_check_call_status(); if (ZEPHIR_IS_TRUE_IDENTICAL(&_3$$4)) { ZVAL_BOOL(&_4$$5, 1); - ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "expression", NULL, 502, &expr, &_4$$5); + ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "expression", NULL, 503, &expr, &_4$$5); zephir_check_call_status(); } zephir_array_fetch_string(&name, &expr, SL("name"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 629); @@ -996,32 +925,26 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileElseIf) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(statement) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &statement_param); ZEPHIR_OBS_COPY_OR_DUP(&statement, statement_param); - - - ZEPHIR_OBS_VAR(&expr); + zephir_memory_observe(&expr); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&expr, &statement, SL("expr"), 0)))) { ZEPHIR_INIT_VAR(&_0$$3); object_init_ex(&_0$$3, phalcon_mvc_view_engine_volt_exception_ce); ZEPHIR_INIT_VAR(&_1$$3); ZVAL_STRING(&_1$$3, "Corrupt statement"); - ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 503, &_1$$3, &statement); + ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 504, &_1$$3, &statement); zephir_check_call_status(); zephir_throw_exception_debug(&_0$$3, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 666); ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_CALL_METHOD(&_2, this_ptr, "expression", NULL, 502, &expr); + ZEPHIR_CALL_METHOD(&_2, this_ptr, "expression", NULL, 503, &expr); zephir_check_call_status(); ZEPHIR_CONCAT_SVS(return_value, ""); RETURN_MM(); @@ -1064,18 +987,14 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileFile) ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_0$$4); ZVAL_UNDEF(&_2$$5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(path) Z_PARAM_STR(compiledPath) Z_PARAM_OPTIONAL Z_PARAM_BOOL(extendsMode) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &path_param, &compiledPath_param, &extendsMode_param); if (UNEXPECTED(Z_TYPE_P(path_param) != IS_STRING && Z_TYPE_P(path_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'path' must be of the type string")); @@ -1098,10 +1017,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileFile) if (!extendsMode_param) { extendsMode = 0; } else { - extendsMode = zephir_get_boolval(extendsMode_param); - } - - + } if (UNEXPECTED(ZEPHIR_IS_EQUAL(&path, &compiledPath))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_view_engine_volt_exception_ce, "Template path and compilation template path cannot be the same", "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 699); return; @@ -1111,7 +1027,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileFile) object_init_ex(&_0$$4, phalcon_mvc_view_engine_volt_exception_ce); ZEPHIR_INIT_VAR(&_1$$4); ZEPHIR_CONCAT_SVS(&_1$$4, "Template file ", &path, " does not exist"); - ZEPHIR_CALL_METHOD(NULL, &_0$$4, "__construct", NULL, 503, &_1$$4); + ZEPHIR_CALL_METHOD(NULL, &_0$$4, "__construct", NULL, 504, &_1$$4); zephir_check_call_status(); zephir_throw_exception_debug(&_0$$4, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 706); ZEPHIR_MM_RESTORE(); @@ -1124,7 +1040,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileFile) object_init_ex(&_2$$5, phalcon_mvc_view_engine_volt_exception_ce); ZEPHIR_INIT_VAR(&_3$$5); ZEPHIR_CONCAT_SVS(&_3$$5, "Template file ", &path, " could not be opened"); - ZEPHIR_CALL_METHOD(NULL, &_2$$5, "__construct", NULL, 503, &_3$$5); + ZEPHIR_CALL_METHOD(NULL, &_2$$5, "__construct", NULL, 504, &_3$$5); zephir_check_call_status(); zephir_throw_exception_debug(&_2$$5, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 718); ZEPHIR_MM_RESTORE(); @@ -1213,26 +1129,19 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileForeach) ZVAL_UNDEF(&_24$$18); ZVAL_UNDEF(&_25$$22); ZVAL_UNDEF(&compilation); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(statement) Z_PARAM_OPTIONAL Z_PARAM_BOOL(extendsMode) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &statement_param, &extendsMode_param); ZEPHIR_OBS_COPY_OR_DUP(&statement, statement_param); if (!extendsMode_param) { extendsMode = 0; } else { - extendsMode = zephir_get_boolval(extendsMode_param); - } - - + } if (UNEXPECTED(!(zephir_array_isset_string(&statement, SL("expr"))))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_view_engine_volt_exception_ce, "Corrupted statement", "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 764); return; @@ -1243,15 +1152,15 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileForeach) RETURN_ON_FAILURE(zephir_property_incr(this_ptr, SL("foreachLevel"))); ZEPHIR_CALL_METHOD(&prefix, this_ptr, "getuniqueprefix", NULL, 0); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&level); + zephir_memory_observe(&level); zephir_read_property(&level, this_ptr, ZEND_STRL("foreachLevel"), PH_NOISY_CC); ZEPHIR_INIT_VAR(&prefixLevel); ZEPHIR_CONCAT_VV(&prefixLevel, &prefix, &level); - ZEPHIR_OBS_VAR(&expr); + zephir_memory_observe(&expr); zephir_array_fetch_string(&expr, &statement, SL("expr"), PH_NOISY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 782); - ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "expression", NULL, 502, &expr); + ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "expression", NULL, 503, &expr); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&blockStatements); + zephir_memory_observe(&blockStatements); zephir_array_fetch_string(&blockStatements, &statement, SL("block_statements"), PH_NOISY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 788); ZEPHIR_INIT_NVAR(&forElse); ZVAL_BOOL(&forElse, 0); @@ -1309,9 +1218,9 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileForeach) } else { ZVAL_BOOL(&_4, 0); } - ZEPHIR_CALL_METHOD(&code, this_ptr, "statementlist", NULL, 504, &blockStatements, &_4); + ZEPHIR_CALL_METHOD(&code, this_ptr, "statementlist", NULL, 505, &blockStatements, &_4); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&loopContext); + zephir_memory_observe(&loopContext); zephir_read_property(&loopContext, this_ptr, ZEND_STRL("loopPointers"), PH_NOISY_CC); if (zephir_array_isset(&loopContext, &level)) { ZEPHIR_INIT_VAR(&_5$$11); @@ -1346,9 +1255,9 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileForeach) } else { ZEPHIR_CPY_WRT(&iterator, &exprCode); } - ZEPHIR_OBS_VAR(&variable); + zephir_memory_observe(&variable); zephir_array_fetch_string(&variable, &statement, SL("variable"), PH_NOISY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 838); - ZEPHIR_OBS_VAR(&key); + zephir_memory_observe(&key); if (zephir_array_isset_string_fetch(&key, &statement, SL("key"), 0)) { ZEPHIR_INIT_VAR(&_14$$13); ZEPHIR_CONCAT_SVSVSVS(&_14$$13, " $", &variable, ") { "); @@ -1358,9 +1267,9 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileForeach) ZEPHIR_CONCAT_SVSVS(&_15$$14, ""); @@ -1420,27 +1329,30 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileForeach) PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileForElse) { zval level, prefix, _0, _1; + zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *this_ptr = getThis(); ZVAL_UNDEF(&level); ZVAL_UNDEF(&prefix); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - - zephir_read_property(&level, this_ptr, ZEND_STRL("foreachLevel"), PH_NOISY_CC | PH_READONLY); + zephir_memory_observe(&level); + zephir_read_property(&level, this_ptr, ZEND_STRL("foreachLevel"), PH_NOISY_CC); + zephir_memory_observe(&prefix); zephir_read_property(&_0, this_ptr, ZEND_STRL("forElsePointers"), PH_NOISY_CC | PH_READONLY); - if (!(zephir_array_isset_fetch(&prefix, &_0, &level, 1))) { - RETURN_STRING(""); + if (!(zephir_array_isset_fetch(&prefix, &_0, &level, 0))) { + RETURN_MM_STRING(""); } zephir_read_property(&_1, this_ptr, ZEND_STRL("loopPointers"), PH_NOISY_CC | PH_READONLY); if (zephir_array_isset(&_1, &level)) { ZEPHIR_CONCAT_SVSVS(return_value, ""); - return; + RETURN_MM(); } ZEPHIR_CONCAT_SVS(return_value, ""); - return; + RETURN_MM(); } /** @@ -1476,39 +1388,32 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileIf) ZVAL_UNDEF(&_8$$4); ZVAL_UNDEF(&_9$$4); ZVAL_UNDEF(&compilation); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(statement) Z_PARAM_OPTIONAL Z_PARAM_BOOL(extendsMode) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &statement_param, &extendsMode_param); ZEPHIR_OBS_COPY_OR_DUP(&statement, statement_param); if (!extendsMode_param) { extendsMode = 0; } else { - extendsMode = zephir_get_boolval(extendsMode_param); - } - - - ZEPHIR_OBS_VAR(&expr); + } + zephir_memory_observe(&expr); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&expr, &statement, SL("expr"), 0)))) { ZEPHIR_INIT_VAR(&_0$$3); object_init_ex(&_0$$3, phalcon_mvc_view_engine_volt_exception_ce); ZEPHIR_INIT_VAR(&_1$$3); ZVAL_STRING(&_1$$3, "Corrupt statement"); - ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 503, &_1$$3, &statement); + ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 504, &_1$$3, &statement); zephir_check_call_status(); zephir_throw_exception_debug(&_0$$3, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 941); ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_CALL_METHOD(&_2, this_ptr, "expression", NULL, 502, &expr); + ZEPHIR_CALL_METHOD(&_2, this_ptr, "expression", NULL, 503, &expr); zephir_check_call_status(); zephir_array_fetch_string(&_4, &statement, SL("true_statements"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 947); if (extendsMode) { @@ -1516,19 +1421,19 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileIf) } else { ZVAL_BOOL(&_5, 0); } - ZEPHIR_CALL_METHOD(&_3, this_ptr, "statementlist", NULL, 504, &_4, &_5); + ZEPHIR_CALL_METHOD(&_3, this_ptr, "statementlist", NULL, 505, &_4, &_5); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_6); ZEPHIR_CONCAT_SVSV(&_6, "", &_3); zephir_get_strval(&compilation, &_6); - ZEPHIR_OBS_VAR(&blockStatements); + zephir_memory_observe(&blockStatements); if (zephir_array_isset_string_fetch(&blockStatements, &statement, SL("false_statements"), 0)) { if (extendsMode) { ZVAL_BOOL(&_8$$4, 1); } else { ZVAL_BOOL(&_8$$4, 0); } - ZEPHIR_CALL_METHOD(&_7$$4, this_ptr, "statementlist", NULL, 504, &blockStatements, &_8$$4); + ZEPHIR_CALL_METHOD(&_7$$4, this_ptr, "statementlist", NULL, 505, &blockStatements, &_8$$4); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_9$$4); ZEPHIR_CONCAT_SV(&_9$$4, "", &_7$$4); @@ -1565,20 +1470,14 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileInclude) ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_1$$5); ZVAL_UNDEF(&_2$$6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(statement) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &statement_param); ZEPHIR_OBS_COPY_OR_DUP(&statement, statement_param); - - - ZEPHIR_OBS_VAR(&pathExpr); + zephir_memory_observe(&pathExpr); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&pathExpr, &statement, SL("path"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_view_engine_volt_exception_ce, "Corrupted statement", "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 981); return; @@ -1586,7 +1485,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileInclude) zephir_array_fetch_string(&_0, &pathExpr, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 988); if (ZEPHIR_IS_LONG(&_0, 260)) { if (!(zephir_array_isset_string(&statement, SL("params")))) { - ZEPHIR_OBS_VAR(&path); + zephir_memory_observe(&path); zephir_array_fetch_string(&path, &pathExpr, SL("value"), PH_NOISY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 997); ZEPHIR_CALL_METHOD(&finalPath, this_ptr, "getfinalpath", NULL, 0, &path); zephir_check_call_status(); @@ -1606,14 +1505,14 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileInclude) RETURN_CCTOR(&compilation); } } - ZEPHIR_CALL_METHOD(&path, this_ptr, "expression", NULL, 502, &pathExpr); + ZEPHIR_CALL_METHOD(&path, this_ptr, "expression", NULL, 503, &pathExpr); zephir_check_call_status(); - ZEPHIR_OBS_VAR(¶ms); + zephir_memory_observe(¶ms); if (!(zephir_array_isset_string_fetch(¶ms, &statement, SL("params"), 0))) { ZEPHIR_CONCAT_SVS(return_value, "partial(", &path, "); ?>"); RETURN_MM(); } - ZEPHIR_CALL_METHOD(&_3, this_ptr, "expression", NULL, 502, ¶ms); + ZEPHIR_CALL_METHOD(&_3, this_ptr, "expression", NULL, 503, ¶ms); zephir_check_call_status(); ZEPHIR_CONCAT_SVSVS(return_value, "partial(", &path, ", ", &_3, "); ?>"); RETURN_MM(); @@ -1675,22 +1574,15 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileMacro) ZVAL_UNDEF(&_28); ZVAL_UNDEF(&_4$$5); ZVAL_UNDEF(&_5$$6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ARRAY(statement) Z_PARAM_BOOL(extendsMode) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &statement_param, &extendsMode_param); ZEPHIR_OBS_COPY_OR_DUP(&statement, statement_param); - extendsMode = zephir_get_boolval(extendsMode_param); - - - ZEPHIR_OBS_VAR(&name); + zephir_memory_observe(&name); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&name, &statement, SL("name"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_view_engine_volt_exception_ce, "Corrupted statement", "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1056); return; @@ -1701,7 +1593,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileMacro) object_init_ex(&_1$$4, phalcon_mvc_view_engine_volt_exception_ce); ZEPHIR_INIT_VAR(&_2$$4); ZEPHIR_CONCAT_SVS(&_2$$4, "Macro '", &name, "' is already defined"); - ZEPHIR_CALL_METHOD(NULL, &_1$$4, "__construct", NULL, 503, &_2$$4); + ZEPHIR_CALL_METHOD(NULL, &_1$$4, "__construct", NULL, 504, &_2$$4); zephir_check_call_status(); zephir_throw_exception_debug(&_1$$4, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1063); ZEPHIR_MM_RESTORE(); @@ -1713,7 +1605,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileMacro) zephir_get_strval(¯oName, &_3); ZEPHIR_INIT_VAR(&code); ZVAL_STRING(&code, ""); @@ -1752,7 +1644,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileMacro) zephir_concat_self_str(&code, " } else { ", sizeof(" } else { ") - 1); ZEPHIR_OBS_NVAR(&defaultValue); if (EXPECTED(zephir_array_isset_string_fetch(&defaultValue, ¶meter, SL("default"), 0))) { - ZEPHIR_CALL_METHOD(&_14$$8, this_ptr, "expression", &_15, 502, &defaultValue); + ZEPHIR_CALL_METHOD(&_14$$8, this_ptr, "expression", &_15, 503, &defaultValue); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_16$$8); ZEPHIR_CONCAT_SVSVS(&_16$$8, "$", &variableName, " = ", &_14$$8, ";"); @@ -1795,7 +1687,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileMacro) zephir_concat_self_str(&code, " } else { ", sizeof(" } else { ") - 1); ZEPHIR_OBS_NVAR(&defaultValue); if (EXPECTED(zephir_array_isset_string_fetch(&defaultValue, ¶meter, SL("default"), 0))) { - ZEPHIR_CALL_METHOD(&_22$$11, this_ptr, "expression", &_15, 502, &defaultValue); + ZEPHIR_CALL_METHOD(&_22$$11, this_ptr, "expression", &_15, 503, &defaultValue); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_23$$11); ZEPHIR_CONCAT_SVSVS(&_23$$11, "$", &variableName, " = ", &_22$$11, ";"); @@ -1814,14 +1706,14 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileMacro) ZEPHIR_INIT_NVAR(&position); zephir_concat_self_str(&code, " ?>", sizeof(" ?>") - 1); } - ZEPHIR_OBS_VAR(&blockStatements); + zephir_memory_observe(&blockStatements); if (zephir_array_isset_string_fetch(&blockStatements, &statement, SL("block_statements"), 0)) { if (extendsMode) { ZVAL_BOOL(&_26$$13, 1); } else { ZVAL_BOOL(&_26$$13, 0); } - ZEPHIR_CALL_METHOD(&_25$$13, this_ptr, "statementlist", NULL, 504, &blockStatements, &_26$$13); + ZEPHIR_CALL_METHOD(&_25$$13, this_ptr, "statementlist", NULL, 505, &blockStatements, &_26$$13); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_27$$13); ZEPHIR_CONCAT_VS(&_27$$13, &_25$$13, "= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(statement) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &statement_param); ZEPHIR_OBS_COPY_OR_DUP(&statement, statement_param); - - - ZEPHIR_OBS_VAR(&expr); + zephir_memory_observe(&expr); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&expr, &statement, SL("expr"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_view_engine_volt_exception_ce, "Corrupted statement", "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1137); return; } - ZEPHIR_CALL_METHOD(&_0, this_ptr, "expression", NULL, 502, &expr); + ZEPHIR_CALL_METHOD(&_0, this_ptr, "expression", NULL, 503, &expr); zephir_check_call_status(); ZEPHIR_CONCAT_SVS(return_value, ""); RETURN_MM(); @@ -1917,20 +1803,14 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileSet) ZVAL_UNDEF(&_17$$14); ZVAL_UNDEF(&_18$$15); ZVAL_UNDEF(&compilation); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(statement) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &statement_param); ZEPHIR_OBS_COPY_OR_DUP(&statement, statement_param); - - - ZEPHIR_OBS_VAR(&assignments); + zephir_memory_observe(&assignments); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&assignments, &statement, SL("assignments"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_view_engine_volt_exception_ce, "Corrupted statement", "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1163); return; @@ -1944,10 +1824,10 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileSet) ZEPHIR_INIT_NVAR(&assignment); ZVAL_COPY(&assignment, _0); zephir_array_fetch_string(&_2$$4, &assignment, SL("expr"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1174); - ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "expression", &_3, 502, &_2$$4); + ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "expression", &_3, 503, &_2$$4); zephir_check_call_status(); zephir_array_fetch_string(&_4$$4, &assignment, SL("variable"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1181); - ZEPHIR_CALL_METHOD(&target, this_ptr, "expression", &_3, 502, &_4$$4); + ZEPHIR_CALL_METHOD(&target, this_ptr, "expression", &_3, 503, &_4$$4); zephir_check_call_status(); zephir_array_fetch_string(&_5$$4, &assignment, SL("op"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1187); do { @@ -1994,10 +1874,10 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileSet) ZEPHIR_CALL_METHOD(&assignment, &assignments, "current", NULL, 0); zephir_check_call_status(); zephir_array_fetch_string(&_11$$10, &assignment, SL("expr"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1174); - ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "expression", &_3, 502, &_11$$10); + ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "expression", &_3, 503, &_11$$10); zephir_check_call_status(); zephir_array_fetch_string(&_12$$10, &assignment, SL("variable"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1181); - ZEPHIR_CALL_METHOD(&target, this_ptr, "expression", &_3, 502, &_12$$10); + ZEPHIR_CALL_METHOD(&target, this_ptr, "expression", &_3, 503, &_12$$10); zephir_check_call_status(); zephir_array_fetch_string(&_13$$10, &assignment, SL("op"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1187); do { @@ -2064,17 +1944,13 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileString) ZVAL_UNDEF(&viewCode); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(viewCode) Z_PARAM_OPTIONAL Z_PARAM_BOOL(extendsMode) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &viewCode_param, &extendsMode_param); if (UNEXPECTED(Z_TYPE_P(viewCode_param) != IS_STRING && Z_TYPE_P(viewCode_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'viewCode' must be of the type string")); @@ -2088,10 +1964,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileString) if (!extendsMode_param) { extendsMode = 0; } else { - extendsMode = zephir_get_boolval(extendsMode_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZEPHIR_INIT_NVAR(&_0); ZVAL_STRING(&_0, "eval code"); @@ -2136,57 +2009,50 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileSwitch) ZVAL_UNDEF(&_4$$5); ZVAL_UNDEF(&_5$$5); ZVAL_UNDEF(&_6$$5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(statement) Z_PARAM_OPTIONAL Z_PARAM_BOOL(extendsMode) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &statement_param, &extendsMode_param); ZEPHIR_OBS_COPY_OR_DUP(&statement, statement_param); if (!extendsMode_param) { extendsMode = 0; } else { - extendsMode = zephir_get_boolval(extendsMode_param); - } - - - ZEPHIR_OBS_VAR(&expr); + } + zephir_memory_observe(&expr); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&expr, &statement, SL("expr"), 0)))) { ZEPHIR_INIT_VAR(&_0$$3); object_init_ex(&_0$$3, phalcon_mvc_view_engine_volt_exception_ce); ZEPHIR_INIT_VAR(&_1$$3); ZVAL_STRING(&_1$$3, "Corrupt statement"); - ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 503, &_1$$3, &statement); + ZEPHIR_CALL_METHOD(NULL, &_0$$3, "__construct", NULL, 504, &_1$$3, &statement); zephir_check_call_status(); zephir_throw_exception_debug(&_0$$3, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1253); ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_CALL_METHOD(&_2, this_ptr, "expression", NULL, 502, &expr); + ZEPHIR_CALL_METHOD(&_2, this_ptr, "expression", NULL, 503, &expr); zephir_check_call_status(); ZEPHIR_INIT_VAR(&compilation); ZEPHIR_CONCAT_SVS(&compilation, ""); - ZEPHIR_OBS_VAR(&caseClauses); + zephir_memory_observe(&caseClauses); if (zephir_array_isset_string_fetch(&caseClauses, &statement, SL("case_clauses"), 0)) { if (extendsMode) { ZVAL_BOOL(&_3$$4, 1); } else { ZVAL_BOOL(&_3$$4, 0); } - ZEPHIR_CALL_METHOD(&lines, this_ptr, "statementlist", NULL, 504, &caseClauses, &_3$$4); + ZEPHIR_CALL_METHOD(&lines, this_ptr, "statementlist", NULL, 505, &caseClauses, &_3$$4); zephir_check_call_status(); if (zephir_fast_strlen_ev(&lines) != 0) { ZEPHIR_INIT_VAR(&_4$$5); ZVAL_STRING(&_4$$5, "/(*ANYCRLF)^\\h+|\\h+$|(\\h){2,}/mu"); ZEPHIR_INIT_VAR(&_5$$5); ZVAL_STRING(&_5$$5, ""); - ZEPHIR_CALL_FUNCTION(&_6$$5, "preg_replace", NULL, 40, &_4$$5, &_5$$5, &lines); + ZEPHIR_CALL_FUNCTION(&_6$$5, "preg_replace", NULL, 41, &_4$$5, &_5$$5, &lines); zephir_check_call_status(); ZEPHIR_CPY_WRT(&lines, &_6$$5); } @@ -2260,26 +2126,19 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, expression) ZVAL_UNDEF(&_34$$78); ZVAL_UNDEF(&_35$$78); ZVAL_UNDEF(&_36$$78); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(expr) Z_PARAM_OPTIONAL Z_PARAM_BOOL(doubleQuotes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &expr_param, &doubleQuotes_param); ZEPHIR_OBS_COPY_OR_DUP(&expr, expr_param); if (!doubleQuotes_param) { doubleQuotes = 0; } else { - doubleQuotes = zephir_get_boolval(doubleQuotes_param); - } - - + } ZEPHIR_INIT_VAR(&exprCode); ZVAL_NULL(&exprCode); RETURN_ON_FAILURE(zephir_property_incr(this_ptr, SL("exprLevel"))); @@ -2292,7 +2151,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, expression) zephir_array_fast_append(&_1$$4, &expr); ZEPHIR_INIT_NVAR(&_2$$4); ZVAL_STRING(&_2$$4, "resolveExpression"); - ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "fireextensionevent", &_3, 506, &_2$$4, &_1$$4); + ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "fireextensionevent", &_3, 507, &_2$$4, &_1$$4); zephir_check_call_status(); if (Z_TYPE_P(&exprCode) == IS_STRING) { break; @@ -2314,7 +2173,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, expression) } else { ZVAL_BOOL(&_7$$7, 0); } - ZEPHIR_CALL_METHOD(&singleExprCode, this_ptr, "expression", &_8, 502, &_6$$7, &_7$$7); + ZEPHIR_CALL_METHOD(&singleExprCode, this_ptr, "expression", &_8, 503, &_6$$7, &_7$$7); zephir_check_call_status(); ZEPHIR_OBS_NVAR(&name); if (zephir_array_isset_string_fetch(&name, &singleExpr, SL("name"), 0)) { @@ -2342,7 +2201,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, expression) } else { ZVAL_BOOL(&_11$$10, 0); } - ZEPHIR_CALL_METHOD(&singleExprCode, this_ptr, "expression", &_8, 502, &_10$$10, &_11$$10); + ZEPHIR_CALL_METHOD(&singleExprCode, this_ptr, "expression", &_8, 503, &_10$$10, &_11$$10); zephir_check_call_status(); ZEPHIR_OBS_NVAR(&name); if (zephir_array_isset_string_fetch(&name, &singleExpr, SL("name"), 0)) { @@ -2373,7 +2232,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, expression) } else { ZVAL_BOOL(&_14$$14, 0); } - ZEPHIR_CALL_METHOD(&leftCode, this_ptr, "expression", &_8, 502, &left, &_14$$14); + ZEPHIR_CALL_METHOD(&leftCode, this_ptr, "expression", &_8, 503, &left, &_14$$14); zephir_check_call_status(); } if (ZEPHIR_IS_LONG(&type, 311)) { @@ -2384,7 +2243,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, expression) } if (ZEPHIR_IS_LONG(&type, 124)) { zephir_array_fetch_string(&_17$$16, &expr, SL("right"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1390); - ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "resolvefilter", &_18, 507, &_17$$16, &leftCode); + ZEPHIR_CALL_METHOD(&exprCode, this_ptr, "resolvefilter", &_18, 508, &_17$$16, &leftCode); zephir_check_call_status(); break; } @@ -2395,7 +2254,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, expression) } else { ZVAL_BOOL(&_19$$17, 0); } - ZEPHIR_CALL_METHOD(&rightCode, this_ptr, "expression", &_8, 502, &right, &_19$$17); + ZEPHIR_CALL_METHOD(&rightCode, this_ptr, "expression", &_8, 503, &right, &_19$$17); zephir_check_call_status(); } ZEPHIR_INIT_NVAR(&exprCode); @@ -2586,7 +2445,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, expression) } else { ZVAL_BOOL(&_28$$54, 0); } - ZEPHIR_CALL_METHOD(&startCode, this_ptr, "expression", &_8, 502, &start, &_28$$54); + ZEPHIR_CALL_METHOD(&startCode, this_ptr, "expression", &_8, 503, &start, &_28$$54); zephir_check_call_status(); } else { ZEPHIR_INIT_NVAR(&startCode); @@ -2599,7 +2458,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, expression) } else { ZVAL_BOOL(&_29$$56, 0); } - ZEPHIR_CALL_METHOD(&endCode, this_ptr, "expression", &_8, 502, &end, &_29$$56); + ZEPHIR_CALL_METHOD(&endCode, this_ptr, "expression", &_8, 503, &end, &_29$$56); zephir_check_call_status(); } else { ZEPHIR_INIT_NVAR(&endCode); @@ -2696,7 +2555,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, expression) } else { ZVAL_BOOL(&_32$$74, 0); } - ZEPHIR_CALL_METHOD(&_30$$74, this_ptr, "expression", &_8, 502, &_31$$74, &_32$$74); + ZEPHIR_CALL_METHOD(&_30$$74, this_ptr, "expression", &_8, 503, &_31$$74, &_32$$74); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&exprCode); ZEPHIR_CONCAT_SVSVSVS(&exprCode, "(", &_30$$74, " ? ", &leftCode, " : ", &rightCode, ")"); @@ -2723,7 +2582,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, expression) zephir_array_fetch_string(&_35$$78, &expr, SL("line"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1646); ZEPHIR_INIT_NVAR(&_36$$78); ZEPHIR_CONCAT_SVSVSV(&_36$$78, "Unknown expression ", &type, " in ", &_34$$78, " on line ", &_35$$78); - ZEPHIR_CALL_METHOD(NULL, &_33$$78, "__construct", &_37, 503, &_36$$78); + ZEPHIR_CALL_METHOD(NULL, &_33$$78, "__construct", &_37, 504, &_36$$78); zephir_check_call_status(); zephir_throw_exception_debug(&_33$$78, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1646); ZEPHIR_MM_RESTORE(); @@ -2764,17 +2623,13 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, fireExtensionEvent) ZVAL_UNDEF(&_4$$6); ZVAL_UNDEF(&_5$$10); ZVAL_UNDEF(&_6$$11); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(name) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(arguments) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &name_param, &arguments_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")); @@ -2791,8 +2646,6 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, fireExtensionEvent) } else { zephir_get_arrval(&arguments, arguments_param); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("extensions"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&extensions, &_0); zephir_is_iterable(&extensions, 0, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1694); @@ -2925,33 +2778,26 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, functionCall) ZVAL_UNDEF(&_20$$28); ZVAL_UNDEF(&_21$$28); ZVAL_UNDEF(&_22$$30); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(expr) Z_PARAM_OPTIONAL Z_PARAM_BOOL(doubleQuotes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &expr_param, &doubleQuotes_param); ZEPHIR_OBS_COPY_OR_DUP(&expr, expr_param); if (!doubleQuotes_param) { doubleQuotes = 0; } else { - doubleQuotes = zephir_get_boolval(doubleQuotes_param); - } - - + } ZEPHIR_INIT_VAR(&code); ZVAL_NULL(&code); ZEPHIR_INIT_VAR(&funcArguments); ZVAL_NULL(&funcArguments); - ZEPHIR_OBS_VAR(&nameExpr); + zephir_memory_observe(&nameExpr); zephir_array_fetch_string(&nameExpr, &expr, SL("name"), PH_NOISY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1713); - ZEPHIR_OBS_VAR(&nameType); + zephir_memory_observe(&nameType); zephir_array_fetch_string(&nameType, &nameExpr, SL("type"), PH_NOISY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1714); ZEPHIR_OBS_NVAR(&funcArguments); if (zephir_array_isset_string_fetch(&funcArguments, &expr, SL("arguments"), 0)) { @@ -2960,14 +2806,14 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, functionCall) } else { ZVAL_BOOL(&_0$$3, 0); } - ZEPHIR_CALL_METHOD(&arguments, this_ptr, "expression", NULL, 502, &funcArguments, &_0$$3); + ZEPHIR_CALL_METHOD(&arguments, this_ptr, "expression", NULL, 503, &funcArguments, &_0$$3); zephir_check_call_status(); } else { ZEPHIR_INIT_NVAR(&arguments); ZVAL_STRING(&arguments, ""); } if (ZEPHIR_IS_LONG(&nameType, 265)) { - ZEPHIR_OBS_VAR(&name); + zephir_memory_observe(&name); zephir_array_fetch_string(&name, &nameExpr, SL("value"), PH_NOISY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1731); zephir_read_property(&_1$$5, this_ptr, ZEND_STRL("extensions"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&extensions, &_1$$5); @@ -2979,7 +2825,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, functionCall) zephir_array_fast_append(&_2$$6, &funcArguments); ZEPHIR_INIT_VAR(&_3$$6); ZVAL_STRING(&_3$$6, "compileFunction"); - ZEPHIR_CALL_METHOD(&code, this_ptr, "fireextensionevent", NULL, 506, &_3$$6, &_2$$6); + ZEPHIR_CALL_METHOD(&code, this_ptr, "fireextensionevent", NULL, 507, &_3$$6, &_2$$6); zephir_check_call_status(); if (Z_TYPE_P(&code) == IS_STRING) { RETURN_CCTOR(&code); @@ -2988,7 +2834,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, functionCall) zephir_read_property(&_1$$5, this_ptr, ZEND_STRL("functions"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&functions, &_1$$5); if (Z_TYPE_P(&functions) == IS_ARRAY) { - ZEPHIR_OBS_VAR(&definition); + zephir_memory_observe(&definition); if (zephir_array_isset_fetch(&definition, &functions, &name, 0)) { if (Z_TYPE_P(&definition) == IS_STRING) { ZEPHIR_CONCAT_VSVS(return_value, &definition, "(", &arguments, ")"); @@ -3011,7 +2857,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, functionCall) zephir_array_fetch_string(&_7$$9, &expr, SL("line"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1782); ZEPHIR_INIT_VAR(&_8$$9); ZEPHIR_CONCAT_SVSVSV(&_8$$9, "Invalid definition for user function '", &name, "' in ", &_6$$9, " on line ", &_7$$9); - ZEPHIR_CALL_METHOD(NULL, &_5$$9, "__construct", NULL, 503, &_8$$9); + ZEPHIR_CALL_METHOD(NULL, &_5$$9, "__construct", NULL, 504, &_8$$9); zephir_check_call_status(); zephir_throw_exception_debug(&_5$$9, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 1782); ZEPHIR_MM_RESTORE(); @@ -3035,12 +2881,12 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, functionCall) if (Z_TYPE_P(&extendedBlocks) == IS_ARRAY) { zephir_read_property(&_11$$16, this_ptr, ZEND_STRL("currentBlock"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(¤tBlock, &_11$$16); - ZEPHIR_OBS_VAR(&block); + zephir_memory_observe(&block); if (zephir_array_isset_fetch(&block, &extendedBlocks, ¤tBlock, 0)) { zephir_read_property(&_12$$17, this_ptr, ZEND_STRL("exprLevel"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&exprLevel, &_12$$17); if (Z_TYPE_P(&block) == IS_ARRAY) { - ZEPHIR_CALL_METHOD(&code, this_ptr, "statementlistorextends", NULL, 508, &block); + ZEPHIR_CALL_METHOD(&code, this_ptr, "statementlistorextends", NULL, 509, &block); zephir_check_call_status(); if (ZEPHIR_IS_LONG(&exprLevel, 1)) { ZEPHIR_CPY_WRT(&escapedCode, &code); @@ -3070,8 +2916,8 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, functionCall) RETURN_MM(); } ZEPHIR_INIT_VAR(&_13$$5); - zephir_camelize(&_13$$5, &name, NULL ); - ZEPHIR_CALL_FUNCTION(&method, "lcfirst", NULL, 76, &_13$$5); + zephir_camelize(&_13$$5, &name, NULL ); + ZEPHIR_CALL_FUNCTION(&method, "lcfirst", NULL, 77, &_13$$5); zephir_check_call_status(); ZEPHIR_INIT_VAR(&arrayHelpers); zephir_create_array(&arrayHelpers, 16, 0); @@ -3125,7 +2971,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, functionCall) ZEPHIR_OBS_NVAR(&funcArguments); if (zephir_array_isset_string_fetch(&funcArguments, &expr, SL("arguments"), 0)) { ZVAL_BOOL(&_22$$30, 1); - ZEPHIR_CALL_METHOD(&arguments, this_ptr, "expression", NULL, 502, &funcArguments, &_22$$30); + ZEPHIR_CALL_METHOD(&arguments, this_ptr, "expression", NULL, 503, &funcArguments, &_22$$30); zephir_check_call_status(); } else { ZEPHIR_INIT_NVAR(&arguments); @@ -3176,7 +3022,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, functionCall) } else { ZVAL_BOOL(&_24, 0); } - ZEPHIR_CALL_METHOD(&_23, this_ptr, "expression", NULL, 502, &nameExpr, &_24); + ZEPHIR_CALL_METHOD(&_23, this_ptr, "expression", NULL, 503, &nameExpr, &_24); zephir_check_call_status(); ZEPHIR_CONCAT_VSVS(return_value, &_23, "(", &arguments, ")"); RETURN_MM(); @@ -3189,9 +3035,6 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, functionCall) */ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, getCompiledTemplatePath) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "compiledTemplatePath"); } @@ -3203,9 +3046,6 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, getCompiledTemplatePath) */ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, getDI) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "container"); } @@ -3217,9 +3057,6 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, getDI) */ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, getExtensions) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "extensions"); } @@ -3231,9 +3068,6 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, getExtensions) */ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, getFilters) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "filters"); } @@ -3245,9 +3079,6 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, getFilters) */ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, getFunctions) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "functions"); } @@ -3269,15 +3100,11 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, getOption) ZVAL_UNDEF(&option); ZVAL_UNDEF(&value); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(option) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &option_param); if (UNEXPECTED(Z_TYPE_P(option_param) != IS_STRING && Z_TYPE_P(option_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'option' must be of the type string")); @@ -3288,13 +3115,12 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, getOption) } else { ZEPHIR_INIT_VAR(&option); } - - + zephir_memory_observe(&value); zephir_read_property(&_0, this_ptr, ZEND_STRL("options"), PH_NOISY_CC | PH_READONLY); - if (!(zephir_array_isset_fetch(&value, &_0, &option, 1))) { + if (!(zephir_array_isset_fetch(&value, &_0, &option, 0))) { RETURN_MM_NULL(); } - RETURN_CTOR(&value); + RETURN_CCTOR(&value); } /** @@ -3304,9 +3130,6 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, getOption) */ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, getOptions) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "options"); } @@ -3318,9 +3141,6 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, getOptions) */ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, getTemplatePath) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "currentPath"); } @@ -3348,9 +3168,8 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, getUniquePrefix) ZVAL_UNDEF(&_5$$5); ZVAL_UNDEF(&_6$$5); ZVAL_UNDEF(&_7$$5); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("prefix"), PH_NOISY_CC | PH_READONLY); if (!(zephir_is_true(&_0))) { @@ -3359,10 +3178,10 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, getUniquePrefix) zephir_unique_path_key(&_1$$3, &_2$$3); zephir_update_property_zval(this_ptr, ZEND_STRL("prefix"), &_1$$3); } - ZEPHIR_OBS_VAR(&_3); + zephir_memory_observe(&_3); zephir_read_property(&_3, this_ptr, ZEND_STRL("prefix"), PH_NOISY_CC); if (Z_TYPE_P(&_3) == IS_OBJECT) { - ZEPHIR_OBS_VAR(&_4$$4); + zephir_memory_observe(&_4$$4); zephir_read_property(&_4$$4, this_ptr, ZEND_STRL("prefix"), PH_NOISY_CC); if (zephir_is_instance_of(&_4$$4, SL("Closure"))) { ZEPHIR_INIT_VAR(&_5$$5); @@ -3375,7 +3194,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, getUniquePrefix) zephir_update_property_zval(this_ptr, ZEND_STRL("prefix"), &_5$$5); } } - ZEPHIR_OBS_VAR(&_8); + zephir_memory_observe(&_8); zephir_read_property(&_8, this_ptr, ZEND_STRL("prefix"), PH_NOISY_CC); if (UNEXPECTED(Z_TYPE_P(&_8) != IS_STRING)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_view_engine_volt_exception_ce, "The unique compilation prefix is invalid", "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2076); @@ -3403,19 +3222,14 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, parse) zend_long ZEPHIR_LAST_CALL_STATUS; zval *viewCode_param = NULL, currentPath; zval viewCode; - zval *this_ptr = getThis(); ZVAL_UNDEF(&viewCode); ZVAL_UNDEF(¤tPath); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(viewCode) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &viewCode_param); if (UNEXPECTED(Z_TYPE_P(viewCode_param) != IS_STRING && Z_TYPE_P(viewCode_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'viewCode' must be of the type string")); @@ -3426,8 +3240,6 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, parse) } else { ZEPHIR_INIT_VAR(&viewCode); } - - ZEPHIR_INIT_VAR(¤tPath); ZVAL_STRING(¤tPath, "eval code"); ZEPHIR_LAST_CALL_STATUS = phvolt_parse_view(return_value, &viewCode, ¤tPath); @@ -3459,25 +3271,19 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, resolveTest) ZVAL_UNDEF(&_4$$14); ZVAL_UNDEF(&_5$$14); ZVAL_UNDEF(&left); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ARRAY(test) Z_PARAM_STR(left) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &test_param, &left_param); ZEPHIR_OBS_COPY_OR_DUP(&test, test_param); zephir_get_strval(&left, left_param); - - - ZEPHIR_OBS_VAR(&type); + zephir_memory_observe(&type); zephir_array_fetch_string(&type, &test, SL("type"), PH_NOISY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2110); if (ZEPHIR_IS_LONG(&type, 265)) { - ZEPHIR_OBS_VAR(&name); + zephir_memory_observe(&name); zephir_array_fetch_string(&name, &test, SL("value"), PH_NOISY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2116); do { if (ZEPHIR_IS_STRING(&name, "empty")) { @@ -3508,28 +3314,28 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, resolveTest) } if (ZEPHIR_IS_LONG(&type, 350)) { - ZEPHIR_OBS_VAR(&testName); + zephir_memory_observe(&testName); zephir_array_fetch_string(&testName, &test, SL("name"), PH_NOISY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2139); ZEPHIR_OBS_NVAR(&name); if (zephir_array_isset_string_fetch(&name, &testName, SL("value"), 0)) { do { if (ZEPHIR_IS_STRING(&name, "divisibleby")) { zephir_array_fetch_string(&_1$$12, &test, SL("arguments"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2144); - ZEPHIR_CALL_METHOD(&_0$$12, this_ptr, "expression", NULL, 502, &_1$$12); + ZEPHIR_CALL_METHOD(&_0$$12, this_ptr, "expression", NULL, 503, &_1$$12); zephir_check_call_status(); ZEPHIR_CONCAT_SVSVS(return_value, "(((", &left, ") % (", &_0$$12, ")) == 0)"); RETURN_MM(); } if (ZEPHIR_IS_STRING(&name, "sameas")) { zephir_array_fetch_string(&_3$$13, &test, SL("arguments"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2146); - ZEPHIR_CALL_METHOD(&_2$$13, this_ptr, "expression", NULL, 502, &_3$$13); + ZEPHIR_CALL_METHOD(&_2$$13, this_ptr, "expression", NULL, 503, &_3$$13); zephir_check_call_status(); ZEPHIR_CONCAT_SVSVS(return_value, "(", &left, ") === (", &_2$$13, ")"); RETURN_MM(); } if (ZEPHIR_IS_STRING(&name, "type")) { zephir_array_fetch_string(&_5$$14, &test, SL("arguments"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2148); - ZEPHIR_CALL_METHOD(&_4$$14, this_ptr, "expression", NULL, 502, &_5$$14); + ZEPHIR_CALL_METHOD(&_4$$14, this_ptr, "expression", NULL, 503, &_5$$14); zephir_check_call_status(); ZEPHIR_CONCAT_SVSVS(return_value, "gettype(", &left, ") === (", &_4$$14, ")"); RETURN_MM(); @@ -3538,7 +3344,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, resolveTest) } } - ZEPHIR_CALL_METHOD(&_6, this_ptr, "expression", NULL, 502, &test); + ZEPHIR_CALL_METHOD(&_6, this_ptr, "expression", NULL, 503, &test); zephir_check_call_status(); ZEPHIR_CONCAT_VSV(return_value, &left, " == ", &_6); RETURN_MM(); @@ -3553,17 +3359,10 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, setDI) zval *this_ptr = getThis(); ZVAL_UNDEF(&container_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(container, phalcon_di_diinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &container); - - zephir_update_property_zval(this_ptr, ZEND_STRL("container"), container); } @@ -3581,16 +3380,12 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, setOption) ZVAL_UNDEF(&option); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(option) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &option_param, &value); if (UNEXPECTED(Z_TYPE_P(option_param) != IS_STRING && Z_TYPE_P(option_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'option' must be of the type string")); @@ -3601,8 +3396,6 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, setOption) } else { ZEPHIR_INIT_VAR(&option); } - - zephir_update_property_array(this_ptr, SL("options"), &option, value); ZEPHIR_MM_RESTORE(); } @@ -3618,19 +3411,13 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, setOptions) zval *this_ptr = getThis(); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &options_param); ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("options"), &options); ZEPHIR_MM_RESTORE(); } @@ -3646,15 +3433,11 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, setUniquePrefix) zval *this_ptr = getThis(); ZVAL_UNDEF(&prefix); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(prefix) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &prefix_param); if (UNEXPECTED(Z_TYPE_P(prefix_param) != IS_STRING && Z_TYPE_P(prefix_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'prefix' must be of the type string")); @@ -3665,8 +3448,6 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, setUniquePrefix) } else { ZEPHIR_INIT_VAR(&prefix); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("prefix"), &prefix); RETURN_THIS(); } @@ -3703,17 +3484,13 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileSource) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2$$7); ZVAL_UNDEF(&_4$$7); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(viewCode) Z_PARAM_OPTIONAL Z_PARAM_BOOL(extendsMode) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &viewCode_param, &extendsMode_param); if (UNEXPECTED(Z_TYPE_P(viewCode_param) != IS_STRING && Z_TYPE_P(viewCode_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'viewCode' must be of the type string")); @@ -3727,16 +3504,13 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileSource) if (!extendsMode_param) { extendsMode = 0; } else { - extendsMode = zephir_get_boolval(extendsMode_param); - } - - + } zephir_read_property(&_0, this_ptr, ZEND_STRL("currentPath"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(¤tPath, &_0); zephir_read_property(&_0, this_ptr, ZEND_STRL("options"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&options, &_0); if (Z_TYPE_P(&options) == IS_ARRAY) { - ZEPHIR_OBS_VAR(&autoescape); + zephir_memory_observe(&autoescape); if (zephir_array_isset_string_fetch(&autoescape, &options, SL("autoescape"), 0)) { if (UNEXPECTED(((Z_TYPE_P(&autoescape) == IS_TRUE || Z_TYPE_P(&autoescape) == IS_FALSE) != 1))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_view_engine_volt_exception_ce, "'autoescape' must be bool", "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2217); @@ -3757,7 +3531,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileSource) } else { ZVAL_BOOL(&_0, 0); } - ZEPHIR_CALL_METHOD(&compilation, this_ptr, "statementlist", NULL, 504, &intermediate, &_0); + ZEPHIR_CALL_METHOD(&compilation, this_ptr, "statementlist", NULL, 505, &intermediate, &_0); zephir_check_call_status(); zephir_read_property(&_1, this_ptr, ZEND_STRL("extended"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&extended, &_1); @@ -3793,11 +3567,11 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileSource) ZEPHIR_INIT_NVAR(&localBlock); array_init(&localBlock); } - ZEPHIR_CALL_METHOD(&blockCompilation, this_ptr, "statementlist", NULL, 504, &localBlock); + ZEPHIR_CALL_METHOD(&blockCompilation, this_ptr, "statementlist", NULL, 505, &localBlock); zephir_check_call_status(); } else { if (Z_TYPE_P(&block) == IS_ARRAY) { - ZEPHIR_CALL_METHOD(&blockCompilation, this_ptr, "statementlist", NULL, 504, &block); + ZEPHIR_CALL_METHOD(&blockCompilation, this_ptr, "statementlist", NULL, 505, &block); zephir_check_call_status(); } else { ZEPHIR_CPY_WRT(&blockCompilation, &block); @@ -3838,11 +3612,11 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileSource) ZEPHIR_INIT_NVAR(&localBlock); array_init(&localBlock); } - ZEPHIR_CALL_METHOD(&blockCompilation, this_ptr, "statementlist", NULL, 504, &localBlock); + ZEPHIR_CALL_METHOD(&blockCompilation, this_ptr, "statementlist", NULL, 505, &localBlock); zephir_check_call_status(); } else { if (Z_TYPE_P(&block) == IS_ARRAY) { - ZEPHIR_CALL_METHOD(&blockCompilation, this_ptr, "statementlist", NULL, 504, &block); + ZEPHIR_CALL_METHOD(&blockCompilation, this_ptr, "statementlist", NULL, 505, &block); zephir_check_call_status(); } else { ZEPHIR_CPY_WRT(&blockCompilation, &block); @@ -3893,19 +3667,13 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, getFinalPath) ZVAL_UNDEF(&_2$$4); ZVAL_UNDEF(&_3$$5); ZVAL_UNDEF(&_4$$7); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(path) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &path_param); zephir_get_strval(&path, path_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("view"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&view, &_0); if (Z_TYPE_P(&view) == IS_OBJECT) { @@ -4006,27 +3774,21 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, resolveFilter) ZVAL_UNDEF(&_18$$24); ZVAL_UNDEF(&_19$$24); ZVAL_UNDEF(&left); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ARRAY(filter) Z_PARAM_STR(left) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &filter_param, &left_param); ZEPHIR_OBS_COPY_OR_DUP(&filter, filter_param); zephir_get_strval(&left, left_param); - - ZEPHIR_INIT_VAR(&code); ZVAL_NULL(&code); - ZEPHIR_OBS_VAR(&type); + zephir_memory_observe(&type); zephir_array_fetch_string(&type, &filter, SL("type"), PH_NOISY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2354); if (ZEPHIR_IS_LONG(&type, 265)) { - ZEPHIR_OBS_VAR(&name); + zephir_memory_observe(&name); zephir_array_fetch_string(&name, &filter, SL("value"), PH_NOISY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2360); } else { if (UNEXPECTED(!ZEPHIR_IS_LONG(&type, 350))) { @@ -4036,13 +3798,13 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, resolveFilter) zephir_array_fetch_string(&_2$$5, &filter, SL("line"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2368); ZEPHIR_INIT_VAR(&_3$$5); ZEPHIR_CONCAT_SVSV(&_3$$5, "Unknown filter type in ", &_1$$5, " on line ", &_2$$5); - ZEPHIR_CALL_METHOD(NULL, &_0$$5, "__construct", NULL, 503, &_3$$5); + ZEPHIR_CALL_METHOD(NULL, &_0$$5, "__construct", NULL, 504, &_3$$5); zephir_check_call_status(); zephir_throw_exception_debug(&_0$$5, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2368); ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_OBS_VAR(&functionName); + zephir_memory_observe(&functionName); zephir_array_fetch_string(&functionName, &filter, SL("name"), PH_NOISY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2371); ZEPHIR_OBS_NVAR(&name); zephir_array_fetch_string(&name, &functionName, SL("value"), PH_NOISY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2372); @@ -4054,9 +3816,9 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, resolveFilter) ZEPHIR_OBS_NVAR(&funcArguments); if (zephir_array_isset_string_fetch(&funcArguments, &filter, SL("arguments"), 0)) { if (!ZEPHIR_IS_STRING(&name, "default")) { - ZEPHIR_OBS_VAR(&file); + zephir_memory_observe(&file); zephir_array_fetch_string(&file, &filter, SL("file"), PH_NOISY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2386); - ZEPHIR_OBS_VAR(&line); + zephir_memory_observe(&line); zephir_array_fetch_string(&line, &filter, SL("line"), PH_NOISY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2387); ZEPHIR_INIT_VAR(&_4$$7); zephir_create_array(&_4$$7, 3, 0); @@ -4070,11 +3832,11 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, resolveFilter) zephir_array_update_string(&_4$$7, SL("file"), &file, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_4$$7, SL("line"), &line, PH_COPY | PH_SEPARATE); ZEPHIR_MAKE_REF(&funcArguments); - ZEPHIR_CALL_FUNCTION(NULL, "array_unshift", NULL, 269, &funcArguments, &_4$$7); + ZEPHIR_CALL_FUNCTION(NULL, "array_unshift", NULL, 270, &funcArguments, &_4$$7); ZEPHIR_UNREF(&funcArguments); zephir_check_call_status(); } - ZEPHIR_CALL_METHOD(&arguments, this_ptr, "expression", NULL, 502, &funcArguments); + ZEPHIR_CALL_METHOD(&arguments, this_ptr, "expression", NULL, 503, &funcArguments); zephir_check_call_status(); } else { ZEPHIR_CPY_WRT(&arguments, &left); @@ -4089,7 +3851,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, resolveFilter) zephir_array_fast_append(&_7$$9, &funcArguments); ZEPHIR_INIT_VAR(&_8$$9); ZVAL_STRING(&_8$$9, "compileFilter"); - ZEPHIR_CALL_METHOD(&code, this_ptr, "fireextensionevent", NULL, 506, &_8$$9, &_7$$9); + ZEPHIR_CALL_METHOD(&code, this_ptr, "fireextensionevent", NULL, 507, &_8$$9, &_7$$9); zephir_check_call_status(); if (Z_TYPE_P(&code) == IS_STRING) { RETURN_CCTOR(&code); @@ -4097,7 +3859,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, resolveFilter) } zephir_read_property(&_6, this_ptr, ZEND_STRL("filters"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&filters, &_6); - ZEPHIR_OBS_VAR(&definition); + zephir_memory_observe(&definition); if (zephir_array_isset_fetch(&definition, &filters, &name, 0)) { if (Z_TYPE_P(&definition) == IS_STRING) { ZEPHIR_CONCAT_VSVS(return_value, &definition, "(", &arguments, ")"); @@ -4120,7 +3882,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, resolveFilter) zephir_array_fetch_string(&_12$$11, &filter, SL("line"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2462); ZEPHIR_INIT_VAR(&_13$$11); ZEPHIR_CONCAT_SVSVSV(&_13$$11, "Invalid definition for user filter '", &name, "' in ", &_11$$11, " on line ", &_12$$11); - ZEPHIR_CALL_METHOD(NULL, &_10$$11, "__construct", NULL, 503, &_13$$11); + ZEPHIR_CALL_METHOD(NULL, &_10$$11, "__construct", NULL, 504, &_13$$11); zephir_check_call_status(); zephir_throw_exception_debug(&_10$$11, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2462); ZEPHIR_MM_RESTORE(); @@ -4245,7 +4007,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, resolveFilter) zephir_array_fetch_string(&_22, &filter, SL("line"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2529); ZEPHIR_INIT_VAR(&_23); ZEPHIR_CONCAT_SVSVSV(&_23, "Unknown filter \"", &name, "\" in ", &_21, " on line ", &_22); - ZEPHIR_CALL_METHOD(NULL, &_20, "__construct", NULL, 503, &_23); + ZEPHIR_CALL_METHOD(NULL, &_20, "__construct", NULL, 504, &_23); zephir_check_call_status(); zephir_throw_exception_debug(&_20, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2529); ZEPHIR_MM_RESTORE(); @@ -4360,26 +4122,19 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, statementList) ZVAL_UNDEF(&_95$$70); ZVAL_UNDEF(&_96$$70); ZVAL_UNDEF(&_97$$70); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(statements) Z_PARAM_OPTIONAL Z_PARAM_BOOL(extendsMode) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &statements_param, &extendsMode_param); ZEPHIR_OBS_COPY_OR_DUP(&statements, statements_param); if (!extendsMode_param) { extendsMode = 0; } else { - extendsMode = zephir_get_boolval(extendsMode_param); - } - - + } if (!(zephir_fast_count_int(&statements))) { RETURN_MM_STRING(""); } @@ -4416,7 +4171,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, statementList) zephir_array_fetch_string(&_6$$7, &statement, SL("line"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2577); ZEPHIR_INIT_NVAR(&_7$$7); ZEPHIR_CONCAT_SVSV(&_7$$7, "Invalid statement in ", &_5$$7, " on line ", &_6$$7); - ZEPHIR_CALL_METHOD(NULL, &_4$$7, "__construct", &_8, 503, &_7$$7, &statement); + ZEPHIR_CALL_METHOD(NULL, &_4$$7, "__construct", &_8, 504, &_7$$7, &statement); zephir_check_call_status(); zephir_throw_exception_debug(&_4$$7, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2579); ZEPHIR_MM_RESTORE(); @@ -4428,7 +4183,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, statementList) zephir_array_fast_append(&_9$$8, &statement); ZEPHIR_INIT_NVAR(&_10$$8); ZVAL_STRING(&_10$$8, "compileStatement"); - ZEPHIR_CALL_METHOD(&tempCompilation, this_ptr, "fireextensionevent", &_11, 506, &_10$$8, &_9$$8); + ZEPHIR_CALL_METHOD(&tempCompilation, this_ptr, "fireextensionevent", &_11, 507, &_10$$8, &_9$$8); zephir_check_call_status(); if (Z_TYPE_P(&tempCompilation) == IS_STRING) { zephir_concat_self(&compilation, &tempCompilation); @@ -4533,7 +4288,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, statementList) } else { ZVAL_BOOL(&_34$$24, 0); } - ZEPHIR_CALL_METHOD(&_33$$24, this_ptr, "statementlist", &_35, 504, &blockStatements, &_34$$24); + ZEPHIR_CALL_METHOD(&_33$$24, this_ptr, "statementlist", &_35, 505, &blockStatements, &_34$$24); zephir_check_call_status(); zephir_concat_self(&compilation, &_33$$24); } @@ -4643,7 +4398,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, statementList) zephir_array_fetch_string(&_58$$37, &statement, SL("line"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2807); ZEPHIR_INIT_NVAR(&_59$$37); ZEPHIR_CONCAT_SVSVSV(&_59$$37, "Unknown statement ", &type, " in ", &_57$$37, " on line ", &_58$$37); - ZEPHIR_CALL_METHOD(NULL, &_56$$37, "__construct", &_8, 503, &_59$$37); + ZEPHIR_CALL_METHOD(NULL, &_56$$37, "__construct", &_8, 504, &_59$$37); zephir_check_call_status(); zephir_throw_exception_debug(&_56$$37, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2807); ZEPHIR_MM_RESTORE(); @@ -4673,7 +4428,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, statementList) zephir_array_fetch_string(&_62$$40, &statement, SL("line"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2577); ZEPHIR_INIT_NVAR(&_63$$40); ZEPHIR_CONCAT_SVSV(&_63$$40, "Invalid statement in ", &_61$$40, " on line ", &_62$$40); - ZEPHIR_CALL_METHOD(NULL, &_60$$40, "__construct", &_8, 503, &_63$$40, &statement); + ZEPHIR_CALL_METHOD(NULL, &_60$$40, "__construct", &_8, 504, &_63$$40, &statement); zephir_check_call_status(); zephir_throw_exception_debug(&_60$$40, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2579); ZEPHIR_MM_RESTORE(); @@ -4685,7 +4440,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, statementList) zephir_array_fast_append(&_64$$41, &statement); ZEPHIR_INIT_NVAR(&_65$$41); ZVAL_STRING(&_65$$41, "compileStatement"); - ZEPHIR_CALL_METHOD(&tempCompilation, this_ptr, "fireextensionevent", &_11, 506, &_65$$41, &_64$$41); + ZEPHIR_CALL_METHOD(&tempCompilation, this_ptr, "fireextensionevent", &_11, 507, &_65$$41, &_64$$41); zephir_check_call_status(); if (Z_TYPE_P(&tempCompilation) == IS_STRING) { zephir_concat_self(&compilation, &tempCompilation); @@ -4790,7 +4545,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, statementList) } else { ZVAL_BOOL(&_81$$57, 0); } - ZEPHIR_CALL_METHOD(&_80$$57, this_ptr, "statementlist", &_35, 504, &blockStatements, &_81$$57); + ZEPHIR_CALL_METHOD(&_80$$57, this_ptr, "statementlist", &_35, 505, &blockStatements, &_81$$57); zephir_check_call_status(); zephir_concat_self(&compilation, &_80$$57); } @@ -4900,7 +4655,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, statementList) zephir_array_fetch_string(&_96$$70, &statement, SL("line"), PH_NOISY | PH_READONLY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2807); ZEPHIR_INIT_NVAR(&_97$$70); ZEPHIR_CONCAT_SVSVSV(&_97$$70, "Unknown statement ", &type, " in ", &_95$$70, " on line ", &_96$$70); - ZEPHIR_CALL_METHOD(NULL, &_94$$70, "__construct", &_8, 503, &_97$$70); + ZEPHIR_CALL_METHOD(NULL, &_94$$70, "__construct", &_8, 504, &_97$$70); zephir_check_call_status(); zephir_throw_exception_debug(&_94$$70, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2807); ZEPHIR_MM_RESTORE(); @@ -4942,18 +4697,12 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, statementListOrExtends) ZVAL_UNDEF(&statements_sub); ZVAL_UNDEF(&statement); ZVAL_UNDEF(&_1$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(statements) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &statements); - - if (Z_TYPE_P(statements) != IS_ARRAY) { RETVAL_ZVAL(statements, 1, 0); RETURN_MM(); @@ -4993,7 +4742,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, statementListOrExtends) ZEPHIR_INIT_NVAR(&statement); } if (isStatementList) { - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "statementlist", NULL, 504, statements); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "statementlist", NULL, 505, statements); zephir_check_call_status(); RETURN_MM(); } @@ -5015,35 +4764,29 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, isTagFactory) ZVAL_UNDEF(&leftValue); ZVAL_UNDEF(&name); ZVAL_UNDEF(&_1$$6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(expression) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &expression_param); zephir_get_arrval(&expression, expression_param); - - - ZEPHIR_OBS_VAR(&name); + zephir_memory_observe(&name); if (zephir_array_isset_string_fetch(&name, &expression, SL("name"), 0)) { - ZEPHIR_OBS_VAR(&left); + zephir_memory_observe(&left); if (zephir_array_isset_string_fetch(&left, &name, SL("left"), 0)) { - ZEPHIR_OBS_VAR(&leftValue); + zephir_memory_observe(&leftValue); if (zephir_array_isset_string_fetch(&leftValue, &left, SL("value"), 0)) { RETURN_MM_BOOL((ZEPHIR_IS_STRING_IDENTICAL(&leftValue, "tag"))); } else { _0$$6 = zephir_array_isset_string(&left, SL("name")); if (_0$$6) { - ZEPHIR_OBS_VAR(&_1$$6); + zephir_memory_observe(&_1$$6); zephir_array_fetch_string(&_1$$6, &left, SL("name"), PH_NOISY, "phalcon/Mvc/View/Engine/Volt/Compiler.zep", 2901); _0$$6 = Z_TYPE_P(&_1$$6) == IS_ARRAY; } if (_0$$6) { - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "istagfactory", NULL, 505, &left); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "istagfactory", NULL, 506, &left); zephir_check_call_status(); RETURN_MM(); } @@ -5073,7 +4816,8 @@ zend_object *zephir_init_properties_Phalcon_Mvc_View_Engine_Volt_Compiler(zend_c ZVAL_UNDEF(&_13$$9); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/mvc/view/engine/volt/compiler.zep.h b/ext/phalcon/mvc/view/engine/volt/compiler.zep.h index 32f410a2acf..efdbc310aeb 100644 --- a/ext/phalcon/mvc/view/engine/volt/compiler.zep.h +++ b/ext/phalcon/mvc/view/engine/volt/compiler.zep.h @@ -158,11 +158,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_view_engine_volt_compiler_fireextensionevent, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, arguments, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, arguments, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, arguments, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_view_engine_volt_compiler_functioncall, 0, 1, IS_STRING, 0) diff --git a/ext/phalcon/mvc/view/engine/volt/exception.zep.c b/ext/phalcon/mvc/view/engine/volt/exception.zep.c index 6cdb8fe79c5..9426f06a6d1 100644 --- a/ext/phalcon/mvc/view/engine/volt/exception.zep.c +++ b/ext/phalcon/mvc/view/engine/volt/exception.zep.c @@ -62,7 +62,6 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Exception, __construct) ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&statement); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 4) Z_PARAM_OPTIONAL @@ -71,10 +70,8 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Exception, __construct) Z_PARAM_LONG(code) Z_PARAM_OBJECT_OF_CLASS_OR_NULL(previous, zend_ce_exception) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 4, &message_param, &statement_param, &code_param, &previous); if (!message_param) { ZEPHIR_INIT_VAR(&message); @@ -91,14 +88,11 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Exception, __construct) if (!code_param) { code = 0; } else { - code = zephir_get_intval(code_param); - } + } if (!previous) { previous = &previous_sub; previous = &__$null; } - - zephir_update_property_zval(this_ptr, ZEND_STRL("statement"), &statement); ZVAL_LONG(&_0, code); ZEPHIR_CALL_PARENT(NULL, phalcon_mvc_view_engine_volt_exception_ce, getThis(), "__construct", NULL, 0, &message, &_0, previous); @@ -119,9 +113,8 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Exception, getStatement) ZVAL_UNDEF(&statement); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("statement"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&statement, &_0); @@ -140,7 +133,8 @@ zend_object *zephir_init_properties_Phalcon_Mvc_View_Engine_Volt_Exception(zend_ ZVAL_UNDEF(&_1$$3); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/mvc/view/engine/volt/exception.zep.h b/ext/phalcon/mvc/view/engine/volt/exception.zep.h index 2ebb07d2248..c44cf1624b7 100644 --- a/ext/phalcon/mvc/view/engine/volt/exception.zep.h +++ b/ext/phalcon/mvc/view/engine/volt/exception.zep.h @@ -9,11 +9,7 @@ zend_object *zephir_init_properties_Phalcon_Mvc_View_Engine_Volt_Exception(zend_ ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_view_engine_volt_exception___construct, 0, 0, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, statement, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, statement, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, statement, IS_ARRAY, 0, "[]") ZEND_ARG_TYPE_INFO(0, code, IS_LONG, 0) ZEND_ARG_OBJ_INFO(0, previous, Exception, 1) ZEND_END_ARG_INFO() diff --git a/ext/phalcon/mvc/view/simple.zep.c b/ext/phalcon/mvc/view/simple.zep.c index cf1ac7b1436..2ece7923992 100644 --- a/ext/phalcon/mvc/view/simple.zep.c +++ b/ext/phalcon/mvc/view/simple.zep.c @@ -116,16 +116,12 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, __construct) zval *this_ptr = getThis(); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -133,8 +129,6 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, __construct) } else { zephir_get_arrval(&options, options_param); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("options"), &options); ZEPHIR_MM_RESTORE(); } @@ -158,15 +152,11 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, __get) ZVAL_UNDEF(&key); ZVAL_UNDEF(&value); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -177,13 +167,12 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, __get) } else { ZEPHIR_INIT_VAR(&key); } - - + zephir_memory_observe(&value); zephir_read_property(&_0, this_ptr, ZEND_STRL("viewParams"), PH_NOISY_CC | PH_READONLY); - if (!(zephir_array_isset_fetch(&value, &_0, &key, 1))) { + if (!(zephir_array_isset_fetch(&value, &_0, &key, 0))) { RETURN_MM_NULL(); } - RETURN_CTOR(&value); + RETURN_CCTOR(&value); } /** @@ -204,16 +193,12 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, __set) ZVAL_UNDEF(&key); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(key) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &key_param, &value); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -224,8 +209,6 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, __set) } else { ZEPHIR_INIT_VAR(&key); } - - zephir_update_property_array(this_ptr, SL("viewParams"), &key, value); ZEPHIR_MM_RESTORE(); } @@ -237,9 +220,6 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, __set) */ PHP_METHOD(Phalcon_Mvc_View_Simple, getActiveRenderPath) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "activeRenderPath"); } @@ -251,9 +231,6 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, getActiveRenderPath) */ PHP_METHOD(Phalcon_Mvc_View_Simple, getContent) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "content"); } @@ -265,9 +242,6 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, getContent) */ PHP_METHOD(Phalcon_Mvc_View_Simple, getEventsManager) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "eventsManager"); } @@ -279,9 +253,6 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, getEventsManager) */ PHP_METHOD(Phalcon_Mvc_View_Simple, getParamsToView) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "viewParams"); } @@ -291,9 +262,6 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, getParamsToView) */ PHP_METHOD(Phalcon_Mvc_View_Simple, getRegisteredEngines) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "registeredEngines"); } @@ -313,15 +281,11 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, getVar) ZVAL_UNDEF(&key); ZVAL_UNDEF(&value); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -332,13 +296,12 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, getVar) } else { ZEPHIR_INIT_VAR(&key); } - - + zephir_memory_observe(&value); zephir_read_property(&_0, this_ptr, ZEND_STRL("viewParams"), PH_NOISY_CC | PH_READONLY); - if (!(zephir_array_isset_fetch(&value, &_0, &key, 1))) { + if (!(zephir_array_isset_fetch(&value, &_0, &key, 0))) { RETURN_MM_NULL(); } - RETURN_CTOR(&value); + RETURN_CCTOR(&value); } /** @@ -348,9 +311,6 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, getVar) */ PHP_METHOD(Phalcon_Mvc_View_Simple, getViewsDir) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "viewsDir"); } @@ -391,17 +351,14 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, partial) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(partialPath) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(params) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &partialPath_param, ¶ms); if (UNEXPECTED(Z_TYPE_P(partialPath_param) != IS_STRING && Z_TYPE_P(partialPath_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'partialPath' must be of the type string")); @@ -416,9 +373,7 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, partial) params = ¶ms_sub; params = &__$null; } - - - ZEPHIR_CALL_FUNCTION(NULL, "ob_start", NULL, 386); + ZEPHIR_CALL_FUNCTION(NULL, "ob_start", NULL, 387); zephir_check_call_status(); if (Z_TYPE_P(params) == IS_ARRAY) { zephir_read_property(&_0$$3, this_ptr, ZEND_STRL("viewParams"), PH_NOISY_CC | PH_READONLY); @@ -431,12 +386,12 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, partial) } else { ZEPHIR_CPY_WRT(&mergedParams, params); } - ZEPHIR_CALL_METHOD(NULL, this_ptr, "internalrender", NULL, 509, &partialPath, &mergedParams); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "internalrender", NULL, 510, &partialPath, &mergedParams); zephir_check_call_status(); if (Z_TYPE_P(params) == IS_ARRAY) { zephir_update_property_zval(this_ptr, ZEND_STRL("viewParams"), &viewParams); } - ZEPHIR_CALL_FUNCTION(NULL, "ob_end_clean", NULL, 488); + ZEPHIR_CALL_FUNCTION(NULL, "ob_end_clean", NULL, 489); zephir_check_call_status(); zephir_read_property(&_2, this_ptr, ZEND_STRL("content"), PH_NOISY_CC | PH_READONLY); zend_print_zval(&_2, 0); @@ -466,19 +421,13 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, registerEngines) zval *this_ptr = getThis(); ZVAL_UNDEF(&engines); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(engines) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &engines_param); ZEPHIR_OBS_COPY_OR_DUP(&engines, engines_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("registeredEngines"), &engines); ZEPHIR_MM_RESTORE(); } @@ -503,17 +452,13 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, render) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(¶ms); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(path) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(params) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &path_param, ¶ms_param); if (UNEXPECTED(Z_TYPE_P(path_param) != IS_STRING && Z_TYPE_P(path_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'path' must be of the type string")); @@ -530,20 +475,18 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, render) } else { zephir_get_arrval(¶ms, params_param); } - - ZEPHIR_INIT_VAR(&_0); ZEPHIR_CREATE_SYMBOL_TABLE(); - ZEPHIR_CALL_FUNCTION(NULL, "ob_start", NULL, 386); + ZEPHIR_CALL_FUNCTION(NULL, "ob_start", NULL, 387); zephir_check_call_status(); zephir_read_property(&_1, this_ptr, ZEND_STRL("viewParams"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&viewParams, &_1); ZEPHIR_INIT_VAR(&mergedParams); zephir_fast_array_merge(&mergedParams, &viewParams, ¶ms); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "internalrender", NULL, 509, &path, &mergedParams); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "internalrender", NULL, 510, &path, &mergedParams); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(NULL, "ob_end_clean", NULL, 488); + ZEPHIR_CALL_FUNCTION(NULL, "ob_end_clean", NULL, 489); zephir_check_call_status(); RETURN_MM_MEMBER(getThis(), "content"); } @@ -565,15 +508,11 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, setContent) zval *this_ptr = getThis(); ZVAL_UNDEF(&content); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(content) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &content_param); if (UNEXPECTED(Z_TYPE_P(content_param) != IS_STRING && Z_TYPE_P(content_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'content' must be of the type string")); @@ -584,8 +523,6 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, setContent) } else { ZEPHIR_INIT_VAR(&content); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("content"), &content); RETURN_THIS(); } @@ -601,17 +538,10 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, setEventsManager) zval *this_ptr = getThis(); ZVAL_UNDEF(&eventsManager_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(eventsManager, phalcon_events_managerinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &eventsManager); - - zephir_update_property_zval(this_ptr, ZEND_STRL("eventsManager"), eventsManager); } @@ -634,16 +564,12 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, setParamToView) ZVAL_UNDEF(&key); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(key) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &key_param, &value); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -654,8 +580,6 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, setParamToView) } else { ZEPHIR_INIT_VAR(&key); } - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "setvar", NULL, 0, &key, value); zephir_check_call_status(); RETURN_MM(); @@ -679,16 +603,12 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, setVar) ZVAL_UNDEF(&key); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(key) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &key_param, &value); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -699,8 +619,6 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, setVar) } else { ZEPHIR_INIT_VAR(&key); } - - zephir_update_property_array(this_ptr, SL("viewParams"), &key, value); RETURN_THIS(); } @@ -729,26 +647,19 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, setVars) ZVAL_UNDEF(¶ms); ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(params) Z_PARAM_OPTIONAL Z_PARAM_BOOL(merge) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, ¶ms_param, &merge_param); ZEPHIR_OBS_COPY_OR_DUP(¶ms, params_param); if (!merge_param) { merge = 1; } else { - merge = zephir_get_boolval(merge_param); - } - - + } if (merge) { ZEPHIR_INIT_VAR(&_0$$3); zephir_read_property(&_1$$3, this_ptr, ZEND_STRL("viewParams"), PH_NOISY_CC | PH_READONLY); @@ -774,15 +685,11 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, setViewsDir) ZVAL_UNDEF(&viewsDir); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(viewsDir) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &viewsDir_param); if (UNEXPECTED(Z_TYPE_P(viewsDir_param) != IS_STRING && Z_TYPE_P(viewsDir_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'viewsDir' must be of the type string")); @@ -793,9 +700,7 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, setViewsDir) } else { ZEPHIR_INIT_VAR(&viewsDir); } - - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "getdirseparator", NULL, 510, &viewsDir); + ZEPHIR_CALL_METHOD(&_0, this_ptr, "getdirseparator", NULL, 511, &viewsDir); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("viewsDir"), &_0); ZEPHIR_MM_RESTORE(); @@ -838,14 +743,13 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, loadTemplateEngines) ZVAL_UNDEF(&_20$$19); ZVAL_UNDEF(&_11$$11); ZVAL_UNDEF(&_17$$17); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("engines"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&engines, &_0); if (ZEPHIR_IS_FALSE_IDENTICAL(&engines)) { - ZEPHIR_OBS_VAR(&di); + zephir_memory_observe(&di); zephir_read_property(&di, this_ptr, ZEND_STRL("container"), PH_NOISY_CC); ZEPHIR_INIT_NVAR(&engines); array_init(&engines); @@ -854,7 +758,7 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, loadTemplateEngines) if (ZEPHIR_IS_EMPTY(®isteredEngines)) { ZEPHIR_INIT_VAR(&_2$$4); object_init_ex(&_2$$4, phalcon_mvc_view_engine_php_ce); - ZEPHIR_CALL_METHOD(NULL, &_2$$4, "__construct", NULL, 491, this_ptr, &di); + ZEPHIR_CALL_METHOD(NULL, &_2$$4, "__construct", NULL, 492, this_ptr, &di); zephir_check_call_status(); zephir_array_update_string(&engines, SL(".phtml"), &_2$$4, PH_COPY | PH_SEPARATE); } else { @@ -880,7 +784,7 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, loadTemplateEngines) ZEPHIR_CALL_CE_STATIC(&_7$$9, _8$$9, "bind", &_9, 0, &engineService, &di); zephir_check_call_status(); ZEPHIR_CPY_WRT(&engineService, &_7$$9); - ZEPHIR_CALL_FUNCTION(&engineObject, "call_user_func", &_10, 187, &engineService, this_ptr); + ZEPHIR_CALL_FUNCTION(&engineObject, "call_user_func", &_10, 188, &engineService, this_ptr); zephir_check_call_status(); } else { ZEPHIR_CPY_WRT(&engineObject, &engineService); @@ -896,7 +800,7 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, loadTemplateEngines) object_init_ex(&_12$$12, phalcon_mvc_view_exception_ce); ZEPHIR_INIT_NVAR(&_13$$12); ZEPHIR_CONCAT_SV(&_13$$12, "Invalid template engine registration for extension: ", &extension); - ZEPHIR_CALL_METHOD(NULL, &_12$$12, "__construct", &_14, 32, &_13$$12); + ZEPHIR_CALL_METHOD(NULL, &_12$$12, "__construct", &_14, 33, &_13$$12); zephir_check_call_status(); zephir_throw_exception_debug(&_12$$12, "phalcon/Mvc/View/Simple.zep", 485); ZEPHIR_MM_RESTORE(); @@ -923,7 +827,7 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, loadTemplateEngines) ZEPHIR_CALL_CE_STATIC(&_15$$15, _16$$15, "bind", &_9, 0, &engineService, &di); zephir_check_call_status(); ZEPHIR_CPY_WRT(&engineService, &_15$$15); - ZEPHIR_CALL_FUNCTION(&engineObject, "call_user_func", &_10, 187, &engineService, this_ptr); + ZEPHIR_CALL_FUNCTION(&engineObject, "call_user_func", &_10, 188, &engineService, this_ptr); zephir_check_call_status(); } else { ZEPHIR_CPY_WRT(&engineObject, &engineService); @@ -939,7 +843,7 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, loadTemplateEngines) object_init_ex(&_18$$18, phalcon_mvc_view_exception_ce); ZEPHIR_INIT_NVAR(&_19$$18); ZEPHIR_CONCAT_SV(&_19$$18, "Invalid template engine registration for extension: ", &extension); - ZEPHIR_CALL_METHOD(NULL, &_18$$18, "__construct", &_14, 32, &_19$$18); + ZEPHIR_CALL_METHOD(NULL, &_18$$18, "__construct", &_14, 33, &_19$$18); zephir_check_call_status(); zephir_throw_exception_debug(&_18$$18, "phalcon/Mvc/View/Simple.zep", 485); ZEPHIR_MM_RESTORE(); @@ -1013,16 +917,12 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, internalRender) ZVAL_UNDEF(&_28$$19); ZVAL_UNDEF(&_30$$20); ZVAL_UNDEF(&_32$$21); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(path) Z_PARAM_ZVAL(params) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &path_param, ¶ms); if (UNEXPECTED(Z_TYPE_P(path_param) != IS_STRING && Z_TYPE_P(path_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'path' must be of the type string")); @@ -1033,8 +933,6 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, internalRender) } else { ZEPHIR_INIT_VAR(&path); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("eventsManager"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&eventsManager, &_0); if (Z_TYPE_P(&eventsManager) == IS_OBJECT) { @@ -1178,7 +1076,7 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, internalRender) object_init_ex(&_30$$20, phalcon_mvc_view_exception_ce); ZEPHIR_INIT_VAR(&_31$$20); ZEPHIR_CONCAT_SVS(&_31$$20, "View '", &viewsDirPath, "' was not found in the views directory"); - ZEPHIR_CALL_METHOD(NULL, &_30$$20, "__construct", NULL, 32, &_31$$20); + ZEPHIR_CALL_METHOD(NULL, &_30$$20, "__construct", NULL, 33, &_31$$20); zephir_check_call_status(); zephir_throw_exception_debug(&_30$$20, "phalcon/Mvc/View/Simple.zep", 584); ZEPHIR_MM_RESTORE(); @@ -1201,20 +1099,15 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, getDirSeparator) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *directory_param = NULL, _0, _1; zval directory; - zval *this_ptr = getThis(); ZVAL_UNDEF(&directory); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(directory) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &directory_param); if (UNEXPECTED(Z_TYPE_P(directory_param) != IS_STRING && Z_TYPE_P(directory_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'directory' must be of the type string")); @@ -1225,8 +1118,6 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, getDirSeparator) } else { ZEPHIR_INIT_VAR(&directory); } - - ZEPHIR_INIT_VAR(&_0); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "/"); @@ -1247,7 +1138,8 @@ zend_object *zephir_init_properties_Phalcon_Mvc_View_Simple(zend_class_entry *cl ZVAL_UNDEF(&_5$$5); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/mvc/view/simple.zep.h b/ext/phalcon/mvc/view/simple.zep.h index 049ef66a200..84777ffd5ec 100644 --- a/ext/phalcon/mvc/view/simple.zep.h +++ b/ext/phalcon/mvc/view/simple.zep.h @@ -28,11 +28,7 @@ PHP_METHOD(Phalcon_Mvc_View_Simple, getDirSeparator); zend_object *zephir_init_properties_Phalcon_Mvc_View_Simple(zend_class_entry *class_type); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_view_simple___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_view_simple___get, 0, 0, 1) @@ -80,11 +76,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_view_simple_render, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, params, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, params, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, params, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_mvc_view_simple_setcontent, 0, 1, Phalcon\\Mvc\\View\\Simple, 0) diff --git a/ext/phalcon/mvc/viewinterface.zep.h b/ext/phalcon/mvc/viewinterface.zep.h index 1c661a3e7e3..773181e4661 100644 --- a/ext/phalcon/mvc/viewinterface.zep.h +++ b/ext/phalcon/mvc/viewinterface.zep.h @@ -56,11 +56,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_viewinterface_render, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, controllerName, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, actionName, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, params, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, params, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, params, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_viewinterface_reset, 0, 0, 0) diff --git a/ext/phalcon/paginator/adapter/abstractadapter.zep.c b/ext/phalcon/paginator/adapter/abstractadapter.zep.c index 1c9be2b7bfc..562597e25d2 100644 --- a/ext/phalcon/paginator/adapter/abstractadapter.zep.c +++ b/ext/phalcon/paginator/adapter/abstractadapter.zep.c @@ -81,19 +81,13 @@ PHP_METHOD(Phalcon_Paginator_Adapter_AbstractAdapter, __construct) ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_1$$4); ZVAL_UNDEF(&_2$$5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(config) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &config_param); ZEPHIR_OBS_COPY_OR_DUP(&config, config_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("config"), &config); if (zephir_array_isset_string(&config, SL("limit"))) { zephir_array_fetch_string(&_0$$3, &config, SL("limit"), PH_NOISY | PH_READONLY, "phalcon/Paginator/Adapter/AbstractAdapter.zep", 62); @@ -118,9 +112,6 @@ PHP_METHOD(Phalcon_Paginator_Adapter_AbstractAdapter, __construct) */ PHP_METHOD(Phalcon_Paginator_Adapter_AbstractAdapter, getLimit) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "limitRows"); } @@ -135,19 +126,11 @@ PHP_METHOD(Phalcon_Paginator_Adapter_AbstractAdapter, setCurrentPage) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(page) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &page_param); - page = zephir_get_intval(page_param); - - - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, page); zephir_update_property_zval(this_ptr, ZEND_STRL("page"), &_0); RETURN_THISW(); @@ -163,23 +146,15 @@ PHP_METHOD(Phalcon_Paginator_Adapter_AbstractAdapter, setLimit) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(limit) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &limit_param); - limit = zephir_get_intval(limit_param); - - if (limit <= 0) { ZEPHIR_THROW_EXCEPTION_DEBUG_STRW(phalcon_paginator_exception_ce, "Limit must be greater than zero", "phalcon/Paginator/Adapter/AbstractAdapter.zep", 102); return; } - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_LONG(&_0, limit); zephir_update_property_zval(this_ptr, ZEND_STRL("limitRows"), &_0); RETURN_THISW(); @@ -194,17 +169,10 @@ PHP_METHOD(Phalcon_Paginator_Adapter_AbstractAdapter, setRepository) zval *this_ptr = getThis(); ZVAL_UNDEF(&repository_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(repository, phalcon_paginator_repositoryinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &repository); - - zephir_update_property_zval(this_ptr, ZEND_STRL("repository"), repository); RETURN_THISW(); } @@ -224,25 +192,20 @@ PHP_METHOD(Phalcon_Paginator_Adapter_AbstractAdapter, getRepository) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$4); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY_OR_NULL(properties) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &properties_param); if (!properties_param) { ZEPHIR_INIT_VAR(&properties); } else { zephir_get_arrval(&properties, properties_param); } - - - ZEPHIR_OBS_VAR(&_0); + zephir_memory_observe(&_0); zephir_read_property(&_0, this_ptr, ZEND_STRL("repository"), PH_NOISY_CC); if (Z_TYPE_P(&_0) != IS_OBJECT) { ZEPHIR_INIT_VAR(&_1$$3); diff --git a/ext/phalcon/paginator/adapter/abstractadapter.zep.h b/ext/phalcon/paginator/adapter/abstractadapter.zep.h index 7b651a79fa1..a54e8c7dd36 100644 --- a/ext/phalcon/paginator/adapter/abstractadapter.zep.h +++ b/ext/phalcon/paginator/adapter/abstractadapter.zep.h @@ -30,11 +30,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_paginator_adapter_abstrac ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_paginator_adapter_abstractadapter_getrepository, 0, 0, Phalcon\\Paginator\\RepositoryInterface, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, properties, IS_ARRAY, 1, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, properties, 1) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, properties, IS_ARRAY, 1, "[]") ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_paginator_adapter_abstractadapter_method_entry) { diff --git a/ext/phalcon/paginator/adapter/model.zep.c b/ext/phalcon/paginator/adapter/model.zep.c index fe42a4619c7..1de534fe7a3 100644 --- a/ext/phalcon/paginator/adapter/model.zep.c +++ b/ext/phalcon/paginator/adapter/model.zep.c @@ -132,23 +132,22 @@ PHP_METHOD(Phalcon_Paginator_Adapter_Model, paginate) ZVAL_UNDEF(&_13); ZVAL_UNDEF(&_4$$4); ZVAL_UNDEF(&_10$$10); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&pageItems); array_init(&pageItems); - ZEPHIR_OBS_VAR(&_0); + zephir_memory_observe(&_0); zephir_read_property(&_0, this_ptr, ZEND_STRL("limitRows"), PH_NOISY_CC); limit = zephir_get_intval(&_0); zephir_read_property(&_1, this_ptr, ZEND_STRL("config"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&config, &_1); - ZEPHIR_OBS_VAR(&_2); + zephir_memory_observe(&_2); zephir_read_property(&_2, this_ptr, ZEND_STRL("page"), PH_NOISY_CC); pageNumber = zephir_get_intval(&_2); zephir_array_fetch_string(&_3, &config, SL("model"), PH_NOISY | PH_READONLY, "phalcon/Paginator/Adapter/Model.zep", 100); ZEPHIR_CPY_WRT(&modelClass, &_3); - ZEPHIR_OBS_VAR(¶meters); + zephir_memory_observe(¶meters); if (!(zephir_array_isset_string_fetch(¶meters, &config, SL("parameters"), 0))) { ZEPHIR_INIT_NVAR(¶meters); array_init(¶meters); @@ -166,7 +165,7 @@ PHP_METHOD(Phalcon_Paginator_Adapter_Model, paginate) ZEPHIR_INIT_VAR(&_6); ZVAL_STRING(&_6, "count"); zephir_array_fast_append(&_5, &_6); - ZEPHIR_CALL_FUNCTION(&rowCountResult, "call_user_func", NULL, 187, &_5, ¶meters); + ZEPHIR_CALL_FUNCTION(&rowCountResult, "call_user_func", NULL, 188, &_5, ¶meters); zephir_check_call_status(); if (Z_TYPE_P(&rowCountResult) == IS_OBJECT) { ZEPHIR_CALL_METHOD(&_7$$6, &rowCountResult, "count", NULL, 0); @@ -193,7 +192,7 @@ PHP_METHOD(Phalcon_Paginator_Adapter_Model, paginate) ZEPHIR_INIT_VAR(&_11$$10); ZVAL_STRING(&_11$$10, "find"); zephir_array_fast_append(&_10$$10, &_11$$10); - ZEPHIR_CALL_FUNCTION(&_12$$10, "call_user_func", NULL, 187, &_10$$10, ¶meters); + ZEPHIR_CALL_FUNCTION(&_12$$10, "call_user_func", NULL, 188, &_10$$10, ¶meters); zephir_check_call_status(); ZEPHIR_CPY_WRT(&pageItems, &_12$$10); } @@ -212,7 +211,7 @@ PHP_METHOD(Phalcon_Paginator_Adapter_Model, paginate) ZEPHIR_INIT_NVAR(&_6); ZVAL_LONG(&_6, rowcount); zephir_array_update_string(&_13, SL("total_items"), &_6, PH_COPY | PH_SEPARATE); - ZEPHIR_OBS_VAR(&_14); + zephir_memory_observe(&_14); zephir_read_property(&_14, this_ptr, ZEND_STRL("limitRows"), PH_NOISY_CC); zephir_array_update_string(&_13, SL("limit"), &_14, PH_COPY | PH_SEPARATE); add_assoc_long_ex(&_13, SL("first"), 1); diff --git a/ext/phalcon/paginator/adapter/nativearray.zep.c b/ext/phalcon/paginator/adapter/nativearray.zep.c index 151ad7081cc..293502e21ac 100644 --- a/ext/phalcon/paginator/adapter/nativearray.zep.c +++ b/ext/phalcon/paginator/adapter/nativearray.zep.c @@ -81,22 +81,21 @@ PHP_METHOD(Phalcon_Paginator_Adapter_NativeArray, paginate) ZVAL_UNDEF(&_7); ZVAL_UNDEF(&_8); ZVAL_UNDEF(&_6); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("config"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&config, &_0); - ZEPHIR_OBS_VAR(&items); + zephir_memory_observe(&items); zephir_array_fetch_string(&items, &config, SL("data"), PH_NOISY, "phalcon/Paginator/Adapter/NativeArray.zep", 54); if (UNEXPECTED(Z_TYPE_P(&items) != IS_ARRAY)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_paginator_exception_ce, "Invalid data for paginator", "phalcon/Paginator/Adapter/NativeArray.zep", 57); return; } - ZEPHIR_OBS_VAR(&_1); + zephir_memory_observe(&_1); zephir_read_property(&_1, this_ptr, ZEND_STRL("limitRows"), PH_NOISY_CC); show = zephir_get_intval(&_1); - ZEPHIR_OBS_VAR(&_2); + zephir_memory_observe(&_2); zephir_read_property(&_2, this_ptr, ZEND_STRL("page"), PH_NOISY_CC); pageNumber = zephir_get_intval(&_2); if (pageNumber <= 0) { @@ -106,14 +105,14 @@ PHP_METHOD(Phalcon_Paginator_Adapter_NativeArray, paginate) ZVAL_LONG(&_0, show); ZEPHIR_CALL_FUNCTION(&_3, "floatval", NULL, 18, &_0); zephir_check_call_status(); - roundedTotal = zephir_safe_div_long_zval(number, &_3); + roundedTotal = (zephir_safe_div_long_zval(number, &_3)); totalPages = (int) (roundedTotal); if (totalPages != roundedTotal) { totalPages++; } ZVAL_LONG(&_0, (show * ((pageNumber - 1)))); ZVAL_LONG(&_4, show); - ZEPHIR_CALL_FUNCTION(&_5, "array_slice", NULL, 500, &items, &_0, &_4); + ZEPHIR_CALL_FUNCTION(&_5, "array_slice", NULL, 501, &items, &_0, &_4); zephir_check_call_status(); ZEPHIR_CPY_WRT(&items, &_5); if (pageNumber < totalPages) { @@ -132,7 +131,7 @@ PHP_METHOD(Phalcon_Paginator_Adapter_NativeArray, paginate) ZEPHIR_INIT_VAR(&_7); ZVAL_LONG(&_7, number); zephir_array_update_string(&_6, SL("total_items"), &_7, PH_COPY | PH_SEPARATE); - ZEPHIR_OBS_VAR(&_8); + zephir_memory_observe(&_8); zephir_read_property(&_8, this_ptr, ZEND_STRL("limitRows"), PH_NOISY_CC); zephir_array_update_string(&_6, SL("limit"), &_8, PH_COPY | PH_SEPARATE); add_assoc_long_ex(&_6, SL("first"), 1); diff --git a/ext/phalcon/paginator/adapter/querybuilder.zep.c b/ext/phalcon/paginator/adapter/querybuilder.zep.c index 0b16eae5f2a..4c3e2d88bce 100644 --- a/ext/phalcon/paginator/adapter/querybuilder.zep.c +++ b/ext/phalcon/paginator/adapter/querybuilder.zep.c @@ -85,7 +85,6 @@ PHP_METHOD(Phalcon_Paginator_Adapter_QueryBuilder, __construct) { zval _1$$5; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zephir_fcall_cache_entry *_2 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *config_param = NULL, builder, columns, _0$$5; zval config; @@ -96,24 +95,18 @@ PHP_METHOD(Phalcon_Paginator_Adapter_QueryBuilder, __construct) ZVAL_UNDEF(&columns); ZVAL_UNDEF(&_0$$5); ZVAL_UNDEF(&_1$$5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(config) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &config_param); zephir_get_arrval(&config, config_param); - - if (UNEXPECTED(!(zephir_array_isset_string(&config, SL("limit"))))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_paginator_exception_ce, "Parameter 'limit' is required", "phalcon/Paginator/Adapter/QueryBuilder.zep", 70); return; } - ZEPHIR_OBS_VAR(&builder); + zephir_memory_observe(&builder); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&builder, &config, SL("builder"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_paginator_exception_ce, "Parameter 'builder' is required", "phalcon/Paginator/Adapter/QueryBuilder.zep", 74); return; @@ -123,17 +116,17 @@ PHP_METHOD(Phalcon_Paginator_Adapter_QueryBuilder, __construct) object_init_ex(&_0$$5, phalcon_paginator_exception_ce); ZEPHIR_INIT_VAR(&_1$$5); ZEPHIR_CONCAT_SS(&_1$$5, "Parameter 'builder' must be an instance ", "of Phalcon\\Mvc\\Model\\Query\\Builder"); - ZEPHIR_CALL_METHOD(NULL, &_0$$5, "__construct", NULL, 32, &_1$$5); + ZEPHIR_CALL_METHOD(NULL, &_0$$5, "__construct", NULL, 33, &_1$$5); zephir_check_call_status(); zephir_throw_exception_debug(&_0$$5, "phalcon/Paginator/Adapter/QueryBuilder.zep", 80); ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_OBS_VAR(&columns); + zephir_memory_observe(&columns); if (zephir_array_isset_string_fetch(&columns, &config, SL("columns"), 0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("columns"), &columns); } - ZEPHIR_CALL_PARENT(NULL, phalcon_paginator_adapter_querybuilder_ce, getThis(), "__construct", &_2, 0, &config); + ZEPHIR_CALL_PARENT(NULL, phalcon_paginator_adapter_querybuilder_ce, getThis(), "__construct", NULL, 0, &config); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, this_ptr, "setquerybuilder", NULL, 0, &builder); zephir_check_call_status(); @@ -145,9 +138,6 @@ PHP_METHOD(Phalcon_Paginator_Adapter_QueryBuilder, __construct) */ PHP_METHOD(Phalcon_Paginator_Adapter_QueryBuilder, getCurrentPage) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "page"); } @@ -157,9 +147,6 @@ PHP_METHOD(Phalcon_Paginator_Adapter_QueryBuilder, getCurrentPage) */ PHP_METHOD(Phalcon_Paginator_Adapter_QueryBuilder, getQueryBuilder) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "builder"); } @@ -222,11 +209,10 @@ PHP_METHOD(Phalcon_Paginator_Adapter_QueryBuilder, paginate) ZVAL_UNDEF(&_23); ZVAL_UNDEF(&_7$$14); ZVAL_UNDEF(&_9$$15); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_OBS_VAR(&originalBuilder); + zephir_memory_observe(&originalBuilder); zephir_read_property(&originalBuilder, this_ptr, ZEND_STRL("builder"), PH_NOISY_CC); zephir_read_property(&_0, this_ptr, ZEND_STRL("columns"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&columns, &_0); @@ -238,9 +224,9 @@ PHP_METHOD(Phalcon_Paginator_Adapter_QueryBuilder, paginate) if (zephir_clone(&totalBuilder, &builder) == FAILURE) { RETURN_MM(); } - ZEPHIR_OBS_VAR(&limit); + zephir_memory_observe(&limit); zephir_read_property(&limit, this_ptr, ZEND_STRL("limitRows"), PH_NOISY_CC); - ZEPHIR_OBS_VAR(&_1); + zephir_memory_observe(&_1); zephir_read_property(&_1, this_ptr, ZEND_STRL("page"), PH_NOISY_CC); numberPage = zephir_get_intval(&_1); if (!(numberPage)) { @@ -392,7 +378,7 @@ PHP_METHOD(Phalcon_Paginator_Adapter_QueryBuilder, paginate) zephir_create_array(&_23, 8, 0); zephir_array_update_string(&_23, SL("items"), &items, PH_COPY | PH_SEPARATE); zephir_array_update_string(&_23, SL("total_items"), &rowcount, PH_COPY | PH_SEPARATE); - ZEPHIR_OBS_VAR(&_24); + zephir_memory_observe(&_24); zephir_read_property(&_24, this_ptr, ZEND_STRL("limitRows"), PH_NOISY_CC); zephir_array_update_string(&_23, SL("limit"), &_24, PH_COPY | PH_SEPARATE); add_assoc_long_ex(&_23, SL("first"), 1); @@ -418,17 +404,10 @@ PHP_METHOD(Phalcon_Paginator_Adapter_QueryBuilder, setQueryBuilder) zval *this_ptr = getThis(); ZVAL_UNDEF(&builder_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(builder, phalcon_mvc_model_query_builder_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &builder); - - zephir_update_property_zval(this_ptr, ZEND_STRL("builder"), builder); RETURN_THISW(); } diff --git a/ext/phalcon/paginator/paginatorfactory.zep.c b/ext/phalcon/paginator/paginatorfactory.zep.c index eff963bf93f..d483b47e58c 100644 --- a/ext/phalcon/paginator/paginatorfactory.zep.c +++ b/ext/phalcon/paginator/paginatorfactory.zep.c @@ -48,16 +48,12 @@ PHP_METHOD(Phalcon_Paginator_PaginatorFactory, __construct) zval *this_ptr = getThis(); ZVAL_UNDEF(&services); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(services) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &services_param); if (!services_param) { ZEPHIR_INIT_VAR(&services); @@ -65,8 +61,6 @@ PHP_METHOD(Phalcon_Paginator_PaginatorFactory, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&services, services_param); } - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "init", NULL, 0, &services); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); @@ -114,19 +108,13 @@ PHP_METHOD(Phalcon_Paginator_PaginatorFactory, load) ZVAL_UNDEF(&options); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(config) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &config); ZEPHIR_SEPARATE_PARAM(config); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "checkconfig", NULL, 0, config); zephir_check_call_status(); ZEPHIR_CPY_WRT(config, &_0); @@ -135,9 +123,9 @@ PHP_METHOD(Phalcon_Paginator_PaginatorFactory, load) ZEPHIR_CALL_METHOD(&_0, this_ptr, "checkconfigelement", NULL, 0, config, &_1); zephir_check_call_status(); ZEPHIR_CPY_WRT(config, &_0); - ZEPHIR_OBS_VAR(&name); + zephir_memory_observe(&name); zephir_array_fetch_string(&name, config, SL("adapter"), PH_NOISY, "phalcon/Paginator/PaginatorFactory.zep", 62); - ZEPHIR_OBS_VAR(&options); + zephir_memory_observe(&options); if (!(zephir_array_isset_string_fetch(&options, config, SL("options"), 0))) { ZEPHIR_INIT_NVAR(&options); array_init(&options); @@ -163,17 +151,13 @@ PHP_METHOD(Phalcon_Paginator_PaginatorFactory, newInstance) ZVAL_UNDEF(&definition); ZVAL_UNDEF(&options); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(name) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &name_param, &options_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")); @@ -190,8 +174,6 @@ PHP_METHOD(Phalcon_Paginator_PaginatorFactory, newInstance) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - ZEPHIR_CALL_METHOD(&definition, this_ptr, "getservice", NULL, 0, &name); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_0); @@ -207,9 +189,6 @@ PHP_METHOD(Phalcon_Paginator_PaginatorFactory, newInstance) */ PHP_METHOD(Phalcon_Paginator_PaginatorFactory, getExceptionClass) { - zval *this_ptr = getThis(); - - RETURN_STRING("Phalcon\\Paginator\\Exception"); } @@ -221,9 +200,6 @@ PHP_METHOD(Phalcon_Paginator_PaginatorFactory, getExceptionClass) */ PHP_METHOD(Phalcon_Paginator_PaginatorFactory, getServices) { - zval *this_ptr = getThis(); - - zephir_create_array(return_value, 3, 0); add_assoc_stringl_ex(return_value, SL("model"), SL("Phalcon\\Paginator\\Adapter\\Model")); diff --git a/ext/phalcon/paginator/paginatorfactory.zep.h b/ext/phalcon/paginator/paginatorfactory.zep.h index 2c498be4307..4b6450a5b7f 100644 --- a/ext/phalcon/paginator/paginatorfactory.zep.h +++ b/ext/phalcon/paginator/paginatorfactory.zep.h @@ -10,11 +10,7 @@ PHP_METHOD(Phalcon_Paginator_PaginatorFactory, getExceptionClass); PHP_METHOD(Phalcon_Paginator_PaginatorFactory, getServices); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_paginator_paginatorfactory___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, services, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, services, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, services, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_paginator_paginatorfactory_load, 0, 1, Phalcon\\Paginator\\Adapter\\AdapterInterface, 0) @@ -23,11 +19,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_paginator_paginatorfactory_newinstance, 0, 1, Phalcon\\Paginator\\Adapter\\AdapterInterface, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_paginator_paginatorfactory_getexceptionclass, 0, 0, IS_STRING, 0) diff --git a/ext/phalcon/paginator/repository.zep.c b/ext/phalcon/paginator/repository.zep.c index 313863161ba..4fe1193443c 100644 --- a/ext/phalcon/paginator/repository.zep.c +++ b/ext/phalcon/paginator/repository.zep.c @@ -71,23 +71,17 @@ PHP_METHOD(Phalcon_Paginator_Repository, __get) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(property) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &property_param); zephir_get_strval(&property, property_param); - - ZEPHIR_INIT_VAR(&_0); ZEPHIR_CALL_METHOD(&_1, this_ptr, "getrealnameproperty", NULL, 0, &property); zephir_check_call_status(); - zephir_camelize(&_0, &_1, NULL ); + zephir_camelize(&_0, &_1, NULL ); ZEPHIR_INIT_VAR(&method); ZEPHIR_CONCAT_SV(&method, "get", &_0); if ((zephir_method_exists(this_ptr, &method) == SUCCESS)) { @@ -109,9 +103,6 @@ PHP_METHOD(Phalcon_Paginator_Repository, __get) */ PHP_METHOD(Phalcon_Paginator_Repository, getAliases) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "aliases"); } @@ -128,9 +119,8 @@ PHP_METHOD(Phalcon_Paginator_Repository, getCurrent) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "current"); @@ -152,9 +142,8 @@ PHP_METHOD(Phalcon_Paginator_Repository, getFirst) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "first"); @@ -176,9 +165,8 @@ PHP_METHOD(Phalcon_Paginator_Repository, getItems) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "items"); @@ -200,9 +188,8 @@ PHP_METHOD(Phalcon_Paginator_Repository, getLast) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "last"); @@ -224,9 +211,8 @@ PHP_METHOD(Phalcon_Paginator_Repository, getLimit) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "limit"); @@ -248,9 +234,8 @@ PHP_METHOD(Phalcon_Paginator_Repository, getNext) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "next"); @@ -272,9 +257,8 @@ PHP_METHOD(Phalcon_Paginator_Repository, getPrevious) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "previous"); @@ -296,9 +280,8 @@ PHP_METHOD(Phalcon_Paginator_Repository, getTotalItems) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "total_items"); @@ -313,9 +296,6 @@ PHP_METHOD(Phalcon_Paginator_Repository, getTotalItems) */ PHP_METHOD(Phalcon_Paginator_Repository, jsonSerialize) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "properties"); } @@ -331,19 +311,13 @@ PHP_METHOD(Phalcon_Paginator_Repository, setAliases) zval *this_ptr = getThis(); ZVAL_UNDEF(&aliases); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(aliases) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &aliases_param); zephir_get_arrval(&aliases, aliases_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("aliases"), &aliases); RETURN_THIS(); } @@ -359,19 +333,13 @@ PHP_METHOD(Phalcon_Paginator_Repository, setProperties) zval *this_ptr = getThis(); ZVAL_UNDEF(&properties); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(properties) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &properties_param); zephir_get_arrval(&properties, properties_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("properties"), &properties); RETURN_THIS(); } @@ -391,26 +359,21 @@ PHP_METHOD(Phalcon_Paginator_Repository, getProperty) ZVAL_NULL(&__$null); ZVAL_UNDEF(&value); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(property) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(defaultValue) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &property_param, &defaultValue); zephir_get_strval(&property, property_param); if (!defaultValue) { defaultValue = &defaultValue_sub; defaultValue = &__$null; } - - - ZEPHIR_OBS_VAR(&value); + zephir_memory_observe(&value); zephir_read_property(&_0, this_ptr, ZEND_STRL("properties"), PH_NOISY_CC | PH_READONLY); if (!(zephir_array_isset_fetch(&value, &_0, &property, 0))) { ZEPHIR_CPY_WRT(&value, defaultValue); @@ -432,19 +395,13 @@ PHP_METHOD(Phalcon_Paginator_Repository, getRealNameProperty) ZVAL_UNDEF(&property); ZVAL_UNDEF(&aliases); ZVAL_UNDEF(&_0$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(property) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &property_param); zephir_get_strval(&property, property_param); - - ZEPHIR_CALL_METHOD(&aliases, this_ptr, "getaliases", NULL, 0); zephir_check_call_status(); if (zephir_array_isset(&aliases, &property)) { @@ -464,7 +421,8 @@ zend_object *zephir_init_properties_Phalcon_Paginator_Repository(zend_class_entr ZVAL_UNDEF(&_3$$4); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/paginator/repository.zep.h b/ext/phalcon/paginator/repository.zep.h index 02511743b68..bf623526eeb 100644 --- a/ext/phalcon/paginator/repository.zep.h +++ b/ext/phalcon/paginator/repository.zep.h @@ -79,11 +79,7 @@ ZEPHIR_INIT_FUNCS(phalcon_paginator_repository_method_entry) { PHP_ME(Phalcon_Paginator_Repository, getAliases, arginfo_phalcon_paginator_repository_getaliases, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Paginator_Repository, getCurrent, arginfo_phalcon_paginator_repository_getcurrent, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Paginator_Repository, getFirst, arginfo_phalcon_paginator_repository_getfirst, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Paginator_Repository, getItems, arginfo_phalcon_paginator_repository_getitems, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Paginator_Repository, getItems, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Paginator_Repository, getItems, arginfo_phalcon_paginator_repository_getitems, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Paginator_Repository, getLast, arginfo_phalcon_paginator_repository_getlast, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Paginator_Repository, getLimit, arginfo_phalcon_paginator_repository_getlimit, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Paginator_Repository, getNext, arginfo_phalcon_paginator_repository_getnext, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/session/adapter/abstractadapter.zep.c b/ext/phalcon/session/adapter/abstractadapter.zep.c index adb81b13f79..062ca16e25c 100644 --- a/ext/phalcon/session/adapter/abstractadapter.zep.c +++ b/ext/phalcon/session/adapter/abstractadapter.zep.c @@ -47,9 +47,6 @@ ZEPHIR_INIT_CLASS(Phalcon_Session_Adapter_AbstractAdapter) */ PHP_METHOD(Phalcon_Session_Adapter_AbstractAdapter, close) { - zval *this_ptr = getThis(); - - RETURN_BOOL(1); } @@ -69,18 +66,12 @@ PHP_METHOD(Phalcon_Session_Adapter_AbstractAdapter, destroy) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(sessionId) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &sessionId); - - _0 = !(ZEPHIR_IS_EMPTY(sessionId)); if (_0) { zephir_read_property(&_1, this_ptr, ZEND_STRL("adapter"), PH_NOISY_CC | PH_READONLY); @@ -107,20 +98,11 @@ PHP_METHOD(Phalcon_Session_Adapter_AbstractAdapter, gc) { zval *maxlifetime_param = NULL; zend_long maxlifetime; - zval *this_ptr = getThis(); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(maxlifetime) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &maxlifetime_param); - maxlifetime = zephir_get_intval(maxlifetime_param); - - RETURN_BOOL(1); } @@ -138,23 +120,18 @@ PHP_METHOD(Phalcon_Session_Adapter_AbstractAdapter, read) ZVAL_UNDEF(&data); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(sessionId) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &sessionId); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("adapter"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&data, &_0, "get", NULL, 0, sessionId); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_1); if (Z_TYPE_P(&data) == IS_NULL) { + ZEPHIR_INIT_NVAR(&_1); ZVAL_STRING(&_1, ""); } else { ZEPHIR_CPY_WRT(&_1, &data); @@ -167,23 +144,15 @@ PHP_METHOD(Phalcon_Session_Adapter_AbstractAdapter, read) */ PHP_METHOD(Phalcon_Session_Adapter_AbstractAdapter, open) { - zval *savePath, savePath_sub, *sessionName, sessionName_sub; - zval *this_ptr = getThis(); + zval *path, path_sub, *name, name_sub; - ZVAL_UNDEF(&savePath_sub); - ZVAL_UNDEF(&sessionName_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; + ZVAL_UNDEF(&path_sub); + ZVAL_UNDEF(&name_sub); ZEND_PARSE_PARAMETERS_START(2, 2) - Z_PARAM_ZVAL(savePath) - Z_PARAM_ZVAL(sessionName) + Z_PARAM_ZVAL(path) + Z_PARAM_ZVAL(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - zephir_fetch_params_without_memory_grow(2, 0, &savePath, &sessionName); - - + zephir_fetch_params_without_memory_grow(2, 0, &path, &name); RETURN_BOOL(1); } @@ -194,27 +163,21 @@ PHP_METHOD(Phalcon_Session_Adapter_AbstractAdapter, write) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *sessionId, sessionId_sub, *data, data_sub, _0; + zval *id, id_sub, *data, data_sub, _0; zval *this_ptr = getThis(); - ZVAL_UNDEF(&sessionId_sub); + ZVAL_UNDEF(&id_sub); ZVAL_UNDEF(&data_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) - Z_PARAM_ZVAL(sessionId) + Z_PARAM_ZVAL(id) Z_PARAM_ZVAL(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); - zephir_fetch_params(1, 2, 0, &sessionId, &data); - - + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); + zephir_fetch_params(1, 2, 0, &id, &data); zephir_read_property(&_0, this_ptr, ZEND_STRL("adapter"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_RETURN_CALL_METHOD(&_0, "set", NULL, 0, sessionId, data); + ZEPHIR_RETURN_CALL_METHOD(&_0, "set", NULL, 0, id, data); zephir_check_call_status(); RETURN_MM(); } @@ -227,14 +190,12 @@ PHP_METHOD(Phalcon_Session_Adapter_AbstractAdapter, getArrVal) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *collection_param = NULL, *index, index_sub, *defaultValue = NULL, defaultValue_sub, __$null, value; zval collection; - zval *this_ptr = getThis(); ZVAL_UNDEF(&collection); ZVAL_UNDEF(&index_sub); ZVAL_UNDEF(&defaultValue_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&value); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_ARRAY(collection) @@ -242,22 +203,19 @@ PHP_METHOD(Phalcon_Session_Adapter_AbstractAdapter, getArrVal) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(defaultValue) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &collection_param, &index, &defaultValue); ZEPHIR_OBS_COPY_OR_DUP(&collection, collection_param); if (!defaultValue) { defaultValue = &defaultValue_sub; defaultValue = &__$null; } - - - if (UNEXPECTED(!(zephir_array_isset_fetch(&value, &collection, index, 1)))) { + zephir_memory_observe(&value); + if (UNEXPECTED(!(zephir_array_isset_fetch(&value, &collection, index, 0)))) { RETVAL_ZVAL(defaultValue, 1, 0); RETURN_MM(); } - RETURN_CTOR(&value); + RETURN_CCTOR(&value); } diff --git a/ext/phalcon/session/adapter/abstractadapter.zep.h b/ext/phalcon/session/adapter/abstractadapter.zep.h index 45be8c40575..a0f6a59cbda 100644 --- a/ext/phalcon/session/adapter/abstractadapter.zep.h +++ b/ext/phalcon/session/adapter/abstractadapter.zep.h @@ -18,31 +18,21 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_session_adapter_abstract ZEND_ARG_INFO(0, sessionId) ZEND_END_ARG_INFO() -#if PHP_VERSION_ID >= 80100 -ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_phalcon_session_adapter_abstractadapter_gc, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, maxlifetime, IS_LONG, 0) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_phalcon_session_adapter_abstractadapter_gc, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) + ZEND_ARG_TYPE_INFO(0, maxlifetime, IS_LONG, 0) ZEND_END_ARG_INFO() -#elif PHP_VERSION_ID >= 80000 -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_session_adapter_abstractadapter_gc, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, maxlifetime, IS_LONG, 0) -ZEND_END_ARG_INFO() -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_session_adapter_abstractadapter_gc, 0, 0, 1) - ZEND_ARG_INFO(0, maxlifetime) -ZEND_END_ARG_INFO() -#endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_session_adapter_abstractadapter_read, 0, 1, IS_STRING, 0) ZEND_ARG_INFO(0, sessionId) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_session_adapter_abstractadapter_open, 0, 2, _IS_BOOL, 0) - ZEND_ARG_INFO(0, savePath) - ZEND_ARG_INFO(0, sessionName) + ZEND_ARG_INFO(0, path) + ZEND_ARG_INFO(0, name) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_session_adapter_abstractadapter_write, 0, 2, _IS_BOOL, 0) - ZEND_ARG_INFO(0, sessionId) + ZEND_ARG_INFO(0, id) ZEND_ARG_INFO(0, data) ZEND_END_ARG_INFO() diff --git a/ext/phalcon/session/adapter/libmemcached.zep.c b/ext/phalcon/session/adapter/libmemcached.zep.c index afcd49cae5f..204a84d50a6 100644 --- a/ext/phalcon/session/adapter/libmemcached.zep.c +++ b/ext/phalcon/session/adapter/libmemcached.zep.c @@ -71,17 +71,13 @@ PHP_METHOD(Phalcon_Session_Adapter_Libmemcached, __construct) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_OBJECT_OF_CLASS(factory, phalcon_storage_adapterfactory_ce) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &factory, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -89,8 +85,6 @@ PHP_METHOD(Phalcon_Session_Adapter_Libmemcached, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "prefix"); ZEPHIR_INIT_VAR(&_2); diff --git a/ext/phalcon/session/adapter/libmemcached.zep.h b/ext/phalcon/session/adapter/libmemcached.zep.h index 528f4ecc9c3..c4afaaa5b4a 100644 --- a/ext/phalcon/session/adapter/libmemcached.zep.h +++ b/ext/phalcon/session/adapter/libmemcached.zep.h @@ -7,11 +7,7 @@ PHP_METHOD(Phalcon_Session_Adapter_Libmemcached, __construct); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_session_adapter_libmemcached___construct, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, factory, Phalcon\\Storage\\AdapterFactory, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_session_adapter_libmemcached_method_entry) { diff --git a/ext/phalcon/session/adapter/noop.zep.c b/ext/phalcon/session/adapter/noop.zep.c index d3caec7c274..f29e6d7d646 100644 --- a/ext/phalcon/session/adapter/noop.zep.c +++ b/ext/phalcon/session/adapter/noop.zep.c @@ -96,16 +96,12 @@ PHP_METHOD(Phalcon_Session_Adapter_Noop, __construct) ZVAL_UNDEF(&options); ZVAL_UNDEF(&prefix); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -113,9 +109,7 @@ PHP_METHOD(Phalcon_Session_Adapter_Noop, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - - ZEPHIR_OBS_VAR(&prefix); + zephir_memory_observe(&prefix); if (!(zephir_array_isset_string_fetch(&prefix, &options, SL("prefix"), 0))) { ZEPHIR_INIT_NVAR(&prefix); ZVAL_STRING(&prefix, ""); @@ -130,9 +124,6 @@ PHP_METHOD(Phalcon_Session_Adapter_Noop, __construct) */ PHP_METHOD(Phalcon_Session_Adapter_Noop, close) { - zval *this_ptr = getThis(); - - RETURN_BOOL(1); } @@ -143,20 +134,12 @@ PHP_METHOD(Phalcon_Session_Adapter_Noop, close) PHP_METHOD(Phalcon_Session_Adapter_Noop, destroy) { zval *sessionId, sessionId_sub; - zval *this_ptr = getThis(); ZVAL_UNDEF(&sessionId_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(sessionId) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &sessionId); - - RETURN_BOOL(1); } @@ -170,20 +153,11 @@ PHP_METHOD(Phalcon_Session_Adapter_Noop, gc) { zval *maxlifetime_param = NULL; zend_long maxlifetime; - zval *this_ptr = getThis(); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(maxlifetime) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &maxlifetime_param); - maxlifetime = zephir_get_intval(maxlifetime_param); - - RETURN_BOOL(1); } @@ -193,20 +167,12 @@ PHP_METHOD(Phalcon_Session_Adapter_Noop, gc) PHP_METHOD(Phalcon_Session_Adapter_Noop, read) { zval *sessionId, sessionId_sub; - zval *this_ptr = getThis(); ZVAL_UNDEF(&sessionId_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(sessionId) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &sessionId); - - RETURN_STRING(""); } @@ -215,23 +181,15 @@ PHP_METHOD(Phalcon_Session_Adapter_Noop, read) */ PHP_METHOD(Phalcon_Session_Adapter_Noop, open) { - zval *savePath, savePath_sub, *sessionName, sessionName_sub; - zval *this_ptr = getThis(); + zval *path, path_sub, *name, name_sub; - ZVAL_UNDEF(&savePath_sub); - ZVAL_UNDEF(&sessionName_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; + ZVAL_UNDEF(&path_sub); + ZVAL_UNDEF(&name_sub); ZEND_PARSE_PARAMETERS_START(2, 2) - Z_PARAM_ZVAL(savePath) - Z_PARAM_ZVAL(sessionName) + Z_PARAM_ZVAL(path) + Z_PARAM_ZVAL(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - zephir_fetch_params_without_memory_grow(2, 0, &savePath, &sessionName); - - + zephir_fetch_params_without_memory_grow(2, 0, &path, &name); RETURN_BOOL(1); } @@ -240,23 +198,15 @@ PHP_METHOD(Phalcon_Session_Adapter_Noop, open) */ PHP_METHOD(Phalcon_Session_Adapter_Noop, write) { - zval *sessionId, sessionId_sub, *data, data_sub; - zval *this_ptr = getThis(); + zval *id, id_sub, *data, data_sub; - ZVAL_UNDEF(&sessionId_sub); + ZVAL_UNDEF(&id_sub); ZVAL_UNDEF(&data_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) - Z_PARAM_ZVAL(sessionId) + Z_PARAM_ZVAL(id) Z_PARAM_ZVAL(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - - zephir_fetch_params_without_memory_grow(2, 0, &sessionId, &data); - - + zephir_fetch_params_without_memory_grow(2, 0, &id, &data); RETURN_BOOL(1); } @@ -273,19 +223,13 @@ PHP_METHOD(Phalcon_Session_Adapter_Noop, getPrefixedName) ZVAL_UNDEF(&name_sub); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &name); ZEPHIR_SEPARATE_PARAM(name); - - zephir_cast_to_string(&_0, name); ZEPHIR_CPY_WRT(name, &_0); zephir_read_property(&_1, this_ptr, ZEND_STRL("prefix"), PH_NOISY_CC | PH_READONLY); @@ -301,7 +245,8 @@ zend_object *zephir_init_properties_Phalcon_Session_Adapter_Noop(zend_class_entr ZVAL_UNDEF(&_1$$3); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/session/adapter/noop.zep.h b/ext/phalcon/session/adapter/noop.zep.h index 6b9adde87c8..f1360a852ea 100644 --- a/ext/phalcon/session/adapter/noop.zep.h +++ b/ext/phalcon/session/adapter/noop.zep.h @@ -14,11 +14,7 @@ PHP_METHOD(Phalcon_Session_Adapter_Noop, getPrefixedName); zend_object *zephir_init_properties_Phalcon_Session_Adapter_Noop(zend_class_entry *class_type); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_session_adapter_noop___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_session_adapter_noop_close, 0, 0, _IS_BOOL, 0) @@ -28,31 +24,21 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_session_adapter_noop_des ZEND_ARG_INFO(0, sessionId) ZEND_END_ARG_INFO() -#if PHP_VERSION_ID >= 80100 -ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_phalcon_session_adapter_noop_gc, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, maxlifetime, IS_LONG, 0) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_phalcon_session_adapter_noop_gc, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) + ZEND_ARG_TYPE_INFO(0, maxlifetime, IS_LONG, 0) ZEND_END_ARG_INFO() -#elif PHP_VERSION_ID >= 80000 -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_session_adapter_noop_gc, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, maxlifetime, IS_LONG, 0) -ZEND_END_ARG_INFO() -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_session_adapter_noop_gc, 0, 0, 1) - ZEND_ARG_INFO(0, maxlifetime) -ZEND_END_ARG_INFO() -#endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_session_adapter_noop_read, 0, 1, IS_STRING, 0) ZEND_ARG_INFO(0, sessionId) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_session_adapter_noop_open, 0, 2, _IS_BOOL, 0) - ZEND_ARG_INFO(0, savePath) - ZEND_ARG_INFO(0, sessionName) + ZEND_ARG_INFO(0, path) + ZEND_ARG_INFO(0, name) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_session_adapter_noop_write, 0, 2, _IS_BOOL, 0) - ZEND_ARG_INFO(0, sessionId) + ZEND_ARG_INFO(0, id) ZEND_ARG_INFO(0, data) ZEND_END_ARG_INFO() diff --git a/ext/phalcon/session/adapter/redis.zep.c b/ext/phalcon/session/adapter/redis.zep.c index 1fc10ead7b3..9c722b13800 100644 --- a/ext/phalcon/session/adapter/redis.zep.c +++ b/ext/phalcon/session/adapter/redis.zep.c @@ -66,17 +66,13 @@ PHP_METHOD(Phalcon_Session_Adapter_Redis, __construct) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_OBJECT_OF_CLASS(factory, phalcon_storage_adapterfactory_ce) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &factory, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -84,8 +80,6 @@ PHP_METHOD(Phalcon_Session_Adapter_Redis, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "prefix"); ZEPHIR_INIT_VAR(&_2); diff --git a/ext/phalcon/session/adapter/redis.zep.h b/ext/phalcon/session/adapter/redis.zep.h index 7217565fa4f..352517cedc7 100644 --- a/ext/phalcon/session/adapter/redis.zep.h +++ b/ext/phalcon/session/adapter/redis.zep.h @@ -7,11 +7,7 @@ PHP_METHOD(Phalcon_Session_Adapter_Redis, __construct); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_session_adapter_redis___construct, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, factory, Phalcon\\Storage\\AdapterFactory, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_session_adapter_redis_method_entry) { diff --git a/ext/phalcon/session/adapter/stream.zep.c b/ext/phalcon/session/adapter/stream.zep.c index fedab9ff5ff..629f034e626 100644 --- a/ext/phalcon/session/adapter/stream.zep.c +++ b/ext/phalcon/session/adapter/stream.zep.c @@ -80,29 +80,24 @@ PHP_METHOD(Phalcon_Session_Adapter_Stream, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; - zval *options_param = NULL, path, _1, _2, _3, _6, _4$$4, _5$$4; + zval *options_param = NULL, path, _0, _1, _2, _5, _3$$4, _4$$4; zval options; zval *this_ptr = getThis(); ZVAL_UNDEF(&options); ZVAL_UNDEF(&path); + ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); - ZVAL_UNDEF(&_3); - ZVAL_UNDEF(&_6); + ZVAL_UNDEF(&_5); + ZVAL_UNDEF(&_3$$4); ZVAL_UNDEF(&_4$$4); - ZVAL_UNDEF(&_5$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -110,38 +105,36 @@ PHP_METHOD(Phalcon_Session_Adapter_Stream, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - - ZEPHIR_CALL_PARENT(NULL, phalcon_session_adapter_stream_ce, getThis(), "__construct", &_0, 0, &options); + ZEPHIR_CALL_PARENT(NULL, phalcon_session_adapter_stream_ce, getThis(), "__construct", NULL, 0, &options); zephir_check_call_status(); - ZEPHIR_INIT_VAR(&_2); - ZVAL_STRING(&_2, "session.save_path"); - ZEPHIR_CALL_METHOD(&_1, this_ptr, "phpiniget", NULL, 0, &_2); + ZEPHIR_INIT_VAR(&_1); + ZVAL_STRING(&_1, "session.save_path"); + ZEPHIR_CALL_METHOD(&_0, this_ptr, "phpiniget", NULL, 0, &_1); zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_2); - ZVAL_STRING(&_2, "savePath"); - ZEPHIR_CALL_METHOD(&path, this_ptr, "getarrval", NULL, 0, &options, &_2, &_1); + ZEPHIR_INIT_NVAR(&_1); + ZVAL_STRING(&_1, "savePath"); + ZEPHIR_CALL_METHOD(&path, this_ptr, "getarrval", NULL, 0, &options, &_1, &_0); zephir_check_call_status(); if (UNEXPECTED(1 == ZEPHIR_IS_EMPTY(&path))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_session_exception_ce, "The session save path cannot be empty", "phalcon/Session/Adapter/Stream.zep", 67); return; } - ZEPHIR_CALL_METHOD(&_3, this_ptr, "phpiswritable", NULL, 0, &path); + ZEPHIR_CALL_METHOD(&_2, this_ptr, "phpiswritable", NULL, 0, &path); zephir_check_call_status(); - if (UNEXPECTED(!ZEPHIR_IS_TRUE_IDENTICAL(&_3))) { + if (UNEXPECTED(!ZEPHIR_IS_TRUE_IDENTICAL(&_2))) { + ZEPHIR_INIT_VAR(&_3$$4); + object_init_ex(&_3$$4, phalcon_session_exception_ce); ZEPHIR_INIT_VAR(&_4$$4); - object_init_ex(&_4$$4, phalcon_session_exception_ce); - ZEPHIR_INIT_VAR(&_5$$4); - ZEPHIR_CONCAT_SVS(&_5$$4, "The session save path [", &path, "] is not writable"); - ZEPHIR_CALL_METHOD(NULL, &_4$$4, "__construct", NULL, 32, &_5$$4); + ZEPHIR_CONCAT_SVS(&_4$$4, "The session save path [", &path, "] is not writable"); + ZEPHIR_CALL_METHOD(NULL, &_3$$4, "__construct", NULL, 33, &_4$$4); zephir_check_call_status(); - zephir_throw_exception_debug(&_4$$4, "phalcon/Session/Adapter/Stream.zep", 71); + zephir_throw_exception_debug(&_3$$4, "phalcon/Session/Adapter/Stream.zep", 71); ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_CALL_METHOD(&_6, this_ptr, "getdirseparator", NULL, 511, &path); + ZEPHIR_CALL_METHOD(&_5, this_ptr, "getdirseparator", NULL, 0, &path); zephir_check_call_status(); - zephir_update_property_zval(this_ptr, ZEND_STRL("path"), &_6); + zephir_update_property_zval(this_ptr, ZEND_STRL("path"), &_5); ZEPHIR_MM_RESTORE(); } @@ -158,18 +151,12 @@ PHP_METHOD(Phalcon_Session_Adapter_Stream, destroy) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(sessionId) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &sessionId); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("path"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&_1, this_ptr, "getprefixedname", NULL, 0, sessionId); zephir_check_call_status(); @@ -182,7 +169,7 @@ PHP_METHOD(Phalcon_Session_Adapter_Stream, destroy) _2 = zephir_is_true(&_3); } if (_2) { - ZEPHIR_CALL_FUNCTION(NULL, "unlink", NULL, 122, &file); + ZEPHIR_CALL_FUNCTION(NULL, "unlink", NULL, 123, &file); zephir_check_call_status(); } RETURN_MM_BOOL(1); @@ -215,19 +202,12 @@ PHP_METHOD(Phalcon_Session_Adapter_Stream, gc) ZVAL_UNDEF(&_10$$3); ZVAL_UNDEF(&_13$$5); ZVAL_UNDEF(&_15$$5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(maxlifetime) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &maxlifetime_param); - maxlifetime = zephir_get_intval(maxlifetime_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("path"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_1, this_ptr, ZEND_STRL("prefix"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&pattern); @@ -257,7 +237,7 @@ PHP_METHOD(Phalcon_Session_Adapter_Stream, gc) _9$$3 = ZEPHIR_LT(&_10$$3, &time); } if (_9$$3) { - ZEPHIR_CALL_FUNCTION(NULL, "unlink", &_11, 122, &file); + ZEPHIR_CALL_FUNCTION(NULL, "unlink", &_11, 123, &file); zephir_check_call_status(); } } ZEND_HASH_FOREACH_END(); @@ -285,7 +265,7 @@ PHP_METHOD(Phalcon_Session_Adapter_Stream, gc) _14$$5 = ZEPHIR_LT(&_15$$5, &time); } if (_14$$5) { - ZEPHIR_CALL_FUNCTION(NULL, "unlink", &_11, 122, &file); + ZEPHIR_CALL_FUNCTION(NULL, "unlink", &_11, 123, &file); zephir_check_call_status(); } ZEPHIR_CALL_METHOD(NULL, &_3, "next", NULL, 0); @@ -303,23 +283,15 @@ PHP_METHOD(Phalcon_Session_Adapter_Stream, gc) */ PHP_METHOD(Phalcon_Session_Adapter_Stream, open) { - zval *savePath, savePath_sub, *sessionName, sessionName_sub; - zval *this_ptr = getThis(); + zval *path, path_sub, *name, name_sub; - ZVAL_UNDEF(&savePath_sub); - ZVAL_UNDEF(&sessionName_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; + ZVAL_UNDEF(&path_sub); + ZVAL_UNDEF(&name_sub); ZEND_PARSE_PARAMETERS_START(2, 2) - Z_PARAM_ZVAL(savePath) - Z_PARAM_ZVAL(sessionName) + Z_PARAM_ZVAL(path) + Z_PARAM_ZVAL(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - zephir_fetch_params_without_memory_grow(2, 0, &savePath, &sessionName); - - + zephir_fetch_params_without_memory_grow(2, 0, &path, &name); RETURN_BOOL(1); } @@ -343,18 +315,12 @@ PHP_METHOD(Phalcon_Session_Adapter_Stream, read) ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$3); ZVAL_UNDEF(&_5$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(sessionId) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &sessionId); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("path"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&_1, this_ptr, "getprefixedname", NULL, 0, sessionId); zephir_check_call_status(); @@ -370,7 +336,7 @@ PHP_METHOD(Phalcon_Session_Adapter_Stream, read) ZEPHIR_CALL_METHOD(&pointer, this_ptr, "phpfopen", NULL, 0, &name, &_3$$3); zephir_check_call_status(); ZVAL_LONG(&_4$$3, 1); - ZEPHIR_CALL_FUNCTION(&_5$$3, "flock", NULL, 131, &pointer, &_4$$3); + ZEPHIR_CALL_FUNCTION(&_5$$3, "flock", NULL, 132, &pointer, &_4$$3); zephir_check_call_status(); if (zephir_is_true(&_5$$3)) { ZEPHIR_CALL_METHOD(&data, this_ptr, "phpfilegetcontents", NULL, 0, &name); @@ -388,31 +354,25 @@ PHP_METHOD(Phalcon_Session_Adapter_Stream, write) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *sessionId, sessionId_sub, *data, data_sub, name, _0, _1, _2, _3; + zval *id, id_sub, *data, data_sub, name, _0, _1, _2, _3; zval *this_ptr = getThis(); - ZVAL_UNDEF(&sessionId_sub); + ZVAL_UNDEF(&id_sub); ZVAL_UNDEF(&data_sub); ZVAL_UNDEF(&name); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) - Z_PARAM_ZVAL(sessionId) + Z_PARAM_ZVAL(id) Z_PARAM_ZVAL(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); - zephir_fetch_params(1, 2, 0, &sessionId, &data); - - + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); + zephir_fetch_params(1, 2, 0, &id, &data); zephir_read_property(&_0, this_ptr, ZEND_STRL("path"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_METHOD(&_1, this_ptr, "getprefixedname", NULL, 0, sessionId); + ZEPHIR_CALL_METHOD(&_1, this_ptr, "getprefixedname", NULL, 0, id); zephir_check_call_status(); ZEPHIR_INIT_VAR(&name); ZEPHIR_CONCAT_VV(&name, &_0, &_1); @@ -432,7 +392,6 @@ PHP_METHOD(Phalcon_Session_Adapter_Stream, getArrVal) zval cast; zval *collection_param = NULL, *index, index_sub, *defaultValue = NULL, defaultValue_sub, *cast_param = NULL, __$null, value; zval collection; - zval *this_ptr = getThis(); ZVAL_UNDEF(&collection); ZVAL_UNDEF(&index_sub); @@ -440,7 +399,6 @@ PHP_METHOD(Phalcon_Session_Adapter_Stream, getArrVal) ZVAL_NULL(&__$null); ZVAL_UNDEF(&value); ZVAL_UNDEF(&cast); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 4) Z_PARAM_ARRAY(collection) @@ -449,10 +407,8 @@ PHP_METHOD(Phalcon_Session_Adapter_Stream, getArrVal) Z_PARAM_ZVAL_OR_NULL(defaultValue) Z_PARAM_STR_OR_NULL(cast) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 2, &collection_param, &index, &defaultValue, &cast_param); ZEPHIR_OBS_COPY_OR_DUP(&collection, collection_param); if (!defaultValue) { @@ -472,9 +428,7 @@ PHP_METHOD(Phalcon_Session_Adapter_Stream, getArrVal) ZEPHIR_INIT_VAR(&cast); } } - - - ZEPHIR_OBS_VAR(&value); + zephir_memory_observe(&value); if (UNEXPECTED(!(zephir_array_isset_fetch(&value, &collection, index, 0)))) { RETVAL_ZVAL(defaultValue, 1, 0); RETURN_MM(); @@ -493,20 +447,15 @@ PHP_METHOD(Phalcon_Session_Adapter_Stream, getDirSeparator) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *directory_param = NULL, _0, _1; zval directory; - zval *this_ptr = getThis(); ZVAL_UNDEF(&directory); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(directory) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &directory_param); if (UNEXPECTED(Z_TYPE_P(directory_param) != IS_STRING && Z_TYPE_P(directory_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'directory' must be of the type string")); @@ -517,8 +466,6 @@ PHP_METHOD(Phalcon_Session_Adapter_Stream, getDirSeparator) } else { ZEPHIR_INIT_VAR(&directory); } - - ZEPHIR_INIT_VAR(&_0); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "/"); @@ -539,22 +486,15 @@ PHP_METHOD(Phalcon_Session_Adapter_Stream, phpFileExists) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *filename_param = NULL; zval filename; - zval *this_ptr = getThis(); ZVAL_UNDEF(&filename); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(filename) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &filename_param); zephir_get_strval(&filename, filename_param); - - RETURN_MM_BOOL((zephir_file_exists(&filename) == SUCCESS)); } @@ -570,22 +510,15 @@ PHP_METHOD(Phalcon_Session_Adapter_Stream, phpFileGetContents) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *filename_param = NULL; zval filename; - zval *this_ptr = getThis(); ZVAL_UNDEF(&filename); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(filename) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &filename_param); zephir_get_strval(&filename, filename_param); - - zephir_file_get_contents(return_value, &filename); RETURN_MM(); } @@ -606,14 +539,12 @@ PHP_METHOD(Phalcon_Session_Adapter_Stream, phpFilePutContents) zend_long flags, ZEPHIR_LAST_CALL_STATUS; zval *filename_param = NULL, *data, data_sub, *flags_param = NULL, *context = NULL, context_sub, __$null, _0; zval filename; - zval *this_ptr = getThis(); ZVAL_UNDEF(&filename); ZVAL_UNDEF(&data_sub); ZVAL_UNDEF(&context_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 4) Z_PARAM_STR(filename) @@ -622,25 +553,20 @@ PHP_METHOD(Phalcon_Session_Adapter_Stream, phpFilePutContents) Z_PARAM_LONG(flags) Z_PARAM_ZVAL_OR_NULL(context) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 2, &filename_param, &data, &flags_param, &context); zephir_get_strval(&filename, filename_param); if (!flags_param) { flags = 0; } else { - flags = zephir_get_intval(flags_param); - } + } if (!context) { context = &context_sub; context = &__$null; } - - ZVAL_LONG(&_0, flags); - ZEPHIR_RETURN_CALL_FUNCTION("file_put_contents", NULL, 138, &filename, data, &_0, context); + ZEPHIR_RETURN_CALL_FUNCTION("file_put_contents", NULL, 139, &filename, data, &_0, context); zephir_check_call_status(); RETURN_MM(); } @@ -659,26 +585,19 @@ PHP_METHOD(Phalcon_Session_Adapter_Stream, phpFopen) zend_long ZEPHIR_LAST_CALL_STATUS; zval *filename_param = NULL, *mode_param = NULL; zval filename, mode; - zval *this_ptr = getThis(); ZVAL_UNDEF(&filename); ZVAL_UNDEF(&mode); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(filename) Z_PARAM_STR(mode) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &filename_param, &mode_param); zephir_get_strval(&filename, filename_param); zephir_get_strval(&mode, mode_param); - - - ZEPHIR_RETURN_CALL_FUNCTION("fopen", NULL, 139, &filename, &mode); + ZEPHIR_RETURN_CALL_FUNCTION("fopen", NULL, 140, &filename, &mode); zephir_check_call_status(); RETURN_MM(); } @@ -699,22 +618,15 @@ PHP_METHOD(Phalcon_Session_Adapter_Stream, phpIniGet) zend_long ZEPHIR_LAST_CALL_STATUS; zval *varname_param = NULL; zval varname; - zval *this_ptr = getThis(); ZVAL_UNDEF(&varname); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(varname) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &varname_param); zephir_get_strval(&varname, varname_param); - - ZEPHIR_RETURN_CALL_FUNCTION("ini_get", NULL, 0, &varname); zephir_check_call_status(); RETURN_MM(); @@ -735,22 +647,15 @@ PHP_METHOD(Phalcon_Session_Adapter_Stream, phpIsWritable) zend_long ZEPHIR_LAST_CALL_STATUS; zval *filename_param = NULL; zval filename; - zval *this_ptr = getThis(); ZVAL_UNDEF(&filename); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(filename) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &filename_param); zephir_get_strval(&filename, filename_param); - - ZEPHIR_RETURN_CALL_FUNCTION("is_writable", NULL, 0, &filename); zephir_check_call_status(); RETURN_MM(); diff --git a/ext/phalcon/session/adapter/stream.zep.h b/ext/phalcon/session/adapter/stream.zep.h index 134fca2c9b0..e1b71238c6c 100644 --- a/ext/phalcon/session/adapter/stream.zep.h +++ b/ext/phalcon/session/adapter/stream.zep.h @@ -19,34 +19,20 @@ PHP_METHOD(Phalcon_Session_Adapter_Stream, phpIniGet); PHP_METHOD(Phalcon_Session_Adapter_Stream, phpIsWritable); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_session_adapter_stream___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_session_adapter_stream_destroy, 0, 1, _IS_BOOL, 0) ZEND_ARG_INFO(0, sessionId) ZEND_END_ARG_INFO() -#if PHP_VERSION_ID >= 80100 -ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_phalcon_session_adapter_stream_gc, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, maxlifetime, IS_LONG, 0) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_phalcon_session_adapter_stream_gc, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) + ZEND_ARG_TYPE_INFO(0, maxlifetime, IS_LONG, 0) ZEND_END_ARG_INFO() -#elif PHP_VERSION_ID >= 80000 -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_session_adapter_stream_gc, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, maxlifetime, IS_LONG, 0) -ZEND_END_ARG_INFO() -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_session_adapter_stream_gc, 0, 0, 1) - ZEND_ARG_INFO(0, maxlifetime) -ZEND_END_ARG_INFO() -#endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_session_adapter_stream_open, 0, 2, _IS_BOOL, 0) - ZEND_ARG_INFO(0, savePath) - ZEND_ARG_INFO(0, sessionName) + ZEND_ARG_INFO(0, path) + ZEND_ARG_INFO(0, name) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_session_adapter_stream_read, 0, 1, IS_STRING, 0) @@ -54,7 +40,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_session_adapter_stream_r ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_session_adapter_stream_write, 0, 2, _IS_BOOL, 0) - ZEND_ARG_INFO(0, sessionId) + ZEND_ARG_INFO(0, id) ZEND_ARG_INFO(0, data) ZEND_END_ARG_INFO() diff --git a/ext/phalcon/session/bag.zep.c b/ext/phalcon/session/bag.zep.c index d9a672759f7..213583e923f 100644 --- a/ext/phalcon/session/bag.zep.c +++ b/ext/phalcon/session/bag.zep.c @@ -86,20 +86,14 @@ PHP_METHOD(Phalcon_Session_Bag, __construct) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&name); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(session, phalcon_session_managerinterface_ce) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &session, &name_param); zephir_get_strval(&name, name_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("session"), session); zephir_update_property_zval(this_ptr, ZEND_STRL("name"), &name); ZEPHIR_CALL_METHOD(&_0, session, "getdi", NULL, 0); @@ -122,23 +116,21 @@ PHP_METHOD(Phalcon_Session_Bag, __construct) */ PHP_METHOD(Phalcon_Session_Bag, clear) { - zval _1, _2; + zval _0, _1; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *this_ptr = getThis(); + ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - ZVAL_UNDEF(&_2); - + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - ZEPHIR_MM_GROW(); - - ZEPHIR_CALL_PARENT(NULL, phalcon_session_bag_ce, getThis(), "clear", &_0, 0); + ZEPHIR_CALL_PARENT(NULL, phalcon_session_bag_ce, getThis(), "clear", NULL, 0); zephir_check_call_status(); - zephir_read_property(&_1, this_ptr, ZEND_STRL("session"), PH_NOISY_CC | PH_READONLY); - zephir_read_property(&_2, this_ptr, ZEND_STRL("name"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_METHOD(NULL, &_1, "remove", NULL, 0, &_2); + zephir_read_property(&_0, this_ptr, ZEND_STRL("session"), PH_NOISY_CC | PH_READONLY); + zephir_read_property(&_1, this_ptr, ZEND_STRL("name"), PH_NOISY_CC | PH_READONLY); + ZEPHIR_CALL_METHOD(NULL, &_0, "remove", NULL, 0, &_1); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -148,9 +140,6 @@ PHP_METHOD(Phalcon_Session_Bag, clear) */ PHP_METHOD(Phalcon_Session_Bag, getDI) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "container"); } @@ -162,24 +151,19 @@ PHP_METHOD(Phalcon_Session_Bag, init) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; - zval *data_param = NULL, _1, _2; + zval *data_param = NULL, _0, _1; zval data; zval *this_ptr = getThis(); ZVAL_UNDEF(&data); + ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &data_param); if (!data_param) { ZEPHIR_INIT_VAR(&data); @@ -187,13 +171,11 @@ PHP_METHOD(Phalcon_Session_Bag, init) } else { ZEPHIR_OBS_COPY_OR_DUP(&data, data_param); } - - - ZEPHIR_CALL_PARENT(NULL, phalcon_session_bag_ce, getThis(), "init", &_0, 0, &data); + ZEPHIR_CALL_PARENT(NULL, phalcon_session_bag_ce, getThis(), "init", NULL, 0, &data); zephir_check_call_status(); - zephir_read_property(&_1, this_ptr, ZEND_STRL("session"), PH_NOISY_CC | PH_READONLY); - zephir_read_property(&_2, this_ptr, ZEND_STRL("name"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_METHOD(NULL, &_1, "set", NULL, 0, &_2, &data); + zephir_read_property(&_0, this_ptr, ZEND_STRL("session"), PH_NOISY_CC | PH_READONLY); + zephir_read_property(&_1, this_ptr, ZEND_STRL("name"), PH_NOISY_CC | PH_READONLY); + ZEPHIR_CALL_METHOD(NULL, &_0, "set", NULL, 0, &_1, &data); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -205,24 +187,19 @@ PHP_METHOD(Phalcon_Session_Bag, remove) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; - zval *element_param = NULL, _1, _2, _3; + zval *element_param = NULL, _0, _1, _2; zval element; zval *this_ptr = getThis(); ZVAL_UNDEF(&element); + ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); - ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(element) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &element_param); if (UNEXPECTED(Z_TYPE_P(element_param) != IS_STRING && Z_TYPE_P(element_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'element' must be of the type string")); @@ -233,14 +210,12 @@ PHP_METHOD(Phalcon_Session_Bag, remove) } else { ZEPHIR_INIT_VAR(&element); } - - - ZEPHIR_CALL_PARENT(NULL, phalcon_session_bag_ce, getThis(), "remove", &_0, 0, &element); + ZEPHIR_CALL_PARENT(NULL, phalcon_session_bag_ce, getThis(), "remove", NULL, 0, &element); zephir_check_call_status(); - zephir_read_property(&_1, this_ptr, ZEND_STRL("session"), PH_NOISY_CC | PH_READONLY); - zephir_read_property(&_2, this_ptr, ZEND_STRL("name"), PH_NOISY_CC | PH_READONLY); - zephir_read_property(&_3, this_ptr, ZEND_STRL("data"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_METHOD(NULL, &_1, "set", NULL, 0, &_2, &_3); + zephir_read_property(&_0, this_ptr, ZEND_STRL("session"), PH_NOISY_CC | PH_READONLY); + zephir_read_property(&_1, this_ptr, ZEND_STRL("name"), PH_NOISY_CC | PH_READONLY); + zephir_read_property(&_2, this_ptr, ZEND_STRL("data"), PH_NOISY_CC | PH_READONLY); + ZEPHIR_CALL_METHOD(NULL, &_0, "set", NULL, 0, &_1, &_2); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -252,26 +227,21 @@ PHP_METHOD(Phalcon_Session_Bag, set) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; - zval *element_param = NULL, *value, value_sub, _1, _2, _3; + zval *element_param = NULL, *value, value_sub, _0, _1, _2; zval element; zval *this_ptr = getThis(); ZVAL_UNDEF(&element); ZVAL_UNDEF(&value_sub); + ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); - ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(element) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &element_param, &value); if (UNEXPECTED(Z_TYPE_P(element_param) != IS_STRING && Z_TYPE_P(element_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'element' must be of the type string")); @@ -282,14 +252,12 @@ PHP_METHOD(Phalcon_Session_Bag, set) } else { ZEPHIR_INIT_VAR(&element); } - - - ZEPHIR_CALL_PARENT(NULL, phalcon_session_bag_ce, getThis(), "set", &_0, 0, &element, value); + ZEPHIR_CALL_PARENT(NULL, phalcon_session_bag_ce, getThis(), "set", NULL, 0, &element, value); zephir_check_call_status(); - zephir_read_property(&_1, this_ptr, ZEND_STRL("session"), PH_NOISY_CC | PH_READONLY); - zephir_read_property(&_2, this_ptr, ZEND_STRL("name"), PH_NOISY_CC | PH_READONLY); - zephir_read_property(&_3, this_ptr, ZEND_STRL("data"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_METHOD(NULL, &_1, "set", NULL, 0, &_2, &_3); + zephir_read_property(&_0, this_ptr, ZEND_STRL("session"), PH_NOISY_CC | PH_READONLY); + zephir_read_property(&_1, this_ptr, ZEND_STRL("name"), PH_NOISY_CC | PH_READONLY); + zephir_read_property(&_2, this_ptr, ZEND_STRL("data"), PH_NOISY_CC | PH_READONLY); + ZEPHIR_CALL_METHOD(NULL, &_0, "set", NULL, 0, &_1, &_2); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -303,17 +271,10 @@ PHP_METHOD(Phalcon_Session_Bag, setDI) zval *this_ptr = getThis(); ZVAL_UNDEF(&container_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(container, phalcon_di_diinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &container); - - zephir_update_property_zval(this_ptr, ZEND_STRL("container"), container); } diff --git a/ext/phalcon/session/bag.zep.h b/ext/phalcon/session/bag.zep.h index f00d7202b18..49cf715bf28 100644 --- a/ext/phalcon/session/bag.zep.h +++ b/ext/phalcon/session/bag.zep.h @@ -24,11 +24,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_session_bag_init, 0, 0, IS_VOID, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, data, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, data, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, data, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_session_bag_remove, 0, 1, IS_VOID, 0) diff --git a/ext/phalcon/session/baginterface.zep.h b/ext/phalcon/session/baginterface.zep.h index 89229dd5fba..a6db92cb134 100644 --- a/ext/phalcon/session/baginterface.zep.h +++ b/ext/phalcon/session/baginterface.zep.h @@ -24,11 +24,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_session_baginterface_init, 0, 0, IS_VOID, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, data, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, data, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, data, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_session_baginterface_get, 0, 0, 1) diff --git a/ext/phalcon/session/manager.zep.c b/ext/phalcon/session/manager.zep.c index 6a29970330f..268d119c8dc 100644 --- a/ext/phalcon/session/manager.zep.c +++ b/ext/phalcon/session/manager.zep.c @@ -80,16 +80,12 @@ PHP_METHOD(Phalcon_Session_Manager, __construct) zval *this_ptr = getThis(); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -97,8 +93,6 @@ PHP_METHOD(Phalcon_Session_Manager, __construct) } else { zephir_get_arrval(&options, options_param); } - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "setoptions", NULL, 0, &options); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); @@ -120,19 +114,13 @@ PHP_METHOD(Phalcon_Session_Manager, __get) zval *this_ptr = getThis(); ZVAL_UNDEF(&key); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); zephir_get_strval(&key, key_param); - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "get", NULL, 0, &key); zephir_check_call_status(); RETURN_MM(); @@ -154,19 +142,13 @@ PHP_METHOD(Phalcon_Session_Manager, __isset) zval *this_ptr = getThis(); ZVAL_UNDEF(&key); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); zephir_get_strval(&key, key_param); - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "has", NULL, 0, &key); zephir_check_call_status(); RETURN_MM(); @@ -188,20 +170,14 @@ PHP_METHOD(Phalcon_Session_Manager, __set) ZVAL_UNDEF(&key); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(key) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &key_param, &value); zephir_get_strval(&key, key_param); - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "set", NULL, 0, &key, value); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); @@ -221,19 +197,13 @@ PHP_METHOD(Phalcon_Session_Manager, __unset) zval *this_ptr = getThis(); ZVAL_UNDEF(&key); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); zephir_get_strval(&key, key_param); - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "remove", NULL, 0, &key); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); @@ -251,9 +221,8 @@ PHP_METHOD(Phalcon_Session_Manager, destroy) ZVAL_UNDEF(&_SESSION); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_get_global(&_SESSION, SL("_SESSION")); ZEPHIR_CALL_METHOD(&_0, this_ptr, "exists", NULL, 0); @@ -277,12 +246,10 @@ PHP_METHOD(Phalcon_Session_Manager, exists) zval _0; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_FUNCTION(&_0, "session_status", NULL, 0); zephir_check_call_status(); @@ -314,7 +281,6 @@ PHP_METHOD(Phalcon_Session_Manager, get) ZVAL_UNDEF(&value); ZVAL_UNDEF(&uniqueKey); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(key) @@ -322,10 +288,8 @@ PHP_METHOD(Phalcon_Session_Manager, get) Z_PARAM_ZVAL_OR_NULL(defaultValue) Z_PARAM_BOOL(remove) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_get_global(&_SESSION, SL("_SESSION")); zephir_fetch_params(1, 1, 2, &key_param, &defaultValue, &remove_param); zephir_get_strval(&key, key_param); @@ -336,10 +300,7 @@ PHP_METHOD(Phalcon_Session_Manager, get) if (!remove_param) { remove = 0; } else { - remove = zephir_get_boolval(remove_param); - } - - + } ZEPHIR_INIT_VAR(&value); ZVAL_NULL(&value); ZEPHIR_CALL_METHOD(&_0, this_ptr, "exists", NULL, 0); @@ -362,9 +323,6 @@ PHP_METHOD(Phalcon_Session_Manager, get) */ PHP_METHOD(Phalcon_Session_Manager, getAdapter) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "adapter"); } @@ -376,11 +334,8 @@ PHP_METHOD(Phalcon_Session_Manager, getId) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *this_ptr = getThis(); - - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_RETURN_CALL_FUNCTION("session_id", NULL, 0); zephir_check_call_status(); @@ -400,9 +355,8 @@ PHP_METHOD(Phalcon_Session_Manager, getName) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2$$3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("name"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_1); @@ -430,20 +384,14 @@ PHP_METHOD(Phalcon_Session_Manager, has) ZVAL_UNDEF(&_SESSION); ZVAL_UNDEF(&uniqueKey); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_get_global(&_SESSION, SL("_SESSION")); zephir_fetch_params(1, 1, 0, &key_param); zephir_get_strval(&key, key_param); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "exists", NULL, 0); zephir_check_call_status(); if (ZEPHIR_IS_FALSE_IDENTICAL(&_0)) { @@ -459,9 +407,6 @@ PHP_METHOD(Phalcon_Session_Manager, has) */ PHP_METHOD(Phalcon_Session_Manager, getOptions) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "options"); } @@ -479,24 +424,17 @@ PHP_METHOD(Phalcon_Session_Manager, regenerateId) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_BOOL(deleteOldSession) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &deleteOldSession_param); if (!deleteOldSession_param) { deleteOldSession = 1; } else { - deleteOldSession = zephir_get_boolval(deleteOldSession_param); - } - - + } ZEPHIR_CALL_METHOD(&_0, this_ptr, "exists", NULL, 0); zephir_check_call_status(); if (ZEPHIR_IS_TRUE_IDENTICAL(&_0)) { @@ -522,20 +460,14 @@ PHP_METHOD(Phalcon_Session_Manager, remove) ZVAL_UNDEF(&_SESSION); ZVAL_UNDEF(&uniqueKey); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_get_global(&_SESSION, SL("_SESSION")); zephir_fetch_params(1, 1, 0, &key_param); zephir_get_strval(&key, key_param); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "exists", NULL, 0); zephir_check_call_status(); if (ZEPHIR_IS_TRUE_IDENTICAL(&_0)) { @@ -562,21 +494,15 @@ PHP_METHOD(Phalcon_Session_Manager, set) ZVAL_UNDEF(&_SESSION); ZVAL_UNDEF(&uniqueKey); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(key) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_get_global(&_SESSION, SL("_SESSION")); zephir_fetch_params(1, 2, 0, &key_param, &value); zephir_get_strval(&key, key_param); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "exists", NULL, 0); zephir_check_call_status(); if (ZEPHIR_IS_TRUE_IDENTICAL(&_0)) { @@ -596,17 +522,10 @@ PHP_METHOD(Phalcon_Session_Manager, setAdapter) zval *this_ptr = getThis(); ZVAL_UNDEF(&adapter_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(adapter, php_session_iface_entry) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &adapter); - - zephir_update_property_zval(this_ptr, ZEND_STRL("adapter"), adapter); RETURN_THISW(); } @@ -626,19 +545,13 @@ PHP_METHOD(Phalcon_Session_Manager, setId) ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(sessionId) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &sessionId_param); zephir_get_strval(&sessionId, sessionId_param); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "exists", NULL, 0); zephir_check_call_status(); if (UNEXPECTED(ZEPHIR_IS_TRUE_IDENTICAL(&_0))) { @@ -646,7 +559,7 @@ PHP_METHOD(Phalcon_Session_Manager, setId) object_init_ex(&_1$$3, phalcon_session_exception_ce); ZEPHIR_INIT_VAR(&_2$$3); ZEPHIR_CONCAT_SS(&_2$$3, "The session has already been started. ", "To change the id, use regenerateId()"); - ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 32, &_2$$3); + ZEPHIR_CALL_METHOD(NULL, &_1$$3, "__construct", NULL, 33, &_2$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_1$$3, "phalcon/Session/Manager.zep", 271); ZEPHIR_MM_RESTORE(); @@ -677,19 +590,13 @@ PHP_METHOD(Phalcon_Session_Manager, setName) ZVAL_UNDEF(&name); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &name_param); zephir_get_strval(&name, name_param); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "exists", NULL, 0); zephir_check_call_status(); if (UNEXPECTED(ZEPHIR_IS_TRUE_IDENTICAL(&_0))) { @@ -717,19 +624,13 @@ PHP_METHOD(Phalcon_Session_Manager, setOptions) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &options_param); zephir_get_arrval(&options, options_param); - - ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "uniqueId"); ZEPHIR_INIT_VAR(&_2); @@ -763,9 +664,8 @@ PHP_METHOD(Phalcon_Session_Manager, start) ZVAL_UNDEF(&_4$$6); ZVAL_UNDEF(&_5$$6); ZVAL_UNDEF(&_6$$6); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_get_global(&_COOKIE, SL("_COOKIE")); ZEPHIR_CALL_METHOD(&name, this_ptr, "getname", NULL, 0); @@ -780,13 +680,13 @@ PHP_METHOD(Phalcon_Session_Manager, start) if (ZEPHIR_IS_TRUE_IDENTICAL(&_1)) { RETURN_MM_BOOL(0); } - ZEPHIR_OBS_VAR(&_2); + zephir_memory_observe(&_2); zephir_read_property(&_2, this_ptr, ZEND_STRL("adapter"), PH_NOISY_CC); if (UNEXPECTED(!(zephir_is_instance_of(&_2, SL("SessionHandlerInterface"))))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_session_exception_ce, "The session adapter is not valid", "phalcon/Session/Manager.zep", 338); return; } - ZEPHIR_OBS_VAR(&value); + zephir_memory_observe(&value); if (zephir_array_isset_fetch(&value, &_COOKIE, &name, 0)) { ZEPHIR_INIT_VAR(&_3$$6); ZEPHIR_INIT_VAR(&_4$$6); @@ -815,12 +715,10 @@ PHP_METHOD(Phalcon_Session_Manager, status) zval status; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *this_ptr = getThis(); ZVAL_UNDEF(&status); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_FUNCTION(&status, "session_status", NULL, 0); zephir_check_call_status(); @@ -847,13 +745,10 @@ PHP_METHOD(Phalcon_Session_Manager, phpHeadersSent) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *this_ptr = getThis(); - + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_RETURN_CALL_FUNCTION("headers_sent", NULL, 358); + ZEPHIR_RETURN_CALL_FUNCTION("headers_sent", NULL, 359); zephir_check_call_status(); RETURN_MM(); } @@ -876,20 +771,14 @@ PHP_METHOD(Phalcon_Session_Manager, getUniqueKey) ZVAL_UNDEF(&prefix); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); zephir_get_strval(&key, key_param); - - - ZEPHIR_OBS_VAR(&_0); + zephir_memory_observe(&_0); zephir_read_property(&_0, this_ptr, ZEND_STRL("uniqueId"), PH_NOISY_CC); if (1 != ZEPHIR_IS_EMPTY(&_0)) { zephir_read_property(&_1, this_ptr, ZEND_STRL("uniqueId"), PH_NOISY_CC | PH_READONLY); @@ -911,14 +800,12 @@ PHP_METHOD(Phalcon_Session_Manager, getArrVal) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *collection_param = NULL, *index, index_sub, *defaultValue = NULL, defaultValue_sub, __$null, value; zval collection; - zval *this_ptr = getThis(); ZVAL_UNDEF(&collection); ZVAL_UNDEF(&index_sub); ZVAL_UNDEF(&defaultValue_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&value); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_ARRAY(collection) @@ -926,23 +813,20 @@ PHP_METHOD(Phalcon_Session_Manager, getArrVal) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(defaultValue) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &collection_param, &index, &defaultValue); ZEPHIR_OBS_COPY_OR_DUP(&collection, collection_param); if (!defaultValue) { defaultValue = &defaultValue_sub; defaultValue = &__$null; } - - - if (UNEXPECTED(!(zephir_array_isset_fetch(&value, &collection, index, 1)))) { + zephir_memory_observe(&value); + if (UNEXPECTED(!(zephir_array_isset_fetch(&value, &collection, index, 0)))) { RETVAL_ZVAL(defaultValue, 1, 0); RETURN_MM(); } - RETURN_CTOR(&value); + RETURN_CCTOR(&value); } zend_object *zephir_init_properties_Phalcon_Session_Manager(zend_class_entry *class_type) @@ -953,7 +837,8 @@ zend_object *zephir_init_properties_Phalcon_Session_Manager(zend_class_entry *cl ZVAL_UNDEF(&_1$$3); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/session/manager.zep.h b/ext/phalcon/session/manager.zep.h index d783be67fd0..6d58583a962 100644 --- a/ext/phalcon/session/manager.zep.h +++ b/ext/phalcon/session/manager.zep.h @@ -31,11 +31,7 @@ PHP_METHOD(Phalcon_Session_Manager, getArrVal); zend_object *zephir_init_properties_Phalcon_Session_Manager(zend_class_entry *class_type); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_session_manager___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_session_manager___get, 0, 0, 1) diff --git a/ext/phalcon/storage/adapter/abstractadapter.zep.c b/ext/phalcon/storage/adapter/abstractadapter.zep.c index e5adecc0fc1..ffaca53a5ae 100644 --- a/ext/phalcon/storage/adapter/abstractadapter.zep.c +++ b/ext/phalcon/storage/adapter/abstractadapter.zep.c @@ -115,17 +115,13 @@ PHP_METHOD(Phalcon_Storage_Adapter_AbstractAdapter, __construct) ZVAL_UNDEF(&_6); ZVAL_UNDEF(&_7$$3); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_OBJECT_OF_CLASS(factory, phalcon_storage_serializerfactory_ce) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &factory, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -133,8 +129,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_AbstractAdapter, __construct) } else { zephir_get_arrval(&options, options_param); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("serializerFactory"), factory); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "defaultSerializer"); @@ -222,25 +216,20 @@ PHP_METHOD(Phalcon_Storage_Adapter_AbstractAdapter, get) ZVAL_NULL(&__$null); ZVAL_UNDEF(&content); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(key) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(defaultValue) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &key_param, &defaultValue); zephir_get_strval(&key, key_param); if (!defaultValue) { defaultValue = &defaultValue_sub; defaultValue = &__$null; } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "has", NULL, 0, &key); zephir_check_call_status(); if (!ZEPHIR_IS_TRUE_IDENTICAL(&_0)) { @@ -261,9 +250,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_AbstractAdapter, get) */ PHP_METHOD(Phalcon_Storage_Adapter_AbstractAdapter, getAdapter) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "adapter"); } @@ -275,9 +261,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_AbstractAdapter, getAdapter) */ PHP_METHOD(Phalcon_Storage_Adapter_AbstractAdapter, getDefaultSerializer) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "defaultSerializer"); } @@ -300,9 +283,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_AbstractAdapter, getKeys) */ PHP_METHOD(Phalcon_Storage_Adapter_AbstractAdapter, getPrefix) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "prefix"); } @@ -356,19 +336,13 @@ PHP_METHOD(Phalcon_Storage_Adapter_AbstractAdapter, setDefaultSerializer) ZVAL_UNDEF(&serializer); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(serializer) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &serializer_param); zephir_get_strval(&serializer, serializer_param); - - ZEPHIR_CALL_FUNCTION(&_0, "mb_strtolower", NULL, 10, &serializer); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("defaultSerializer"), &_0); @@ -390,19 +364,13 @@ PHP_METHOD(Phalcon_Storage_Adapter_AbstractAdapter, doGet) ZVAL_UNDEF(&key); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); zephir_get_strval(&key, key_param); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "getadapter", NULL, 0); zephir_check_call_status(); ZEPHIR_RETURN_CALL_METHOD(&_0, "get", NULL, 0, &key); @@ -435,16 +403,12 @@ PHP_METHOD(Phalcon_Storage_Adapter_AbstractAdapter, getFilteredKeys) ZVAL_UNDEF(&_3); ZVAL_UNDEF(&prefix); ZVAL_UNDEF(&results); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ZVAL(keys) Z_PARAM_STR(prefix) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &keys, &prefix_param); ZEPHIR_SEPARATE_PARAM(keys); if (UNEXPECTED(Z_TYPE_P(prefix_param) != IS_STRING && Z_TYPE_P(prefix_param) != IS_NULL)) { @@ -456,8 +420,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_AbstractAdapter, getFilteredKeys) } else { ZEPHIR_INIT_VAR(&prefix); } - - ZEPHIR_INIT_VAR(&results); array_init(&results); zephir_read_property(&_0, this_ptr, ZEND_STRL("prefix"), PH_NOISY_CC | PH_READONLY); @@ -520,19 +482,13 @@ PHP_METHOD(Phalcon_Storage_Adapter_AbstractAdapter, getPrefixedKey) ZVAL_UNDEF(&key_sub); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key); ZEPHIR_SEPARATE_PARAM(key); - - zephir_cast_to_string(&_0, key); ZEPHIR_CPY_WRT(key, &_0); zephir_read_property(&_1, this_ptr, ZEND_STRL("prefix"), PH_NOISY_CC | PH_READONLY); @@ -558,19 +514,13 @@ PHP_METHOD(Phalcon_Storage_Adapter_AbstractAdapter, getSerializedData) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(content) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &content); ZEPHIR_SEPARATE_PARAM(content); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("serializer"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_0) != IS_NULL) { zephir_read_property(&_1$$3, this_ptr, ZEND_STRL("serializer"), PH_NOISY_CC | PH_READONLY); @@ -598,24 +548,17 @@ PHP_METHOD(Phalcon_Storage_Adapter_AbstractAdapter, getTtl) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *ttl, ttl_sub, dateTime, _1$$4, _2$$4; - zval *this_ptr = getThis(); ZVAL_UNDEF(&ttl_sub); ZVAL_UNDEF(&dateTime); ZVAL_UNDEF(&_1$$4); ZVAL_UNDEF(&_2$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(ttl) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &ttl); - - if (Z_TYPE_P(ttl) == IS_NULL) { RETURN_MM_MEMBER(getThis(), "lifetime"); } @@ -662,25 +605,20 @@ PHP_METHOD(Phalcon_Storage_Adapter_AbstractAdapter, getUnserializedData) ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ZVAL(content) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(defaultValue) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &content, &defaultValue); ZEPHIR_SEPARATE_PARAM(content); if (!defaultValue) { defaultValue = &defaultValue_sub; defaultValue = &__$null; } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("serializer"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_0) != IS_NULL) { zephir_read_property(&_1$$3, this_ptr, ZEND_STRL("serializer"), PH_NOISY_CC | PH_READONLY); @@ -719,20 +657,19 @@ PHP_METHOD(Phalcon_Storage_Adapter_AbstractAdapter, initSerializer) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$3); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_OBS_VAR(&_0); + zephir_memory_observe(&_0); zephir_read_property(&_0, this_ptr, ZEND_STRL("defaultSerializer"), PH_NOISY_CC); _1 = 1 != ZEPHIR_IS_EMPTY(&_0); if (_1) { - ZEPHIR_OBS_VAR(&_2); + zephir_memory_observe(&_2); zephir_read_property(&_2, this_ptr, ZEND_STRL("serializer"), PH_NOISY_CC); _1 = Z_TYPE_P(&_2) != IS_OBJECT; } if (_1) { - ZEPHIR_OBS_VAR(&className); + zephir_memory_observe(&className); zephir_read_property(&className, this_ptr, ZEND_STRL("defaultSerializer"), PH_NOISY_CC); zephir_read_property(&_3$$3, this_ptr, ZEND_STRL("serializerFactory"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&_4$$3, &_3$$3, "newinstance", NULL, 0, &className); @@ -752,7 +689,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_AbstractAdapter, getArrVal) zval cast; zval *collection_param = NULL, *index, index_sub, *defaultValue = NULL, defaultValue_sub, *cast_param = NULL, __$null, value; zval collection; - zval *this_ptr = getThis(); ZVAL_UNDEF(&collection); ZVAL_UNDEF(&index_sub); @@ -760,7 +696,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_AbstractAdapter, getArrVal) ZVAL_NULL(&__$null); ZVAL_UNDEF(&value); ZVAL_UNDEF(&cast); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 4) Z_PARAM_ARRAY(collection) @@ -769,10 +704,8 @@ PHP_METHOD(Phalcon_Storage_Adapter_AbstractAdapter, getArrVal) Z_PARAM_ZVAL_OR_NULL(defaultValue) Z_PARAM_STR_OR_NULL(cast) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 2, &collection_param, &index, &defaultValue, &cast_param); ZEPHIR_OBS_COPY_OR_DUP(&collection, collection_param); if (!defaultValue) { @@ -792,9 +725,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_AbstractAdapter, getArrVal) ZEPHIR_INIT_VAR(&cast); } } - - - ZEPHIR_OBS_VAR(&value); + zephir_memory_observe(&value); if (UNEXPECTED(!(zephir_array_isset_fetch(&value, &collection, index, 0)))) { RETVAL_ZVAL(defaultValue, 1, 0); RETURN_MM(); @@ -816,7 +747,8 @@ zend_object *zephir_init_properties_Phalcon_Storage_Adapter_AbstractAdapter(zend ZVAL_UNDEF(&_1$$3); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/storage/adapter/abstractadapter.zep.h b/ext/phalcon/storage/adapter/abstractadapter.zep.h index 201a1d67df9..4b185354634 100644 --- a/ext/phalcon/storage/adapter/abstractadapter.zep.h +++ b/ext/phalcon/storage/adapter/abstractadapter.zep.h @@ -28,11 +28,7 @@ zend_object *zephir_init_properties_Phalcon_Storage_Adapter_AbstractAdapter(zend ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_storage_adapter_abstractadapter___construct, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, factory, Phalcon\\Storage\\SerializerFactory, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_storage_adapter_abstractadapter_clear, 0, 0, _IS_BOOL, 0) @@ -130,11 +126,7 @@ ZEPHIR_INIT_FUNCS(phalcon_storage_adapter_abstractadapter_method_entry) { PHP_ME(Phalcon_Storage_Adapter_AbstractAdapter, decrement, arginfo_phalcon_storage_adapter_abstractadapter_decrement, ZEND_ACC_ABSTRACT|ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Storage_Adapter_AbstractAdapter, delete, arginfo_phalcon_storage_adapter_abstractadapter_delete, ZEND_ACC_ABSTRACT|ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Storage_Adapter_AbstractAdapter, get, arginfo_phalcon_storage_adapter_abstractadapter_get, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Storage_Adapter_AbstractAdapter, getAdapter, arginfo_phalcon_storage_adapter_abstractadapter_getadapter, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Storage_Adapter_AbstractAdapter, getAdapter, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Storage_Adapter_AbstractAdapter, getAdapter, arginfo_phalcon_storage_adapter_abstractadapter_getadapter, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Storage_Adapter_AbstractAdapter, getDefaultSerializer, arginfo_phalcon_storage_adapter_abstractadapter_getdefaultserializer, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Storage_Adapter_AbstractAdapter, getKeys, arginfo_phalcon_storage_adapter_abstractadapter_getkeys, ZEND_ACC_ABSTRACT|ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Storage_Adapter_AbstractAdapter, getPrefix, arginfo_phalcon_storage_adapter_abstractadapter_getprefix, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/storage/adapter/apcu.zep.c b/ext/phalcon/storage/adapter/apcu.zep.c index 9e52523808a..f4f383244e4 100644 --- a/ext/phalcon/storage/adapter/apcu.zep.c +++ b/ext/phalcon/storage/adapter/apcu.zep.c @@ -59,24 +59,19 @@ PHP_METHOD(Phalcon_Storage_Adapter_Apcu, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval options; zval *factory, factory_sub, *options_param = NULL; zval *this_ptr = getThis(); ZVAL_UNDEF(&factory_sub); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_OBJECT_OF_CLASS(factory, phalcon_storage_serializerfactory_ce) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &factory, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -84,9 +79,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_Apcu, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - - ZEPHIR_CALL_PARENT(NULL, phalcon_storage_adapter_apcu_ce, getThis(), "__construct", &_0, 0, factory, &options); + ZEPHIR_CALL_PARENT(NULL, phalcon_storage_adapter_apcu_ce, getThis(), "__construct", NULL, 0, factory, &options); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, this_ptr, "initserializer", NULL, 0); zephir_check_call_status(); @@ -112,9 +105,8 @@ PHP_METHOD(Phalcon_Storage_Adapter_Apcu, clear) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2$$4); ZVAL_UNDEF(&_3$$4); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&apc); ZVAL_NULL(&apc); @@ -163,17 +155,13 @@ PHP_METHOD(Phalcon_Storage_Adapter_Apcu, decrement) ZVAL_UNDEF(&key); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(key) Z_PARAM_OPTIONAL Z_PARAM_LONG(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &key_param, &value_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -187,10 +175,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_Apcu, decrement) if (!value_param) { value = 1; } else { - value = zephir_get_intval(value_param); - } - - + } ZEPHIR_CALL_METHOD(&_0, this_ptr, "getprefixedkey", NULL, 0, &key); zephir_check_call_status(); ZVAL_LONG(&_1, value); @@ -217,15 +202,11 @@ PHP_METHOD(Phalcon_Storage_Adapter_Apcu, delete) ZVAL_UNDEF(&key); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -236,8 +217,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Apcu, delete) } else { ZEPHIR_INIT_VAR(&key); } - - ZEPHIR_CALL_METHOD(&_1, this_ptr, "getprefixedkey", NULL, 0, &key); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_0, this_ptr, "phpapcudelete", NULL, 0, &_1); @@ -269,16 +248,12 @@ PHP_METHOD(Phalcon_Storage_Adapter_Apcu, getKeys) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2$$4); ZVAL_UNDEF(&results); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR(prefix) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &prefix_param); if (!prefix_param) { ZEPHIR_INIT_VAR(&prefix); @@ -294,8 +269,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Apcu, getKeys) ZEPHIR_INIT_VAR(&prefix); } } - - ZEPHIR_INIT_VAR(&apc); ZVAL_NULL(&apc); zephir_read_property(&_0, this_ptr, ZEND_STRL("prefix"), PH_NOISY_CC | PH_READONLY); @@ -340,15 +313,11 @@ PHP_METHOD(Phalcon_Storage_Adapter_Apcu, has) ZVAL_UNDEF(&result); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -359,8 +328,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Apcu, has) } else { ZEPHIR_INIT_VAR(&key); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "getprefixedkey", NULL, 0, &key); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&result, this_ptr, "phpapcuexists", NULL, 0, &_0); @@ -369,6 +336,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_Apcu, has) if (((Z_TYPE_P(&result) == IS_TRUE || Z_TYPE_P(&result) == IS_FALSE) == 1)) { ZEPHIR_CPY_WRT(&_1, &result); } else { + ZEPHIR_INIT_NVAR(&_1); ZVAL_BOOL(&_1, 0); } RETURN_CCTOR(&_1); @@ -393,17 +361,13 @@ PHP_METHOD(Phalcon_Storage_Adapter_Apcu, increment) ZVAL_UNDEF(&key); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(key) Z_PARAM_OPTIONAL Z_PARAM_LONG(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &key_param, &value_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -417,10 +381,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_Apcu, increment) if (!value_param) { value = 1; } else { - value = zephir_get_intval(value_param); - } - - + } ZEPHIR_CALL_METHOD(&_0, this_ptr, "getprefixedkey", NULL, 0, &key); zephir_check_call_status(); ZVAL_LONG(&_1, value); @@ -461,7 +422,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Apcu, set) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(key) @@ -469,10 +429,8 @@ PHP_METHOD(Phalcon_Storage_Adapter_Apcu, set) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(ttl) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &key_param, &value, &ttl); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -487,8 +445,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Apcu, set) ttl = &ttl_sub; ttl = &__$null; } - - _0 = Z_TYPE_P(ttl) == IS_LONG; if (_0) { _0 = ZEPHIR_LT_LONG(ttl, 1); @@ -510,6 +466,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_Apcu, set) if (((Z_TYPE_P(&result) == IS_TRUE || Z_TYPE_P(&result) == IS_FALSE) == 1)) { ZEPHIR_CPY_WRT(&_4, &result); } else { + ZEPHIR_INIT_NVAR(&_4); ZVAL_BOOL(&_4, 0); } RETURN_CCTOR(&_4); @@ -538,16 +495,12 @@ PHP_METHOD(Phalcon_Storage_Adapter_Apcu, setForever) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(key) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &key_param, &value); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -558,8 +511,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Apcu, setForever) } else { ZEPHIR_INIT_VAR(&key); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "getprefixedkey", NULL, 0, &key); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_1, this_ptr, "getserializeddata", NULL, 0, value); @@ -570,6 +521,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_Apcu, setForever) if ((Z_TYPE_P(&result) == IS_TRUE || Z_TYPE_P(&result) == IS_FALSE)) { ZEPHIR_CPY_WRT(&_2, &result); } else { + ZEPHIR_INIT_NVAR(&_2); ZVAL_BOOL(&_2, 0); } RETURN_CCTOR(&_2); @@ -590,19 +542,13 @@ PHP_METHOD(Phalcon_Storage_Adapter_Apcu, doGet) ZVAL_UNDEF(&key); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); zephir_get_strval(&key, key_param); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "getprefixedkey", NULL, 0, &key); zephir_check_call_status(); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "phpapcufetch", NULL, 0, &_0); @@ -618,14 +564,12 @@ PHP_METHOD(Phalcon_Storage_Adapter_Apcu, phpApcuDec) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long step, ttl, ZEPHIR_LAST_CALL_STATUS; zval *key, key_sub, *step_param = NULL, *success = NULL, success_sub, *ttl_param = NULL, __$null, _0, _1; - zval *this_ptr = getThis(); ZVAL_UNDEF(&key_sub); ZVAL_UNDEF(&success_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 4) Z_PARAM_ZVAL(key) @@ -634,16 +578,13 @@ PHP_METHOD(Phalcon_Storage_Adapter_Apcu, phpApcuDec) Z_PARAM_ZVAL_OR_NULL(success) Z_PARAM_LONG(ttl) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 3, &key, &step_param, &success, &ttl_param); if (!step_param) { step = 1; } else { - step = zephir_get_intval(step_param); - } + } if (!success) { success = &success_sub; success = &__$null; @@ -651,14 +592,11 @@ PHP_METHOD(Phalcon_Storage_Adapter_Apcu, phpApcuDec) if (!ttl_param) { ttl = 0; } else { - ttl = zephir_get_intval(ttl_param); - } - - + } ZVAL_LONG(&_0, step); ZVAL_LONG(&_1, ttl); ZEPHIR_MAKE_REF(success); - ZEPHIR_RETURN_CALL_FUNCTION("apcu_dec", NULL, 102, key, &_0, success, &_1); + ZEPHIR_RETURN_CALL_FUNCTION("apcu_dec", NULL, 103, key, &_0, success, &_1); ZEPHIR_UNREF(success); zephir_check_call_status(); RETURN_MM(); @@ -669,22 +607,15 @@ PHP_METHOD(Phalcon_Storage_Adapter_Apcu, phpApcuDelete) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *key, key_sub; - zval *this_ptr = getThis(); ZVAL_UNDEF(&key_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key); - - - ZEPHIR_RETURN_CALL_FUNCTION("apcu_delete", NULL, 103, key); + ZEPHIR_RETURN_CALL_FUNCTION("apcu_delete", NULL, 104, key); zephir_check_call_status(); RETURN_MM(); } @@ -694,22 +625,15 @@ PHP_METHOD(Phalcon_Storage_Adapter_Apcu, phpApcuExists) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *key, key_sub; - zval *this_ptr = getThis(); ZVAL_UNDEF(&key_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key); - - - ZEPHIR_RETURN_CALL_FUNCTION("apcu_exists", NULL, 104, key); + ZEPHIR_RETURN_CALL_FUNCTION("apcu_exists", NULL, 105, key); zephir_check_call_status(); RETURN_MM(); } @@ -719,14 +643,12 @@ PHP_METHOD(Phalcon_Storage_Adapter_Apcu, phpApcuInc) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long step, ttl, ZEPHIR_LAST_CALL_STATUS; zval *key, key_sub, *step_param = NULL, *success = NULL, success_sub, *ttl_param = NULL, __$null, _0, _1; - zval *this_ptr = getThis(); ZVAL_UNDEF(&key_sub); ZVAL_UNDEF(&success_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 4) Z_PARAM_ZVAL(key) @@ -735,16 +657,13 @@ PHP_METHOD(Phalcon_Storage_Adapter_Apcu, phpApcuInc) Z_PARAM_ZVAL_OR_NULL(success) Z_PARAM_LONG(ttl) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 3, &key, &step_param, &success, &ttl_param); if (!step_param) { step = 1; } else { - step = zephir_get_intval(step_param); - } + } if (!success) { success = &success_sub; success = &__$null; @@ -752,14 +671,11 @@ PHP_METHOD(Phalcon_Storage_Adapter_Apcu, phpApcuInc) if (!ttl_param) { ttl = 0; } else { - ttl = zephir_get_intval(ttl_param); - } - - + } ZVAL_LONG(&_0, step); ZVAL_LONG(&_1, ttl); ZEPHIR_MAKE_REF(success); - ZEPHIR_RETURN_CALL_FUNCTION("apcu_inc", NULL, 105, key, &_0, success, &_1); + ZEPHIR_RETURN_CALL_FUNCTION("apcu_inc", NULL, 106, key, &_0, success, &_1); ZEPHIR_UNREF(success); zephir_check_call_status(); RETURN_MM(); @@ -770,31 +686,25 @@ PHP_METHOD(Phalcon_Storage_Adapter_Apcu, phpApcuFetch) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *key, key_sub, *success = NULL, success_sub, __$null; - zval *this_ptr = getThis(); ZVAL_UNDEF(&key_sub); ZVAL_UNDEF(&success_sub); ZVAL_NULL(&__$null); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ZVAL(key) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(success) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &key, &success); if (!success) { success = &success_sub; success = &__$null; } - - ZEPHIR_MAKE_REF(success); - ZEPHIR_RETURN_CALL_FUNCTION("apcu_fetch", NULL, 106, key, success); + ZEPHIR_RETURN_CALL_FUNCTION("apcu_fetch", NULL, 107, key, success); ZEPHIR_UNREF(success); zephir_check_call_status(); RETURN_MM(); @@ -806,22 +716,15 @@ PHP_METHOD(Phalcon_Storage_Adapter_Apcu, phpApcuIterator) zend_long ZEPHIR_LAST_CALL_STATUS; zval *pattern_param = NULL; zval pattern; - zval *this_ptr = getThis(); ZVAL_UNDEF(&pattern); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(pattern) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &pattern_param); zephir_get_strval(&pattern, pattern_param); - - object_init_ex(return_value, zephir_get_internal_ce(SL("apcuiterator"))); ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 0, &pattern); zephir_check_call_status(); @@ -833,33 +736,25 @@ PHP_METHOD(Phalcon_Storage_Adapter_Apcu, phpApcuStore) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ttl, ZEPHIR_LAST_CALL_STATUS; zval *key, key_sub, *payload, payload_sub, *ttl_param = NULL, _0; - zval *this_ptr = getThis(); ZVAL_UNDEF(&key_sub); ZVAL_UNDEF(&payload_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_ZVAL(key) Z_PARAM_ZVAL(payload) Z_PARAM_OPTIONAL Z_PARAM_LONG(ttl) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &key, &payload, &ttl_param); if (!ttl_param) { ttl = 0; } else { - ttl = zephir_get_intval(ttl_param); - } - - + } ZVAL_LONG(&_0, ttl); - ZEPHIR_RETURN_CALL_FUNCTION("apcu_store", NULL, 107, key, payload, &_0); + ZEPHIR_RETURN_CALL_FUNCTION("apcu_store", NULL, 108, key, payload, &_0); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/storage/adapter/apcu.zep.h b/ext/phalcon/storage/adapter/apcu.zep.h index b15288154d7..58388fb0bf5 100644 --- a/ext/phalcon/storage/adapter/apcu.zep.h +++ b/ext/phalcon/storage/adapter/apcu.zep.h @@ -23,11 +23,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_Apcu, phpApcuStore); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_storage_adapter_apcu___construct, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, factory, Phalcon\\Storage\\SerializerFactory, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_storage_adapter_apcu_clear, 0, 0, _IS_BOOL, 0) diff --git a/ext/phalcon/storage/adapter/libmemcached.zep.c b/ext/phalcon/storage/adapter/libmemcached.zep.c index 3dc54ea4b24..c6dd17be187 100644 --- a/ext/phalcon/storage/adapter/libmemcached.zep.c +++ b/ext/phalcon/storage/adapter/libmemcached.zep.c @@ -56,26 +56,20 @@ PHP_METHOD(Phalcon_Storage_Adapter_Libmemcached, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_2 = NULL; zval options, _0$$3, _1$$3; zval *factory, factory_sub, *options_param = NULL; - zval *this_ptr = getThis(); ZVAL_UNDEF(&factory_sub); ZVAL_UNDEF(&options); ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_OBJECT_OF_CLASS(factory, phalcon_storage_serializerfactory_ce) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &factory, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -83,8 +77,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Libmemcached, __construct) } else { zephir_get_arrval(&options, options_param); } - - if (!(zephir_array_isset_string(&options, SL("servers")))) { ZEPHIR_INIT_VAR(&_0$$3); zephir_create_array(&_0$$3, 1, 0); @@ -96,7 +88,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_Libmemcached, __construct) zephir_array_update_long(&_0$$3, 0, &_1$$3, PH_COPY ZEPHIR_DEBUG_PARAMS_DUMMY); zephir_array_update_string(&options, SL("servers"), &_0$$3, PH_COPY | PH_SEPARATE); } - ZEPHIR_CALL_PARENT(NULL, phalcon_storage_adapter_libmemcached_ce, getThis(), "__construct", &_2, 0, factory, &options); + ZEPHIR_CALL_PARENT(NULL, phalcon_storage_adapter_libmemcached_ce, getThis(), "__construct", NULL, 0, factory, &options); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -115,9 +107,8 @@ PHP_METHOD(Phalcon_Storage_Adapter_Libmemcached, clear) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&_0, this_ptr, "getadapter", NULL, 0); zephir_check_call_status(); @@ -146,17 +137,13 @@ PHP_METHOD(Phalcon_Storage_Adapter_Libmemcached, decrement) ZVAL_UNDEF(&key); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(key) Z_PARAM_OPTIONAL Z_PARAM_LONG(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &key_param, &value_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -170,10 +157,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_Libmemcached, decrement) if (!value_param) { value = 1; } else { - value = zephir_get_intval(value_param); - } - - + } ZEPHIR_CALL_METHOD(&_0, this_ptr, "getadapter", NULL, 0); zephir_check_call_status(); ZVAL_LONG(&_1, value); @@ -201,15 +185,11 @@ PHP_METHOD(Phalcon_Storage_Adapter_Libmemcached, delete) ZVAL_UNDEF(&key); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -220,8 +200,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Libmemcached, delete) } else { ZEPHIR_INIT_VAR(&key); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "getadapter", NULL, 0); zephir_check_call_status(); ZVAL_LONG(&_1, 0); @@ -266,9 +244,8 @@ PHP_METHOD(Phalcon_Storage_Adapter_Libmemcached, getAdapter) ZVAL_UNDEF(&_8$$4); ZVAL_UNDEF(&_9$$4); ZVAL_UNDEF(&_10$$4); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("adapter"), PH_NOISY_CC | PH_READONLY); if (!(zephir_is_true(&_0))) { @@ -331,14 +308,14 @@ PHP_METHOD(Phalcon_Storage_Adapter_Libmemcached, getAdapter) ZEPHIR_INIT_NVAR(&_7$$4); zephir_fast_array_merge(&_7$$4, &failover, &client); ZEPHIR_CPY_WRT(&client, &_7$$4); - ZEPHIR_CALL_METHOD(&_9$$4, this_ptr, "setoptions", NULL, 108, &connection, &client); + ZEPHIR_CALL_METHOD(&_9$$4, this_ptr, "setoptions", NULL, 109, &connection, &client); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_10$$4, &_9$$4, "setservers", NULL, 109, &connection, &servers); + ZEPHIR_CALL_METHOD(&_10$$4, &_9$$4, "setservers", NULL, 110, &connection, &servers); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &_10$$4, "setsasl", NULL, 110, &connection, &saslUser, &saslPass); + ZEPHIR_CALL_METHOD(NULL, &_10$$4, "setsasl", NULL, 111, &connection, &saslUser, &saslPass); zephir_check_call_status(); } - ZEPHIR_CALL_METHOD(NULL, this_ptr, "setserializer", NULL, 111, &connection); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "setserializer", NULL, 112, &connection); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("adapter"), &connection); } @@ -364,16 +341,12 @@ PHP_METHOD(Phalcon_Storage_Adapter_Libmemcached, getKeys) ZVAL_UNDEF(&prefix); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR(prefix) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &prefix_param); if (!prefix_param) { ZEPHIR_INIT_VAR(&prefix); @@ -389,8 +362,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Libmemcached, getKeys) ZEPHIR_INIT_VAR(&prefix); } } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "getadapter", NULL, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_1, &_0, "getallkeys", NULL, 0); @@ -420,15 +391,11 @@ PHP_METHOD(Phalcon_Storage_Adapter_Libmemcached, has) ZVAL_UNDEF(&connection); ZVAL_UNDEF(&result); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -439,8 +406,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Libmemcached, has) } else { ZEPHIR_INIT_VAR(&key); } - - ZEPHIR_CALL_METHOD(&connection, this_ptr, "getadapter", NULL, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&result, &connection, "get", NULL, 0, &key); @@ -470,17 +435,13 @@ PHP_METHOD(Phalcon_Storage_Adapter_Libmemcached, increment) ZVAL_UNDEF(&key); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(key) Z_PARAM_OPTIONAL Z_PARAM_LONG(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &key_param, &value_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -494,10 +455,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_Libmemcached, increment) if (!value_param) { value = 1; } else { - value = zephir_get_intval(value_param); - } - - + } ZEPHIR_CALL_METHOD(&_0, this_ptr, "getadapter", NULL, 0); zephir_check_call_status(); ZVAL_LONG(&_1, value); @@ -539,7 +497,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Libmemcached, set) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(key) @@ -547,18 +504,14 @@ PHP_METHOD(Phalcon_Storage_Adapter_Libmemcached, set) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(ttl) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &key_param, &value, &ttl); zephir_get_strval(&key, key_param); if (!ttl) { ttl = &ttl_sub; ttl = &__$null; } - - _0 = Z_TYPE_P(ttl) == IS_LONG; if (_0) { _0 = ZEPHIR_LT_LONG(ttl, 1); @@ -580,6 +533,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_Libmemcached, set) if (((Z_TYPE_P(&result) == IS_TRUE || Z_TYPE_P(&result) == IS_FALSE) == 1)) { ZEPHIR_CPY_WRT(&_4, &result); } else { + ZEPHIR_INIT_NVAR(&_4); ZVAL_BOOL(&_4, 0); } RETURN_CCTOR(&_4); @@ -609,20 +563,14 @@ PHP_METHOD(Phalcon_Storage_Adapter_Libmemcached, setForever) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(key) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &key_param, &value); zephir_get_strval(&key, key_param); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "getadapter", NULL, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_1, this_ptr, "getserializeddata", NULL, 0, value); @@ -634,6 +582,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_Libmemcached, setForever) if (((Z_TYPE_P(&result) == IS_TRUE || Z_TYPE_P(&result) == IS_FALSE) == 1)) { ZEPHIR_CPY_WRT(&_3, &result); } else { + ZEPHIR_INIT_NVAR(&_3); ZVAL_BOOL(&_3, 0); } RETURN_CCTOR(&_3); @@ -657,20 +606,14 @@ PHP_METHOD(Phalcon_Storage_Adapter_Libmemcached, setOptions) ZVAL_UNDEF(&connection_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&client); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(connection, zephir_get_internal_ce(SL("memcached"))) Z_PARAM_ARRAY(client) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &connection, &client_param); zephir_get_arrval(&client, client_param); - - ZEPHIR_CALL_METHOD(&_0, connection, "setoptions", NULL, 0, &client); zephir_check_call_status(); if (!ZEPHIR_IS_TRUE_IDENTICAL(&_0)) { @@ -698,22 +641,16 @@ PHP_METHOD(Phalcon_Storage_Adapter_Libmemcached, setSasl) ZVAL_UNDEF(&connection_sub); ZVAL_UNDEF(&saslUser); ZVAL_UNDEF(&saslPass); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_OBJECT_OF_CLASS(connection, zephir_get_internal_ce(SL("memcached"))) Z_PARAM_STR(saslUser) Z_PARAM_STR(saslPass) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &connection, &saslUser_param, &saslPass_param); zephir_get_strval(&saslUser, saslUser_param); zephir_get_strval(&saslPass, saslPass_param); - - if (1 != ZEPHIR_IS_EMPTY(&saslUser)) { ZEPHIR_CALL_METHOD(NULL, connection, "setsaslauthdata", NULL, 0, &saslUser, &saslPass); zephir_check_call_status(); @@ -742,18 +679,12 @@ PHP_METHOD(Phalcon_Storage_Adapter_Libmemcached, setSerializer) ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&map); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(connection, zephir_get_internal_ce(SL("memcached"))) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &connection); - - ZEPHIR_INIT_VAR(&map); zephir_create_array(&map, 3, 0); add_assoc_long_ex(&map, SL("memcached_igbinary"), 2); @@ -795,20 +726,14 @@ PHP_METHOD(Phalcon_Storage_Adapter_Libmemcached, setServers) ZVAL_UNDEF(&connection_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&servers); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_OBJECT_OF_CLASS(connection, zephir_get_internal_ce(SL("memcached"))) Z_PARAM_ARRAY(servers) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &connection, &servers_param); zephir_get_arrval(&servers, servers_param); - - ZEPHIR_CALL_METHOD(&_0, connection, "addservers", NULL, 0, &servers); zephir_check_call_status(); if (!ZEPHIR_IS_TRUE_IDENTICAL(&_0)) { diff --git a/ext/phalcon/storage/adapter/libmemcached.zep.h b/ext/phalcon/storage/adapter/libmemcached.zep.h index b0369833bde..ba37c0c456d 100644 --- a/ext/phalcon/storage/adapter/libmemcached.zep.h +++ b/ext/phalcon/storage/adapter/libmemcached.zep.h @@ -20,11 +20,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_Libmemcached, setServers); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_storage_adapter_libmemcached___construct, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, factory, Phalcon\\Storage\\SerializerFactory, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_storage_adapter_libmemcached_clear, 0, 0, _IS_BOOL, 0) @@ -92,11 +88,7 @@ ZEPHIR_INIT_FUNCS(phalcon_storage_adapter_libmemcached_method_entry) { PHP_ME(Phalcon_Storage_Adapter_Libmemcached, clear, arginfo_phalcon_storage_adapter_libmemcached_clear, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Storage_Adapter_Libmemcached, decrement, arginfo_phalcon_storage_adapter_libmemcached_decrement, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Storage_Adapter_Libmemcached, delete, arginfo_phalcon_storage_adapter_libmemcached_delete, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Storage_Adapter_Libmemcached, getAdapter, arginfo_phalcon_storage_adapter_libmemcached_getadapter, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Storage_Adapter_Libmemcached, getAdapter, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Storage_Adapter_Libmemcached, getAdapter, arginfo_phalcon_storage_adapter_libmemcached_getadapter, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Storage_Adapter_Libmemcached, getKeys, arginfo_phalcon_storage_adapter_libmemcached_getkeys, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Storage_Adapter_Libmemcached, has, arginfo_phalcon_storage_adapter_libmemcached_has, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Storage_Adapter_Libmemcached, increment, arginfo_phalcon_storage_adapter_libmemcached_increment, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/storage/adapter/memory.zep.c b/ext/phalcon/storage/adapter/memory.zep.c index 1c7ebffbfd7..4d6f8bb2cee 100644 --- a/ext/phalcon/storage/adapter/memory.zep.c +++ b/ext/phalcon/storage/adapter/memory.zep.c @@ -60,24 +60,19 @@ PHP_METHOD(Phalcon_Storage_Adapter_Memory, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval options; zval *factory, factory_sub, *options_param = NULL; zval *this_ptr = getThis(); ZVAL_UNDEF(&factory_sub); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_OBJECT_OF_CLASS(factory, phalcon_storage_serializerfactory_ce) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &factory, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -85,9 +80,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_Memory, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - - ZEPHIR_CALL_PARENT(NULL, phalcon_storage_adapter_memory_ce, getThis(), "__construct", &_0, 0, factory, &options); + ZEPHIR_CALL_PARENT(NULL, phalcon_storage_adapter_memory_ce, getThis(), "__construct", NULL, 0, factory, &options); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, this_ptr, "initserializer", NULL, 0); zephir_check_call_status(); @@ -104,9 +97,8 @@ PHP_METHOD(Phalcon_Storage_Adapter_Memory, clear) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); array_init(&_0); @@ -137,17 +129,13 @@ PHP_METHOD(Phalcon_Storage_Adapter_Memory, decrement) ZVAL_UNDEF(&result); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(key) Z_PARAM_OPTIONAL Z_PARAM_LONG(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &key_param, &value_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -161,10 +149,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_Memory, decrement) if (!value_param) { value = 1; } else { - value = zephir_get_intval(value_param); - } - - + } ZEPHIR_CALL_METHOD(&prefixedKey, this_ptr, "getprefixedkey", NULL, 0, &key); zephir_check_call_status(); zephir_read_property(&_0, this_ptr, ZEND_STRL("data"), PH_NOISY_CC | PH_READONLY); @@ -201,15 +186,11 @@ PHP_METHOD(Phalcon_Storage_Adapter_Memory, delete) ZVAL_UNDEF(&prefixedKey); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -220,8 +201,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Memory, delete) } else { ZEPHIR_INIT_VAR(&key); } - - ZEPHIR_CALL_METHOD(&prefixedKey, this_ptr, "getprefixedkey", NULL, 0, &key); zephir_check_call_status(); zephir_read_property(&_0, this_ptr, ZEND_STRL("data"), PH_NOISY_CC | PH_READONLY); @@ -251,16 +230,12 @@ PHP_METHOD(Phalcon_Storage_Adapter_Memory, getKeys) ZVAL_UNDEF(&prefix); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR(prefix) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &prefix_param); if (!prefix_param) { ZEPHIR_INIT_VAR(&prefix); @@ -268,8 +243,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Memory, getKeys) } else { zephir_get_strval(&prefix, prefix_param); } - - ZEPHIR_INIT_VAR(&_0); zephir_read_property(&_1, this_ptr, ZEND_STRL("data"), PH_NOISY_CC | PH_READONLY); zephir_array_keys(&_0, &_1); @@ -296,15 +269,11 @@ PHP_METHOD(Phalcon_Storage_Adapter_Memory, has) ZVAL_UNDEF(&key); ZVAL_UNDEF(&prefixedKey); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -315,8 +284,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Memory, has) } else { ZEPHIR_INIT_VAR(&key); } - - ZEPHIR_CALL_METHOD(&prefixedKey, this_ptr, "getprefixedkey", NULL, 0, &key); zephir_check_call_status(); zephir_read_property(&_0, this_ptr, ZEND_STRL("data"), PH_NOISY_CC | PH_READONLY); @@ -346,17 +313,13 @@ PHP_METHOD(Phalcon_Storage_Adapter_Memory, increment) ZVAL_UNDEF(&result); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(key) Z_PARAM_OPTIONAL Z_PARAM_LONG(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &key_param, &value_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -370,10 +333,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_Memory, increment) if (!value_param) { value = 1; } else { - value = zephir_get_intval(value_param); - } - - + } ZEPHIR_CALL_METHOD(&prefixedKey, this_ptr, "getprefixedkey", NULL, 0, &key); zephir_check_call_status(); zephir_read_property(&_0, this_ptr, ZEND_STRL("data"), PH_NOISY_CC | PH_READONLY); @@ -419,7 +379,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Memory, set) ZVAL_NULL(&__$null); ZVAL_UNDEF(&content); ZVAL_UNDEF(&prefixedKey); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(key) @@ -427,10 +386,8 @@ PHP_METHOD(Phalcon_Storage_Adapter_Memory, set) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(ttl) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &key_param, &value, &ttl); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -445,8 +402,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Memory, set) ttl = &ttl_sub; ttl = &__$null; } - - _0 = Z_TYPE_P(ttl) == IS_LONG; if (_0) { _0 = ZEPHIR_LT_LONG(ttl, 1); @@ -483,16 +438,12 @@ PHP_METHOD(Phalcon_Storage_Adapter_Memory, setForever) ZVAL_UNDEF(&key); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(key) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &key_param, &value); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -503,8 +454,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Memory, setForever) } else { ZEPHIR_INIT_VAR(&key); } - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "set", NULL, 0, &key, value); zephir_check_call_status(); RETURN_MM(); @@ -527,19 +476,13 @@ PHP_METHOD(Phalcon_Storage_Adapter_Memory, doGet) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); zephir_get_strval(&key, key_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("data"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&_2, this_ptr, "getprefixedkey", NULL, 0, &key); zephir_check_call_status(); @@ -557,7 +500,8 @@ zend_object *zephir_init_properties_Phalcon_Storage_Adapter_Memory(zend_class_en ZVAL_UNDEF(&_3$$4); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/storage/adapter/memory.zep.h b/ext/phalcon/storage/adapter/memory.zep.h index 57f0131cfe3..07a4bb43558 100644 --- a/ext/phalcon/storage/adapter/memory.zep.h +++ b/ext/phalcon/storage/adapter/memory.zep.h @@ -17,11 +17,7 @@ zend_object *zephir_init_properties_Phalcon_Storage_Adapter_Memory(zend_class_en ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_storage_adapter_memory___construct, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, factory, Phalcon\\Storage\\SerializerFactory, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_storage_adapter_memory_clear, 0, 0, _IS_BOOL, 0) diff --git a/ext/phalcon/storage/adapter/redis.zep.c b/ext/phalcon/storage/adapter/redis.zep.c index 4aef833e277..c1df3dc62e0 100644 --- a/ext/phalcon/storage/adapter/redis.zep.c +++ b/ext/phalcon/storage/adapter/redis.zep.c @@ -70,7 +70,6 @@ ZEPHIR_INIT_CLASS(Phalcon_Storage_Adapter_Redis) PHP_METHOD(Phalcon_Storage_Adapter_Redis, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zephir_fcall_cache_entry *_15 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval options; zval *factory, factory_sub, *options_param = NULL, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14; @@ -93,17 +92,13 @@ PHP_METHOD(Phalcon_Storage_Adapter_Redis, __construct) ZVAL_UNDEF(&_13); ZVAL_UNDEF(&_14); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_OBJECT_OF_CLASS(factory, phalcon_storage_serializerfactory_ce) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &factory, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -111,8 +106,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Redis, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "host"); ZEPHIR_INIT_VAR(&_2); @@ -189,7 +182,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_Redis, __construct) ZEPHIR_CALL_METHOD(&_14, this_ptr, "getarrval", NULL, 0, &options, &_1, &_4); zephir_check_call_status(); zephir_array_update_string(&options, SL("readTimeout"), &_14, PH_COPY | PH_SEPARATE); - ZEPHIR_CALL_PARENT(NULL, phalcon_storage_adapter_redis_ce, getThis(), "__construct", &_15, 0, factory, &options); + ZEPHIR_CALL_PARENT(NULL, phalcon_storage_adapter_redis_ce, getThis(), "__construct", NULL, 0, factory, &options); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -208,9 +201,8 @@ PHP_METHOD(Phalcon_Storage_Adapter_Redis, clear) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&_0, this_ptr, "getadapter", NULL, 0); zephir_check_call_status(); @@ -239,17 +231,13 @@ PHP_METHOD(Phalcon_Storage_Adapter_Redis, decrement) ZVAL_UNDEF(&key); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(key) Z_PARAM_OPTIONAL Z_PARAM_LONG(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &key_param, &value_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -263,10 +251,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_Redis, decrement) if (!value_param) { value = 1; } else { - value = zephir_get_intval(value_param); - } - - + } ZEPHIR_CALL_METHOD(&_0, this_ptr, "getadapter", NULL, 0); zephir_check_call_status(); ZVAL_LONG(&_1, value); @@ -294,15 +279,11 @@ PHP_METHOD(Phalcon_Storage_Adapter_Redis, delete) ZVAL_UNDEF(&key); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -313,8 +294,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Redis, delete) } else { ZEPHIR_INIT_VAR(&key); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "getadapter", NULL, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_1, &_0, "del", NULL, 0, &key); @@ -342,9 +321,8 @@ PHP_METHOD(Phalcon_Storage_Adapter_Redis, getAdapter) ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("adapter"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_0) == IS_NULL) { @@ -352,17 +330,17 @@ PHP_METHOD(Phalcon_Storage_Adapter_Redis, getAdapter) object_init_ex(&connection, zephir_get_internal_ce(SL("redis"))); ZEPHIR_CALL_METHOD(NULL, &connection, "__construct", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_1$$3, this_ptr, "checkconnect", NULL, 112, &connection); + ZEPHIR_CALL_METHOD(&_1$$3, this_ptr, "checkconnect", NULL, 113, &connection); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_2$$3, &_1$$3, "checkauth", NULL, 113, &connection); + ZEPHIR_CALL_METHOD(&_2$$3, &_1$$3, "checkauth", NULL, 114, &connection); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &_2$$3, "checkindex", NULL, 114, &connection); + ZEPHIR_CALL_METHOD(NULL, &_2$$3, "checkindex", NULL, 115, &connection); zephir_check_call_status(); zephir_read_property(&_3$$3, this_ptr, ZEND_STRL("prefix"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_4$$3, 2); ZEPHIR_CALL_METHOD(NULL, &connection, "setoption", NULL, 0, &_4$$3, &_3$$3); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "setserializer", NULL, 115, &connection); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "setserializer", NULL, 116, &connection); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("adapter"), &connection); } @@ -389,16 +367,12 @@ PHP_METHOD(Phalcon_Storage_Adapter_Redis, getKeys) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR(prefix) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &prefix_param); if (!prefix_param) { ZEPHIR_INIT_VAR(&prefix); @@ -414,8 +388,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Redis, getKeys) ZEPHIR_INIT_VAR(&prefix); } } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "getadapter", NULL, 0); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_2); @@ -446,15 +418,11 @@ PHP_METHOD(Phalcon_Storage_Adapter_Redis, has) ZVAL_UNDEF(&key); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -465,8 +433,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Redis, has) } else { ZEPHIR_INIT_VAR(&key); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "getadapter", NULL, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_1, &_0, "exists", NULL, 0, &key); @@ -494,17 +460,13 @@ PHP_METHOD(Phalcon_Storage_Adapter_Redis, increment) ZVAL_UNDEF(&key); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(key) Z_PARAM_OPTIONAL Z_PARAM_LONG(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &key_param, &value_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -518,10 +480,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_Redis, increment) if (!value_param) { value = 1; } else { - value = zephir_get_intval(value_param); - } - - + } ZEPHIR_CALL_METHOD(&_0, this_ptr, "getadapter", NULL, 0); zephir_check_call_status(); ZVAL_LONG(&_1, value); @@ -562,7 +521,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Redis, set) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(key) @@ -570,10 +528,8 @@ PHP_METHOD(Phalcon_Storage_Adapter_Redis, set) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(ttl) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &key_param, &value, &ttl); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -588,8 +544,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Redis, set) ttl = &ttl_sub; ttl = &__$null; } - - _0 = Z_TYPE_P(ttl) == IS_LONG; if (_0) { _0 = ZEPHIR_LT_LONG(ttl, 1); @@ -611,6 +565,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_Redis, set) if (((Z_TYPE_P(&result) == IS_TRUE || Z_TYPE_P(&result) == IS_FALSE) == 1)) { ZEPHIR_CPY_WRT(&_4, &result); } else { + ZEPHIR_INIT_NVAR(&_4); ZVAL_BOOL(&_4, 0); } RETURN_CCTOR(&_4); @@ -639,16 +594,12 @@ PHP_METHOD(Phalcon_Storage_Adapter_Redis, setForever) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(key) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &key_param, &value); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -659,8 +610,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Redis, setForever) } else { ZEPHIR_INIT_VAR(&key); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "getadapter", NULL, 0); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_1, this_ptr, "getserializeddata", NULL, 0, value); @@ -671,6 +620,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_Redis, setForever) if (((Z_TYPE_P(&result) == IS_TRUE || Z_TYPE_P(&result) == IS_FALSE) == 1)) { ZEPHIR_CPY_WRT(&_2, &result); } else { + ZEPHIR_INIT_NVAR(&_2); ZVAL_BOOL(&_2, 0); } RETURN_CCTOR(&_2); @@ -696,20 +646,14 @@ PHP_METHOD(Phalcon_Storage_Adapter_Redis, checkAuth) ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_2$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(connection, zephir_get_internal_ce(SL("redis"))) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &connection); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("options"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_OBS_VAR(&auth); + zephir_memory_observe(&auth); zephir_array_fetch_string(&auth, &_0, SL("auth"), PH_NOISY, "phalcon/Storage/Adapter/Redis.zep", 243); /* try_start_1: */ @@ -773,29 +717,23 @@ PHP_METHOD(Phalcon_Storage_Adapter_Redis, checkConnect) ZVAL_UNDEF(&_4$$5); ZVAL_UNDEF(&_5$$5); ZVAL_UNDEF(&_6$$5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(connection, zephir_get_internal_ce(SL("redis"))) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &connection); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("options"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&options, &_0); - ZEPHIR_OBS_VAR(&host); + zephir_memory_observe(&host); zephir_array_fetch_string(&host, &options, SL("host"), PH_NOISY, "phalcon/Storage/Adapter/Redis.zep", 272); - ZEPHIR_OBS_VAR(&port); + zephir_memory_observe(&port); zephir_array_fetch_string(&port, &options, SL("port"), PH_NOISY, "phalcon/Storage/Adapter/Redis.zep", 273); - ZEPHIR_OBS_VAR(&timeout); + zephir_memory_observe(&timeout); zephir_array_fetch_string(&timeout, &options, SL("timeout"), PH_NOISY, "phalcon/Storage/Adapter/Redis.zep", 274); - ZEPHIR_OBS_VAR(&retryInterval); + zephir_memory_observe(&retryInterval); zephir_array_fetch_string(&retryInterval, &options, SL("retryInterval"), PH_NOISY, "phalcon/Storage/Adapter/Redis.zep", 275); - ZEPHIR_OBS_VAR(&readTimeout); + zephir_memory_observe(&readTimeout); zephir_array_fetch_string(&readTimeout, &options, SL("readTimeout"), PH_NOISY, "phalcon/Storage/Adapter/Redis.zep", 276); zephir_array_fetch_string(&_1, &options, SL("persistent"), PH_NOISY | PH_READONLY, "phalcon/Storage/Adapter/Redis.zep", 278); ZEPHIR_INIT_VAR(&method); @@ -806,7 +744,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_Redis, checkConnect) } else { ZVAL_STRING(&method, "pconnect"); zephir_read_property(&_2$$4, this_ptr, ZEND_STRL("options"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_OBS_VAR(&persistentId); + zephir_memory_observe(&persistentId); zephir_array_fetch_string(&persistentId, &_2$$4, SL("persistentId"), PH_NOISY, "phalcon/Storage/Adapter/Redis.zep", 283); if (!(ZEPHIR_IS_EMPTY(&persistentId))) { ZEPHIR_CPY_WRT(¶meter, &persistentId); @@ -822,9 +760,9 @@ PHP_METHOD(Phalcon_Storage_Adapter_Redis, checkConnect) object_init_ex(&_4$$5, phalcon_storage_exception_ce); ZEPHIR_INIT_VAR(&_5$$5); ZVAL_STRING(&_5$$5, "Could not connect to the Redisd server [%s:%s]"); - ZEPHIR_CALL_FUNCTION(&_6$$5, "sprintf", NULL, 116, &_5$$5, &host, &port); + ZEPHIR_CALL_FUNCTION(&_6$$5, "sprintf", NULL, 117, &_5$$5, &host, &port); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &_4$$5, "__construct", NULL, 32, &_6$$5); + ZEPHIR_CALL_METHOD(NULL, &_4$$5, "__construct", NULL, 33, &_6$$5); zephir_check_call_status(); zephir_throw_exception_debug(&_4$$5, "phalcon/Storage/Adapter/Redis.zep", 303); ZEPHIR_MM_RESTORE(); @@ -851,20 +789,14 @@ PHP_METHOD(Phalcon_Storage_Adapter_Redis, checkIndex) ZVAL_UNDEF(&index); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(connection, zephir_get_internal_ce(SL("redis"))) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &connection); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("options"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_OBS_VAR(&index); + zephir_memory_observe(&index); zephir_array_fetch_string(&index, &_0, SL("index"), PH_NOISY, "phalcon/Storage/Adapter/Redis.zep", 319); _1 = ZEPHIR_GT_LONG(&index, 0); if (_1) { @@ -910,52 +842,46 @@ PHP_METHOD(Phalcon_Storage_Adapter_Redis, setSerializer) ZVAL_UNDEF(&_12$$6); ZVAL_UNDEF(&_13$$6); ZVAL_UNDEF(&map); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(connection, zephir_get_internal_ce(SL("redis"))) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &connection); - - ZEPHIR_INIT_VAR(&map); zephir_create_array(&map, 2, 0); add_assoc_long_ex(&map, SL("redis_none"), 0); add_assoc_long_ex(&map, SL("redis_php"), 1); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "\\Redis::SERIALIZER_IGBINARY"); - ZEPHIR_CALL_FUNCTION(&_1, "defined", NULL, 117, &_0); + ZEPHIR_CALL_FUNCTION(&_1, "defined", NULL, 118, &_0); zephir_check_call_status(); if (zephir_is_true(&_1)) { ZEPHIR_INIT_VAR(&_2$$3); ZVAL_STRING(&_2$$3, "\\Redis::SERIALIZER_IGBINARY"); - ZEPHIR_CALL_FUNCTION(&_3$$3, "constant", NULL, 118, &_2$$3); + ZEPHIR_CALL_FUNCTION(&_3$$3, "constant", NULL, 119, &_2$$3); zephir_check_call_status(); zephir_array_update_string(&map, SL("redis_igbinary"), &_3$$3, PH_COPY | PH_SEPARATE); } ZEPHIR_INIT_NVAR(&_0); ZVAL_STRING(&_0, "\\Redis::SERIALIZER_MSGPACK"); - ZEPHIR_CALL_FUNCTION(&_4, "defined", NULL, 117, &_0); + ZEPHIR_CALL_FUNCTION(&_4, "defined", NULL, 118, &_0); zephir_check_call_status(); if (zephir_is_true(&_4)) { ZEPHIR_INIT_VAR(&_5$$4); ZVAL_STRING(&_5$$4, "\\Redis::SERIALIZER_MSGPACK"); - ZEPHIR_CALL_FUNCTION(&_6$$4, "constant", NULL, 118, &_5$$4); + ZEPHIR_CALL_FUNCTION(&_6$$4, "constant", NULL, 119, &_5$$4); zephir_check_call_status(); zephir_array_update_string(&map, SL("redis_msgpack"), &_6$$4, PH_COPY | PH_SEPARATE); } ZEPHIR_INIT_NVAR(&_0); ZVAL_STRING(&_0, "\\Redis::SERIALIZER_JSON"); - ZEPHIR_CALL_FUNCTION(&_7, "defined", NULL, 117, &_0); + ZEPHIR_CALL_FUNCTION(&_7, "defined", NULL, 118, &_0); zephir_check_call_status(); if (zephir_is_true(&_7)) { ZEPHIR_INIT_VAR(&_8$$5); ZVAL_STRING(&_8$$5, "\\Redis::SERIALIZER_JSON"); - ZEPHIR_CALL_FUNCTION(&_9$$5, "constant", NULL, 118, &_8$$5); + ZEPHIR_CALL_FUNCTION(&_9$$5, "constant", NULL, 119, &_8$$5); zephir_check_call_status(); zephir_array_update_string(&map, SL("redis_json"), &_9$$5, PH_COPY | PH_SEPARATE); } diff --git a/ext/phalcon/storage/adapter/redis.zep.h b/ext/phalcon/storage/adapter/redis.zep.h index 8ff62e98e9e..9a889eb3878 100644 --- a/ext/phalcon/storage/adapter/redis.zep.h +++ b/ext/phalcon/storage/adapter/redis.zep.h @@ -20,11 +20,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_Redis, setSerializer); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_storage_adapter_redis___construct, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, factory, Phalcon\\Storage\\SerializerFactory, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_storage_adapter_redis_clear, 0, 0, _IS_BOOL, 0) @@ -88,11 +84,7 @@ ZEPHIR_INIT_FUNCS(phalcon_storage_adapter_redis_method_entry) { PHP_ME(Phalcon_Storage_Adapter_Redis, clear, arginfo_phalcon_storage_adapter_redis_clear, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Storage_Adapter_Redis, decrement, arginfo_phalcon_storage_adapter_redis_decrement, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Storage_Adapter_Redis, delete, arginfo_phalcon_storage_adapter_redis_delete, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Storage_Adapter_Redis, getAdapter, arginfo_phalcon_storage_adapter_redis_getadapter, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Storage_Adapter_Redis, getAdapter, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Storage_Adapter_Redis, getAdapter, arginfo_phalcon_storage_adapter_redis_getadapter, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Storage_Adapter_Redis, getKeys, arginfo_phalcon_storage_adapter_redis_getkeys, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Storage_Adapter_Redis, has, arginfo_phalcon_storage_adapter_redis_has, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Storage_Adapter_Redis, increment, arginfo_phalcon_storage_adapter_redis_increment, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/storage/adapter/stream.zep.c b/ext/phalcon/storage/adapter/stream.zep.c index cde18a12970..b2ede9c68fe 100644 --- a/ext/phalcon/storage/adapter/stream.zep.c +++ b/ext/phalcon/storage/adapter/stream.zep.c @@ -72,7 +72,6 @@ ZEPHIR_INIT_CLASS(Phalcon_Storage_Adapter_Stream) PHP_METHOD(Phalcon_Storage_Adapter_Stream, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zephir_fcall_cache_entry *_3 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval options; zval *factory, factory_sub, *options_param = NULL, storageDir, _0, _1, _2; @@ -84,17 +83,13 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, __construct) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_OBJECT_OF_CLASS(factory, phalcon_storage_serializerfactory_ce) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &factory, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -102,8 +97,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "storageDir"); ZEPHIR_INIT_VAR(&_1); @@ -114,10 +107,10 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, __construct) ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_storage_exception_ce, "The 'storageDir' must be specified in the options", "phalcon/Storage/Adapter/Stream.zep", 60); return; } - ZEPHIR_CALL_METHOD(&_2, this_ptr, "getdirseparator", NULL, 119, &storageDir); + ZEPHIR_CALL_METHOD(&_2, this_ptr, "getdirseparator", NULL, 120, &storageDir); zephir_check_call_status(); zephir_update_property_zval(this_ptr, ZEND_STRL("storageDir"), &_2); - ZEPHIR_CALL_PARENT(NULL, phalcon_storage_adapter_stream_ce, getThis(), "__construct", &_3, 0, factory, &options); + ZEPHIR_CALL_PARENT(NULL, phalcon_storage_adapter_stream_ce, getThis(), "__construct", NULL, 0, factory, &options); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, this_ptr, "initserializer", NULL, 0); zephir_check_call_status(); @@ -147,15 +140,14 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, clear) ZVAL_UNDEF(&_8$$5); ZVAL_UNDEF(&_10$$5); ZVAL_UNDEF(&_11$$5); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); result = 1; zephir_read_property(&_0, this_ptr, ZEND_STRL("storageDir"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_CALL_METHOD(&directory, this_ptr, "getdirseparator", NULL, 119, &_0); + ZEPHIR_CALL_METHOD(&directory, this_ptr, "getdirseparator", NULL, 120, &_0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&iterator, this_ptr, "getiterator", NULL, 120, &directory); + ZEPHIR_CALL_METHOD(&iterator, this_ptr, "getiterator", NULL, 121, &directory); zephir_check_call_status(); zephir_is_iterable(&iterator, 0, "phalcon/Storage/Adapter/Stream.zep", 91); if (Z_TYPE_P(&iterator) == IS_ARRAY) { @@ -229,17 +221,13 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, decrement) ZVAL_UNDEF(&data); ZVAL_UNDEF(&result); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(key) Z_PARAM_OPTIONAL Z_PARAM_LONG(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &key_param, &value_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -253,10 +241,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, decrement) if (!value_param) { value = 1; } else { - value = zephir_get_intval(value_param); - } - - + } ZEPHIR_CALL_METHOD(&_0, this_ptr, "has", NULL, 0, &key); zephir_check_call_status(); if (UNEXPECTED(!ZEPHIR_IS_TRUE_IDENTICAL(&_0))) { @@ -293,15 +278,11 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, delete) ZVAL_UNDEF(&key); ZVAL_UNDEF(&filepath); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -312,16 +293,14 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, delete) } else { ZEPHIR_INIT_VAR(&key); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "has", NULL, 0, &key); zephir_check_call_status(); if (!ZEPHIR_IS_TRUE_IDENTICAL(&_0)) { RETURN_MM_BOOL(0); } - ZEPHIR_CALL_METHOD(&filepath, this_ptr, "getfilepath", NULL, 121, &key); + ZEPHIR_CALL_METHOD(&filepath, this_ptr, "getfilepath", NULL, 122, &key); zephir_check_call_status(); - ZEPHIR_RETURN_CALL_FUNCTION("unlink", NULL, 122, &filepath); + ZEPHIR_RETURN_CALL_FUNCTION("unlink", NULL, 123, &filepath); zephir_check_call_status(); RETURN_MM(); } @@ -351,17 +330,14 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, get) ZVAL_UNDEF(&payload); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(key) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(defaultValue) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &key_param, &defaultValue); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -376,19 +352,17 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, get) defaultValue = &defaultValue_sub; defaultValue = &__$null; } - - - ZEPHIR_CALL_METHOD(&filepath, this_ptr, "getfilepath", NULL, 121, &key); + ZEPHIR_CALL_METHOD(&filepath, this_ptr, "getfilepath", NULL, 122, &key); zephir_check_call_status(); if (1 != (zephir_file_exists(&filepath) == SUCCESS)) { RETVAL_ZVAL(defaultValue, 1, 0); RETURN_MM(); } - ZEPHIR_CALL_METHOD(&payload, this_ptr, "getpayload", NULL, 123, &filepath); + ZEPHIR_CALL_METHOD(&payload, this_ptr, "getpayload", NULL, 124, &filepath); zephir_check_call_status(); _0 = ZEPHIR_IS_EMPTY(&payload); if (!(_0)) { - ZEPHIR_CALL_METHOD(&_1, this_ptr, "isexpired", NULL, 124, &payload); + ZEPHIR_CALL_METHOD(&_1, this_ptr, "isexpired", NULL, 125, &payload); zephir_check_call_status(); _0 = zephir_is_true(&_1); } @@ -436,16 +410,12 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, getKeys) ZVAL_UNDEF(&_9$$7); ZVAL_UNDEF(&_10$$7); ZVAL_UNDEF(&files); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR(prefix) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &prefix_param); if (!prefix_param) { ZEPHIR_INIT_VAR(&prefix); @@ -461,11 +431,9 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, getKeys) ZEPHIR_INIT_VAR(&prefix); } } - - ZEPHIR_INIT_VAR(&files); array_init(&files); - ZEPHIR_CALL_METHOD(&directory, this_ptr, "getdir", NULL, 125); + ZEPHIR_CALL_METHOD(&directory, this_ptr, "getdir", NULL, 126); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_0, this_ptr, "phpfileexists", NULL, 0, &directory); zephir_check_call_status(); @@ -473,7 +441,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, getKeys) array_init(return_value); RETURN_MM(); } - ZEPHIR_CALL_METHOD(&iterator, this_ptr, "getiterator", NULL, 120, &directory); + ZEPHIR_CALL_METHOD(&iterator, this_ptr, "getiterator", NULL, 121, &directory); zephir_check_call_status(); zephir_is_iterable(&iterator, 0, "phalcon/Storage/Adapter/Stream.zep", 197); if (Z_TYPE_P(&iterator) == IS_ARRAY) { @@ -543,15 +511,11 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, has) ZVAL_UNDEF(&filepath); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -562,21 +526,19 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, has) } else { ZEPHIR_INIT_VAR(&key); } - - - ZEPHIR_CALL_METHOD(&filepath, this_ptr, "getfilepath", NULL, 121, &key); + ZEPHIR_CALL_METHOD(&filepath, this_ptr, "getfilepath", NULL, 122, &key); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_0, this_ptr, "phpfileexists", NULL, 0, &filepath); zephir_check_call_status(); if (UNEXPECTED(!ZEPHIR_IS_TRUE_IDENTICAL(&_0))) { RETURN_MM_BOOL(0); } - ZEPHIR_CALL_METHOD(&payload, this_ptr, "getpayload", NULL, 123, &filepath); + ZEPHIR_CALL_METHOD(&payload, this_ptr, "getpayload", NULL, 124, &filepath); zephir_check_call_status(); if (UNEXPECTED(ZEPHIR_IS_EMPTY(&payload))) { RETURN_MM_BOOL(0); } - ZEPHIR_CALL_METHOD(&_1, this_ptr, "isexpired", NULL, 124, &payload); + ZEPHIR_CALL_METHOD(&_1, this_ptr, "isexpired", NULL, 125, &payload); zephir_check_call_status(); RETURN_MM_BOOL(!zephir_is_true(&_1)); } @@ -601,17 +563,13 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, increment) ZVAL_UNDEF(&data); ZVAL_UNDEF(&result); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(key) Z_PARAM_OPTIONAL Z_PARAM_LONG(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &key_param, &value_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -625,10 +583,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, increment) if (!value_param) { value = 1; } else { - value = zephir_get_intval(value_param); - } - - + } ZEPHIR_CALL_METHOD(&_0, this_ptr, "has", NULL, 0, &key); zephir_check_call_status(); if (UNEXPECTED(!ZEPHIR_IS_TRUE_IDENTICAL(&_0))) { @@ -677,7 +632,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, set) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&payload); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(key) @@ -685,10 +639,8 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, set) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(ttl) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &key_param, &value, &ttl); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -703,8 +655,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, set) ttl = &ttl_sub; ttl = &__$null; } - - _0 = Z_TYPE_P(ttl) == IS_LONG; if (_0) { _0 = ZEPHIR_LT_LONG(ttl, 1); @@ -725,7 +675,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, set) ZEPHIR_CALL_METHOD(&_2, this_ptr, "getserializeddata", NULL, 0, value); zephir_check_call_status(); zephir_array_update_string(&payload, SL("content"), &_2, PH_COPY | PH_SEPARATE); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "storepayload", NULL, 126, &payload, &key); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "storepayload", NULL, 127, &payload, &key); zephir_check_call_status(); RETURN_MM(); } @@ -753,16 +703,12 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, setForever) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&payload); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(key) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &key_param, &value); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -773,8 +719,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, setForever) } else { ZEPHIR_INIT_VAR(&key); } - - ZEPHIR_INIT_VAR(&payload); zephir_create_array(&payload, 3, 0); ZEPHIR_INIT_VAR(&_0); @@ -784,7 +728,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, setForever) ZEPHIR_CALL_METHOD(&_1, this_ptr, "getserializeddata", NULL, 0, value); zephir_check_call_status(); zephir_array_update_string(&payload, SL("content"), &_1, PH_COPY | PH_SEPARATE); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "storepayload", NULL, 126, &payload, &key); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "storepayload", NULL, 127, &payload, &key); zephir_check_call_status(); RETURN_MM(); } @@ -812,16 +756,12 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, getDir) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &key_param); if (!key_param) { ZEPHIR_INIT_VAR(&key); @@ -837,21 +777,19 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, getDir) ZEPHIR_INIT_VAR(&key); } } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("storageDir"), PH_NOISY_CC | PH_READONLY); zephir_read_property(&_1, this_ptr, ZEND_STRL("prefix"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&_2); ZEPHIR_CONCAT_VV(&_2, &_0, &_1); - ZEPHIR_CALL_METHOD(&dirPrefix, this_ptr, "getdirseparator", NULL, 119, &_2); + ZEPHIR_CALL_METHOD(&dirPrefix, this_ptr, "getdirseparator", NULL, 120, &_2); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_3, this_ptr, "getkeywithoutprefix", NULL, 127, &key); + ZEPHIR_CALL_METHOD(&_3, this_ptr, "getkeywithoutprefix", NULL, 128, &key); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&dirFromFile, this_ptr, "getdirfromfile", NULL, 128, &_3); + ZEPHIR_CALL_METHOD(&dirFromFile, this_ptr, "getdirfromfile", NULL, 129, &_3); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_4); ZEPHIR_CONCAT_VV(&_4, &dirPrefix, &dirFromFile); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getdirseparator", NULL, 119, &_4); + ZEPHIR_RETURN_CALL_METHOD(this_ptr, "getdirseparator", NULL, 120, &_4); zephir_check_call_status(); RETURN_MM(); } @@ -874,22 +812,16 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, getFilepath) ZVAL_UNDEF(&key); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); zephir_get_strval(&key, key_param); - - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "getdir", NULL, 125, &key); + ZEPHIR_CALL_METHOD(&_0, this_ptr, "getdir", NULL, 126, &key); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(&_1, this_ptr, "getkeywithoutprefix", NULL, 127, &key); + ZEPHIR_CALL_METHOD(&_1, this_ptr, "getkeywithoutprefix", NULL, 128, &key); zephir_check_call_status(); ZEPHIR_CONCAT_VV(return_value, &_0, &_1); RETURN_MM(); @@ -914,19 +846,13 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, getKeyWithoutPrefix) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); zephir_get_strval(&key, key_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("prefix"), PH_NOISY_CC | PH_READONLY); if (zephir_start_with(&key, &_0, NULL)) { zephir_read_property(&_1$$3, this_ptr, ZEND_STRL("prefix"), PH_NOISY_CC | PH_READONLY); @@ -950,20 +876,15 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, getIterator) zend_long ZEPHIR_LAST_CALL_STATUS; zval *dir_param = NULL, _0, _1; zval dir; - zval *this_ptr = getThis(); ZVAL_UNDEF(&dir); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(dir) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &dir_param); if (UNEXPECTED(Z_TYPE_P(dir_param) != IS_STRING && Z_TYPE_P(dir_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'dir' must be of the type string")); @@ -974,16 +895,14 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, getIterator) } else { ZEPHIR_INIT_VAR(&dir); } - - object_init_ex(return_value, spl_ce_RecursiveIteratorIterator); ZEPHIR_INIT_VAR(&_0); object_init_ex(&_0, spl_ce_RecursiveDirectoryIterator); ZVAL_LONG(&_1, 4096); - ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 129, &dir, &_1); + ZEPHIR_CALL_METHOD(NULL, &_0, "__construct", NULL, 130, &dir, &_1); zephir_check_call_status(); ZVAL_LONG(&_1, 2); - ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 130, &_0, &_1); + ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 131, &_0, &_1); zephir_check_call_status(); RETURN_MM(); } @@ -1020,19 +939,13 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, getPayload) ZVAL_UNDEF(&_6$$6); ZVAL_UNDEF(&_7$$7); ZVAL_UNDEF(&_8$$7); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(filepath) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &filepath_param); zephir_get_strval(&filepath, filepath_param); - - ZEPHIR_INIT_VAR(&payload); ZVAL_BOOL(&payload, 0); ZEPHIR_INIT_VAR(&_0); @@ -1044,7 +957,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, getPayload) RETURN_MM(); } ZVAL_LONG(&_1, 1); - ZEPHIR_CALL_FUNCTION(&_2, "flock", NULL, 131, &pointer, &_1); + ZEPHIR_CALL_FUNCTION(&_2, "flock", NULL, 132, &pointer, &_1); zephir_check_call_status(); if (EXPECTED(ZEPHIR_IS_TRUE_IDENTICAL(&_2))) { ZEPHIR_CALL_METHOD(&payload, this_ptr, "phpfilegetcontents", NULL, 0, &filepath); @@ -1055,34 +968,34 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, getPayload) array_init(return_value); RETURN_MM(); } - ZEPHIR_CALL_FUNCTION(&version, "phpversion", NULL, 132); + ZEPHIR_CALL_FUNCTION(&version, "phpversion", NULL, 133); zephir_check_call_status(); ZEPHIR_GLOBAL(warning).enable = zend_is_true(&__$false); ZEPHIR_INIT_NVAR(&_0); ZVAL_STRING(&_0, "8.0"); ZEPHIR_INIT_VAR(&_3); ZVAL_STRING(&_3, ">="); - ZEPHIR_CALL_FUNCTION(&_4, "version_compare", NULL, 133, &version, &_0, &_3); + ZEPHIR_CALL_FUNCTION(&_4, "version_compare", NULL, 134, &version, &_0, &_3); zephir_check_call_status(); if (zephir_is_true(&_4)) { ZEPHIR_INIT_VAR(&_5$$6); ZEPHIR_INIT_NVAR(&_5$$6); zephir_create_closure_ex(&_5$$6, NULL, phalcon_1__closure_ce, SL("__invoke")); ZVAL_LONG(&_6$$6, 8); - ZEPHIR_CALL_FUNCTION(NULL, "set_error_handler", NULL, 134, &_5$$6, &_6$$6); + ZEPHIR_CALL_FUNCTION(NULL, "set_error_handler", NULL, 135, &_5$$6, &_6$$6); zephir_check_call_status(); } else { ZEPHIR_INIT_VAR(&_7$$7); ZEPHIR_INIT_NVAR(&_7$$7); zephir_create_closure_ex(&_7$$7, NULL, phalcon_2__closure_ce, SL("__invoke")); ZVAL_LONG(&_8$$7, 8); - ZEPHIR_CALL_FUNCTION(NULL, "set_error_handler", NULL, 134, &_7$$7, &_8$$7); + ZEPHIR_CALL_FUNCTION(NULL, "set_error_handler", NULL, 135, &_7$$7, &_8$$7); zephir_check_call_status(); } ZEPHIR_CALL_FUNCTION(&_9, "unserialize", NULL, 16, &payload); zephir_check_call_status(); ZEPHIR_CPY_WRT(&payload, &_9); - ZEPHIR_CALL_FUNCTION(NULL, "restore_error_handler", NULL, 135); + ZEPHIR_CALL_FUNCTION(NULL, "restore_error_handler", NULL, 136); zephir_check_call_status(); _10 = ZEPHIR_GLOBAL(warning).enable; if (!(_10)) { @@ -1118,19 +1031,13 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, isExpired) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(payload) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &payload_param); ZEPHIR_OBS_COPY_OR_DUP(&payload, payload_param); - - ZEPHIR_INIT_VAR(&_0); zephir_time(&_0); ZEPHIR_INIT_VAR(&_1); @@ -1179,31 +1086,25 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, storePayload) ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&key); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ARRAY(payload) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &payload_param, &key_param); zephir_get_arrval(&payload, payload_param); zephir_get_strval(&key, key_param); - - ZEPHIR_CALL_FUNCTION(&_0, "serialize", NULL, 15, &payload); zephir_check_call_status(); ZEPHIR_CPY_WRT(&payload, &_0); - ZEPHIR_CALL_METHOD(&directory, this_ptr, "getdir", NULL, 125, &key); + ZEPHIR_CALL_METHOD(&directory, this_ptr, "getdir", NULL, 126, &key); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&_0, "is_dir", NULL, 136, &directory); + ZEPHIR_CALL_FUNCTION(&_0, "is_dir", NULL, 137, &directory); zephir_check_call_status(); if (!(zephir_is_true(&_0))) { ZVAL_LONG(&_1$$3, 0777); - ZEPHIR_CALL_FUNCTION(NULL, "mkdir", NULL, 137, &directory, &_1$$3, &__$true); + ZEPHIR_CALL_FUNCTION(NULL, "mkdir", NULL, 138, &directory, &_1$$3, &__$true); zephir_check_call_status(); } ZEPHIR_INIT_VAR(&_3); @@ -1222,22 +1123,15 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, phpFileExists) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *filename_param = NULL; zval filename; - zval *this_ptr = getThis(); ZVAL_UNDEF(&filename); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(filename) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &filename_param); zephir_get_strval(&filename, filename_param); - - RETURN_MM_BOOL((zephir_file_exists(&filename) == SUCCESS)); } @@ -1246,22 +1140,15 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, phpFileGetContents) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *filename_param = NULL; zval filename; - zval *this_ptr = getThis(); ZVAL_UNDEF(&filename); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(filename) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &filename_param); zephir_get_strval(&filename, filename_param); - - zephir_file_get_contents(return_value, &filename); RETURN_MM(); } @@ -1272,14 +1159,12 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, phpFilePutContents) zend_long flags, ZEPHIR_LAST_CALL_STATUS; zval *filename_param = NULL, *data, data_sub, *flags_param = NULL, *context = NULL, context_sub, __$null, _0; zval filename; - zval *this_ptr = getThis(); ZVAL_UNDEF(&filename); ZVAL_UNDEF(&data_sub); ZVAL_UNDEF(&context_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 4) Z_PARAM_STR(filename) @@ -1288,25 +1173,20 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, phpFilePutContents) Z_PARAM_LONG(flags) Z_PARAM_ZVAL_OR_NULL(context) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 2, &filename_param, &data, &flags_param, &context); zephir_get_strval(&filename, filename_param); if (!flags_param) { flags = 0; } else { - flags = zephir_get_intval(flags_param); - } + } if (!context) { context = &context_sub; context = &__$null; } - - ZVAL_LONG(&_0, flags); - ZEPHIR_RETURN_CALL_FUNCTION("file_put_contents", NULL, 138, &filename, data, &_0, context); + ZEPHIR_RETURN_CALL_FUNCTION("file_put_contents", NULL, 139, &filename, data, &_0, context); zephir_check_call_status(); RETURN_MM(); } @@ -1317,26 +1197,19 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, phpFopen) zend_long ZEPHIR_LAST_CALL_STATUS; zval *filename_param = NULL, *mode_param = NULL; zval filename, mode; - zval *this_ptr = getThis(); ZVAL_UNDEF(&filename); ZVAL_UNDEF(&mode); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(filename) Z_PARAM_STR(mode) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &filename_param, &mode_param); zephir_get_strval(&filename, filename_param); zephir_get_strval(&mode, mode_param); - - - ZEPHIR_RETURN_CALL_FUNCTION("fopen", NULL, 139, &filename, &mode); + ZEPHIR_RETURN_CALL_FUNCTION("fopen", NULL, 140, &filename, &mode); zephir_check_call_status(); RETURN_MM(); } @@ -1347,23 +1220,16 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, phpUnlink) zend_long ZEPHIR_LAST_CALL_STATUS; zval *filename_param = NULL; zval filename; - zval *this_ptr = getThis(); ZVAL_UNDEF(&filename); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(filename) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &filename_param); zephir_get_strval(&filename, filename_param); - - - ZEPHIR_RETURN_CALL_FUNCTION("unlink", NULL, 122, &filename); + ZEPHIR_RETURN_CALL_FUNCTION("unlink", NULL, 123, &filename); zephir_check_call_status(); RETURN_MM(); } @@ -1374,7 +1240,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, getDirFromFile) zend_long ZEPHIR_LAST_CALL_STATUS; zval *file_param = NULL, name, start, _0, _1, _7, _8, _9, _2$$3, _3$$3, _4$$3, _5$$4, _6$$4; zval file; - zval *this_ptr = getThis(); ZVAL_UNDEF(&file); ZVAL_UNDEF(&name); @@ -1389,15 +1254,11 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, getDirFromFile) ZVAL_UNDEF(&_4$$3); ZVAL_UNDEF(&_5$$4); ZVAL_UNDEF(&_6$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(file) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &file_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")); @@ -1408,10 +1269,8 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, getDirFromFile) } else { ZEPHIR_INIT_VAR(&file); } - - ZVAL_LONG(&_0, 8); - ZEPHIR_CALL_FUNCTION(&name, "pathinfo", NULL, 88, &file, &_0); + ZEPHIR_CALL_FUNCTION(&name, "pathinfo", NULL, 89, &file, &_0); zephir_check_call_status(); ZVAL_LONG(&_0, 0); ZVAL_LONG(&_1, -2); @@ -1434,7 +1293,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, getDirFromFile) } ZEPHIR_INIT_VAR(&_7); ZVAL_LONG(&_8, 2); - ZEPHIR_CALL_FUNCTION(&_9, "str_split", NULL, 87, &start, &_8); + ZEPHIR_CALL_FUNCTION(&_9, "str_split", NULL, 88, &start, &_8); zephir_check_call_status(); zephir_fast_join_str(&_7, SL("/"), &_9); ZEPHIR_CONCAT_VS(return_value, &_7, "/"); @@ -1446,20 +1305,15 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, getDirSeparator) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *directory_param = NULL, _0, _1; zval directory; - zval *this_ptr = getThis(); ZVAL_UNDEF(&directory); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(directory) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &directory_param); if (UNEXPECTED(Z_TYPE_P(directory_param) != IS_STRING && Z_TYPE_P(directory_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'directory' must be of the type string")); @@ -1470,8 +1324,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, getDirSeparator) } else { ZEPHIR_INIT_VAR(&directory); } - - ZEPHIR_INIT_VAR(&_0); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "/"); diff --git a/ext/phalcon/storage/adapter/stream.zep.h b/ext/phalcon/storage/adapter/stream.zep.h index 18b149582d0..3e905224acc 100644 --- a/ext/phalcon/storage/adapter/stream.zep.h +++ b/ext/phalcon/storage/adapter/stream.zep.h @@ -30,11 +30,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_Stream, getDirSeparator); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_storage_adapter_stream___construct, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, factory, Phalcon\\Storage\\SerializerFactory, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_storage_adapter_stream_clear, 0, 0, _IS_BOOL, 0) diff --git a/ext/phalcon/storage/adapter/weak.zep.c b/ext/phalcon/storage/adapter/weak.zep.c index ffbba6aaff1..fa1f34f2171 100644 --- a/ext/phalcon/storage/adapter/weak.zep.c +++ b/ext/phalcon/storage/adapter/weak.zep.c @@ -72,17 +72,13 @@ PHP_METHOD(Phalcon_Storage_Adapter_Weak, __construct) ZVAL_UNDEF(&factory_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_OBJECT_OF_CLASS(factory, phalcon_storage_serializerfactory_ce) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &factory, &options_param); if (!options_param) { ZEPHIR_INIT_VAR(&options); @@ -90,8 +86,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Weak, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - ZEPHIR_INIT_VAR(&_0); ZEPHIR_INIT_NVAR(&_0); ZVAL_STRING(&_0, "none"); @@ -113,9 +107,8 @@ PHP_METHOD(Phalcon_Storage_Adapter_Weak, clear) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); array_init(&_0); @@ -137,20 +130,15 @@ PHP_METHOD(Phalcon_Storage_Adapter_Weak, decrement) zend_long value; zval *key_param = NULL, *value_param = NULL; zval key; - zval *this_ptr = getThis(); ZVAL_UNDEF(&key); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(key) Z_PARAM_OPTIONAL Z_PARAM_LONG(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &key_param, &value_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -164,10 +152,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_Weak, decrement) if (!value_param) { value = 1; } else { - value = zephir_get_intval(value_param); - } - - + } RETURN_MM_BOOL(0); } @@ -190,15 +175,11 @@ PHP_METHOD(Phalcon_Storage_Adapter_Weak, delete) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -209,8 +190,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Weak, delete) } else { ZEPHIR_INIT_VAR(&key); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("fetching"), PH_NOISY_CC | PH_READONLY); if (ZEPHIR_IS_IDENTICAL(&key, &_0)) { RETURN_MM_BOOL(0); @@ -246,16 +225,12 @@ PHP_METHOD(Phalcon_Storage_Adapter_Weak, getKeys) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&results); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_STR(prefix) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &prefix_param); if (!prefix_param) { ZEPHIR_INIT_VAR(&prefix); @@ -263,8 +238,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Weak, getKeys) } else { zephir_get_strval(&prefix, prefix_param); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("weakList"), PH_NOISY_CC | PH_READONLY); ZEPHIR_INIT_VAR(&keys); zephir_array_keys(&keys, &_0); @@ -321,20 +294,15 @@ PHP_METHOD(Phalcon_Storage_Adapter_Weak, increment) zend_long value; zval *key_param = NULL, *value_param = NULL; zval key; - zval *this_ptr = getThis(); ZVAL_UNDEF(&key); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(key) Z_PARAM_OPTIONAL Z_PARAM_LONG(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &key_param, &value_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -348,10 +316,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_Weak, increment) if (!value_param) { value = 1; } else { - value = zephir_get_intval(value_param); - } - - + } RETURN_MM_BOOL(0); } @@ -378,17 +343,14 @@ PHP_METHOD(Phalcon_Storage_Adapter_Weak, get) ZVAL_UNDEF(&wr); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(key) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(defaultValue) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &key_param, &defaultValue); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -403,8 +365,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Weak, get) defaultValue = &defaultValue_sub; defaultValue = &__$null; } - - zephir_update_property_zval(this_ptr, ZEND_STRL("fetching"), &key); zephir_read_property(&_0, this_ptr, ZEND_STRL("weakList"), PH_NOISY_CC | PH_READONLY); if (0 == zephir_array_isset(&_0, &key)) { @@ -413,7 +373,7 @@ PHP_METHOD(Phalcon_Storage_Adapter_Weak, get) RETURN_MM(); } zephir_read_property(&_1, this_ptr, ZEND_STRL("weakList"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_OBS_VAR(&wr); + zephir_memory_observe(&wr); zephir_array_fetch(&wr, &_1, &key, PH_NOISY, "phalcon/Storage/Adapter/Weak.zep", 156); ZEPHIR_CALL_METHOD(&value, &wr, "get", NULL, 0); zephir_check_call_status(); @@ -441,15 +401,11 @@ PHP_METHOD(Phalcon_Storage_Adapter_Weak, has) ZVAL_UNDEF(&key); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(key) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &key_param); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -460,8 +416,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Weak, has) } else { ZEPHIR_INIT_VAR(&key); } - - zephir_read_property(&_0, this_ptr, ZEND_STRL("weakList"), PH_NOISY_CC | PH_READONLY); RETURN_MM_BOOL(zephir_array_isset(&_0, &key)); } @@ -495,7 +449,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Weak, set) ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$4); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(key) @@ -503,10 +456,8 @@ PHP_METHOD(Phalcon_Storage_Adapter_Weak, set) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(ttl) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &key_param, &value, &ttl); if (UNEXPECTED(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'key' must be of the type string")); @@ -521,8 +472,6 @@ PHP_METHOD(Phalcon_Storage_Adapter_Weak, set) ttl = &ttl_sub; ttl = &__$null; } - - if (Z_TYPE_P(value) != IS_OBJECT) { RETURN_MM_BOOL(0); } @@ -554,20 +503,14 @@ PHP_METHOD(Phalcon_Storage_Adapter_Weak, setForever) ZVAL_UNDEF(&key); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(key) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &key_param, &value); zephir_get_strval(&key, key_param); - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "set", NULL, 0, &key, value); zephir_check_call_status(); RETURN_MM(); @@ -582,22 +525,15 @@ PHP_METHOD(Phalcon_Storage_Adapter_Weak, setDefaultSerializer) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *serializer_param = NULL; zval serializer; - zval *this_ptr = getThis(); ZVAL_UNDEF(&serializer); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(serializer) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &serializer_param); zephir_get_strval(&serializer, serializer_param); - - } zend_object *zephir_init_properties_Phalcon_Storage_Adapter_Weak(zend_class_entry *class_type) @@ -610,7 +546,8 @@ zend_object *zephir_init_properties_Phalcon_Storage_Adapter_Weak(zend_class_entr ZVAL_UNDEF(&_3$$4); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/storage/adapter/weak.zep.h b/ext/phalcon/storage/adapter/weak.zep.h index cf076552587..705d6f70252 100644 --- a/ext/phalcon/storage/adapter/weak.zep.h +++ b/ext/phalcon/storage/adapter/weak.zep.h @@ -18,11 +18,7 @@ zend_object *zephir_init_properties_Phalcon_Storage_Adapter_Weak(zend_class_entr ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_storage_adapter_weak___construct, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, factory, Phalcon\\Storage\\SerializerFactory, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_storage_adapter_weak_clear, 0, 0, _IS_BOOL, 0) diff --git a/ext/phalcon/storage/adapterfactory.zep.c b/ext/phalcon/storage/adapterfactory.zep.c index ecc146be7d2..d635325e70c 100644 --- a/ext/phalcon/storage/adapterfactory.zep.c +++ b/ext/phalcon/storage/adapterfactory.zep.c @@ -53,17 +53,13 @@ PHP_METHOD(Phalcon_Storage_AdapterFactory, __construct) ZVAL_UNDEF(&factory_sub); ZVAL_UNDEF(&services); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_OBJECT_OF_CLASS(factory, phalcon_storage_serializerfactory_ce) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(services) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &factory, &services_param); if (!services_param) { ZEPHIR_INIT_VAR(&services); @@ -71,8 +67,6 @@ PHP_METHOD(Phalcon_Storage_AdapterFactory, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&services, services_param); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("serializerFactory"), factory); ZEPHIR_CALL_METHOD(NULL, this_ptr, "init", NULL, 0, &services); zephir_check_call_status(); @@ -120,17 +114,13 @@ PHP_METHOD(Phalcon_Storage_AdapterFactory, newInstance) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&options); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(name) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &name_param, &options_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")); @@ -147,13 +137,11 @@ PHP_METHOD(Phalcon_Storage_AdapterFactory, newInstance) } else { ZEPHIR_OBS_COPY_OR_DUP(&options, options_param); } - - ZEPHIR_CALL_METHOD(&definition, this_ptr, "getservice", NULL, 0, &name); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_0); zephir_create_array(&_0, 2, 0); - ZEPHIR_OBS_VAR(&_1); + zephir_memory_observe(&_1); zephir_read_property(&_1, this_ptr, ZEND_STRL("serializerFactory"), PH_NOISY_CC); zephir_array_fast_append(&_0, &_1); zephir_array_fast_append(&_0, &options); @@ -167,9 +155,6 @@ PHP_METHOD(Phalcon_Storage_AdapterFactory, newInstance) */ PHP_METHOD(Phalcon_Storage_AdapterFactory, getExceptionClass) { - zval *this_ptr = getThis(); - - RETURN_STRING("Phalcon\\Storage\\Exception"); } @@ -181,9 +166,6 @@ PHP_METHOD(Phalcon_Storage_AdapterFactory, getExceptionClass) */ PHP_METHOD(Phalcon_Storage_AdapterFactory, getServices) { - zval *this_ptr = getThis(); - - zephir_create_array(return_value, 6, 0); add_assoc_stringl_ex(return_value, SL("apcu"), SL("Phalcon\\Storage\\Adapter\\Apcu")); diff --git a/ext/phalcon/storage/adapterfactory.zep.h b/ext/phalcon/storage/adapterfactory.zep.h index 16241da1a45..3d2b9942633 100644 --- a/ext/phalcon/storage/adapterfactory.zep.h +++ b/ext/phalcon/storage/adapterfactory.zep.h @@ -10,20 +10,12 @@ PHP_METHOD(Phalcon_Storage_AdapterFactory, getServices); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_storage_adapterfactory___construct, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, factory, Phalcon\\Storage\\SerializerFactory, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, services, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, services, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, services, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_storage_adapterfactory_newinstance, 0, 1, Phalcon\\Storage\\Adapter\\AdapterInterface, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_storage_adapterfactory_getexceptionclass, 0, 0, IS_STRING, 0) diff --git a/ext/phalcon/storage/serializer/abstractserializer.zep.c b/ext/phalcon/storage/serializer/abstractserializer.zep.c index 8cb95eab310..fed1f563b05 100644 --- a/ext/phalcon/storage/serializer/abstractserializer.zep.c +++ b/ext/phalcon/storage/serializer/abstractserializer.zep.c @@ -60,23 +60,18 @@ PHP_METHOD(Phalcon_Storage_Serializer_AbstractSerializer, __construct) ZVAL_UNDEF(&data_sub); ZVAL_NULL(&__$null); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &data); if (!data) { data = &data_sub; data = &__$null; } - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "setdata", NULL, 0, data); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); @@ -92,11 +87,10 @@ PHP_METHOD(Phalcon_Storage_Serializer_AbstractSerializer, __serialize) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_OBS_VAR(&_0); + zephir_memory_observe(&_0); zephir_read_property(&_0, this_ptr, ZEND_STRL("data"), PH_NOISY_CC); if (Z_TYPE_P(&_0) == IS_ARRAY) { RETURN_MM_MEMBER(getThis(), "data"); @@ -116,19 +110,13 @@ PHP_METHOD(Phalcon_Storage_Serializer_AbstractSerializer, __unserialize) zval *this_ptr = getThis(); ZVAL_UNDEF(&data); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &data_param); zephir_get_arrval(&data, data_param); - - zephir_update_property_zval(this_ptr, ZEND_STRL("data"), &data); ZEPHIR_MM_RESTORE(); } @@ -138,9 +126,6 @@ PHP_METHOD(Phalcon_Storage_Serializer_AbstractSerializer, __unserialize) */ PHP_METHOD(Phalcon_Storage_Serializer_AbstractSerializer, getData) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "data"); } @@ -153,9 +138,6 @@ PHP_METHOD(Phalcon_Storage_Serializer_AbstractSerializer, getData) */ PHP_METHOD(Phalcon_Storage_Serializer_AbstractSerializer, isSuccess) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "isSuccess"); } @@ -169,17 +151,10 @@ PHP_METHOD(Phalcon_Storage_Serializer_AbstractSerializer, setData) zval *this_ptr = getThis(); ZVAL_UNDEF(&data_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &data); - - zephir_update_property_zval(this_ptr, ZEND_STRL("data"), data); } @@ -194,20 +169,12 @@ PHP_METHOD(Phalcon_Storage_Serializer_AbstractSerializer, isSerializable) { zend_bool _0, _1; zval *data, data_sub; - zval *this_ptr = getThis(); ZVAL_UNDEF(&data_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &data); - - _0 = Z_TYPE_P(data) == IS_NULL; if (!(_0)) { _0 = 1 == (Z_TYPE_P(data) == IS_TRUE || Z_TYPE_P(data) == IS_FALSE); diff --git a/ext/phalcon/storage/serializer/abstractserializer.zep.h b/ext/phalcon/storage/serializer/abstractserializer.zep.h index a7d7e2ebaa6..fa59e1a2adb 100644 --- a/ext/phalcon/storage/serializer/abstractserializer.zep.h +++ b/ext/phalcon/storage/serializer/abstractserializer.zep.h @@ -42,11 +42,7 @@ ZEPHIR_INIT_FUNCS(phalcon_storage_serializer_abstractserializer_method_entry) { PHP_ME(Phalcon_Storage_Serializer_AbstractSerializer, __construct, arginfo_phalcon_storage_serializer_abstractserializer___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) PHP_ME(Phalcon_Storage_Serializer_AbstractSerializer, __serialize, arginfo_phalcon_storage_serializer_abstractserializer___serialize, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Storage_Serializer_AbstractSerializer, __unserialize, arginfo_phalcon_storage_serializer_abstractserializer___unserialize, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Storage_Serializer_AbstractSerializer, getData, arginfo_phalcon_storage_serializer_abstractserializer_getdata, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Storage_Serializer_AbstractSerializer, getData, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Storage_Serializer_AbstractSerializer, getData, arginfo_phalcon_storage_serializer_abstractserializer_getdata, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Storage_Serializer_AbstractSerializer, isSuccess, arginfo_phalcon_storage_serializer_abstractserializer_issuccess, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Storage_Serializer_AbstractSerializer, setData, arginfo_phalcon_storage_serializer_abstractserializer_setdata, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Storage_Serializer_AbstractSerializer, isSerializable, arginfo_phalcon_storage_serializer_abstractserializer_isserializable, ZEND_ACC_PROTECTED) diff --git a/ext/phalcon/storage/serializer/base64.zep.c b/ext/phalcon/storage/serializer/base64.zep.c index fe2d85693ce..4c6a1b3d49d 100644 --- a/ext/phalcon/storage/serializer/base64.zep.c +++ b/ext/phalcon/storage/serializer/base64.zep.c @@ -49,18 +49,17 @@ PHP_METHOD(Phalcon_Storage_Serializer_Base64, serialize) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_OBS_VAR(&_0); + zephir_memory_observe(&_0); zephir_read_property(&_0, this_ptr, ZEND_STRL("data"), PH_NOISY_CC); if (Z_TYPE_P(&_0) != IS_STRING) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(spl_ce_InvalidArgumentException, "Data for the serializer must of type string", "phalcon/Storage/Serializer/Base64.zep", 27); return; } zephir_read_property(&_1, this_ptr, ZEND_STRL("data"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_RETURN_CALL_FUNCTION("base64_encode", NULL, 230, &_1); + ZEPHIR_RETURN_CALL_FUNCTION("base64_encode", NULL, 231, &_1); zephir_check_call_status(); RETURN_MM(); } @@ -86,18 +85,12 @@ PHP_METHOD(Phalcon_Storage_Serializer_Base64, unserialize) ZVAL_UNDEF(&result); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &data); - - ZEPHIR_INIT_VAR(&_0); zephir_gettype(&_0, data); if (!ZEPHIR_IS_STRING_IDENTICAL(&_0, "string")) { @@ -141,32 +134,24 @@ PHP_METHOD(Phalcon_Storage_Serializer_Base64, phpBase64Decode) zend_bool strict; zval *input_param = NULL, *strict_param = NULL, _0; zval input; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(input) Z_PARAM_OPTIONAL Z_PARAM_BOOL(strict) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &input_param, &strict_param); zephir_get_strval(&input, input_param); if (!strict_param) { strict = 0; } else { - strict = zephir_get_boolval(strict_param); - } - - + } ZVAL_BOOL(&_0, (strict ? 1 : 0)); - ZEPHIR_RETURN_CALL_FUNCTION("base64_decode", NULL, 229, &input, &_0); + ZEPHIR_RETURN_CALL_FUNCTION("base64_decode", NULL, 230, &input, &_0); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/storage/serializer/base64.zep.h b/ext/phalcon/storage/serializer/base64.zep.h index fc6c36350a3..db588a01d24 100644 --- a/ext/phalcon/storage/serializer/base64.zep.h +++ b/ext/phalcon/storage/serializer/base64.zep.h @@ -10,15 +10,10 @@ PHP_METHOD(Phalcon_Storage_Serializer_Base64, phpBase64Decode); ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_storage_serializer_base64_serialize, 0, 0, IS_STRING, 0) ZEND_END_ARG_INFO() -#if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_storage_serializer_base64_unserialize, 0, 1, IS_VOID, 0) - ZEND_ARG_TYPE_INFO(0, serialized, IS_STRING, 0) -ZEND_END_ARG_INFO() -#else -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_storage_serializer_base64_unserialize, 0, 1, IS_VOID, 0) - ZEND_ARG_INFO(0, serialized) + + ZEND_ARG_INFO(0, data) ZEND_END_ARG_INFO() -#endif ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_storage_serializer_base64_phpbase64decode, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, input, IS_STRING, 0) diff --git a/ext/phalcon/storage/serializer/igbinary.zep.c b/ext/phalcon/storage/serializer/igbinary.zep.c index 6e530fc3b31..8cc7d8194b9 100644 --- a/ext/phalcon/storage/serializer/igbinary.zep.c +++ b/ext/phalcon/storage/serializer/igbinary.zep.c @@ -51,9 +51,8 @@ PHP_METHOD(Phalcon_Storage_Serializer_Igbinary, serialize) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_1, this_ptr, ZEND_STRL("data"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&_0, this_ptr, "isserializable", NULL, 0, &_1); @@ -111,50 +110,44 @@ PHP_METHOD(Phalcon_Storage_Serializer_Igbinary, unserialize) ZVAL_UNDEF(&_5$$5); ZVAL_UNDEF(&_6$$6); ZVAL_UNDEF(&_7$$6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &data); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "isserializable", NULL, 0, data); zephir_check_call_status(); if (!ZEPHIR_IS_TRUE_IDENTICAL(&_0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("data"), data); } else { - ZEPHIR_CALL_FUNCTION(&version, "phpversion", NULL, 132); + ZEPHIR_CALL_FUNCTION(&version, "phpversion", NULL, 133); zephir_check_call_status(); ZEPHIR_GLOBAL(warning).enable = zend_is_true(&__$false); ZEPHIR_INIT_VAR(&_1$$4); ZVAL_STRING(&_1$$4, "8.0"); ZEPHIR_INIT_VAR(&_2$$4); ZVAL_STRING(&_2$$4, ">="); - ZEPHIR_CALL_FUNCTION(&_3$$4, "version_compare", NULL, 133, &version, &_1$$4, &_2$$4); + ZEPHIR_CALL_FUNCTION(&_3$$4, "version_compare", NULL, 134, &version, &_1$$4, &_2$$4); zephir_check_call_status(); if (zephir_is_true(&_3$$4)) { ZEPHIR_INIT_VAR(&_4$$5); ZEPHIR_INIT_NVAR(&_4$$5); zephir_create_closure_ex(&_4$$5, NULL, phalcon_3__closure_ce, SL("__invoke")); ZVAL_LONG(&_5$$5, 2); - ZEPHIR_CALL_FUNCTION(NULL, "set_error_handler", NULL, 134, &_4$$5, &_5$$5); + ZEPHIR_CALL_FUNCTION(NULL, "set_error_handler", NULL, 135, &_4$$5, &_5$$5); zephir_check_call_status(); } else { ZEPHIR_INIT_VAR(&_6$$6); ZEPHIR_INIT_NVAR(&_6$$6); zephir_create_closure_ex(&_6$$6, NULL, phalcon_4__closure_ce, SL("__invoke")); ZVAL_LONG(&_7$$6, 2); - ZEPHIR_CALL_FUNCTION(NULL, "set_error_handler", NULL, 134, &_6$$6, &_7$$6); + ZEPHIR_CALL_FUNCTION(NULL, "set_error_handler", NULL, 135, &_6$$6, &_7$$6); zephir_check_call_status(); } ZEPHIR_CALL_METHOD(&result, this_ptr, "dounserialize", NULL, 0, data); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(NULL, "restore_error_handler", NULL, 135); + ZEPHIR_CALL_FUNCTION(NULL, "restore_error_handler", NULL, 136); zephir_check_call_status(); _8$$4 = ZEPHIR_GLOBAL(warning).enable; if (!(_8$$4)) { @@ -192,22 +185,15 @@ PHP_METHOD(Phalcon_Storage_Serializer_Igbinary, phpIgbinarySerialize) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *value, value_sub; - zval *this_ptr = getThis(); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &value); - - - ZEPHIR_RETURN_CALL_FUNCTION("igbinary_serialize", NULL, 140, value); + ZEPHIR_RETURN_CALL_FUNCTION("igbinary_serialize", NULL, 141, value); zephir_check_call_status(); RETURN_MM(); } @@ -227,18 +213,12 @@ PHP_METHOD(Phalcon_Storage_Serializer_Igbinary, doSerialize) zval *this_ptr = getThis(); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &value); - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "phpigbinaryserialize", NULL, 0, value); zephir_check_call_status(); RETURN_MM(); @@ -256,22 +236,15 @@ PHP_METHOD(Phalcon_Storage_Serializer_Igbinary, doUnserialize) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *value, value_sub; - zval *this_ptr = getThis(); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &value); - - - ZEPHIR_RETURN_CALL_FUNCTION("igbinary_unserialize", NULL, 141, value); + ZEPHIR_RETURN_CALL_FUNCTION("igbinary_unserialize", NULL, 142, value); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/storage/serializer/igbinary.zep.h b/ext/phalcon/storage/serializer/igbinary.zep.h index 4f388c5afc0..16f82dbdf99 100644 --- a/ext/phalcon/storage/serializer/igbinary.zep.h +++ b/ext/phalcon/storage/serializer/igbinary.zep.h @@ -12,15 +12,10 @@ PHP_METHOD(Phalcon_Storage_Serializer_Igbinary, doUnserialize); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_storage_serializer_igbinary_serialize, 0, 0, 0) ZEND_END_ARG_INFO() -#if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_storage_serializer_igbinary_unserialize, 0, 1, IS_VOID, 0) - ZEND_ARG_TYPE_INFO(0, serialized, IS_STRING, 0) -ZEND_END_ARG_INFO() -#else -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_storage_serializer_igbinary_unserialize, 0, 1, IS_VOID, 0) - ZEND_ARG_INFO(0, serialized) + + ZEND_ARG_INFO(0, data) ZEND_END_ARG_INFO() -#endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_storage_serializer_igbinary_phpigbinaryserialize, 0, 1, IS_STRING, 1) ZEND_ARG_INFO(0, value) @@ -35,11 +30,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_storage_serializer_igbinary_dounserialize ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_storage_serializer_igbinary_method_entry) { -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Storage_Serializer_Igbinary, serialize, arginfo_phalcon_storage_serializer_igbinary_serialize, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Storage_Serializer_Igbinary, serialize, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Storage_Serializer_Igbinary, serialize, arginfo_phalcon_storage_serializer_igbinary_serialize, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Storage_Serializer_Igbinary, unserialize, arginfo_phalcon_storage_serializer_igbinary_unserialize, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Storage_Serializer_Igbinary, phpIgbinarySerialize, arginfo_phalcon_storage_serializer_igbinary_phpigbinaryserialize, ZEND_ACC_PROTECTED) PHP_ME(Phalcon_Storage_Serializer_Igbinary, doSerialize, arginfo_phalcon_storage_serializer_igbinary_doserialize, ZEND_ACC_PROTECTED) diff --git a/ext/phalcon/storage/serializer/json.zep.c b/ext/phalcon/storage/serializer/json.zep.c index 18da4b9e578..87c8eee1e9f 100644 --- a/ext/phalcon/storage/serializer/json.zep.c +++ b/ext/phalcon/storage/serializer/json.zep.c @@ -52,7 +52,6 @@ ZEPHIR_INIT_CLASS(Phalcon_Storage_Serializer_Json) PHP_METHOD(Phalcon_Storage_Serializer_Json, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zephir_fcall_cache_entry *_2 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *data = NULL, data_sub, __$null, _0, _1; zval *this_ptr = getThis(); @@ -61,23 +60,18 @@ PHP_METHOD(Phalcon_Storage_Serializer_Json, __construct) ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &data); if (!data) { data = &data_sub; data = &__$null; } - - ZEPHIR_INIT_VAR(&_0); object_init_ex(&_0, phalcon_support_helper_json_encode_ce); if (zephir_has_constructor(&_0)) { @@ -94,7 +88,7 @@ PHP_METHOD(Phalcon_Storage_Serializer_Json, __construct) } zephir_update_property_zval(this_ptr, ZEND_STRL("decode"), &_1); - ZEPHIR_CALL_PARENT(NULL, phalcon_storage_serializer_json_ce, getThis(), "__construct", &_2, 0, data); + ZEPHIR_CALL_PARENT(NULL, phalcon_storage_serializer_json_ce, getThis(), "__construct", NULL, 0, data); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -121,15 +115,14 @@ PHP_METHOD(Phalcon_Storage_Serializer_Json, serialize) ZVAL_UNDEF(&_8); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$3); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_OBS_VAR(&_0); + zephir_memory_observe(&_0); zephir_read_property(&_0, this_ptr, ZEND_STRL("data"), PH_NOISY_CC); _1 = Z_TYPE_P(&_0) == IS_OBJECT; if (_1) { - ZEPHIR_OBS_VAR(&_2); + zephir_memory_observe(&_2); zephir_read_property(&_2, this_ptr, ZEND_STRL("data"), PH_NOISY_CC); _1 = !(zephir_is_instance_of(&_2, SL("JsonSerializable"))); } @@ -138,7 +131,7 @@ PHP_METHOD(Phalcon_Storage_Serializer_Json, serialize) object_init_ex(&_3$$3, spl_ce_InvalidArgumentException); ZEPHIR_INIT_VAR(&_4$$3); ZEPHIR_CONCAT_SS(&_4$$3, "Data for the JSON serializer cannot be of type 'object' ", "without implementing 'JsonSerializable'"); - ZEPHIR_CALL_METHOD(NULL, &_3$$3, "__construct", NULL, 199, &_4$$3); + ZEPHIR_CALL_METHOD(NULL, &_3$$3, "__construct", NULL, 200, &_4$$3); zephir_check_call_status(); zephir_throw_exception_debug(&_3$$3, "phalcon/Storage/Serializer/Json.zep", 54); ZEPHIR_MM_RESTORE(); @@ -176,18 +169,12 @@ PHP_METHOD(Phalcon_Storage_Serializer_Json, unserialize) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$4); ZVAL_UNDEF(&_2$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &data); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "isserializable", NULL, 0, data); zephir_check_call_status(); if (!ZEPHIR_IS_TRUE_IDENTICAL(&_0)) { diff --git a/ext/phalcon/storage/serializer/json.zep.h b/ext/phalcon/storage/serializer/json.zep.h index 2a0d2e97db3..359df9b4553 100644 --- a/ext/phalcon/storage/serializer/json.zep.h +++ b/ext/phalcon/storage/serializer/json.zep.h @@ -14,23 +14,14 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_storage_serializer_json_serialize, 0, 0, 0) ZEND_END_ARG_INFO() -#if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_storage_serializer_json_unserialize, 0, 1, IS_VOID, 0) - ZEND_ARG_TYPE_INFO(0, serialized, IS_STRING, 0) -ZEND_END_ARG_INFO() -#else -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_storage_serializer_json_unserialize, 0, 1, IS_VOID, 0) - ZEND_ARG_INFO(0, serialized) + + ZEND_ARG_INFO(0, data) ZEND_END_ARG_INFO() -#endif ZEPHIR_INIT_FUNCS(phalcon_storage_serializer_json_method_entry) { PHP_ME(Phalcon_Storage_Serializer_Json, __construct, arginfo_phalcon_storage_serializer_json___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Storage_Serializer_Json, serialize, arginfo_phalcon_storage_serializer_json_serialize, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Storage_Serializer_Json, serialize, NULL, ZEND_ACC_PUBLIC) -#endif +PHP_ME(Phalcon_Storage_Serializer_Json, serialize, arginfo_phalcon_storage_serializer_json_serialize, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Storage_Serializer_Json, unserialize, arginfo_phalcon_storage_serializer_json_unserialize, ZEND_ACC_PUBLIC) PHP_FE_END }; diff --git a/ext/phalcon/storage/serializer/msgpack.zep.c b/ext/phalcon/storage/serializer/msgpack.zep.c index b459111035e..a817722235d 100644 --- a/ext/phalcon/storage/serializer/msgpack.zep.c +++ b/ext/phalcon/storage/serializer/msgpack.zep.c @@ -46,18 +46,12 @@ PHP_METHOD(Phalcon_Storage_Serializer_Msgpack, doSerialize) ZVAL_UNDEF(&value_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &value); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("data"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_FUNCTION("msgpack_pack", NULL, 0, &_0); zephir_check_call_status(); @@ -74,21 +68,14 @@ PHP_METHOD(Phalcon_Storage_Serializer_Msgpack, doUnserialize) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *value, value_sub; - zval *this_ptr = getThis(); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &value); - - ZEPHIR_RETURN_CALL_FUNCTION("msgpack_unpack", NULL, 0, value); zephir_check_call_status(); RETURN_MM(); diff --git a/ext/phalcon/storage/serializer/none.zep.c b/ext/phalcon/storage/serializer/none.zep.c index 9c7c5160f26..81e35ec391e 100644 --- a/ext/phalcon/storage/serializer/none.zep.c +++ b/ext/phalcon/storage/serializer/none.zep.c @@ -38,9 +38,6 @@ ZEPHIR_INIT_CLASS(Phalcon_Storage_Serializer_None) */ PHP_METHOD(Phalcon_Storage_Serializer_None, serialize) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "data"); } @@ -59,17 +56,10 @@ PHP_METHOD(Phalcon_Storage_Serializer_None, unserialize) zval *this_ptr = getThis(); ZVAL_UNDEF(&data_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &data); - - zephir_update_property_zval(this_ptr, ZEND_STRL("data"), data); } diff --git a/ext/phalcon/storage/serializer/none.zep.h b/ext/phalcon/storage/serializer/none.zep.h index a8b9cbf0bdd..9c962a1738b 100644 --- a/ext/phalcon/storage/serializer/none.zep.h +++ b/ext/phalcon/storage/serializer/none.zep.h @@ -6,22 +6,13 @@ ZEPHIR_INIT_CLASS(Phalcon_Storage_Serializer_None); PHP_METHOD(Phalcon_Storage_Serializer_None, serialize); PHP_METHOD(Phalcon_Storage_Serializer_None, unserialize); -#if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_storage_serializer_none_serialize, 0, 0, IS_MIXED, 0) -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_storage_serializer_none_serialize, 0, 0, 0) -#endif ZEND_END_ARG_INFO() -#if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_storage_serializer_none_unserialize, 0, 1, IS_VOID, 0) - ZEND_ARG_TYPE_INFO(0, serialized, IS_STRING, 0) -ZEND_END_ARG_INFO() -#else -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_storage_serializer_none_unserialize, 0, 1, IS_VOID, 0) - ZEND_ARG_INFO(0, serialized) + + ZEND_ARG_INFO(0, data) ZEND_END_ARG_INFO() -#endif ZEPHIR_INIT_FUNCS(phalcon_storage_serializer_none_method_entry) { PHP_ME(Phalcon_Storage_Serializer_None, serialize, arginfo_phalcon_storage_serializer_none_serialize, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/storage/serializer/php.zep.c b/ext/phalcon/storage/serializer/php.zep.c index 65b7d83c071..2a7572aa58b 100644 --- a/ext/phalcon/storage/serializer/php.zep.c +++ b/ext/phalcon/storage/serializer/php.zep.c @@ -48,9 +48,8 @@ PHP_METHOD(Phalcon_Storage_Serializer_Php, serialize) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_1, this_ptr, ZEND_STRL("data"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CALL_METHOD(&_0, this_ptr, "isserializable", NULL, 0, &_1); @@ -91,51 +90,45 @@ PHP_METHOD(Phalcon_Storage_Serializer_Php, unserialize) ZVAL_UNDEF(&_5$$4); ZVAL_UNDEF(&_6$$5); ZVAL_UNDEF(&_7$$5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &data); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "isserializable", NULL, 0, data); zephir_check_call_status(); if (!ZEPHIR_IS_TRUE_IDENTICAL(&_0)) { zephir_update_property_zval(this_ptr, ZEND_STRL("data"), data); RETURN_MM_NULL(); } - ZEPHIR_CALL_FUNCTION(&version, "phpversion", NULL, 132); + ZEPHIR_CALL_FUNCTION(&version, "phpversion", NULL, 133); zephir_check_call_status(); ZEPHIR_GLOBAL(warning).enable = zend_is_true(&__$false); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "8.0"); ZEPHIR_INIT_VAR(&_2); ZVAL_STRING(&_2, ">="); - ZEPHIR_CALL_FUNCTION(&_3, "version_compare", NULL, 133, &version, &_1, &_2); + ZEPHIR_CALL_FUNCTION(&_3, "version_compare", NULL, 134, &version, &_1, &_2); zephir_check_call_status(); if (zephir_is_true(&_3)) { ZEPHIR_INIT_VAR(&_4$$4); ZEPHIR_INIT_NVAR(&_4$$4); zephir_create_closure_ex(&_4$$4, NULL, phalcon_11__closure_ce, SL("__invoke")); ZVAL_LONG(&_5$$4, 8); - ZEPHIR_CALL_FUNCTION(NULL, "set_error_handler", NULL, 134, &_4$$4, &_5$$4); + ZEPHIR_CALL_FUNCTION(NULL, "set_error_handler", NULL, 135, &_4$$4, &_5$$4); zephir_check_call_status(); } else { ZEPHIR_INIT_VAR(&_6$$5); ZEPHIR_INIT_NVAR(&_6$$5); zephir_create_closure_ex(&_6$$5, NULL, phalcon_12__closure_ce, SL("__invoke")); ZVAL_LONG(&_7$$5, 8); - ZEPHIR_CALL_FUNCTION(NULL, "set_error_handler", NULL, 134, &_6$$5, &_7$$5); + ZEPHIR_CALL_FUNCTION(NULL, "set_error_handler", NULL, 135, &_6$$5, &_7$$5); zephir_check_call_status(); } ZEPHIR_CALL_METHOD(&result, this_ptr, "phpunserialize", NULL, 0, data); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(NULL, "restore_error_handler", NULL, 135); + ZEPHIR_CALL_FUNCTION(NULL, "restore_error_handler", NULL, 136); zephir_check_call_status(); _8 = ZEPHIR_GLOBAL(warning).enable; if (!(_8)) { @@ -173,21 +166,16 @@ PHP_METHOD(Phalcon_Storage_Serializer_Php, phpUnserialize) zval options; zval *data_param = NULL, *options_param = NULL; zval data; - zval *this_ptr = getThis(); ZVAL_UNDEF(&data); ZVAL_UNDEF(&options); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(data) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &data_param, &options_param); zephir_get_strval(&data, data_param); if (!options_param) { @@ -196,8 +184,6 @@ PHP_METHOD(Phalcon_Storage_Serializer_Php, phpUnserialize) } else { zephir_get_arrval(&options, options_param); } - - ZEPHIR_RETURN_CALL_FUNCTION("unserialize", NULL, 16, &data, &options); zephir_check_call_status(); RETURN_MM(); diff --git a/ext/phalcon/storage/serializer/php.zep.h b/ext/phalcon/storage/serializer/php.zep.h index e08b0daf6d9..091d8f78142 100644 --- a/ext/phalcon/storage/serializer/php.zep.h +++ b/ext/phalcon/storage/serializer/php.zep.h @@ -10,27 +10,14 @@ PHP_METHOD(Phalcon_Storage_Serializer_Php, phpUnserialize); ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_storage_serializer_php_serialize, 0, 0, IS_STRING, 0) ZEND_END_ARG_INFO() -#if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_storage_serializer_php_unserialize, 0, 1, IS_VOID, 0) - ZEND_ARG_TYPE_INFO(0, serialized, IS_STRING, 0) -ZEND_END_ARG_INFO() -#else -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_storage_serializer_php_unserialize, 0, 1, IS_VOID, 0) - ZEND_ARG_INFO(0, serialized) + + ZEND_ARG_INFO(0, data) ZEND_END_ARG_INFO() -#endif -#if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_storage_serializer_php_phpunserialize, 0, 1, IS_MIXED, 0) -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_storage_serializer_php_phpunserialize, 0, 0, 1) -#endif ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, options, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_storage_serializer_php_method_entry) { diff --git a/ext/phalcon/storage/serializerfactory.zep.c b/ext/phalcon/storage/serializerfactory.zep.c index 235cd28744a..9c2f4172780 100644 --- a/ext/phalcon/storage/serializerfactory.zep.c +++ b/ext/phalcon/storage/serializerfactory.zep.c @@ -50,16 +50,12 @@ PHP_METHOD(Phalcon_Storage_SerializerFactory, __construct) zval *this_ptr = getThis(); ZVAL_UNDEF(&services); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(services) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &services_param); if (!services_param) { ZEPHIR_INIT_VAR(&services); @@ -67,8 +63,6 @@ PHP_METHOD(Phalcon_Storage_SerializerFactory, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&services, services_param); } - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "init", NULL, 0, &services); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); @@ -90,15 +84,11 @@ PHP_METHOD(Phalcon_Storage_SerializerFactory, newInstance) ZVAL_UNDEF(&name); ZVAL_UNDEF(&definition); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); 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")); @@ -109,8 +99,6 @@ PHP_METHOD(Phalcon_Storage_SerializerFactory, newInstance) } else { ZEPHIR_INIT_VAR(&name); } - - ZEPHIR_CALL_METHOD(&definition, this_ptr, "getservice", NULL, 0, &name); zephir_check_call_status(); ZEPHIR_LAST_CALL_STATUS = zephir_create_instance(return_value, &definition); @@ -123,9 +111,6 @@ PHP_METHOD(Phalcon_Storage_SerializerFactory, newInstance) */ PHP_METHOD(Phalcon_Storage_SerializerFactory, getExceptionClass) { - zval *this_ptr = getThis(); - - RETURN_STRING("Phalcon\\Storage\\Exception"); } @@ -137,9 +122,6 @@ PHP_METHOD(Phalcon_Storage_SerializerFactory, getExceptionClass) */ PHP_METHOD(Phalcon_Storage_SerializerFactory, getServices) { - zval *this_ptr = getThis(); - - zephir_create_array(return_value, 14, 0); add_assoc_stringl_ex(return_value, SL("base64"), SL("Phalcon\\Storage\\Serializer\\Base64")); diff --git a/ext/phalcon/storage/serializerfactory.zep.h b/ext/phalcon/storage/serializerfactory.zep.h index b464a25ef44..eb93bf6a8fe 100644 --- a/ext/phalcon/storage/serializerfactory.zep.h +++ b/ext/phalcon/storage/serializerfactory.zep.h @@ -9,11 +9,7 @@ PHP_METHOD(Phalcon_Storage_SerializerFactory, getExceptionClass); PHP_METHOD(Phalcon_Storage_SerializerFactory, getServices); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_storage_serializerfactory___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, services, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, services, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, services, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_storage_serializerfactory_newinstance, 0, 1, Phalcon\\Storage\\Serializer\\SerializerInterface, 0) diff --git a/ext/phalcon/support/collection.zep.c b/ext/phalcon/support/collection.zep.c index 7ee474cc157..82a8933585d 100644 --- a/ext/phalcon/support/collection.zep.c +++ b/ext/phalcon/support/collection.zep.c @@ -90,17 +90,13 @@ PHP_METHOD(Phalcon_Support_Collection, __construct) ZVAL_UNDEF(&data); ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(data) Z_PARAM_BOOL(insensitive) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 2, &data_param, &insensitive_param); if (!data_param) { ZEPHIR_INIT_VAR(&data); @@ -111,10 +107,7 @@ PHP_METHOD(Phalcon_Support_Collection, __construct) if (!insensitive_param) { insensitive = 1; } else { - insensitive = zephir_get_boolval(insensitive_param); - } - - + } if (insensitive) { zephir_update_property_zval(this_ptr, ZEND_STRL("insensitive"), &__$true); } else { @@ -137,19 +130,13 @@ PHP_METHOD(Phalcon_Support_Collection, __get) zval *this_ptr = getThis(); ZVAL_UNDEF(&element); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(element) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &element_param); zephir_get_strval(&element, element_param); - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "get", NULL, 0, &element); zephir_check_call_status(); RETURN_MM(); @@ -167,19 +154,13 @@ PHP_METHOD(Phalcon_Support_Collection, __isset) zval *this_ptr = getThis(); ZVAL_UNDEF(&element); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(element) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &element_param); zephir_get_strval(&element, element_param); - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "has", NULL, 0, &element); zephir_check_call_status(); RETURN_MM(); @@ -198,20 +179,14 @@ PHP_METHOD(Phalcon_Support_Collection, __set) ZVAL_UNDEF(&element); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(element) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &element_param, &value); zephir_get_strval(&element, element_param); - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "set", NULL, 0, &element, value); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); @@ -229,19 +204,13 @@ PHP_METHOD(Phalcon_Support_Collection, __unset) zval *this_ptr = getThis(); ZVAL_UNDEF(&element); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(element) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &element_param); zephir_get_strval(&element, element_param); - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "remove", NULL, 0, &element); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); @@ -258,9 +227,8 @@ PHP_METHOD(Phalcon_Support_Collection, clear) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); array_init(&_0); @@ -281,9 +249,6 @@ PHP_METHOD(Phalcon_Support_Collection, count) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - zephir_read_property(&_0, this_ptr, ZEND_STRL("data"), PH_NOISY_CC | PH_READONLY); RETURN_LONG(zephir_fast_count_int(&_0)); } @@ -309,7 +274,6 @@ PHP_METHOD(Phalcon_Support_Collection, get) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(element) @@ -317,10 +281,8 @@ PHP_METHOD(Phalcon_Support_Collection, get) Z_PARAM_ZVAL_OR_NULL(defaultValue) Z_PARAM_STR_OR_NULL(cast) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &element_param, &defaultValue, &cast_param); zephir_get_strval(&element, element_param); if (!defaultValue) { @@ -340,8 +302,6 @@ PHP_METHOD(Phalcon_Support_Collection, get) ZEPHIR_INIT_VAR(&cast); } } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "processkey", NULL, 0, &element); zephir_check_call_status(); zephir_get_strval(&element, &_0); @@ -351,10 +311,10 @@ PHP_METHOD(Phalcon_Support_Collection, get) RETURN_MM(); } zephir_read_property(&_2, this_ptr, ZEND_STRL("lowerKeys"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_OBS_VAR(&key); + zephir_memory_observe(&key); zephir_array_fetch(&key, &_2, &element, PH_NOISY, "phalcon/Support/Collection.zep", 140); zephir_read_property(&_3, this_ptr, ZEND_STRL("data"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_OBS_VAR(&value); + zephir_memory_observe(&value); zephir_array_fetch(&value, &_3, &key, PH_NOISY, "phalcon/Support/Collection.zep", 141); if (UNEXPECTED((Z_TYPE_P(&value) == IS_NULL))) { RETVAL_ZVAL(defaultValue, 1, 0); @@ -380,9 +340,8 @@ PHP_METHOD(Phalcon_Support_Collection, getIterator) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); object_init_ex(return_value, spl_ce_ArrayIterator); zephir_read_property(&_0, this_ptr, ZEND_STRL("data"), PH_NOISY_CC | PH_READONLY); @@ -404,24 +363,17 @@ PHP_METHOD(Phalcon_Support_Collection, getKeys) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&collection); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_BOOL(insensitive) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &insensitive_param); if (!insensitive_param) { insensitive = 1; } else { - insensitive = zephir_get_boolval(insensitive_param); - } - - + } ZEPHIR_INIT_VAR(&_0); if (insensitive == 1) { ZEPHIR_OBS_NVAR(&_0); @@ -446,9 +398,8 @@ PHP_METHOD(Phalcon_Support_Collection, getValues) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("data"), PH_NOISY_CC | PH_READONLY); ZEPHIR_RETURN_CALL_FUNCTION("array_values", NULL, 14, &_0); @@ -470,19 +421,13 @@ PHP_METHOD(Phalcon_Support_Collection, has) ZVAL_UNDEF(&element); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(element) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &element_param); zephir_get_strval(&element, element_param); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "processkey", NULL, 0, &element); zephir_check_call_status(); zephir_get_strval(&element, &_0); @@ -508,16 +453,12 @@ PHP_METHOD(Phalcon_Support_Collection, init) ZVAL_UNDEF(&key); ZVAL_UNDEF(&value); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &data_param); if (!data_param) { ZEPHIR_INIT_VAR(&data); @@ -525,8 +466,6 @@ PHP_METHOD(Phalcon_Support_Collection, init) } else { zephir_get_arrval(&data, data_param); } - - zephir_is_iterable(&data, 0, "phalcon/Support/Collection.zep", 206); if (Z_TYPE_P(&data) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&data), _2, _3, _0) @@ -588,9 +527,8 @@ PHP_METHOD(Phalcon_Support_Collection, jsonSerialize) ZVAL_UNDEF(&_6$$4); ZVAL_UNDEF(&_8$$7); ZVAL_UNDEF(&records); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&records); array_init(&records); @@ -667,18 +605,12 @@ PHP_METHOD(Phalcon_Support_Collection, offsetExists) ZVAL_UNDEF(&element_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(element) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &element); - - zephir_cast_to_string(&_0, element); ZEPHIR_CPY_WRT(element, &_0); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "has", NULL, 0, element); @@ -701,18 +633,12 @@ PHP_METHOD(Phalcon_Support_Collection, offsetGet) ZVAL_UNDEF(&element_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(element) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &element); - - zephir_cast_to_string(&_0, element); ZEPHIR_CPY_WRT(element, &_0); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "get", NULL, 0, element); @@ -729,29 +655,23 @@ PHP_METHOD(Phalcon_Support_Collection, offsetSet) zval _0; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval element_sub, value_sub; - zval *element = NULL, *value; + zval offset_sub, value_sub; + zval *offset = NULL, *value; zval *this_ptr = getThis(); - ZVAL_UNDEF(&element_sub); + ZVAL_UNDEF(&offset_sub); ZVAL_UNDEF(&value_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) - Z_PARAM_ZVAL(element) + Z_PARAM_ZVAL(offset) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); - zephir_fetch_params(1, 2, 0, &element, &value); - - - zephir_cast_to_string(&_0, element); - ZEPHIR_CPY_WRT(element, &_0); - ZEPHIR_CALL_METHOD(NULL, this_ptr, "set", NULL, 0, element, value); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); + zephir_fetch_params(1, 2, 0, &offset, &value); + zephir_cast_to_string(&_0, offset); + ZEPHIR_CPY_WRT(offset, &_0); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "set", NULL, 0, offset, value); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -771,18 +691,12 @@ PHP_METHOD(Phalcon_Support_Collection, offsetUnset) ZVAL_UNDEF(&element_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(element) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &element); - - zephir_cast_to_string(&_0, element); ZEPHIR_CPY_WRT(element, &_0); ZEPHIR_CALL_METHOD(NULL, this_ptr, "remove", NULL, 0, element); @@ -810,19 +724,13 @@ PHP_METHOD(Phalcon_Support_Collection, remove) ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&lowerKeys); ZVAL_UNDEF(&data); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(element) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &element_param); zephir_get_strval(&element, element_param); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "has", NULL, 0, &element); zephir_check_call_status(); if (UNEXPECTED(zephir_is_true(&_0))) { @@ -855,20 +763,14 @@ PHP_METHOD(Phalcon_Support_Collection, set) ZVAL_UNDEF(&element); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(element) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &element_param, &value); zephir_get_strval(&element, element_param); - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "setdata", NULL, 0, &element, value); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); @@ -886,9 +788,8 @@ PHP_METHOD(Phalcon_Support_Collection, serialize) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&_0, this_ptr, "toarray", NULL, 0); zephir_check_call_status(); @@ -902,9 +803,6 @@ PHP_METHOD(Phalcon_Support_Collection, serialize) */ PHP_METHOD(Phalcon_Support_Collection, toArray) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "data"); } @@ -929,24 +827,17 @@ PHP_METHOD(Phalcon_Support_Collection, toJson) ZVAL_UNDEF(&result); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_LONG(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { options = 4194383; } else { - options = zephir_get_intval(options_param); - } - - + } ZEPHIR_CALL_METHOD(&_0, this_ptr, "jsonserialize", NULL, 0); zephir_check_call_status(); ZVAL_LONG(&_1, options); @@ -973,19 +864,13 @@ PHP_METHOD(Phalcon_Support_Collection, unserialize) ZVAL_UNDEF(&serialized); ZVAL_UNDEF(&data); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(serialized) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &serialized_param); zephir_get_strval(&serialized, serialized_param); - - ZEPHIR_CALL_FUNCTION(&data, "unserialize", NULL, 16, &serialized); zephir_check_call_status(); ZEPHIR_CALL_METHOD(NULL, this_ptr, "init", NULL, 0, &data); @@ -998,10 +883,8 @@ PHP_METHOD(Phalcon_Support_Collection, __serialize) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *this_ptr = getThis(); - - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "toarray", NULL, 0); zephir_check_call_status(); @@ -1017,19 +900,13 @@ PHP_METHOD(Phalcon_Support_Collection, __unserialize) zval *this_ptr = getThis(); ZVAL_UNDEF(&data); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &data_param); zephir_get_arrval(&data, data_param); - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "init", NULL, 0, &data); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); @@ -1049,20 +926,14 @@ PHP_METHOD(Phalcon_Support_Collection, setData) ZVAL_UNDEF(&element); ZVAL_UNDEF(&value_sub); ZVAL_UNDEF(&key); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(element) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &element_param, &value); zephir_get_strval(&element, element_param); - - ZEPHIR_CALL_METHOD(&key, this_ptr, "processkey", NULL, 0, &element); zephir_check_call_status(); zephir_update_property_array(this_ptr, SL("data"), &element, value); @@ -1077,35 +948,25 @@ PHP_METHOD(Phalcon_Support_Collection, phpJsonEncode) { zend_long flags, depth; zval *value, value_sub, *flags_param = NULL, *depth_param = NULL, _0, _1; - zval *this_ptr = getThis(); ZVAL_UNDEF(&value_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_ZVAL(value) Z_PARAM_OPTIONAL Z_PARAM_LONG(flags) Z_PARAM_LONG(depth) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 2, &value, &flags_param, &depth_param); if (!flags_param) { flags = 0; } else { - flags = zephir_get_intval(flags_param); - } + } if (!depth_param) { depth = 512; } else { - depth = zephir_get_intval(depth_param); - } - - + } ZVAL_LONG(&_0, flags); ZVAL_LONG(&_1, depth); zephir_json_encode(return_value, value, zephir_get_intval(&_0) ); @@ -1126,19 +987,13 @@ PHP_METHOD(Phalcon_Support_Collection, processKey) ZVAL_UNDEF(&element); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(element) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &element_param); zephir_get_strval(&element, element_param); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("insensitive"), PH_NOISY_CC | PH_READONLY); if (UNEXPECTED(zephir_is_true(&_0))) { ZEPHIR_RETURN_CALL_FUNCTION("mb_strtolower", NULL, 10, &element); @@ -1158,7 +1013,8 @@ zend_object *zephir_init_properties_Phalcon_Support_Collection(zend_class_entry ZVAL_UNDEF(&_3$$4); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/support/collection.zep.h b/ext/phalcon/support/collection.zep.h index 7d53f828a2f..b4577f343ba 100644 --- a/ext/phalcon/support/collection.zep.h +++ b/ext/phalcon/support/collection.zep.h @@ -35,11 +35,7 @@ PHP_METHOD(Phalcon_Support_Collection, processKey); zend_object *zephir_init_properties_Phalcon_Support_Collection(zend_class_entry *class_type); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_support_collection___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, data, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, data, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, data, IS_ARRAY, 0, "[]") ZEND_ARG_TYPE_INFO(0, insensitive, _IS_BOOL, 0) ZEND_END_ARG_INFO() @@ -90,11 +86,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_support_collection_init, 0, 0, IS_VOID, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, data, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, data, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, data, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_support_collection_jsonserialize, 0, 0, IS_ARRAY, 0) @@ -104,17 +96,13 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_support_collection_offse ZEND_ARG_INFO(0, element) ZEND_END_ARG_INFO() -#if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_support_collection_offsetget, 0, 1, IS_MIXED, 0) -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_support_collection_offsetget, 0, 0, 1) -#endif ZEND_ARG_INFO(0, element) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_support_collection_offsetset, 0, 2, IS_VOID, 0) - ZEND_ARG_INFO(0, element) + ZEND_ARG_INFO(0, offset) ZEND_ARG_INFO(0, value) ZEND_END_ARG_INFO() @@ -144,15 +132,10 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_support_collection_tojso ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) ZEND_END_ARG_INFO() -#if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_support_collection_unserialize, 0, 1, IS_VOID, 0) - ZEND_ARG_TYPE_INFO(0, serialized, IS_STRING, 0) -ZEND_END_ARG_INFO() -#else -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_support_collection_unserialize, 0, 1, IS_VOID, 0) - ZEND_ARG_INFO(0, serialized) + + ZEND_ARG_TYPE_INFO(0, serialized, IS_STRING, 0) ZEND_END_ARG_INFO() -#endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_support_collection___serialize, 0, 0, IS_ARRAY, 0) ZEND_END_ARG_INFO() diff --git a/ext/phalcon/support/collection/collectioninterface.zep.h b/ext/phalcon/support/collection/collectioninterface.zep.h index 6b40eaad538..2e1be3e7900 100644 --- a/ext/phalcon/support/collection/collectioninterface.zep.h +++ b/ext/phalcon/support/collection/collectioninterface.zep.h @@ -44,11 +44,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_support_collection_collectioninterface_init, 0, 0, IS_VOID, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, data, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, data, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, data, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_support_collection_collectioninterface_remove, 0, 1, IS_VOID, 0) diff --git a/ext/phalcon/support/collection/readonlycollection.zep.c b/ext/phalcon/support/collection/readonlycollection.zep.c index 90dca8d7f56..b3e85c29312 100644 --- a/ext/phalcon/support/collection/readonlycollection.zep.c +++ b/ext/phalcon/support/collection/readonlycollection.zep.c @@ -44,22 +44,15 @@ PHP_METHOD(Phalcon_Support_Collection_ReadOnlyCollection, remove) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *element_param = NULL; zval element; - zval *this_ptr = getThis(); ZVAL_UNDEF(&element); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(element) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &element_param); zephir_get_strval(&element, element_param); - - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_support_collection_exception_ce, "The object is read only", "phalcon/Support/Collection/ReadOnlyCollection.zep", 25); return; } @@ -72,24 +65,17 @@ PHP_METHOD(Phalcon_Support_Collection_ReadOnlyCollection, set) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *element_param = NULL, *value, value_sub; zval element; - zval *this_ptr = getThis(); ZVAL_UNDEF(&element); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(element) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &element_param, &value); zephir_get_strval(&element, element_param); - - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_support_collection_exception_ce, "The object is read only", "phalcon/Support/Collection/ReadOnlyCollection.zep", 33); return; } diff --git a/ext/phalcon/support/debug.zep.c b/ext/phalcon/support/debug.zep.c index 5cd6137e221..1a84411aeaa 100644 --- a/ext/phalcon/support/debug.zep.c +++ b/ext/phalcon/support/debug.zep.c @@ -91,9 +91,8 @@ PHP_METHOD(Phalcon_Support_Debug, __construct) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); object_init_ex(&_0, phalcon_support_version_ce); @@ -116,9 +115,8 @@ PHP_METHOD(Phalcon_Support_Debug, clearVars) zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); array_init(&_0); @@ -143,18 +141,12 @@ PHP_METHOD(Phalcon_Support_Debug, debugVar) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(varz) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &varz); - - ZEPHIR_INIT_VAR(&_0); zephir_create_array(&_0, 3, 0); zephir_array_fast_append(&_0, varz); @@ -180,9 +172,8 @@ PHP_METHOD(Phalcon_Support_Debug, getCssSources) ZVAL_UNDEF(&uri); ZVAL_UNDEF(&sources); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("uri"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&uri, &_0); @@ -203,9 +194,8 @@ PHP_METHOD(Phalcon_Support_Debug, getJsSources) ZVAL_UNDEF(&uri); ZVAL_UNDEF(&sources); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("uri"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&uri, &_0); @@ -229,9 +219,8 @@ PHP_METHOD(Phalcon_Support_Debug, getVersion) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_property(&_0, this_ptr, ZEND_STRL("version"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_2, 0); @@ -253,9 +242,6 @@ PHP_METHOD(Phalcon_Support_Debug, getVersion) */ PHP_METHOD(Phalcon_Support_Debug, halt) { - zval *this_ptr = getThis(); - - ZEPHIR_THROW_EXCEPTION_DEBUG_STRW(phalcon_support_debug_exception_ce, "Halted request", "phalcon/Support/Debug.zep", 169); return; @@ -275,30 +261,22 @@ PHP_METHOD(Phalcon_Support_Debug, listen) zend_bool exceptions, lowSeverity; zval *this_ptr = getThis(); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_BOOL(exceptions) Z_PARAM_BOOL(lowSeverity) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 2, &exceptions_param, &lowSeverity_param); if (!exceptions_param) { exceptions = 1; } else { - exceptions = zephir_get_boolval(exceptions_param); - } + } if (!lowSeverity_param) { lowSeverity = 0; } else { - lowSeverity = zephir_get_boolval(lowSeverity_param); - } - - + } if (exceptions) { ZEPHIR_CALL_METHOD(NULL, this_ptr, "listenexceptions", NULL, 0); zephir_check_call_status(); @@ -323,9 +301,8 @@ PHP_METHOD(Phalcon_Support_Debug, listenExceptions) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); zephir_create_array(&_0, 2, 0); @@ -352,9 +329,8 @@ PHP_METHOD(Phalcon_Support_Debug, listenLowSeverity) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); zephir_create_array(&_0, 2, 0); @@ -362,7 +338,7 @@ PHP_METHOD(Phalcon_Support_Debug, listenLowSeverity) ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "onUncaughtLowSeverity"); zephir_array_fast_append(&_0, &_1); - ZEPHIR_CALL_FUNCTION(NULL, "set_error_handler", NULL, 134, &_0); + ZEPHIR_CALL_FUNCTION(NULL, "set_error_handler", NULL, 135, &_0); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_2); zephir_create_array(&_2, 2, 0); @@ -392,22 +368,16 @@ PHP_METHOD(Phalcon_Support_Debug, onUncaughtException) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_1$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(exception, zend_ce_throwable) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &exception); - - ZEPHIR_CALL_FUNCTION(&obLevel, "ob_get_level", NULL, 0); zephir_check_call_status(); if (ZEPHIR_GT_LONG(&obLevel, 0)) { - ZEPHIR_CALL_FUNCTION(NULL, "ob_end_clean", NULL, 488); + ZEPHIR_CALL_FUNCTION(NULL, "ob_end_clean", NULL, 489); zephir_check_call_status(); } zephir_read_static_property_ce(&_0, phalcon_support_debug_ce, SL("isActive"), PH_NOISY_CC | PH_READONLY); @@ -433,7 +403,6 @@ PHP_METHOD(Phalcon_Support_Debug, onUncaughtLowSeverity) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *severity, severity_sub, *message, message_sub, *file, file_sub, *line, line_sub, *context, context_sub, _0, _1, _2$$3, _3$$3; - zval *this_ptr = getThis(); ZVAL_UNDEF(&severity_sub); ZVAL_UNDEF(&message_sub); @@ -444,8 +413,6 @@ PHP_METHOD(Phalcon_Support_Debug, onUncaughtLowSeverity) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(5, 5) Z_PARAM_ZVAL(severity) Z_PARAM_ZVAL(message) @@ -453,13 +420,9 @@ PHP_METHOD(Phalcon_Support_Debug, onUncaughtLowSeverity) Z_PARAM_ZVAL(line) Z_PARAM_ZVAL(context) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 5, 0, &severity, &message, &file, &line, &context); - - ZEPHIR_CALL_FUNCTION(&_0, "error_reporting", NULL, 0); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_1); @@ -566,20 +529,14 @@ PHP_METHOD(Phalcon_Support_Debug, renderHtml) ZVAL_UNDEF(&_33$$3); ZVAL_UNDEF(&_47$$3); ZVAL_UNDEF(&_57$$21); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(exception, zend_ce_throwable) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_get_global(&_SERVER, SL("_SERVER")); zephir_get_global(&_REQUEST, SL("_REQUEST")); zephir_fetch_params(1, 1, 0, &exception); - - ZEPHIR_INIT_VAR(&className); zephir_get_class(&className, exception, 0); ZEPHIR_CALL_METHOD(&_0, exception, "getmessage", NULL, 0); @@ -603,7 +560,7 @@ PHP_METHOD(Phalcon_Support_Debug, renderHtml) zephir_read_property(&_6, this_ptr, ZEND_STRL("showBackTrace"), PH_NOISY_CC | PH_READONLY); ZEPHIR_CPY_WRT(&showBackTrace, &_6); if (zephir_is_true(&showBackTrace)) { - ZEPHIR_OBS_VAR(&dataVars); + zephir_memory_observe(&dataVars); zephir_read_property(&dataVars, this_ptr, ZEND_STRL("data"), PH_NOISY_CC); ZEPHIR_INIT_VAR(&_7$$3); ZEPHIR_CONCAT_SSSSSS(&_7$$3, "
    ", "
  • Backtrace
  • ", "
  • Request
  • ", "
  • Server
  • ", "
  • Included Files
  • ", "
  • Memory
  • "); @@ -924,19 +881,13 @@ PHP_METHOD(Phalcon_Support_Debug, setBlacklist) ZVAL_UNDEF(&_5$$4); ZVAL_UNDEF(&_9$$5); ZVAL_UNDEF(&_10$$6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(blacklist) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &blacklist_param); zephir_get_arrval(&blacklist, blacklist_param); - - ZEPHIR_INIT_VAR(&_0); array_init(&_0); ZEPHIR_INIT_VAR(&_1); @@ -1044,18 +995,10 @@ PHP_METHOD(Phalcon_Support_Debug, setShowBackTrace) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(showBackTrace) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &showBackTrace_param); - showBackTrace = zephir_get_boolval(showBackTrace_param); - - if (showBackTrace) { zephir_update_property_zval(this_ptr, ZEND_STRL("showBackTrace"), &__$true); } else { @@ -1078,18 +1021,10 @@ PHP_METHOD(Phalcon_Support_Debug, setShowFileFragment) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(showFileFragment) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &showFileFragment_param); - showFileFragment = zephir_get_boolval(showFileFragment_param); - - if (showFileFragment) { zephir_update_property_zval(this_ptr, ZEND_STRL("showFileFragment"), &__$true); } else { @@ -1111,18 +1046,10 @@ PHP_METHOD(Phalcon_Support_Debug, setShowFiles) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(showFiles) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &showFiles_param); - showFiles = zephir_get_boolval(showFiles_param); - - if (showFiles) { zephir_update_property_zval(this_ptr, ZEND_STRL("showFiles"), &__$true); } else { @@ -1144,15 +1071,11 @@ PHP_METHOD(Phalcon_Support_Debug, setUri) zval *this_ptr = getThis(); ZVAL_UNDEF(&uri); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(uri) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &uri_param); if (UNEXPECTED(Z_TYPE_P(uri_param) != IS_STRING && Z_TYPE_P(uri_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'uri' must be of the type string")); @@ -1163,8 +1086,6 @@ PHP_METHOD(Phalcon_Support_Debug, setUri) } else { ZEPHIR_INIT_VAR(&uri); } - - zephir_update_property_zval(this_ptr, ZEND_STRL("uri"), &uri); RETURN_THIS(); } @@ -1180,7 +1101,6 @@ PHP_METHOD(Phalcon_Support_Debug, escapeString) zend_long ZEPHIR_LAST_CALL_STATUS; zval *value_param = NULL, _0, _1, _2, _3, _4; zval value; - zval *this_ptr = getThis(); ZVAL_UNDEF(&value); ZVAL_UNDEF(&_0); @@ -1188,19 +1108,13 @@ PHP_METHOD(Phalcon_Support_Debug, escapeString) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &value_param); zephir_get_strval(&value, value_param); - - ZEPHIR_INIT_VAR(&_0); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "\n"); @@ -1251,17 +1165,13 @@ PHP_METHOD(Phalcon_Support_Debug, getArrayDump) ZVAL_UNDEF(&_12$$15); ZVAL_UNDEF(&_13$$16); ZVAL_UNDEF(&_14$$12); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(argument) Z_PARAM_OPTIONAL Z_PARAM_ZVAL(n) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &argument_param, &n); ZEPHIR_OBS_COPY_OR_DUP(&argument, argument_param); if (!n) { @@ -1269,8 +1179,6 @@ PHP_METHOD(Phalcon_Support_Debug, getArrayDump) ZEPHIR_INIT_VAR(n); ZVAL_LONG(n, 0); } - - ZEPHIR_INIT_VAR(&numberArguments); ZVAL_LONG(&numberArguments, zephir_fast_count_int(&argument)); _0 = ZEPHIR_GE_LONG(n, 3); @@ -1388,18 +1296,12 @@ PHP_METHOD(Phalcon_Support_Debug, getVarDump) ZVAL_UNDEF(&dumpedObject); ZVAL_UNDEF(&_0$$8); ZVAL_UNDEF(&_1$$10); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(variable) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &variable); - - if (ZEPHIR_IS_TRUE_IDENTICAL(variable)) { RETURN_MM_STRING("true"); } @@ -1537,27 +1439,20 @@ PHP_METHOD(Phalcon_Support_Debug, showTraceItem) ZVAL_UNDEF(&trace); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_31$$17); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_LONG(n) Z_PARAM_ARRAY(trace) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &n_param, &trace_param); - n = zephir_get_intval(n_param); ZEPHIR_OBS_COPY_OR_DUP(&trace, trace_param); - - ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, n); ZEPHIR_INIT_VAR(&_1); ZEPHIR_CONCAT_SVS(&_1, "#", &_0, ""); ZEPHIR_CPY_WRT(&html, &_1); - ZEPHIR_OBS_VAR(&className); + zephir_memory_observe(&className); if (zephir_array_isset_string_fetch(&className, &trace, SL("class"), 0)) { ZEPHIR_INIT_VAR(&_2$$3); ZEPHIR_INIT_VAR(&_3$$3); @@ -1582,7 +1477,7 @@ PHP_METHOD(Phalcon_Support_Debug, showTraceItem) } else { ZEPHIR_INIT_VAR(&classReflection); object_init_ex(&classReflection, zephir_get_internal_ce(SL("reflectionclass"))); - ZEPHIR_CALL_METHOD(NULL, &classReflection, "__construct", NULL, 153, &className); + ZEPHIR_CALL_METHOD(NULL, &classReflection, "__construct", NULL, 154, &className); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_11$$5, &classReflection, "isinternal", NULL, 0); zephir_check_call_status(); @@ -1607,7 +1502,7 @@ PHP_METHOD(Phalcon_Support_Debug, showTraceItem) zephir_array_fetch_string(&_16$$3, &trace, SL("type"), PH_NOISY | PH_READONLY, "phalcon/Support/Debug.zep", 739); zephir_concat_self(&html, &_16$$3); } - ZEPHIR_OBS_VAR(&functionName); + zephir_memory_observe(&functionName); zephir_array_fetch_string(&functionName, &trace, SL("function"), PH_NOISY, "phalcon/Support/Debug.zep", 745); if (zephir_array_isset_string(&trace, SL("class"))) { ZEPHIR_CPY_WRT(&functionNameWithLink, &functionName); @@ -1615,7 +1510,7 @@ PHP_METHOD(Phalcon_Support_Debug, showTraceItem) if ((zephir_function_exists(&functionName) == SUCCESS)) { ZEPHIR_INIT_VAR(&functionReflection); object_init_ex(&functionReflection, zephir_get_internal_ce(SL("reflectionfunction"))); - ZEPHIR_CALL_METHOD(NULL, &functionReflection, "__construct", NULL, 150, &functionName); + ZEPHIR_CALL_METHOD(NULL, &functionReflection, "__construct", NULL, 151, &functionName); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_17$$10, &functionReflection, "isinternal", NULL, 0); zephir_check_call_status(); @@ -1638,7 +1533,7 @@ PHP_METHOD(Phalcon_Support_Debug, showTraceItem) ZEPHIR_INIT_VAR(&_20); ZEPHIR_CONCAT_SVS(&_20, "", &functionNameWithLink, ""); zephir_concat_self(&html, &_20); - ZEPHIR_OBS_VAR(&traceArgs); + zephir_memory_observe(&traceArgs); if (zephir_array_isset_string_fetch(&traceArgs, &trace, SL("args"), 0)) { ZEPHIR_INIT_VAR(&arguments); array_init(&arguments); @@ -1681,9 +1576,9 @@ PHP_METHOD(Phalcon_Support_Debug, showTraceItem) ZEPHIR_CONCAT_SVS(&_29$$14, "(", &_28$$14, ")"); zephir_concat_self(&html, &_29$$14); } - ZEPHIR_OBS_VAR(&filez); + zephir_memory_observe(&filez); if (zephir_array_isset_string_fetch(&filez, &trace, SL("file"), 0)) { - ZEPHIR_OBS_VAR(&_30$$17); + zephir_memory_observe(&_30$$17); zephir_array_fetch_string(&_30$$17, &trace, SL("line"), PH_NOISY, "phalcon/Support/Debug.zep", 808); zephir_cast_to_string(&_31$$17, &_30$$17); ZEPHIR_CPY_WRT(&line, &_31$$17); @@ -1794,14 +1689,12 @@ PHP_METHOD(Phalcon_Support_Debug, getArrVal) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *collection_param = NULL, *index, index_sub, *defaultValue = NULL, defaultValue_sub, __$null, value; zval collection; - zval *this_ptr = getThis(); ZVAL_UNDEF(&collection); ZVAL_UNDEF(&index_sub); ZVAL_UNDEF(&defaultValue_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&value); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_ARRAY(collection) @@ -1809,23 +1702,20 @@ PHP_METHOD(Phalcon_Support_Debug, getArrVal) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(defaultValue) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &collection_param, &index, &defaultValue); ZEPHIR_OBS_COPY_OR_DUP(&collection, collection_param); if (!defaultValue) { defaultValue = &defaultValue_sub; defaultValue = &__$null; } - - - if (UNEXPECTED(!(zephir_array_isset_fetch(&value, &collection, index, 1)))) { + zephir_memory_observe(&value); + if (UNEXPECTED(!(zephir_array_isset_fetch(&value, &collection, index, 0)))) { RETVAL_ZVAL(defaultValue, 1, 0); RETURN_MM(); } - RETURN_CTOR(&value); + RETURN_CCTOR(&value); } zend_object *zephir_init_properties_Phalcon_Support_Debug(zend_class_entry *class_type) @@ -1840,7 +1730,8 @@ zend_object *zephir_init_properties_Phalcon_Support_Debug(zend_class_entry *clas ZVAL_UNDEF(&_3$$4); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/support/debug.zep.h b/ext/phalcon/support/debug.zep.h index 98507a08295..b399c5cdc6b 100644 --- a/ext/phalcon/support/debug.zep.h +++ b/ext/phalcon/support/debug.zep.h @@ -126,11 +126,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_support_debug_zephir_init_properties_phal ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_support_debug_method_entry) { -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Support_Debug, __construct, arginfo_phalcon_support_debug___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) -#else - PHP_ME(Phalcon_Support_Debug, __construct, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) -#endif +PHP_ME(Phalcon_Support_Debug, __construct, arginfo_phalcon_support_debug___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) PHP_ME(Phalcon_Support_Debug, clearVars, arginfo_phalcon_support_debug_clearvars, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Support_Debug, debugVar, arginfo_phalcon_support_debug_debugvar, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Support_Debug, getCssSources, arginfo_phalcon_support_debug_getcsssources, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/support/debug/dump.zep.c b/ext/phalcon/support/debug/dump.zep.c index 6068da55ce1..9f771677d2e 100644 --- a/ext/phalcon/support/debug/dump.zep.c +++ b/ext/phalcon/support/debug/dump.zep.c @@ -90,17 +90,13 @@ PHP_METHOD(Phalcon_Support_Debug_Dump, __construct) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(styles) Z_PARAM_BOOL(detailed) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 2, &styles_param, &detailed_param); if (!styles_param) { ZEPHIR_INIT_VAR(&styles); @@ -111,10 +107,7 @@ PHP_METHOD(Phalcon_Support_Debug_Dump, __construct) if (!detailed_param) { detailed = 0; } else { - detailed = zephir_get_boolval(detailed_param); - } - - + } ZEPHIR_INIT_VAR(&_0); object_init_ex(&_0, phalcon_support_helper_json_encode_ce); if (zephir_has_constructor(&_0)) { @@ -146,9 +139,8 @@ PHP_METHOD(Phalcon_Support_Debug_Dump, all) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); zephir_create_array(&_0, 2, 0); @@ -165,9 +157,6 @@ PHP_METHOD(Phalcon_Support_Debug_Dump, all) PHP_METHOD(Phalcon_Support_Debug_Dump, getDetailed) { - zval *this_ptr = getThis(); - - RETURN_MEMBER(getThis(), "detailed"); } @@ -180,18 +169,10 @@ PHP_METHOD(Phalcon_Support_Debug_Dump, setDetailed) ZVAL_BOOL(&__$true, 1); ZVAL_BOOL(&__$false, 0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(detailed) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &detailed_param); - detailed = zephir_get_boolval(detailed_param); - - if (detailed) { zephir_update_property_zval(this_ptr, ZEND_STRL("detailed"), &__$true); } else { @@ -212,25 +193,20 @@ PHP_METHOD(Phalcon_Support_Debug_Dump, one) ZVAL_UNDEF(&variable_sub); ZVAL_UNDEF(&name); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ZVAL(variable) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &variable, &name_param); if (!name_param) { ZEPHIR_INIT_VAR(&name); } else { zephir_get_strval(&name, name_param); } - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "variable", NULL, 0, variable, &name); zephir_check_call_status(); RETURN_MM(); @@ -249,16 +225,12 @@ PHP_METHOD(Phalcon_Support_Debug_Dump, setStyles) ZVAL_UNDEF(&styles); ZVAL_UNDEF(&defaultStyles); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(styles) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &styles_param); if (!styles_param) { ZEPHIR_INIT_VAR(&styles); @@ -266,8 +238,6 @@ PHP_METHOD(Phalcon_Support_Debug_Dump, setStyles) } else { ZEPHIR_OBS_COPY_OR_DUP(&styles, styles_param); } - - ZEPHIR_INIT_VAR(&defaultStyles); zephir_create_array(&defaultStyles, 11, 0); add_assoc_stringl_ex(&defaultStyles, SL("pre"), SL("background-color:#f3f3f3; font-size:11px; padding:10px; border:1px solid #ccc; text-align:left; color:#333")); @@ -313,18 +283,12 @@ PHP_METHOD(Phalcon_Support_Debug_Dump, toJson) ZVAL_UNDEF(&variable_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(variable) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &variable); - - zephir_read_property(&_0, this_ptr, ZEND_STRL("encode"), PH_NOISY_CC | PH_READONLY); ZVAL_LONG(&_1, ((128 | 64) | 256)); ZEPHIR_RETURN_CALL_METHOD(&_0, "__invoke", NULL, 0, variable, &_1); @@ -353,25 +317,20 @@ PHP_METHOD(Phalcon_Support_Debug_Dump, variable) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&name); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ZVAL(variable) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &variable, &name_param); if (!name_param) { ZEPHIR_INIT_VAR(&name); } else { zephir_get_strval(&name, name_param); } - - ZEPHIR_INIT_VAR(&_0); zephir_create_array(&_0, 2, 0); ZEPHIR_INIT_VAR(&_2); @@ -421,9 +380,8 @@ PHP_METHOD(Phalcon_Support_Debug_Dump, variables) ZVAL_UNDEF(&_8$$4); ZVAL_UNDEF(&_9$$4); ZVAL_UNDEF(&output); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&output); ZEPHIR_INIT_VAR(&_0); @@ -486,15 +444,11 @@ PHP_METHOD(Phalcon_Support_Debug_Dump, getStyle) ZVAL_UNDEF(&type); ZVAL_UNDEF(&style); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(type) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &type_param); if (UNEXPECTED(Z_TYPE_P(type_param) != IS_STRING && Z_TYPE_P(type_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'type' must be of the type string")); @@ -505,13 +459,12 @@ PHP_METHOD(Phalcon_Support_Debug_Dump, getStyle) } else { ZEPHIR_INIT_VAR(&type); } - - + zephir_memory_observe(&style); zephir_read_property(&_0, this_ptr, ZEND_STRL("styles"), PH_NOISY_CC | PH_READONLY); - if (!(zephir_array_isset_fetch(&style, &_0, &type, 1))) { + if (!(zephir_array_isset_fetch(&style, &_0, &type, 0))) { RETURN_MM_STRING("color:gray"); } - RETURN_CTOR(&style); + RETURN_CCTOR(&style); } /** @@ -683,7 +636,6 @@ PHP_METHOD(Phalcon_Support_Debug_Dump, output) ZVAL_UNDEF(&_154$$29); ZVAL_UNDEF(&_159$$30); ZVAL_UNDEF(&_163$$31); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_ZVAL(variable) @@ -691,10 +643,8 @@ PHP_METHOD(Phalcon_Support_Debug_Dump, output) Z_PARAM_STR_OR_NULL(name) Z_PARAM_LONG(tab) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &variable, &name_param, &tab_param); if (!name_param) { ZEPHIR_INIT_VAR(&name); @@ -704,10 +654,7 @@ PHP_METHOD(Phalcon_Support_Debug_Dump, output) if (!tab_param) { tab = 1; } else { - tab = zephir_get_intval(tab_param); - } - - + } ZEPHIR_INIT_VAR(&space); ZVAL_STRING(&space, " "); ZEPHIR_INIT_VAR(&output); @@ -900,7 +847,7 @@ PHP_METHOD(Phalcon_Support_Debug_Dump, output) ZEPHIR_CONCAT_VS(&_45$$11, &_44$$11, "[skipped]\n"); zephir_concat_self(&output, &_45$$11); } else if (_42$$9) { - ZEPHIR_CALL_FUNCTION(&_46$$12, "get_object_vars", NULL, 425, variable); + ZEPHIR_CALL_FUNCTION(&_46$$12, "get_object_vars", NULL, 426, variable); zephir_check_call_status(); zephir_is_iterable(&_46$$12, 0, "phalcon/Support/Debug/Dump.zep", 280); if (Z_TYPE_P(&_46$$12) == IS_ARRAY) { @@ -991,10 +938,10 @@ PHP_METHOD(Phalcon_Support_Debug_Dump, output) } else { ZEPHIR_INIT_VAR(&reflect$$15); object_init_ex(&reflect$$15, zephir_get_internal_ce(SL("reflectionclass"))); - ZEPHIR_CALL_METHOD(NULL, &reflect$$15, "__construct", NULL, 153, variable); + ZEPHIR_CALL_METHOD(NULL, &reflect$$15, "__construct", NULL, 154, variable); zephir_check_call_status(); ZVAL_LONG(&_67$$15, ((1 | 2) | 4)); - ZEPHIR_CALL_METHOD(&props$$15, &reflect$$15, "getproperties", NULL, 164, &_67$$15); + ZEPHIR_CALL_METHOD(&props$$15, &reflect$$15, "getproperties", NULL, 165, &_67$$15); zephir_check_call_status(); zephir_is_iterable(&props$$15, 0, "phalcon/Support/Debug/Dump.zep", 306); if (Z_TYPE_P(&props$$15) == IS_ARRAY) { @@ -1272,7 +1219,7 @@ PHP_METHOD(Phalcon_Support_Debug_Dump, output) ZEPHIR_CONCAT_VV(return_value, &output, &_145$$26); RETURN_MM(); } - ZEPHIR_CALL_FUNCTION(&_147, "is_float", NULL, 213, variable); + ZEPHIR_CALL_FUNCTION(&_147, "is_float", NULL, 214, variable); zephir_check_call_status(); if (zephir_is_true(&_147)) { ZEPHIR_INIT_VAR(&_148$$27); @@ -1396,7 +1343,8 @@ zend_object *zephir_init_properties_Phalcon_Support_Debug_Dump(zend_class_entry ZVAL_UNDEF(&_3$$4); - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); { zval local_this_ptr, *this_ptr = &local_this_ptr; diff --git a/ext/phalcon/support/debug/dump.zep.h b/ext/phalcon/support/debug/dump.zep.h index 75dd21c59f9..ef933a0d178 100644 --- a/ext/phalcon/support/debug/dump.zep.h +++ b/ext/phalcon/support/debug/dump.zep.h @@ -17,11 +17,7 @@ PHP_METHOD(Phalcon_Support_Debug_Dump, output); zend_object *zephir_init_properties_Phalcon_Support_Debug_Dump(zend_class_entry *class_type); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_support_debug_dump___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, styles, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, styles, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, styles, IS_ARRAY, 0, "[]") ZEND_ARG_TYPE_INFO(0, detailed, _IS_BOOL, 0) ZEND_END_ARG_INFO() @@ -42,11 +38,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_support_debug_dump_one, ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_support_debug_dump_setstyles, 0, 0, IS_ARRAY, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, styles, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, styles, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, styles, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_support_debug_dump_tojson, 0, 1, IS_STRING, 0) diff --git a/ext/phalcon/support/helper/arr/abstractarr.zep.c b/ext/phalcon/support/helper/arr/abstractarr.zep.c index 44139ff8201..95741767ec3 100644 --- a/ext/phalcon/support/helper/arr/abstractarr.zep.c +++ b/ext/phalcon/support/helper/arr/abstractarr.zep.c @@ -54,30 +54,24 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_AbstractArr, toFilter) zend_long ZEPHIR_LAST_CALL_STATUS; zval *collection_param = NULL, *method = NULL, method_sub, __$null; zval collection; - zval *this_ptr = getThis(); ZVAL_UNDEF(&collection); ZVAL_UNDEF(&method_sub); ZVAL_NULL(&__$null); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(collection) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(method) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &collection_param, &method); zephir_get_arrval(&collection, collection_param); if (!method) { method = &method_sub; method = &__$null; } - - _0 = !zephir_is_true(method); if (!(_0)) { _0 = !(zephir_is_callable(method)); diff --git a/ext/phalcon/support/helper/arr/blacklist.zep.c b/ext/phalcon/support/helper/arr/blacklist.zep.c index 7475874ade5..1ecc7169bdc 100644 --- a/ext/phalcon/support/helper/arr/blacklist.zep.c +++ b/ext/phalcon/support/helper/arr/blacklist.zep.c @@ -56,29 +56,23 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_Blacklist, __invoke) ZVAL_UNDEF(&blackListed); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ARRAY(collection) Z_PARAM_ARRAY(blackList) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &collection_param, &blackList_param); zephir_get_arrval(&collection, collection_param); zephir_get_arrval(&blackList, blackList_param); - - ZEPHIR_INIT_VAR(&_0); ZEPHIR_INIT_NVAR(&_0); zephir_create_closure_ex(&_0, NULL, phalcon_13__closure_ce, SL("__invoke")); ZEPHIR_CALL_METHOD(&blackListed, this_ptr, "tofilter", NULL, 0, &blackList, &_0); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&_1, "array_flip", NULL, 99, &blackListed); + ZEPHIR_CALL_FUNCTION(&_1, "array_flip", NULL, 100, &blackListed); zephir_check_call_status(); - ZEPHIR_RETURN_CALL_FUNCTION("array_diff_key", NULL, 98, &collection, &_1); + ZEPHIR_RETURN_CALL_FUNCTION("array_diff_key", NULL, 99, &collection, &_1); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/support/helper/arr/chunk.zep.c b/ext/phalcon/support/helper/arr/chunk.zep.c index 2703c9ba7e3..81c0ff2dd47 100644 --- a/ext/phalcon/support/helper/arr/chunk.zep.c +++ b/ext/phalcon/support/helper/arr/chunk.zep.c @@ -50,33 +50,24 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_Chunk, __invoke) zend_long size, ZEPHIR_LAST_CALL_STATUS; zval *collection_param = NULL, *size_param = NULL, *preserveKeys_param = NULL, _0, _1; zval collection; - zval *this_ptr = getThis(); ZVAL_UNDEF(&collection); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_ARRAY(collection) Z_PARAM_LONG(size) Z_PARAM_OPTIONAL Z_PARAM_BOOL(preserveKeys) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &collection_param, &size_param, &preserveKeys_param); zephir_get_arrval(&collection, collection_param); - size = zephir_get_intval(size_param); if (!preserveKeys_param) { preserveKeys = 0; } else { - preserveKeys = zephir_get_boolval(preserveKeys_param); - } - - + } ZVAL_LONG(&_0, size); ZVAL_BOOL(&_1, (preserveKeys ? 1 : 0)); ZEPHIR_RETURN_CALL_FUNCTION("array_chunk", NULL, 0, &collection, &_0, &_1); diff --git a/ext/phalcon/support/helper/arr/filter.zep.c b/ext/phalcon/support/helper/arr/filter.zep.c index 5cc14713acb..c2219d712fb 100644 --- a/ext/phalcon/support/helper/arr/filter.zep.c +++ b/ext/phalcon/support/helper/arr/filter.zep.c @@ -53,25 +53,20 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_Filter, __invoke) ZVAL_UNDEF(&collection); ZVAL_UNDEF(&method_sub); ZVAL_NULL(&__$null); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(collection) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(method) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &collection_param, &method); zephir_get_arrval(&collection, collection_param); if (!method) { method = &method_sub; method = &__$null; } - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "tofilter", NULL, 0, &collection, method); zephir_check_call_status(); RETURN_MM(); diff --git a/ext/phalcon/support/helper/arr/first.zep.c b/ext/phalcon/support/helper/arr/first.zep.c index 42a340bcf8c..81df7fc707c 100644 --- a/ext/phalcon/support/helper/arr/first.zep.c +++ b/ext/phalcon/support/helper/arr/first.zep.c @@ -55,29 +55,24 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_First, __invoke) ZVAL_UNDEF(&method_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&filtered); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(collection) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(method) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &collection_param, &method); zephir_get_arrval(&collection, collection_param); if (!method) { method = &method_sub; method = &__$null; } - - ZEPHIR_CALL_METHOD(&filtered, this_ptr, "tofilter", NULL, 0, &collection, method); zephir_check_call_status(); ZEPHIR_MAKE_REF(&filtered); - ZEPHIR_RETURN_CALL_FUNCTION("reset", NULL, 476, &filtered); + ZEPHIR_RETURN_CALL_FUNCTION("reset", NULL, 477, &filtered); ZEPHIR_UNREF(&filtered); zephir_check_call_status(); RETURN_MM(); diff --git a/ext/phalcon/support/helper/arr/firstkey.zep.c b/ext/phalcon/support/helper/arr/firstkey.zep.c index 597f25429ef..a4aea602cee 100644 --- a/ext/phalcon/support/helper/arr/firstkey.zep.c +++ b/ext/phalcon/support/helper/arr/firstkey.zep.c @@ -55,25 +55,20 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_FirstKey, __invoke) ZVAL_UNDEF(&method_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&filtered); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(collection) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(method) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &collection_param, &method); zephir_get_arrval(&collection, collection_param); if (!method) { method = &method_sub; method = &__$null; } - - ZEPHIR_CALL_METHOD(&filtered, this_ptr, "tofilter", NULL, 0, &collection, method); zephir_check_call_status(); ZEPHIR_RETURN_CALL_FUNCTION("array_key_first", NULL, 0, &filtered); diff --git a/ext/phalcon/support/helper/arr/flatten.zep.c b/ext/phalcon/support/helper/arr/flatten.zep.c index 680eccc6dcb..84c5876d5b2 100644 --- a/ext/phalcon/support/helper/arr/flatten.zep.c +++ b/ext/phalcon/support/helper/arr/flatten.zep.c @@ -64,26 +64,19 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_Flatten, __invoke) ZVAL_UNDEF(&_8$$4); ZVAL_UNDEF(&_9$$4); ZVAL_UNDEF(&_10$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(collection) Z_PARAM_OPTIONAL Z_PARAM_BOOL(deep) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &collection_param, &deep_param); zephir_get_arrval(&collection, collection_param); if (!deep_param) { deep = 0; } else { - deep = zephir_get_boolval(deep_param); - } - - + } ZEPHIR_INIT_VAR(&data); array_init(&data); zephir_is_iterable(&collection, 0, "phalcon/Support/Helper/Arr/Flatten.zep", 37); @@ -161,24 +154,17 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_Flatten, processNotArray) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *data_param = NULL, *item, item_sub; zval data; - zval *this_ptr = getThis(); ZVAL_UNDEF(&data); ZVAL_UNDEF(&item_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ARRAY(data) Z_PARAM_ZVAL(item) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &data_param, &item); zephir_get_arrval(&data, data_param); - - if (Z_TYPE_P(item) != IS_ARRAY) { zephir_array_append(&data, item, PH_SEPARATE, "phalcon/Support/Helper/Arr/Flatten.zep", 49); } @@ -199,28 +185,20 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_Flatten, processArray) zend_bool deep, _0; zval *data_param = NULL, *item, item_sub, *deep_param = NULL, _1$$3, _2$$3; zval data; - zval *this_ptr = getThis(); ZVAL_UNDEF(&data); ZVAL_UNDEF(&item_sub); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_ARRAY(data) Z_PARAM_ZVAL(item) Z_PARAM_BOOL(deep) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &data_param, &item, &deep_param); zephir_get_arrval(&data, data_param); - deep = zephir_get_boolval(deep_param); - - _0 = Z_TYPE_P(item) == IS_ARRAY; if (_0) { _0 = !deep; @@ -256,22 +234,15 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_Flatten, processArrayDeep) ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_ARRAY(data) Z_PARAM_ZVAL(item) Z_PARAM_BOOL(deep) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &data_param, &item, &deep_param); zephir_get_arrval(&data, data_param); - deep = zephir_get_boolval(deep_param); - - _0 = Z_TYPE_P(item) == IS_ARRAY; if (_0) { _0 = deep; diff --git a/ext/phalcon/support/helper/arr/get.zep.c b/ext/phalcon/support/helper/arr/get.zep.c index ad49f392191..be5c71477cf 100644 --- a/ext/phalcon/support/helper/arr/get.zep.c +++ b/ext/phalcon/support/helper/arr/get.zep.c @@ -54,7 +54,6 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_Get, __invoke) zval cast; zval *collection_param = NULL, *index, index_sub, *defaultValue = NULL, defaultValue_sub, *cast_param = NULL, __$null, value; zval collection; - zval *this_ptr = getThis(); ZVAL_UNDEF(&collection); ZVAL_UNDEF(&index_sub); @@ -62,7 +61,6 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_Get, __invoke) ZVAL_NULL(&__$null); ZVAL_UNDEF(&value); ZVAL_UNDEF(&cast); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 4) Z_PARAM_ARRAY(collection) @@ -71,10 +69,8 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_Get, __invoke) Z_PARAM_ZVAL_OR_NULL(defaultValue) Z_PARAM_STR_OR_NULL(cast) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 2, &collection_param, &index, &defaultValue, &cast_param); zephir_get_arrval(&collection, collection_param); if (!defaultValue) { @@ -86,8 +82,6 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_Get, __invoke) } else { zephir_get_strval(&cast, cast_param); } - - ZEPHIR_CPY_WRT(&value, defaultValue); if (1 == zephir_array_isset(&collection, index)) { ZEPHIR_OBS_NVAR(&value); diff --git a/ext/phalcon/support/helper/arr/group.zep.c b/ext/phalcon/support/helper/arr/group.zep.c index c5e5c847fde..6b5c7da4eb4 100644 --- a/ext/phalcon/support/helper/arr/group.zep.c +++ b/ext/phalcon/support/helper/arr/group.zep.c @@ -59,20 +59,14 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_Group, __invoke) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_6$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ARRAY(collection) Z_PARAM_ZVAL(method) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &collection_param, &method); zephir_get_arrval(&collection, collection_param); - - ZEPHIR_INIT_VAR(&filtered); array_init(&filtered); zephir_is_iterable(&collection, 0, "phalcon/Support/Helper/Arr/Group.zep", 36); @@ -128,20 +122,12 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_Group, isCallable) { zend_bool _0, _1; zval *method, method_sub; - zval *this_ptr = getThis(); ZVAL_UNDEF(&method_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(method) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &method); - - _0 = zephir_is_callable(method); if (!(_0)) { _1 = Z_TYPE_P(method) == IS_STRING; @@ -174,26 +160,20 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_Group, processCallable) ZVAL_UNDEF(&key); ZVAL_UNDEF(&output); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_ARRAY(filtered) Z_PARAM_ZVAL(method) Z_PARAM_ZVAL(element) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &filtered_param, &method, &element); zephir_get_arrval(&filtered, filtered_param); - - ZEPHIR_CPY_WRT(&output, &filtered); ZEPHIR_CALL_METHOD(&_0, this_ptr, "iscallable", NULL, 0, method); zephir_check_call_status(); if (ZEPHIR_IS_TRUE_IDENTICAL(&_0)) { - ZEPHIR_CALL_FUNCTION(&key, "call_user_func", NULL, 187, method, element); + ZEPHIR_CALL_FUNCTION(&key, "call_user_func", NULL, 188, method, element); zephir_check_call_status(); zephir_array_update_multi(&output, element, SL("za"), 2, &key); } @@ -222,21 +202,15 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_Group, processObject) ZVAL_UNDEF(&output); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&key$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_ARRAY(filtered) Z_PARAM_ZVAL(method) Z_PARAM_ZVAL(element) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &filtered_param, &method, &element); zephir_get_arrval(&filtered, filtered_param); - - ZEPHIR_CPY_WRT(&output, &filtered); ZEPHIR_CALL_METHOD(&_0, this_ptr, "iscallable", NULL, 0, method); zephir_check_call_status(); @@ -245,7 +219,7 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_Group, processObject) _1 = Z_TYPE_P(element) == IS_OBJECT; } if (_1) { - ZEPHIR_OBS_VAR(&key$$3); + zephir_memory_observe(&key$$3); zephir_read_property_zval(&key$$3, element, method, PH_NOISY_CC); zephir_array_update_multi(&output, element, SL("za"), 2, &key$$3); } @@ -274,21 +248,15 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_Group, processOther) ZVAL_UNDEF(&output); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&key$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_ARRAY(filtered) Z_PARAM_ZVAL(method) Z_PARAM_ZVAL(element) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &filtered_param, &method, &element); zephir_get_arrval(&filtered, filtered_param); - - ZEPHIR_CPY_WRT(&output, &filtered); ZEPHIR_CALL_METHOD(&_0, this_ptr, "iscallable", NULL, 0, method); zephir_check_call_status(); @@ -301,7 +269,7 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_Group, processOther) _2 = 1 == zephir_array_isset(element, method); } if (_2) { - ZEPHIR_OBS_VAR(&key$$3); + zephir_memory_observe(&key$$3); zephir_array_fetch(&key$$3, element, method, PH_NOISY, "phalcon/Support/Helper/Arr/Group.zep", 116); zephir_array_update_multi(&output, element, SL("za"), 2, &key$$3); } diff --git a/ext/phalcon/support/helper/arr/has.zep.c b/ext/phalcon/support/helper/arr/has.zep.c index 66ffa1eb7bb..4ce60333501 100644 --- a/ext/phalcon/support/helper/arr/has.zep.c +++ b/ext/phalcon/support/helper/arr/has.zep.c @@ -48,24 +48,17 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_Has, __invoke) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *collection_param = NULL, *index, index_sub; zval collection; - zval *this_ptr = getThis(); ZVAL_UNDEF(&collection); ZVAL_UNDEF(&index_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ARRAY(collection) Z_PARAM_ZVAL(index) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &collection_param, &index); zephir_get_arrval(&collection, collection_param); - - RETURN_MM_BOOL(zephir_array_key_exists(&collection, index)); } diff --git a/ext/phalcon/support/helper/arr/isunique.zep.c b/ext/phalcon/support/helper/arr/isunique.zep.c index 419064083cb..aa4a725ee75 100644 --- a/ext/phalcon/support/helper/arr/isunique.zep.c +++ b/ext/phalcon/support/helper/arr/isunique.zep.c @@ -48,24 +48,17 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_IsUnique, __invoke) zend_long ZEPHIR_LAST_CALL_STATUS; zval *collection_param = NULL, _0; zval collection; - zval *this_ptr = getThis(); ZVAL_UNDEF(&collection); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(collection) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &collection_param); zephir_get_arrval(&collection, collection_param); - - - ZEPHIR_CALL_FUNCTION(&_0, "array_unique", NULL, 179, &collection); + ZEPHIR_CALL_FUNCTION(&_0, "array_unique", NULL, 180, &collection); zephir_check_call_status(); RETURN_MM_BOOL(zephir_fast_count_int(&collection) == zephir_fast_count_int(&_0)); } diff --git a/ext/phalcon/support/helper/arr/last.zep.c b/ext/phalcon/support/helper/arr/last.zep.c index 196ed067c49..c96529e48d9 100644 --- a/ext/phalcon/support/helper/arr/last.zep.c +++ b/ext/phalcon/support/helper/arr/last.zep.c @@ -55,29 +55,24 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_Last, __invoke) ZVAL_UNDEF(&method_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&filtered); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(collection) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(method) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &collection_param, &method); zephir_get_arrval(&collection, collection_param); if (!method) { method = &method_sub; method = &__$null; } - - ZEPHIR_CALL_METHOD(&filtered, this_ptr, "tofilter", NULL, 0, &collection, method); zephir_check_call_status(); ZEPHIR_MAKE_REF(&filtered); - ZEPHIR_RETURN_CALL_FUNCTION("end", NULL, 319, &filtered); + ZEPHIR_RETURN_CALL_FUNCTION("end", NULL, 320, &filtered); ZEPHIR_UNREF(&filtered); zephir_check_call_status(); RETURN_MM(); diff --git a/ext/phalcon/support/helper/arr/lastkey.zep.c b/ext/phalcon/support/helper/arr/lastkey.zep.c index beb426f3d07..17146abc74b 100644 --- a/ext/phalcon/support/helper/arr/lastkey.zep.c +++ b/ext/phalcon/support/helper/arr/lastkey.zep.c @@ -55,28 +55,23 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_LastKey, __invoke) ZVAL_UNDEF(&method_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&filtered); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(collection) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(method) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &collection_param, &method); zephir_get_arrval(&collection, collection_param); if (!method) { method = &method_sub; method = &__$null; } - - ZEPHIR_CALL_METHOD(&filtered, this_ptr, "tofilter", NULL, 0, &collection, method); zephir_check_call_status(); - ZEPHIR_RETURN_CALL_FUNCTION("array_key_last", NULL, 39, &filtered); + ZEPHIR_RETURN_CALL_FUNCTION("array_key_last", NULL, 40, &filtered); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/support/helper/arr/order.zep.c b/ext/phalcon/support/helper/arr/order.zep.c index 2e58d9353a7..e95cabb02ac 100644 --- a/ext/phalcon/support/helper/arr/order.zep.c +++ b/ext/phalcon/support/helper/arr/order.zep.c @@ -69,8 +69,6 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_Order, __invoke) ZVAL_UNDEF(&_5$$4); ZVAL_UNDEF(&_6$$5); ZVAL_UNDEF(&_7$$6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 4) Z_PARAM_ARRAY(collection) Z_PARAM_ZVAL(attribute) @@ -78,24 +76,18 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_Order, __invoke) Z_PARAM_LONG(order) Z_PARAM_LONG(flags) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 2, &collection_param, &attribute, &order_param, &flags_param); zephir_get_arrval(&collection, collection_param); if (!order_param) { order = 1; } else { - order = zephir_get_intval(order_param); - } + } if (!flags_param) { flags = 0; } else { - flags = zephir_get_intval(flags_param); - } - - + } ZEPHIR_INIT_VAR(&sorted); array_init(&sorted); zephir_is_iterable(&collection, 0, "phalcon/Support/Helper/Arr/Order.zep", 45); @@ -163,29 +155,22 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_Order, checkObject) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *sorted_param = NULL, *attribute, attribute_sub, *item, item_sub, key; zval sorted; - zval *this_ptr = getThis(); ZVAL_UNDEF(&sorted); ZVAL_UNDEF(&attribute_sub); ZVAL_UNDEF(&item_sub); ZVAL_UNDEF(&key); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_ARRAY(sorted) Z_PARAM_ZVAL(attribute) Z_PARAM_ZVAL(item) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &sorted_param, &attribute, &item); zephir_get_arrval(&sorted, sorted_param); - - if (Z_TYPE_P(item) == IS_OBJECT) { - ZEPHIR_OBS_VAR(&key); + zephir_memory_observe(&key); zephir_read_property_zval(&key, item, attribute, PH_NOISY_CC); zephir_array_update_zval(&sorted, &key, item, PH_COPY | PH_SEPARATE); } @@ -204,29 +189,23 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_Order, checkNonObject) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *sorted_param = NULL, *attribute, attribute_sub, *item, item_sub, key; zval sorted; - zval *this_ptr = getThis(); ZVAL_UNDEF(&sorted); ZVAL_UNDEF(&attribute_sub); ZVAL_UNDEF(&item_sub); ZVAL_UNDEF(&key); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_ARRAY(sorted) Z_PARAM_ZVAL(attribute) Z_PARAM_ZVAL(item) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &sorted_param, &attribute, &item); zephir_get_arrval(&sorted, sorted_param); - - if (Z_TYPE_P(item) != IS_OBJECT) { - zephir_array_fetch(&key, item, attribute, PH_NOISY | PH_READONLY, "phalcon/Support/Helper/Arr/Order.zep", 85); + zephir_memory_observe(&key); + zephir_array_fetch(&key, item, attribute, PH_NOISY, "phalcon/Support/Helper/Arr/Order.zep", 85); zephir_array_update_zval(&sorted, &key, item, PH_COPY | PH_SEPARATE); } RETURN_CTOR(&sorted); diff --git a/ext/phalcon/support/helper/arr/pluck.zep.c b/ext/phalcon/support/helper/arr/pluck.zep.c index 14dc101673b..24bad6312ea 100644 --- a/ext/phalcon/support/helper/arr/pluck.zep.c +++ b/ext/phalcon/support/helper/arr/pluck.zep.c @@ -51,7 +51,6 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_Pluck, __invoke) zval element; zval *collection_param = NULL, *element_param = NULL, item, *_0, _1, _4$$4, _5$$5, _8$$7, _9$$8; zval collection, filtered; - zval *this_ptr = getThis(); ZVAL_UNDEF(&collection); ZVAL_UNDEF(&filtered); @@ -62,21 +61,15 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_Pluck, __invoke) ZVAL_UNDEF(&_8$$7); ZVAL_UNDEF(&_9$$8); ZVAL_UNDEF(&element); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ARRAY(collection) Z_PARAM_STR(element) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &collection_param, &element_param); zephir_get_arrval(&collection, collection_param); zephir_get_strval(&element, element_param); - - ZEPHIR_INIT_VAR(&filtered); array_init(&filtered); zephir_is_iterable(&collection, 0, "phalcon/Support/Helper/Arr/Pluck.zep", 39); diff --git a/ext/phalcon/support/helper/arr/set.zep.c b/ext/phalcon/support/helper/arr/set.zep.c index a575dbdaab9..47884a7f1fc 100644 --- a/ext/phalcon/support/helper/arr/set.zep.c +++ b/ext/phalcon/support/helper/arr/set.zep.c @@ -57,7 +57,6 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_Set, __invoke) ZVAL_UNDEF(&index_sub); ZVAL_NULL(&__$null); ZVAL_UNDEF(&source); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_ARRAY(collection) @@ -65,18 +64,14 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_Set, __invoke) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(index) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &collection_param, &value, &index); zephir_get_arrval(&collection, collection_param); if (!index) { index = &index_sub; index = &__$null; } - - ZEPHIR_CALL_METHOD(&source, this_ptr, "checknull", NULL, 0, &collection, value, index); zephir_check_call_status(); ZEPHIR_RETURN_CALL_METHOD(this_ptr, "checknotnull", NULL, 0, &source, value, index); @@ -96,26 +91,19 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_Set, checkNull) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *collection_param = NULL, *value, value_sub, *index, index_sub; zval collection; - zval *this_ptr = getThis(); ZVAL_UNDEF(&collection); ZVAL_UNDEF(&value_sub); ZVAL_UNDEF(&index_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_ARRAY(collection) Z_PARAM_ZVAL(value) Z_PARAM_ZVAL(index) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &collection_param, &value, &index); zephir_get_arrval(&collection, collection_param); - - if (Z_TYPE_P(index) == IS_NULL) { zephir_array_append(&collection, value, PH_SEPARATE, "phalcon/Support/Helper/Arr/Set.zep", 47); } @@ -134,26 +122,19 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_Set, checkNotNull) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *collection_param = NULL, *value, value_sub, *index, index_sub; zval collection; - zval *this_ptr = getThis(); ZVAL_UNDEF(&collection); ZVAL_UNDEF(&value_sub); ZVAL_UNDEF(&index_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_ARRAY(collection) Z_PARAM_ZVAL(value) Z_PARAM_ZVAL(index) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &collection_param, &value, &index); zephir_get_arrval(&collection, collection_param); - - if (Z_TYPE_P(index) != IS_NULL) { zephir_array_update_zval(&collection, index, value, PH_COPY | PH_SEPARATE); } diff --git a/ext/phalcon/support/helper/arr/sliceleft.zep.c b/ext/phalcon/support/helper/arr/sliceleft.zep.c index 76abe92b68e..0ae72dd4af2 100644 --- a/ext/phalcon/support/helper/arr/sliceleft.zep.c +++ b/ext/phalcon/support/helper/arr/sliceleft.zep.c @@ -48,34 +48,26 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_SliceLeft, __invoke) zend_long elements, ZEPHIR_LAST_CALL_STATUS; zval *collection_param = NULL, *elements_param = NULL, _0, _1; zval collection; - zval *this_ptr = getThis(); ZVAL_UNDEF(&collection); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(collection) Z_PARAM_OPTIONAL Z_PARAM_LONG(elements) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &collection_param, &elements_param); zephir_get_arrval(&collection, collection_param); if (!elements_param) { elements = 1; } else { - elements = zephir_get_intval(elements_param); - } - - + } ZVAL_LONG(&_0, 0); ZVAL_LONG(&_1, elements); - ZEPHIR_RETURN_CALL_FUNCTION("array_slice", NULL, 500, &collection, &_0, &_1); + ZEPHIR_RETURN_CALL_FUNCTION("array_slice", NULL, 501, &collection, &_0, &_1); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/support/helper/arr/sliceright.zep.c b/ext/phalcon/support/helper/arr/sliceright.zep.c index 09b737b144c..3c08c268b2b 100644 --- a/ext/phalcon/support/helper/arr/sliceright.zep.c +++ b/ext/phalcon/support/helper/arr/sliceright.zep.c @@ -48,32 +48,24 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_SliceRight, __invoke) zend_long elements, ZEPHIR_LAST_CALL_STATUS; zval *collection_param = NULL, *elements_param = NULL, _0; zval collection; - zval *this_ptr = getThis(); ZVAL_UNDEF(&collection); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(collection) Z_PARAM_OPTIONAL Z_PARAM_LONG(elements) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &collection_param, &elements_param); zephir_get_arrval(&collection, collection_param); if (!elements_param) { elements = 1; } else { - elements = zephir_get_intval(elements_param); - } - - + } ZVAL_LONG(&_0, elements); - ZEPHIR_RETURN_CALL_FUNCTION("array_slice", NULL, 500, &collection, &_0); + ZEPHIR_RETURN_CALL_FUNCTION("array_slice", NULL, 501, &collection, &_0); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/support/helper/arr/split.zep.c b/ext/phalcon/support/helper/arr/split.zep.c index 8ba788f5cc8..0bf761831e1 100644 --- a/ext/phalcon/support/helper/arr/split.zep.c +++ b/ext/phalcon/support/helper/arr/split.zep.c @@ -49,24 +49,17 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_Split, __invoke) zend_long ZEPHIR_LAST_CALL_STATUS; zval *collection_param = NULL, _0, _1; zval collection; - zval *this_ptr = getThis(); ZVAL_UNDEF(&collection); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(collection) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &collection_param); zephir_get_arrval(&collection, collection_param); - - zephir_create_array(return_value, 2, 0); ZEPHIR_INIT_VAR(&_0); zephir_array_keys(&_0, &collection); diff --git a/ext/phalcon/support/helper/arr/toobject.zep.c b/ext/phalcon/support/helper/arr/toobject.zep.c index cf27a3b9478..3426ab087a7 100644 --- a/ext/phalcon/support/helper/arr/toobject.zep.c +++ b/ext/phalcon/support/helper/arr/toobject.zep.c @@ -45,22 +45,15 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_ToObject, __invoke) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *collection_param = NULL; zval collection; - zval *this_ptr = getThis(); ZVAL_UNDEF(&collection); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(collection) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &collection_param); zephir_get_arrval(&collection, collection_param); - - zephir_convert_to_object(&collection); RETURN_CTOR(&collection); } diff --git a/ext/phalcon/support/helper/arr/toobject.zep.h b/ext/phalcon/support/helper/arr/toobject.zep.h index 9201f906fae..bc4d71bfad0 100644 --- a/ext/phalcon/support/helper/arr/toobject.zep.h +++ b/ext/phalcon/support/helper/arr/toobject.zep.h @@ -5,11 +5,7 @@ ZEPHIR_INIT_CLASS(Phalcon_Support_Helper_Arr_ToObject); PHP_METHOD(Phalcon_Support_Helper_Arr_ToObject, __invoke); -#if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_phalcon_support_helper_arr_toobject___invoke, 0, 1, MAY_BE_OBJECT) -#else -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_support_helper_arr_toobject___invoke, 0, 1, IS_OBJECT, 0) -#endif ZEND_ARG_ARRAY_INFO(0, collection, 0) ZEND_END_ARG_INFO() diff --git a/ext/phalcon/support/helper/arr/validateall.zep.c b/ext/phalcon/support/helper/arr/validateall.zep.c index ea61e26184d..d9d530ff2a9 100644 --- a/ext/phalcon/support/helper/arr/validateall.zep.c +++ b/ext/phalcon/support/helper/arr/validateall.zep.c @@ -54,20 +54,14 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_ValidateAll, __invoke) ZVAL_UNDEF(&collection); ZVAL_UNDEF(&method_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ARRAY(collection) Z_PARAM_ZVAL(method) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &collection_param, &method); zephir_get_arrval(&collection, collection_param); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "tofilter", NULL, 0, &collection, method); zephir_check_call_status(); RETURN_MM_BOOL(zephir_fast_count_int(&_0) == zephir_fast_count_int(&collection)); diff --git a/ext/phalcon/support/helper/arr/validateany.zep.c b/ext/phalcon/support/helper/arr/validateany.zep.c index 2f419a10a0c..8c26c44dfd1 100644 --- a/ext/phalcon/support/helper/arr/validateany.zep.c +++ b/ext/phalcon/support/helper/arr/validateany.zep.c @@ -54,20 +54,14 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_ValidateAny, __invoke) ZVAL_UNDEF(&collection); ZVAL_UNDEF(&method_sub); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ARRAY(collection) Z_PARAM_ZVAL(method) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &collection_param, &method); zephir_get_arrval(&collection, collection_param); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "tofilter", NULL, 0, &collection, method); zephir_check_call_status(); RETURN_MM_BOOL(zephir_fast_count_int(&_0) > 0); diff --git a/ext/phalcon/support/helper/arr/whitelist.zep.c b/ext/phalcon/support/helper/arr/whitelist.zep.c index 2060a656657..518ad32cd26 100644 --- a/ext/phalcon/support/helper/arr/whitelist.zep.c +++ b/ext/phalcon/support/helper/arr/whitelist.zep.c @@ -56,27 +56,21 @@ PHP_METHOD(Phalcon_Support_Helper_Arr_Whitelist, __invoke) ZVAL_UNDEF(&filtered); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ARRAY(collection) Z_PARAM_ARRAY(whiteList) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &collection_param, &whiteList_param); zephir_get_arrval(&collection, collection_param); zephir_get_arrval(&whiteList, whiteList_param); - - ZEPHIR_INIT_VAR(&_0); ZEPHIR_INIT_NVAR(&_0); zephir_create_closure_ex(&_0, NULL, phalcon_14__closure_ce, SL("__invoke")); ZEPHIR_CALL_METHOD(&filtered, this_ptr, "tofilter", NULL, 0, &whiteList, &_0); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&_1, "array_flip", NULL, 99, &filtered); + ZEPHIR_CALL_FUNCTION(&_1, "array_flip", NULL, 100, &filtered); zephir_check_call_status(); ZEPHIR_RETURN_CALL_FUNCTION("array_intersect_key", NULL, 2, &collection, &_1); zephir_check_call_status(); diff --git a/ext/phalcon/support/helper/file/basename.zep.c b/ext/phalcon/support/helper/file/basename.zep.c index def395f604b..fab1fa7ebc2 100644 --- a/ext/phalcon/support/helper/file/basename.zep.c +++ b/ext/phalcon/support/helper/file/basename.zep.c @@ -55,7 +55,6 @@ PHP_METHOD(Phalcon_Support_Helper_File_Basename, __invoke) zend_long ZEPHIR_LAST_CALL_STATUS; zval *uri_param = NULL, *suffix_param = NULL, fileName, matches, _0, _1, _2, _3, _4, _5, _6$$3, _7$$3, _8$$3, _9$$3; zval uri, suffix; - zval *this_ptr = getThis(); ZVAL_UNDEF(&uri); ZVAL_UNDEF(&suffix); @@ -71,17 +70,14 @@ PHP_METHOD(Phalcon_Support_Helper_File_Basename, __invoke) ZVAL_UNDEF(&_7$$3); ZVAL_UNDEF(&_8$$3); ZVAL_UNDEF(&_9$$3); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(uri) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(suffix) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &uri_param, &suffix_param); zephir_get_strval(&uri, uri_param); if (!suffix_param) { @@ -89,8 +85,6 @@ PHP_METHOD(Phalcon_Support_Helper_File_Basename, __invoke) } else { zephir_get_strval(&suffix, suffix_param); } - - ZEPHIR_INIT_VAR(&_0); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "/"); @@ -100,14 +94,14 @@ PHP_METHOD(Phalcon_Support_Helper_File_Basename, __invoke) ZVAL_STRING(&_2, "/"); ZEPHIR_INIT_VAR(&_3); ZVAL_STRING(&_3, "@"); - ZEPHIR_CALL_FUNCTION(&_4, "preg_quote", NULL, 350, &_2, &_3); + ZEPHIR_CALL_FUNCTION(&_4, "preg_quote", NULL, 351, &_2, &_3); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_5); ZEPHIR_CONCAT_SVS(&_5, "@[^", &_4, "]+$@"); ZEPHIR_INIT_NVAR(&_2); zephir_preg_match(&_2, &_5, &uri, &matches, 0, 0 , 0 ); if (zephir_is_true(&_2)) { - ZEPHIR_OBS_VAR(&fileName); + zephir_memory_observe(&fileName); zephir_array_fetch_long(&fileName, &matches, 0, PH_NOISY, "phalcon/Support/Helper/File/Basename.zep", 39); } else { ZEPHIR_INIT_NVAR(&fileName); @@ -116,13 +110,13 @@ PHP_METHOD(Phalcon_Support_Helper_File_Basename, __invoke) if (1 != ZEPHIR_IS_EMPTY(&suffix)) { ZEPHIR_INIT_VAR(&_6$$3); ZVAL_STRING(&_6$$3, "@"); - ZEPHIR_CALL_FUNCTION(&_7$$3, "preg_quote", NULL, 350, &suffix, &_6$$3); + ZEPHIR_CALL_FUNCTION(&_7$$3, "preg_quote", NULL, 351, &suffix, &_6$$3); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_8$$3); ZEPHIR_CONCAT_SVS(&_8$$3, "@", &_7$$3, "$@"); ZEPHIR_INIT_NVAR(&_6$$3); ZVAL_STRING(&_6$$3, ""); - ZEPHIR_CALL_FUNCTION(&_9$$3, "preg_replace", NULL, 40, &_8$$3, &_6$$3, &fileName); + ZEPHIR_CALL_FUNCTION(&_9$$3, "preg_replace", NULL, 41, &_8$$3, &_6$$3, &fileName); zephir_check_call_status(); ZEPHIR_CPY_WRT(&fileName, &_9$$3); } diff --git a/ext/phalcon/support/helper/json/decode.zep.c b/ext/phalcon/support/helper/json/decode.zep.c index 0c5cfca155a..88d2b3c8c6f 100644 --- a/ext/phalcon/support/helper/json/decode.zep.c +++ b/ext/phalcon/support/helper/json/decode.zep.c @@ -67,7 +67,6 @@ PHP_METHOD(Phalcon_Support_Helper_Json_Decode, __invoke) zend_bool associative; zval *data_param = NULL, *associative_param = NULL, *depth_param = NULL, *options_param = NULL, __$null, decoded, error, message, _0, _1, _2, _3$$3, _4$$3; zval data; - zval *this_ptr = getThis(); ZVAL_UNDEF(&data); ZVAL_NULL(&__$null); @@ -79,8 +78,6 @@ PHP_METHOD(Phalcon_Support_Helper_Json_Decode, __invoke) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 4) Z_PARAM_STR(data) Z_PARAM_OPTIONAL @@ -88,29 +85,22 @@ PHP_METHOD(Phalcon_Support_Helper_Json_Decode, __invoke) Z_PARAM_LONG(depth) Z_PARAM_LONG(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 3, &data_param, &associative_param, &depth_param, &options_param); zephir_get_strval(&data, data_param); if (!associative_param) { associative = 0; } else { - associative = zephir_get_boolval(associative_param); - } + } if (!depth_param) { depth = 512; } else { - depth = zephir_get_intval(depth_param); - } + } if (!options_param) { options = 79; } else { - options = zephir_get_intval(options_param); - } - - + } ZEPHIR_INIT_VAR(&decoded); zephir_json_encode(&decoded, &__$null, 0 ); ZVAL_BOOL(&_0, (associative ? 1 : 0)); @@ -127,7 +117,7 @@ PHP_METHOD(Phalcon_Support_Helper_Json_Decode, __invoke) zephir_json_encode(&_3$$3, &__$null, 0 ); ZEPHIR_INIT_VAR(&_4$$3); object_init_ex(&_4$$3, spl_ce_InvalidArgumentException); - ZEPHIR_CALL_METHOD(NULL, &_4$$3, "__construct", NULL, 199, &message, &error); + ZEPHIR_CALL_METHOD(NULL, &_4$$3, "__construct", NULL, 200, &message, &error); zephir_check_call_status(); zephir_throw_exception_debug(&_4$$3, "phalcon/Support/Helper/Json/Decode.zep", 64); ZEPHIR_MM_RESTORE(); diff --git a/ext/phalcon/support/helper/json/encode.zep.c b/ext/phalcon/support/helper/json/encode.zep.c index 8440ba72520..027cbec54b2 100644 --- a/ext/phalcon/support/helper/json/encode.zep.c +++ b/ext/phalcon/support/helper/json/encode.zep.c @@ -67,7 +67,6 @@ PHP_METHOD(Phalcon_Support_Helper_Json_Encode, __invoke) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long options, depth, ZEPHIR_LAST_CALL_STATUS; zval *data, data_sub, *options_param = NULL, *depth_param = NULL, __$null, encoded, error, message, _0, _1, _2$$3, _3$$3; - zval *this_ptr = getThis(); ZVAL_UNDEF(&data_sub); ZVAL_NULL(&__$null); @@ -79,31 +78,23 @@ PHP_METHOD(Phalcon_Support_Helper_Json_Encode, __invoke) ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_ZVAL(data) Z_PARAM_OPTIONAL Z_PARAM_LONG(options) Z_PARAM_LONG(depth) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &data, &options_param, &depth_param); if (!options_param) { options = 79; } else { - options = zephir_get_intval(options_param); - } + } if (!depth_param) { depth = 512; } else { - depth = zephir_get_intval(depth_param); - } - - + } ZEPHIR_INIT_VAR(&encoded); zephir_json_encode(&encoded, &__$null, 0 ); ZVAL_LONG(&_0, options); @@ -119,7 +110,7 @@ PHP_METHOD(Phalcon_Support_Helper_Json_Encode, __invoke) zephir_json_encode(&_2$$3, &__$null, 0 ); ZEPHIR_INIT_VAR(&_3$$3); object_init_ex(&_3$$3, spl_ce_InvalidArgumentException); - ZEPHIR_CALL_METHOD(NULL, &_3$$3, "__construct", NULL, 199, &message, &error); + ZEPHIR_CALL_METHOD(NULL, &_3$$3, "__construct", NULL, 200, &message, &error); zephir_check_call_status(); zephir_throw_exception_debug(&_3$$3, "phalcon/Support/Helper/Json/Encode.zep", 64); ZEPHIR_MM_RESTORE(); diff --git a/ext/phalcon/support/helper/number/isbetween.zep.c b/ext/phalcon/support/helper/number/isbetween.zep.c index ffabbba3843..29e275e1bb9 100644 --- a/ext/phalcon/support/helper/number/isbetween.zep.c +++ b/ext/phalcon/support/helper/number/isbetween.zep.c @@ -47,24 +47,13 @@ PHP_METHOD(Phalcon_Support_Helper_Number_IsBetween, __invoke) zend_bool _0; zval *value_param = NULL, *start_param = NULL, *end_param = NULL; zend_long value, start, end; - zval *this_ptr = getThis(); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_LONG(value) Z_PARAM_LONG(start) Z_PARAM_LONG(end) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(3, 0, &value_param, &start_param, &end_param); - value = zephir_get_intval(value_param); - start = zephir_get_intval(start_param); - end = zephir_get_intval(end_param); - - _0 = value >= start; if (_0) { _0 = value <= end; diff --git a/ext/phalcon/support/helper/str/abstractstr.zep.c b/ext/phalcon/support/helper/str/abstractstr.zep.c index c72fd97ba4e..b284079c8c6 100644 --- a/ext/phalcon/support/helper/str/abstractstr.zep.c +++ b/ext/phalcon/support/helper/str/abstractstr.zep.c @@ -58,35 +58,27 @@ PHP_METHOD(Phalcon_Support_Helper_Str_AbstractStr, toEndsWith) zend_bool ignoreCase; zval *haystack_param = NULL, *needle_param = NULL, *ignoreCase_param = NULL, child, parent, _0; zval haystack, needle; - zval *this_ptr = getThis(); ZVAL_UNDEF(&haystack); ZVAL_UNDEF(&needle); ZVAL_UNDEF(&child); ZVAL_UNDEF(&parent); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(haystack) Z_PARAM_STR(needle) Z_PARAM_OPTIONAL Z_PARAM_BOOL(ignoreCase) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &haystack_param, &needle_param, &ignoreCase_param); zephir_get_strval(&haystack, haystack_param); zephir_get_strval(&needle, needle_param); if (!ignoreCase_param) { ignoreCase = 1; } else { - ignoreCase = zephir_get_boolval(ignoreCase_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, ""); if (ZEPHIR_IS_IDENTICAL(&_0, &haystack)) { @@ -125,7 +117,6 @@ PHP_METHOD(Phalcon_Support_Helper_Str_AbstractStr, toInterpolate) zval context; zval *input_param = NULL, *context_param = NULL, *left_param = NULL, *right_param = NULL, key, replace, value, *_0, _1, _4$$4, _5$$5; zval input, left, right; - zval *this_ptr = getThis(); ZVAL_UNDEF(&input); ZVAL_UNDEF(&left); @@ -137,8 +128,6 @@ PHP_METHOD(Phalcon_Support_Helper_Str_AbstractStr, toInterpolate) ZVAL_UNDEF(&_4$$4); ZVAL_UNDEF(&_5$$5); ZVAL_UNDEF(&context); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 4) Z_PARAM_STR(input) Z_PARAM_OPTIONAL @@ -146,10 +135,8 @@ PHP_METHOD(Phalcon_Support_Helper_Str_AbstractStr, toInterpolate) Z_PARAM_STR(left) Z_PARAM_STR(right) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 3, &input_param, &context_param, &left_param, &right_param); zephir_get_strval(&input, input_param); if (!context_param) { @@ -170,8 +157,6 @@ PHP_METHOD(Phalcon_Support_Helper_Str_AbstractStr, toInterpolate) } else { zephir_get_strval(&right, right_param); } - - if (ZEPHIR_IS_EMPTY(&context)) { RETURN_CTOR(&input); } @@ -234,22 +219,17 @@ PHP_METHOD(Phalcon_Support_Helper_Str_AbstractStr, toLower) zend_long ZEPHIR_LAST_CALL_STATUS; zval *text_param = NULL, *encoding_param = NULL, _0; zval text, encoding; - zval *this_ptr = getThis(); ZVAL_UNDEF(&text); ZVAL_UNDEF(&encoding); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(text) Z_PARAM_OPTIONAL Z_PARAM_STR(encoding) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &text_param, &encoding_param); zephir_get_strval(&text, text_param); if (!encoding_param) { @@ -258,8 +238,6 @@ PHP_METHOD(Phalcon_Support_Helper_Str_AbstractStr, toLower) } else { zephir_get_strval(&encoding, encoding_param); } - - ZVAL_LONG(&_0, 1); ZEPHIR_RETURN_CALL_FUNCTION("mb_convert_case", NULL, 12, &text, &_0, &encoding); zephir_check_call_status(); @@ -282,35 +260,27 @@ PHP_METHOD(Phalcon_Support_Helper_Str_AbstractStr, toStartsWith) zend_bool ignoreCase; zval *haystack_param = NULL, *needle_param = NULL, *ignoreCase_param = NULL, child, parent, _0; zval haystack, needle; - zval *this_ptr = getThis(); ZVAL_UNDEF(&haystack); ZVAL_UNDEF(&needle); ZVAL_UNDEF(&child); ZVAL_UNDEF(&parent); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(haystack) Z_PARAM_STR(needle) Z_PARAM_OPTIONAL Z_PARAM_BOOL(ignoreCase) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &haystack_param, &needle_param, &ignoreCase_param); zephir_get_strval(&haystack, haystack_param); zephir_get_strval(&needle, needle_param); if (!ignoreCase_param) { ignoreCase = 1; } else { - ignoreCase = zephir_get_boolval(ignoreCase_param); - } - - + } ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, ""); if (ZEPHIR_IS_IDENTICAL(&_0, &haystack)) { @@ -342,22 +312,17 @@ PHP_METHOD(Phalcon_Support_Helper_Str_AbstractStr, toUpper) zend_long ZEPHIR_LAST_CALL_STATUS; zval *text_param = NULL, *encoding_param = NULL, _0; zval text, encoding; - zval *this_ptr = getThis(); ZVAL_UNDEF(&text); ZVAL_UNDEF(&encoding); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(text) Z_PARAM_OPTIONAL Z_PARAM_STR(encoding) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &text_param, &encoding_param); zephir_get_strval(&text, text_param); if (!encoding_param) { @@ -366,8 +331,6 @@ PHP_METHOD(Phalcon_Support_Helper_Str_AbstractStr, toUpper) } else { zephir_get_strval(&encoding, encoding_param); } - - ZVAL_LONG(&_0, 0); ZEPHIR_RETURN_CALL_FUNCTION("mb_convert_case", NULL, 12, &text, &_0, &encoding); zephir_check_call_status(); diff --git a/ext/phalcon/support/helper/str/abstractstr.zep.h b/ext/phalcon/support/helper/str/abstractstr.zep.h index 0046544292a..23379c0b4ae 100644 --- a/ext/phalcon/support/helper/str/abstractstr.zep.h +++ b/ext/phalcon/support/helper/str/abstractstr.zep.h @@ -17,11 +17,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_support_helper_str_abstractstr_tointerpolate, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, input, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, context, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") ZEND_ARG_TYPE_INFO(0, left, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, right, IS_STRING, 0) ZEND_END_ARG_INFO() diff --git a/ext/phalcon/support/helper/str/camelize.zep.c b/ext/phalcon/support/helper/str/camelize.zep.c index 82547dcd19d..eb24c7391cf 100644 --- a/ext/phalcon/support/helper/str/camelize.zep.c +++ b/ext/phalcon/support/helper/str/camelize.zep.c @@ -47,17 +47,14 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Camelize, __invoke) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zend_bool lowerFirst; - zval *text_param = NULL, *delimiters_param = NULL, *lowerFirst_param = NULL, result, _1$$3; + zval *text_param = NULL, *delimiters_param = NULL, *lowerFirst_param = NULL, result, _0$$3; zval text, delimiters; - zval *this_ptr = getThis(); ZVAL_UNDEF(&text); ZVAL_UNDEF(&delimiters); ZVAL_UNDEF(&result); - ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 + ZVAL_UNDEF(&_0$$3); bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(text) @@ -65,10 +62,8 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Camelize, __invoke) Z_PARAM_STR_OR_NULL(delimiters) Z_PARAM_BOOL(lowerFirst) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &text_param, &delimiters_param, &lowerFirst_param); zephir_get_strval(&text, text_param); if (!delimiters_param) { @@ -79,16 +74,13 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Camelize, __invoke) if (!lowerFirst_param) { lowerFirst = 0; } else { - lowerFirst = zephir_get_boolval(lowerFirst_param); - } - - - ZEPHIR_CALL_PARENT(&result, phalcon_support_helper_str_camelize_ce, getThis(), "__invoke", &_0, 0, &text, &delimiters); + } + ZEPHIR_CALL_PARENT(&result, phalcon_support_helper_str_camelize_ce, getThis(), "__invoke", NULL, 0, &text, &delimiters); zephir_check_call_status(); if (lowerFirst == 1) { - ZEPHIR_CALL_FUNCTION(&_1$$3, "lcfirst", NULL, 76, &result); + ZEPHIR_CALL_FUNCTION(&_0$$3, "lcfirst", NULL, 77, &result); zephir_check_call_status(); - ZEPHIR_CPY_WRT(&result, &_1$$3); + ZEPHIR_CPY_WRT(&result, &_0$$3); } RETURN_CCTOR(&result); } diff --git a/ext/phalcon/support/helper/str/concat.zep.c b/ext/phalcon/support/helper/str/concat.zep.c index fd681d58e8f..f00eea4ec9c 100644 --- a/ext/phalcon/support/helper/str/concat.zep.c +++ b/ext/phalcon/support/helper/str/concat.zep.c @@ -54,7 +54,6 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Concat, __invoke) zval argument, arguments, delimiter, data, first, last, prefix, suffix, _0, _1, *_2, _3, _6, _4$$6, _5$$7; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *this_ptr = getThis(); ZVAL_UNDEF(&argument); ZVAL_UNDEF(&arguments); @@ -70,9 +69,8 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Concat, __invoke) ZVAL_UNDEF(&_6); ZVAL_UNDEF(&_4$$6); ZVAL_UNDEF(&_5$$7); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&arguments); zephir_get_args(&arguments); @@ -81,19 +79,19 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Concat, __invoke) return; } ZEPHIR_MAKE_REF(&arguments); - ZEPHIR_CALL_FUNCTION(&delimiter, "reset", NULL, 476, &arguments); + ZEPHIR_CALL_FUNCTION(&delimiter, "reset", NULL, 477, &arguments); ZEPHIR_UNREF(&arguments); zephir_check_call_status(); ZVAL_LONG(&_0, 1); - ZEPHIR_CALL_FUNCTION(&_1, "array_slice", NULL, 500, &arguments, &_0); + ZEPHIR_CALL_FUNCTION(&_1, "array_slice", NULL, 501, &arguments, &_0); zephir_check_call_status(); ZEPHIR_CPY_WRT(&arguments, &_1); ZEPHIR_MAKE_REF(&arguments); - ZEPHIR_CALL_FUNCTION(&first, "reset", NULL, 476, &arguments); + ZEPHIR_CALL_FUNCTION(&first, "reset", NULL, 477, &arguments); ZEPHIR_UNREF(&arguments); zephir_check_call_status(); ZEPHIR_MAKE_REF(&arguments); - ZEPHIR_CALL_FUNCTION(&last, "end", NULL, 319, &arguments); + ZEPHIR_CALL_FUNCTION(&last, "end", NULL, 320, &arguments); ZEPHIR_UNREF(&arguments); zephir_check_call_status(); ZEPHIR_INIT_VAR(&prefix); diff --git a/ext/phalcon/support/helper/str/countvowels.zep.c b/ext/phalcon/support/helper/str/countvowels.zep.c index 56d3bafb067..1d8d5550f2c 100644 --- a/ext/phalcon/support/helper/str/countvowels.zep.c +++ b/ext/phalcon/support/helper/str/countvowels.zep.c @@ -48,7 +48,6 @@ PHP_METHOD(Phalcon_Support_Helper_Str_CountVowels, __invoke) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *text_param = NULL, matches, _0, _1, _2, _3; zval text; - zval *this_ptr = getThis(); ZVAL_UNDEF(&text); ZVAL_UNDEF(&matches); @@ -56,19 +55,13 @@ PHP_METHOD(Phalcon_Support_Helper_Str_CountVowels, __invoke) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(text) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &text_param); zephir_get_strval(&text, text_param); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "/[aeiouy]/i"); ZEPHIR_INIT_VAR(&_1); diff --git a/ext/phalcon/support/helper/str/decapitalize.zep.c b/ext/phalcon/support/helper/str/decapitalize.zep.c index 453dcd8db46..54199ceeaeb 100644 --- a/ext/phalcon/support/helper/str/decapitalize.zep.c +++ b/ext/phalcon/support/helper/str/decapitalize.zep.c @@ -63,35 +63,28 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Decapitalize, __invoke) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(text) Z_PARAM_OPTIONAL Z_PARAM_BOOL(upperRest) Z_PARAM_STR(encoding) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &text_param, &upperRest_param, &encoding_param); zephir_get_strval(&text, text_param); if (!upperRest_param) { upperRest = 0; } else { - upperRest = zephir_get_boolval(upperRest_param); - } + } if (!encoding_param) { ZEPHIR_INIT_VAR(&encoding); ZVAL_STRING(&encoding, "UTF-8"); } else { zephir_get_strval(&encoding, encoding_param); } - - ZVAL_LONG(&_0, 1); - ZEPHIR_CALL_FUNCTION(&substr, "mb_substr", NULL, 227, &text, &_0); + ZEPHIR_CALL_FUNCTION(&substr, "mb_substr", NULL, 228, &text, &_0); zephir_check_call_status(); if (upperRest) { ZEPHIR_CALL_METHOD(&suffix, this_ptr, "toupper", NULL, 0, &substr, &encoding); @@ -101,7 +94,7 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Decapitalize, __invoke) } ZVAL_LONG(&_0, 0); ZVAL_LONG(&_2, 1); - ZEPHIR_CALL_FUNCTION(&_3, "mb_substr", NULL, 227, &text, &_0, &_2); + ZEPHIR_CALL_FUNCTION(&_3, "mb_substr", NULL, 228, &text, &_0, &_2); zephir_check_call_status(); ZEPHIR_CALL_METHOD(&_1, this_ptr, "tolower", NULL, 0, &_3, &encoding); zephir_check_call_status(); diff --git a/ext/phalcon/support/helper/str/decrement.zep.c b/ext/phalcon/support/helper/str/decrement.zep.c index 6542bc3feef..2e93614a9f5 100644 --- a/ext/phalcon/support/helper/str/decrement.zep.c +++ b/ext/phalcon/support/helper/str/decrement.zep.c @@ -51,7 +51,6 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Decrement, __invoke) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *text_param = NULL, *separator_param = NULL, parts, _0, _3, _4, _1$$3, _2$$4; zval text, separator; - zval *this_ptr = getThis(); ZVAL_UNDEF(&text); ZVAL_UNDEF(&separator); @@ -61,17 +60,13 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Decrement, __invoke) ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(text) Z_PARAM_OPTIONAL Z_PARAM_STR(separator) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &text_param, &separator_param); zephir_get_strval(&text, text_param); if (!separator_param) { @@ -80,8 +75,6 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Decrement, __invoke) } else { zephir_get_strval(&separator, separator_param); } - - number = 0; ZEPHIR_INIT_VAR(&parts); zephir_fast_explode(&parts, &separator, &text, LONG_MAX); @@ -94,7 +87,7 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Decrement, __invoke) } ZEPHIR_CPY_WRT(&parts, &_0); if (1 == zephir_array_isset_long(&parts, 1)) { - ZEPHIR_OBS_VAR(&_1$$3); + zephir_memory_observe(&_1$$3); zephir_array_fetch_long(&_1$$3, &parts, 1, PH_NOISY, "phalcon/Support/Helper/Str/Decrement.zep", 36); number = zephir_get_intval(&_1$$3); number--; diff --git a/ext/phalcon/support/helper/str/dirfromfile.zep.c b/ext/phalcon/support/helper/str/dirfromfile.zep.c index 19f4c7bee7f..e9106b32d75 100644 --- a/ext/phalcon/support/helper/str/dirfromfile.zep.c +++ b/ext/phalcon/support/helper/str/dirfromfile.zep.c @@ -50,7 +50,6 @@ PHP_METHOD(Phalcon_Support_Helper_Str_DirFromFile, __invoke) zend_long ZEPHIR_LAST_CALL_STATUS; zval *file_param = NULL, name, start, _0, _1, _4, _5, _2$$3, _3$$3; zval file; - zval *this_ptr = getThis(); ZVAL_UNDEF(&file); ZVAL_UNDEF(&name); @@ -61,30 +60,24 @@ PHP_METHOD(Phalcon_Support_Helper_Str_DirFromFile, __invoke) ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(file) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &file_param); zephir_get_strval(&file, file_param); - - ZVAL_LONG(&_0, 8); - ZEPHIR_CALL_FUNCTION(&name, "pathinfo", NULL, 88, &file, &_0); + ZEPHIR_CALL_FUNCTION(&name, "pathinfo", NULL, 89, &file, &_0); zephir_check_call_status(); ZVAL_LONG(&_0, 0); ZVAL_LONG(&_1, -2); - ZEPHIR_CALL_FUNCTION(&start, "mb_substr", NULL, 227, &name, &_0, &_1); + ZEPHIR_CALL_FUNCTION(&start, "mb_substr", NULL, 228, &name, &_0, &_1); zephir_check_call_status(); if (!zephir_is_true(&start)) { ZVAL_LONG(&_2$$3, 0); ZVAL_LONG(&_3$$3, 1); - ZEPHIR_CALL_FUNCTION(&start, "mb_substr", NULL, 227, &name, &_2$$3, &_3$$3); + ZEPHIR_CALL_FUNCTION(&start, "mb_substr", NULL, 228, &name, &_2$$3, &_3$$3); zephir_check_call_status(); } ZEPHIR_INIT_VAR(&_4); diff --git a/ext/phalcon/support/helper/str/dirseparator.zep.c b/ext/phalcon/support/helper/str/dirseparator.zep.c index 17e86e99400..058f7f502be 100644 --- a/ext/phalcon/support/helper/str/dirseparator.zep.c +++ b/ext/phalcon/support/helper/str/dirseparator.zep.c @@ -48,24 +48,17 @@ PHP_METHOD(Phalcon_Support_Helper_Str_DirSeparator, __invoke) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *directory_param = NULL, _0, _1; zval directory; - zval *this_ptr = getThis(); ZVAL_UNDEF(&directory); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(directory) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &directory_param); zephir_get_strval(&directory, directory_param); - - ZEPHIR_INIT_VAR(&_0); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "/"); diff --git a/ext/phalcon/support/helper/str/dynamic.zep.c b/ext/phalcon/support/helper/str/dynamic.zep.c index b8ba9942e3c..97e1147bc6d 100644 --- a/ext/phalcon/support/helper/str/dynamic.zep.c +++ b/ext/phalcon/support/helper/str/dynamic.zep.c @@ -59,7 +59,6 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Dynamic, __invoke) zend_long ZEPHIR_LAST_CALL_STATUS; zval *text_param = NULL, *leftDelimiter_param = NULL, *rightDelimiter_param = NULL, *separator_param = NULL, ldS, rdS, matches, match, words, word, sub, _0, _1, _4, _5, _2$$3, *_6$$5, _7$$5, _9$$6, _10$$6, _12$$6, _13$$6, _14$$6, _15$$6, _18$$8, _19$$8, _20$$8, _21$$8, _22$$8, _23$$8; zval text, leftDelimiter, rightDelimiter, separator, pattern, _3$$3; - zval *this_ptr = getThis(); ZVAL_UNDEF(&text); ZVAL_UNDEF(&leftDelimiter); @@ -92,8 +91,6 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Dynamic, __invoke) ZVAL_UNDEF(&_21$$8); ZVAL_UNDEF(&_22$$8); ZVAL_UNDEF(&_23$$8); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 4) Z_PARAM_STR(text) Z_PARAM_OPTIONAL @@ -101,10 +98,8 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Dynamic, __invoke) Z_PARAM_STR(rightDelimiter) Z_PARAM_STR(separator) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 3, &text_param, &leftDelimiter_param, &rightDelimiter_param, &separator_param); zephir_get_strval(&text, text_param); if (!leftDelimiter_param) { @@ -125,8 +120,6 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Dynamic, __invoke) } else { zephir_get_strval(&separator, separator_param); } - - ZEPHIR_CALL_FUNCTION(&_0, "substr_count", NULL, 0, &text, &leftDelimiter); zephir_check_call_status(); ZEPHIR_CALL_FUNCTION(&_1, "substr_count", NULL, 0, &text, &rightDelimiter); @@ -142,9 +135,9 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Dynamic, __invoke) ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_CALL_FUNCTION(&ldS, "preg_quote", NULL, 350, &leftDelimiter); + ZEPHIR_CALL_FUNCTION(&ldS, "preg_quote", NULL, 351, &leftDelimiter); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&rdS, "preg_quote", NULL, 350, &rightDelimiter); + ZEPHIR_CALL_FUNCTION(&rdS, "preg_quote", NULL, 351, &rightDelimiter); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_4); ZEPHIR_CONCAT_SVSVVSVS(&_4, "/", &ldS, "([^", &ldS, &rdS, "]+)", &rdS, "/"); @@ -174,16 +167,16 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Dynamic, __invoke) ZEPHIR_INIT_NVAR(&words); zephir_fast_explode(&words, &separator, &_9$$6, LONG_MAX); ZEPHIR_OBS_NVAR(&word); - ZEPHIR_CALL_FUNCTION(&_10$$6, "array_rand", &_11, 201, &words); + ZEPHIR_CALL_FUNCTION(&_10$$6, "array_rand", &_11, 202, &words); zephir_check_call_status(); zephir_array_fetch(&word, &words, &_10$$6, PH_NOISY, "phalcon/Support/Helper/Str/Dynamic.zep", 62); zephir_array_fetch_long(&_12$$6, &match, 0, PH_NOISY | PH_READONLY, "phalcon/Support/Helper/Str/Dynamic.zep", 63); - ZEPHIR_CALL_FUNCTION(&sub, "preg_quote", NULL, 350, &_12$$6, &separator); + ZEPHIR_CALL_FUNCTION(&sub, "preg_quote", NULL, 351, &_12$$6, &separator); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_13$$6); ZEPHIR_CONCAT_SVS(&_13$$6, "/", &sub, "/"); ZVAL_LONG(&_14$$6, 1); - ZEPHIR_CALL_FUNCTION(&_15$$6, "preg_replace", &_16, 40, &_13$$6, &word, &text, &_14$$6); + ZEPHIR_CALL_FUNCTION(&_15$$6, "preg_replace", &_16, 41, &_13$$6, &word, &text, &_14$$6); zephir_check_call_status(); zephir_get_strval(&text, &_15$$6); } ZEND_HASH_FOREACH_END(); @@ -209,16 +202,16 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Dynamic, __invoke) ZEPHIR_INIT_NVAR(&words); zephir_fast_explode(&words, &separator, &_18$$8, LONG_MAX); ZEPHIR_OBS_NVAR(&word); - ZEPHIR_CALL_FUNCTION(&_19$$8, "array_rand", &_11, 201, &words); + ZEPHIR_CALL_FUNCTION(&_19$$8, "array_rand", &_11, 202, &words); zephir_check_call_status(); zephir_array_fetch(&word, &words, &_19$$8, PH_NOISY, "phalcon/Support/Helper/Str/Dynamic.zep", 62); zephir_array_fetch_long(&_20$$8, &match, 0, PH_NOISY | PH_READONLY, "phalcon/Support/Helper/Str/Dynamic.zep", 63); - ZEPHIR_CALL_FUNCTION(&sub, "preg_quote", NULL, 350, &_20$$8, &separator); + ZEPHIR_CALL_FUNCTION(&sub, "preg_quote", NULL, 351, &_20$$8, &separator); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_21$$8); ZEPHIR_CONCAT_SVS(&_21$$8, "/", &sub, "/"); ZVAL_LONG(&_22$$8, 1); - ZEPHIR_CALL_FUNCTION(&_23$$8, "preg_replace", &_16, 40, &_21$$8, &word, &text, &_22$$8); + ZEPHIR_CALL_FUNCTION(&_23$$8, "preg_replace", &_16, 41, &_21$$8, &word, &text, &_22$$8); zephir_check_call_status(); zephir_get_strval(&text, &_23$$8); ZEPHIR_CALL_METHOD(NULL, &matches, "next", NULL, 0); diff --git a/ext/phalcon/support/helper/str/endswith.zep.c b/ext/phalcon/support/helper/str/endswith.zep.c index d47294d6cd7..a077b1c426d 100644 --- a/ext/phalcon/support/helper/str/endswith.zep.c +++ b/ext/phalcon/support/helper/str/endswith.zep.c @@ -55,28 +55,21 @@ PHP_METHOD(Phalcon_Support_Helper_Str_EndsWith, __invoke) ZVAL_UNDEF(&haystack); ZVAL_UNDEF(&needle); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(haystack) Z_PARAM_STR(needle) Z_PARAM_OPTIONAL Z_PARAM_BOOL(ignoreCase) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &haystack_param, &needle_param, &ignoreCase_param); zephir_get_strval(&haystack, haystack_param); zephir_get_strval(&needle, needle_param); if (!ignoreCase_param) { ignoreCase = 1; } else { - ignoreCase = zephir_get_boolval(ignoreCase_param); - } - - + } if (ignoreCase) { ZVAL_BOOL(&_0, 1); } else { diff --git a/ext/phalcon/support/helper/str/firstbetween.zep.c b/ext/phalcon/support/helper/str/firstbetween.zep.c index e36e992a05c..6f4543bb0b5 100644 --- a/ext/phalcon/support/helper/str/firstbetween.zep.c +++ b/ext/phalcon/support/helper/str/firstbetween.zep.c @@ -52,7 +52,6 @@ PHP_METHOD(Phalcon_Support_Helper_Str_FirstBetween, __invoke) zend_long ZEPHIR_LAST_CALL_STATUS; zval *text_param = NULL, *start_param = NULL, *end_param = NULL, __$true, result, _0, _1; zval text, start, end, _2; - zval *this_ptr = getThis(); ZVAL_UNDEF(&text); ZVAL_UNDEF(&start); @@ -62,23 +61,17 @@ PHP_METHOD(Phalcon_Support_Helper_Str_FirstBetween, __invoke) ZVAL_UNDEF(&result); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(text) Z_PARAM_STR(start) Z_PARAM_STR(end) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &text_param, &start_param, &end_param); zephir_get_strval(&text, text_param); zephir_get_strval(&start, start_param); zephir_get_strval(&end, end_param); - - ZEPHIR_CALL_FUNCTION(&result, "mb_strstr", NULL, 0, &text, &start); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_0); diff --git a/ext/phalcon/support/helper/str/friendly.zep.c b/ext/phalcon/support/helper/str/friendly.zep.c index 66676f71679..1332ddcb7ba 100644 --- a/ext/phalcon/support/helper/str/friendly.zep.c +++ b/ext/phalcon/support/helper/str/friendly.zep.c @@ -74,7 +74,6 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Friendly, __invoke) ZVAL_UNDEF(&_7); ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_6$$5); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 4) Z_PARAM_STR(text) @@ -83,10 +82,8 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Friendly, __invoke) Z_PARAM_BOOL(lowercase) Z_PARAM_ZVAL_OR_NULL(replace) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 3, &text_param, &separator_param, &lowercase_param, &replace); if (UNEXPECTED(Z_TYPE_P(text_param) != IS_STRING && Z_TYPE_P(text_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'text' must be of the type string")); @@ -114,16 +111,13 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Friendly, __invoke) if (!lowercase_param) { lowercase = 1; } else { - lowercase = zephir_get_boolval(lowercase_param); - } + } if (!replace) { replace = &replace_sub; ZEPHIR_CPY_WRT(replace, &__$null); } else { ZEPHIR_SEPARATE_PARAM(replace); } - - if (zephir_is_true(replace)) { ZEPHIR_CALL_METHOD(&_0$$3, this_ptr, "checkreplace", NULL, 0, replace); zephir_check_call_status(); @@ -145,7 +139,7 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Friendly, __invoke) ZVAL_STRING(&_4, "/[^a-zA-Z0-9\\/_|+ -]/"); ZEPHIR_INIT_VAR(&_5); ZVAL_STRING(&_5, ""); - ZEPHIR_CALL_FUNCTION(&friendly, "preg_replace", NULL, 40, &_4, &_5, &text); + ZEPHIR_CALL_FUNCTION(&friendly, "preg_replace", NULL, 41, &_4, &_5, &text); zephir_check_call_status(); if (lowercase) { ZEPHIR_INIT_VAR(&_6$$5); @@ -154,7 +148,7 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Friendly, __invoke) } ZEPHIR_INIT_NVAR(&_4); ZVAL_STRING(&_4, "/[\\/_|+ -]+/"); - ZEPHIR_CALL_FUNCTION(&_7, "preg_replace", NULL, 40, &_4, &separator, &friendly); + ZEPHIR_CALL_FUNCTION(&_7, "preg_replace", NULL, 41, &_4, &separator, &friendly); zephir_check_call_status(); ZEPHIR_CPY_WRT(&friendly, &_7); zephir_fast_trim(return_value, &friendly, &separator, ZEPHIR_TRIM_BOTH); @@ -172,23 +166,16 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Friendly, checkReplace) zend_bool _0; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *replace = NULL, replace_sub, _1$$4; - zval *this_ptr = getThis(); ZVAL_UNDEF(&replace_sub); ZVAL_UNDEF(&_1$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(replace) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &replace); ZEPHIR_SEPARATE_PARAM(replace); - - _0 = Z_TYPE_P(replace) != IS_ARRAY; if (_0) { _0 = Z_TYPE_P(replace) != IS_STRING; @@ -219,7 +206,6 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Friendly, getMatrix) zend_long ZEPHIR_LAST_CALL_STATUS; zval *replace_param = NULL, item, *_0, _1, _2$$3, _3$$4; zval replace, matrix; - zval *this_ptr = getThis(); ZVAL_UNDEF(&replace); ZVAL_UNDEF(&matrix); @@ -227,19 +213,13 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Friendly, getMatrix) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(replace) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &replace_param); zephir_get_arrval(&replace, replace_param); - - ZEPHIR_INIT_VAR(&matrix); zephir_create_array(&matrix, 79, 0); add_assoc_stringl_ex(&matrix, SL("Š"), SL("S")); diff --git a/ext/phalcon/support/helper/str/humanize.zep.c b/ext/phalcon/support/helper/str/humanize.zep.c index 76db4429adc..8d572b10a04 100644 --- a/ext/phalcon/support/helper/str/humanize.zep.c +++ b/ext/phalcon/support/helper/str/humanize.zep.c @@ -48,36 +48,30 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Humanize, __invoke) zend_long ZEPHIR_LAST_CALL_STATUS; zval *text_param = NULL, result, _0, _1, _2; zval text; - zval *this_ptr = getThis(); ZVAL_UNDEF(&text); ZVAL_UNDEF(&result); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(text) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &text_param); zephir_get_strval(&text, text_param); - - ZEPHIR_INIT_VAR(&_0); zephir_fast_trim(&_0, &text, NULL , ZEPHIR_TRIM_BOTH); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "#[_-]+#"); ZEPHIR_INIT_VAR(&_2); ZVAL_STRING(&_2, " "); - ZEPHIR_CALL_FUNCTION(&result, "preg_replace", NULL, 40, &_1, &_2, &_0); + ZEPHIR_CALL_FUNCTION(&result, "preg_replace", NULL, 41, &_1, &_2, &_0); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_1); if (Z_TYPE_P(&result) == IS_NULL) { + ZEPHIR_INIT_NVAR(&_1); ZVAL_STRING(&_1, ""); } else { ZEPHIR_CPY_WRT(&_1, &result); diff --git a/ext/phalcon/support/helper/str/includes.zep.c b/ext/phalcon/support/helper/str/includes.zep.c index 3ec2b06ec5c..fa79c8eb238 100644 --- a/ext/phalcon/support/helper/str/includes.zep.c +++ b/ext/phalcon/support/helper/str/includes.zep.c @@ -48,27 +48,20 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Includes, __invoke) zend_long ZEPHIR_LAST_CALL_STATUS; zval *haystack_param = NULL, *needle_param = NULL, _0; zval haystack, needle; - zval *this_ptr = getThis(); ZVAL_UNDEF(&haystack); ZVAL_UNDEF(&needle); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(haystack) Z_PARAM_STR(needle) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &haystack_param, &needle_param); zephir_get_strval(&haystack, haystack_param); zephir_get_strval(&needle, needle_param); - - - ZEPHIR_CALL_FUNCTION(&_0, "mb_strpos", NULL, 85, &haystack, &needle); + ZEPHIR_CALL_FUNCTION(&_0, "mb_strpos", NULL, 86, &haystack, &needle); zephir_check_call_status(); RETURN_MM_BOOL(!ZEPHIR_IS_FALSE_IDENTICAL(&_0)); } diff --git a/ext/phalcon/support/helper/str/increment.zep.c b/ext/phalcon/support/helper/str/increment.zep.c index 8476c1f2360..7fe01518bda 100644 --- a/ext/phalcon/support/helper/str/increment.zep.c +++ b/ext/phalcon/support/helper/str/increment.zep.c @@ -51,7 +51,6 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Increment, __invoke) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *text_param = NULL, *separator_param = NULL, parts, _1, _2, _0$$3; zval text, separator; - zval *this_ptr = getThis(); ZVAL_UNDEF(&text); ZVAL_UNDEF(&separator); @@ -59,17 +58,13 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Increment, __invoke) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_0$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(text) Z_PARAM_OPTIONAL Z_PARAM_STR(separator) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &text_param, &separator_param); zephir_get_strval(&text, text_param); if (!separator_param) { @@ -78,13 +73,11 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Increment, __invoke) } else { zephir_get_strval(&separator, separator_param); } - - ZEPHIR_INIT_VAR(&parts); zephir_fast_explode(&parts, &separator, &text, LONG_MAX); number = 1; if (1 == zephir_array_isset_long(&parts, 1)) { - ZEPHIR_OBS_VAR(&_0$$3); + zephir_memory_observe(&_0$$3); zephir_array_fetch_long(&_0$$3, &parts, 1, PH_NOISY, "phalcon/Support/Helper/Str/Increment.zep", 35); number = (zephir_get_intval(&_0$$3) + 1); } diff --git a/ext/phalcon/support/helper/str/interpolate.zep.c b/ext/phalcon/support/helper/str/interpolate.zep.c index 12df436bf12..0510ff93fad 100644 --- a/ext/phalcon/support/helper/str/interpolate.zep.c +++ b/ext/phalcon/support/helper/str/interpolate.zep.c @@ -54,7 +54,6 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Interpolate, __invoke) zval context, replace; zval *message_param = NULL, *context_param = NULL, *leftToken_param = NULL, *rightToken_param = NULL, key, value, *_0$$3, _1$$3, _4$$4, _5$$5; zval message, leftToken, rightToken; - zval *this_ptr = getThis(); ZVAL_UNDEF(&message); ZVAL_UNDEF(&leftToken); @@ -66,8 +65,6 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Interpolate, __invoke) ZVAL_UNDEF(&_5$$5); ZVAL_UNDEF(&context); ZVAL_UNDEF(&replace); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 4) Z_PARAM_STR(message) Z_PARAM_OPTIONAL @@ -75,10 +72,8 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Interpolate, __invoke) Z_PARAM_STR(leftToken) Z_PARAM_STR(rightToken) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 3, &message_param, &context_param, &leftToken_param, &rightToken_param); zephir_get_strval(&message, message_param); if (!context_param) { @@ -99,8 +94,6 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Interpolate, __invoke) } else { zephir_get_strval(&rightToken, rightToken_param); } - - if (!(ZEPHIR_IS_EMPTY(&context))) { ZEPHIR_INIT_VAR(&replace); array_init(&replace); diff --git a/ext/phalcon/support/helper/str/interpolate.zep.h b/ext/phalcon/support/helper/str/interpolate.zep.h index 6fa8c15713f..34874c14dea 100644 --- a/ext/phalcon/support/helper/str/interpolate.zep.h +++ b/ext/phalcon/support/helper/str/interpolate.zep.h @@ -7,11 +7,7 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Interpolate, __invoke); ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_support_helper_str_interpolate___invoke, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, context, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, context, IS_ARRAY, 0, "[]") ZEND_ARG_TYPE_INFO(0, leftToken, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, rightToken, IS_STRING, 0) ZEND_END_ARG_INFO() diff --git a/ext/phalcon/support/helper/str/isanagram.zep.c b/ext/phalcon/support/helper/str/isanagram.zep.c index da69c4354ca..77423c2081f 100644 --- a/ext/phalcon/support/helper/str/isanagram.zep.c +++ b/ext/phalcon/support/helper/str/isanagram.zep.c @@ -49,28 +49,21 @@ PHP_METHOD(Phalcon_Support_Helper_Str_IsAnagram, __invoke) zend_long ZEPHIR_LAST_CALL_STATUS; zval *first_param = NULL, *second_param = NULL, _0, _1, _2; zval first, second; - zval *this_ptr = getThis(); ZVAL_UNDEF(&first); ZVAL_UNDEF(&second); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(first) Z_PARAM_STR(second) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &first_param, &second_param); zephir_get_strval(&first, first_param); zephir_get_strval(&second, second_param); - - ZVAL_LONG(&_0, 1); ZEPHIR_CALL_FUNCTION(&_1, "count_chars", NULL, 0, &first, &_0); zephir_check_call_status(); diff --git a/ext/phalcon/support/helper/str/islower.zep.c b/ext/phalcon/support/helper/str/islower.zep.c index fb91ba90025..f6011febd31 100644 --- a/ext/phalcon/support/helper/str/islower.zep.c +++ b/ext/phalcon/support/helper/str/islower.zep.c @@ -53,17 +53,13 @@ PHP_METHOD(Phalcon_Support_Helper_Str_IsLower, __invoke) ZVAL_UNDEF(&text); ZVAL_UNDEF(&encoding); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(text) Z_PARAM_OPTIONAL Z_PARAM_STR(encoding) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &text_param, &encoding_param); zephir_get_strval(&text, text_param); if (!encoding_param) { @@ -72,8 +68,6 @@ PHP_METHOD(Phalcon_Support_Helper_Str_IsLower, __invoke) } else { zephir_get_strval(&encoding, encoding_param); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "tolower", NULL, 0, &text, &encoding); zephir_check_call_status(); RETURN_MM_BOOL(ZEPHIR_IS_IDENTICAL(&text, &_0)); diff --git a/ext/phalcon/support/helper/str/ispalindrome.zep.c b/ext/phalcon/support/helper/str/ispalindrome.zep.c index 6b7405f7ed5..7eab15a2394 100644 --- a/ext/phalcon/support/helper/str/ispalindrome.zep.c +++ b/ext/phalcon/support/helper/str/ispalindrome.zep.c @@ -47,23 +47,16 @@ PHP_METHOD(Phalcon_Support_Helper_Str_IsPalindrome, __invoke) zend_long ZEPHIR_LAST_CALL_STATUS; zval *text_param = NULL, _0; zval text; - zval *this_ptr = getThis(); ZVAL_UNDEF(&text); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(text) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &text_param); zephir_get_strval(&text, text_param); - - ZEPHIR_CALL_FUNCTION(&_0, "strrev", NULL, 0, &text); zephir_check_call_status(); RETURN_MM_BOOL(ZEPHIR_IS_IDENTICAL(&_0, &text)); diff --git a/ext/phalcon/support/helper/str/isupper.zep.c b/ext/phalcon/support/helper/str/isupper.zep.c index d9ba17437c8..65d2be8a4a6 100644 --- a/ext/phalcon/support/helper/str/isupper.zep.c +++ b/ext/phalcon/support/helper/str/isupper.zep.c @@ -53,17 +53,13 @@ PHP_METHOD(Phalcon_Support_Helper_Str_IsUpper, __invoke) ZVAL_UNDEF(&text); ZVAL_UNDEF(&encoding); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(text) Z_PARAM_OPTIONAL Z_PARAM_STR(encoding) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &text_param, &encoding_param); zephir_get_strval(&text, text_param); if (!encoding_param) { @@ -72,8 +68,6 @@ PHP_METHOD(Phalcon_Support_Helper_Str_IsUpper, __invoke) } else { zephir_get_strval(&encoding, encoding_param); } - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "toupper", NULL, 0, &text, &encoding); zephir_check_call_status(); RETURN_MM_BOOL(ZEPHIR_IS_IDENTICAL(&text, &_0)); diff --git a/ext/phalcon/support/helper/str/kebabcase.zep.c b/ext/phalcon/support/helper/str/kebabcase.zep.c index 2896912a3cb..21d31d57e94 100644 --- a/ext/phalcon/support/helper/str/kebabcase.zep.c +++ b/ext/phalcon/support/helper/str/kebabcase.zep.c @@ -54,17 +54,14 @@ PHP_METHOD(Phalcon_Support_Helper_Str_KebabCase, __invoke) ZVAL_UNDEF(&text); ZVAL_UNDEF(&delimiters); ZVAL_UNDEF(&output); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(text) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(delimiters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &text_param, &delimiters_param); zephir_get_strval(&text, text_param); if (!delimiters_param) { @@ -72,8 +69,6 @@ PHP_METHOD(Phalcon_Support_Helper_Str_KebabCase, __invoke) } else { zephir_get_strval(&delimiters, delimiters_param); } - - ZEPHIR_CALL_METHOD(&output, this_ptr, "processarray", NULL, 0, &text, &delimiters); zephir_check_call_status(); zephir_fast_join_str(return_value, SL("-"), &output); diff --git a/ext/phalcon/support/helper/str/len.zep.c b/ext/phalcon/support/helper/str/len.zep.c index 3981a76e3c9..d3004d6a760 100644 --- a/ext/phalcon/support/helper/str/len.zep.c +++ b/ext/phalcon/support/helper/str/len.zep.c @@ -48,21 +48,16 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Len, __invoke) zend_long ZEPHIR_LAST_CALL_STATUS; zval *text_param = NULL, *encoding_param = NULL; zval text, encoding; - zval *this_ptr = getThis(); ZVAL_UNDEF(&text); ZVAL_UNDEF(&encoding); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(text) Z_PARAM_OPTIONAL Z_PARAM_STR(encoding) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &text_param, &encoding_param); zephir_get_strval(&text, text_param); if (!encoding_param) { @@ -71,9 +66,7 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Len, __invoke) } else { zephir_get_strval(&encoding, encoding_param); } - - - ZEPHIR_RETURN_CALL_FUNCTION("mb_strlen", NULL, 233, &text, &encoding); + ZEPHIR_RETURN_CALL_FUNCTION("mb_strlen", NULL, 234, &text, &encoding); zephir_check_call_status(); RETURN_MM(); } diff --git a/ext/phalcon/support/helper/str/lower.zep.c b/ext/phalcon/support/helper/str/lower.zep.c index 7ed3aae6927..61983059edd 100644 --- a/ext/phalcon/support/helper/str/lower.zep.c +++ b/ext/phalcon/support/helper/str/lower.zep.c @@ -52,17 +52,13 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Lower, __invoke) ZVAL_UNDEF(&text); ZVAL_UNDEF(&encoding); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(text) Z_PARAM_OPTIONAL Z_PARAM_STR(encoding) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &text_param, &encoding_param); zephir_get_strval(&text, text_param); if (!encoding_param) { @@ -71,8 +67,6 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Lower, __invoke) } else { zephir_get_strval(&encoding, encoding_param); } - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "tolower", NULL, 0, &text, &encoding); zephir_check_call_status(); RETURN_MM(); diff --git a/ext/phalcon/support/helper/str/pascalcase.zep.c b/ext/phalcon/support/helper/str/pascalcase.zep.c index 098d3f0c7c9..21a05cc8bd8 100644 --- a/ext/phalcon/support/helper/str/pascalcase.zep.c +++ b/ext/phalcon/support/helper/str/pascalcase.zep.c @@ -58,17 +58,14 @@ PHP_METHOD(Phalcon_Support_Helper_Str_PascalCase, __invoke) ZVAL_UNDEF(&exploded); ZVAL_UNDEF(&output); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(text) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(delimiters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &text_param, &delimiters_param); zephir_get_strval(&text, text_param); if (!delimiters_param) { @@ -76,14 +73,12 @@ PHP_METHOD(Phalcon_Support_Helper_Str_PascalCase, __invoke) } else { zephir_get_strval(&delimiters, delimiters_param); } - - ZEPHIR_CALL_METHOD(&exploded, this_ptr, "processarray", NULL, 0, &text, &delimiters); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_0); ZEPHIR_INIT_NVAR(&_0); zephir_create_closure_ex(&_0, NULL, phalcon_0__closure_ce, SL("__invoke")); - ZEPHIR_CALL_FUNCTION(&output, "array_map", NULL, 69, &_0, &exploded); + ZEPHIR_CALL_FUNCTION(&output, "array_map", NULL, 70, &_0, &exploded); zephir_check_call_status(); zephir_fast_join_str(return_value, SL(""), &output); RETURN_MM(); @@ -103,7 +98,6 @@ PHP_METHOD(Phalcon_Support_Helper_Str_PascalCase, processArray) zend_long ZEPHIR_LAST_CALL_STATUS; zval *text_param = NULL, *delimiters_param = NULL, result, _0, _1, _3, _4, _11, _12, _13, _5$$4, _7$$4; zval text, delimiters, _10, _9$$4; - zval *this_ptr = getThis(); ZVAL_UNDEF(&text); ZVAL_UNDEF(&delimiters); @@ -121,17 +115,14 @@ PHP_METHOD(Phalcon_Support_Helper_Str_PascalCase, processArray) ZVAL_UNDEF(&_7$$4); ZVAL_UNDEF(&_6$$4); ZVAL_UNDEF(&_8$$4); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(text) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(delimiters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &text_param, &delimiters_param); zephir_get_strval(&text, text_param); if (!delimiters_param) { @@ -139,8 +130,6 @@ PHP_METHOD(Phalcon_Support_Helper_Str_PascalCase, processArray) } else { zephir_get_strval(&delimiters, delimiters_param); } - - if (ZEPHIR_IS_NULL(&delimiters)) { ZEPHIR_INIT_NVAR(&delimiters); ZVAL_STRING(&delimiters, "-_"); @@ -185,10 +174,11 @@ PHP_METHOD(Phalcon_Support_Helper_Str_PascalCase, processArray) ZEPHIR_CONCAT_SVS(&_10, "/[", &delimiters, "]+/"); ZVAL_LONG(&_11, -1); ZVAL_LONG(&_12, (2 | 1)); - ZEPHIR_CALL_FUNCTION(&result, "preg_split", NULL, 70, &_10, &text, &_11, &_12); + ZEPHIR_CALL_FUNCTION(&result, "preg_split", NULL, 71, &_10, &text, &_11, &_12); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_13); if (ZEPHIR_IS_FALSE_IDENTICAL(&result)) { + ZEPHIR_INIT_NVAR(&_13); array_init(&_13); } else { ZEPHIR_CPY_WRT(&_13, &result); diff --git a/ext/phalcon/support/helper/str/prefix.zep.c b/ext/phalcon/support/helper/str/prefix.zep.c index 159dc4d7c89..0cb765e8f49 100644 --- a/ext/phalcon/support/helper/str/prefix.zep.c +++ b/ext/phalcon/support/helper/str/prefix.zep.c @@ -47,25 +47,18 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Prefix, __invoke) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval prefix, _0; zval *text, text_sub, *prefix_param = NULL; - zval *this_ptr = getThis(); ZVAL_UNDEF(&text_sub); ZVAL_UNDEF(&prefix); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ZVAL(text) Z_PARAM_STR(prefix) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &text, &prefix_param); zephir_get_strval(&prefix, prefix_param); - - zephir_cast_to_string(&_0, text); ZEPHIR_CONCAT_VV(return_value, &prefix, &_0); RETURN_MM(); diff --git a/ext/phalcon/support/helper/str/random.zep.c b/ext/phalcon/support/helper/str/random.zep.c index 18b1ec1afa6..aefe30108b5 100644 --- a/ext/phalcon/support/helper/str/random.zep.c +++ b/ext/phalcon/support/helper/str/random.zep.c @@ -64,7 +64,6 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Random, __invoke) zephir_fcall_cache_entry *_20 = NULL; zval *type_param = NULL, *length_param = NULL, end, pools, text, _0, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16$$3, _17$$3, _18$$3, _19$$3; zend_long type, length, ZEPHIR_LAST_CALL_STATUS; - zval *this_ptr = getThis(); ZVAL_UNDEF(&end); ZVAL_UNDEF(&pools); @@ -88,30 +87,22 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Random, __invoke) ZVAL_UNDEF(&_17$$3); ZVAL_UNDEF(&_18$$3); ZVAL_UNDEF(&_19$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_LONG(type) Z_PARAM_LONG(length) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 2, &type_param, &length_param); if (!type_param) { type = 0; } else { - type = zephir_get_intval(type_param); - } + } if (!length_param) { length = 8; } else { - length = zephir_get_intval(length_param); - } - - + } ZEPHIR_INIT_VAR(&text); ZVAL_STRING(&text, ""); ZEPHIR_INIT_VAR(&_0); @@ -134,61 +125,61 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Random, __invoke) ZVAL_STRING(&_3, "a"); ZEPHIR_INIT_VAR(&_4); ZVAL_STRING(&_4, "z"); - ZEPHIR_CALL_FUNCTION(&_5, "range", NULL, 313, &_3, &_4); + ZEPHIR_CALL_FUNCTION(&_5, "range", NULL, 314, &_3, &_4); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_3); ZVAL_STRING(&_3, "A"); ZEPHIR_INIT_NVAR(&_4); ZVAL_STRING(&_4, "Z"); - ZEPHIR_CALL_FUNCTION(&_6, "range", NULL, 313, &_3, &_4); + ZEPHIR_CALL_FUNCTION(&_6, "range", NULL, 314, &_3, &_4); zephir_check_call_status(); zephir_fast_array_merge(&_2, &_5, &_6); zephir_array_update_long(&pools, 1, &_2, PH_COPY ZEPHIR_DEBUG_PARAMS_DUMMY); ZEPHIR_INIT_NVAR(&_2); ZVAL_LONG(&_7, 0); ZVAL_LONG(&_8, 9); - ZEPHIR_CALL_FUNCTION(&_9, "range", NULL, 313, &_7, &_8); + ZEPHIR_CALL_FUNCTION(&_9, "range", NULL, 314, &_7, &_8); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_3); ZVAL_STRING(&_3, "a"); ZEPHIR_INIT_NVAR(&_4); ZVAL_STRING(&_4, "f"); - ZEPHIR_CALL_FUNCTION(&_10, "range", NULL, 313, &_3, &_4); + ZEPHIR_CALL_FUNCTION(&_10, "range", NULL, 314, &_3, &_4); zephir_check_call_status(); zephir_fast_array_merge(&_2, &_9, &_10); zephir_array_update_long(&pools, 2, &_2, PH_COPY ZEPHIR_DEBUG_PARAMS_DUMMY); ZVAL_LONG(&_7, 0); ZVAL_LONG(&_8, 9); - ZEPHIR_CALL_FUNCTION(&_11, "range", NULL, 313, &_7, &_8); + ZEPHIR_CALL_FUNCTION(&_11, "range", NULL, 314, &_7, &_8); zephir_check_call_status(); zephir_array_update_long(&pools, 3, &_11, PH_COPY ZEPHIR_DEBUG_PARAMS_DUMMY); ZVAL_LONG(&_7, 1); ZVAL_LONG(&_8, 9); - ZEPHIR_CALL_FUNCTION(&_11, "range", NULL, 313, &_7, &_8); + ZEPHIR_CALL_FUNCTION(&_11, "range", NULL, 314, &_7, &_8); zephir_check_call_status(); zephir_array_update_long(&pools, 4, &_11, PH_COPY ZEPHIR_DEBUG_PARAMS_DUMMY); ZEPHIR_INIT_NVAR(&_2); ZVAL_STRING(&_2, "2345679ACDEFHJKLMNPRSTUVWXYZ"); - ZEPHIR_CALL_FUNCTION(&_11, "str_split", NULL, 87, &_2); + ZEPHIR_CALL_FUNCTION(&_11, "str_split", NULL, 88, &_2); zephir_check_call_status(); zephir_array_update_long(&pools, 5, &_11, PH_COPY ZEPHIR_DEBUG_PARAMS_DUMMY); ZVAL_LONG(&_7, 0); ZVAL_LONG(&_8, 9); - ZEPHIR_CALL_FUNCTION(&_11, "range", NULL, 313, &_7, &_8); + ZEPHIR_CALL_FUNCTION(&_11, "range", NULL, 314, &_7, &_8); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_2); ZVAL_STRING(&_2, "a"); ZEPHIR_INIT_NVAR(&_3); ZVAL_STRING(&_3, "z"); - ZEPHIR_CALL_FUNCTION(&_12, "range", NULL, 313, &_2, &_3); + ZEPHIR_CALL_FUNCTION(&_12, "range", NULL, 314, &_2, &_3); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_2); ZVAL_STRING(&_2, "A"); ZEPHIR_INIT_NVAR(&_3); ZVAL_STRING(&_3, "Z"); - ZEPHIR_CALL_FUNCTION(&_13, "range", NULL, 313, &_2, &_3); + ZEPHIR_CALL_FUNCTION(&_13, "range", NULL, 314, &_2, &_3); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&_14, "array_merge", NULL, 329, &_11, &_12, &_13); + ZEPHIR_CALL_FUNCTION(&_14, "array_merge", NULL, 330, &_11, &_12, &_13); zephir_check_call_status(); zephir_array_update_long(&pools, 0, &_14, PH_COPY ZEPHIR_DEBUG_PARAMS_DUMMY); zephir_array_fetch_long(&_15, &pools, type, PH_NOISY | PH_READONLY, "phalcon/Support/Helper/Str/Random.zep", 66); diff --git a/ext/phalcon/support/helper/str/reduceslashes.zep.c b/ext/phalcon/support/helper/str/reduceslashes.zep.c index b82ab545085..79a37f64cb1 100644 --- a/ext/phalcon/support/helper/str/reduceslashes.zep.c +++ b/ext/phalcon/support/helper/str/reduceslashes.zep.c @@ -47,33 +47,27 @@ PHP_METHOD(Phalcon_Support_Helper_Str_ReduceSlashes, __invoke) zend_long ZEPHIR_LAST_CALL_STATUS; zval *text_param = NULL, result, _0, _1; zval text; - zval *this_ptr = getThis(); ZVAL_UNDEF(&text); ZVAL_UNDEF(&result); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(text) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &text_param); zephir_get_strval(&text, text_param); - - ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "#(?= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(text) Z_PARAM_OPTIONAL Z_PARAM_STR_OR_NULL(delimiters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &text_param, &delimiters_param); zephir_get_strval(&text, text_param); if (!delimiters_param) { @@ -72,8 +69,6 @@ PHP_METHOD(Phalcon_Support_Helper_Str_SnakeCase, __invoke) } else { zephir_get_strval(&delimiters, delimiters_param); } - - ZEPHIR_CALL_METHOD(&output, this_ptr, "processarray", NULL, 0, &text, &delimiters); zephir_check_call_status(); zephir_fast_join_str(return_value, SL("_"), &output); diff --git a/ext/phalcon/support/helper/str/startswith.zep.c b/ext/phalcon/support/helper/str/startswith.zep.c index bcb6133a8b0..580e780ceb5 100644 --- a/ext/phalcon/support/helper/str/startswith.zep.c +++ b/ext/phalcon/support/helper/str/startswith.zep.c @@ -55,28 +55,21 @@ PHP_METHOD(Phalcon_Support_Helper_Str_StartsWith, __invoke) ZVAL_UNDEF(&haystack); ZVAL_UNDEF(&needle); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(haystack) Z_PARAM_STR(needle) Z_PARAM_OPTIONAL Z_PARAM_BOOL(ignoreCase) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &haystack_param, &needle_param, &ignoreCase_param); zephir_get_strval(&haystack, haystack_param); zephir_get_strval(&needle, needle_param); if (!ignoreCase_param) { ignoreCase = 1; } else { - ignoreCase = zephir_get_boolval(ignoreCase_param); - } - - + } if (ignoreCase) { ZVAL_BOOL(&_0, 1); } else { diff --git a/ext/phalcon/support/helper/str/suffix.zep.c b/ext/phalcon/support/helper/str/suffix.zep.c index 6982498e5ed..2bb4d75def0 100644 --- a/ext/phalcon/support/helper/str/suffix.zep.c +++ b/ext/phalcon/support/helper/str/suffix.zep.c @@ -47,25 +47,18 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Suffix, __invoke) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval suffix, _0; zval *text, text_sub, *suffix_param = NULL; - zval *this_ptr = getThis(); ZVAL_UNDEF(&text_sub); ZVAL_UNDEF(&suffix); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ZVAL(text) Z_PARAM_STR(suffix) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &text, &suffix_param); zephir_get_strval(&suffix, suffix_param); - - zephir_cast_to_string(&_0, text); ZEPHIR_CONCAT_VV(return_value, &_0, &suffix); RETURN_MM(); diff --git a/ext/phalcon/support/helper/str/ucwords.zep.c b/ext/phalcon/support/helper/str/ucwords.zep.c index 6fa5df7942c..1d37334d32b 100644 --- a/ext/phalcon/support/helper/str/ucwords.zep.c +++ b/ext/phalcon/support/helper/str/ucwords.zep.c @@ -48,22 +48,17 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Ucwords, __invoke) zend_long ZEPHIR_LAST_CALL_STATUS; zval *text_param = NULL, *encoding_param = NULL, _0; zval text, encoding; - zval *this_ptr = getThis(); ZVAL_UNDEF(&text); ZVAL_UNDEF(&encoding); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(text) Z_PARAM_OPTIONAL Z_PARAM_STR(encoding) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &text_param, &encoding_param); zephir_get_strval(&text, text_param); if (!encoding_param) { @@ -72,8 +67,6 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Ucwords, __invoke) } else { zephir_get_strval(&encoding, encoding_param); } - - ZVAL_LONG(&_0, 2); ZEPHIR_RETURN_CALL_FUNCTION("mb_convert_case", NULL, 12, &text, &_0, &encoding); zephir_check_call_status(); diff --git a/ext/phalcon/support/helper/str/uncamelize.zep.c b/ext/phalcon/support/helper/str/uncamelize.zep.c index 1a7bffb3333..e47db52e6b7 100644 --- a/ext/phalcon/support/helper/str/uncamelize.zep.c +++ b/ext/phalcon/support/helper/str/uncamelize.zep.c @@ -49,7 +49,6 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Uncamelize, __invoke) zend_long ZEPHIR_LAST_CALL_STATUS; zval *text_param = NULL, *delimiter_param = NULL, _1, _2, _3; zval text, delimiter, _0; - zval *this_ptr = getThis(); ZVAL_UNDEF(&text); ZVAL_UNDEF(&delimiter); @@ -57,17 +56,13 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Uncamelize, __invoke) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(text) Z_PARAM_OPTIONAL Z_PARAM_STR(delimiter) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &text_param, &delimiter_param); zephir_get_strval(&text, text_param); if (!delimiter_param) { @@ -76,15 +71,13 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Uncamelize, __invoke) } else { zephir_get_strval(&delimiter, delimiter_param); } - - ZEPHIR_INIT_VAR(&_0); ZEPHIR_CONCAT_VS(&_0, &delimiter, "\\0"); - ZEPHIR_CALL_FUNCTION(&_1, "lcfirst", NULL, 76, &text); + ZEPHIR_CALL_FUNCTION(&_1, "lcfirst", NULL, 77, &text); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_2); ZVAL_STRING(&_2, "/[A-Z]/"); - ZEPHIR_CALL_FUNCTION(&_3, "preg_replace", NULL, 40, &_2, &_0, &_1); + ZEPHIR_CALL_FUNCTION(&_3, "preg_replace", NULL, 41, &_2, &_0, &_1); zephir_check_call_status(); ZEPHIR_RETURN_CALL_FUNCTION("mb_strtolower", NULL, 10, &_3); zephir_check_call_status(); diff --git a/ext/phalcon/support/helper/str/underscore.zep.c b/ext/phalcon/support/helper/str/underscore.zep.c index fcce60eb32e..13cf0fd4388 100644 --- a/ext/phalcon/support/helper/str/underscore.zep.c +++ b/ext/phalcon/support/helper/str/underscore.zep.c @@ -48,36 +48,30 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Underscore, __invoke) zend_long ZEPHIR_LAST_CALL_STATUS; zval *text_param = NULL, result, _0, _1, _2; zval text; - zval *this_ptr = getThis(); ZVAL_UNDEF(&text); ZVAL_UNDEF(&result); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(text) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &text_param); zephir_get_strval(&text, text_param); - - ZEPHIR_INIT_VAR(&_0); zephir_fast_trim(&_0, &text, NULL , ZEPHIR_TRIM_BOTH); ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "#\\s+#"); ZEPHIR_INIT_VAR(&_2); ZVAL_STRING(&_2, "_"); - ZEPHIR_CALL_FUNCTION(&result, "preg_replace", NULL, 40, &_1, &_2, &_0); + ZEPHIR_CALL_FUNCTION(&result, "preg_replace", NULL, 41, &_1, &_2, &_0); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_1); if (Z_TYPE_P(&result) == IS_NULL) { + ZEPHIR_INIT_NVAR(&_1); ZVAL_STRING(&_1, ""); } else { ZEPHIR_CPY_WRT(&_1, &result); diff --git a/ext/phalcon/support/helper/str/upper.zep.c b/ext/phalcon/support/helper/str/upper.zep.c index 0caf5753e53..be2fb0b5707 100644 --- a/ext/phalcon/support/helper/str/upper.zep.c +++ b/ext/phalcon/support/helper/str/upper.zep.c @@ -52,17 +52,13 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Upper, __invoke) ZVAL_UNDEF(&text); ZVAL_UNDEF(&encoding); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(text) Z_PARAM_OPTIONAL Z_PARAM_STR(encoding) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &text_param, &encoding_param); zephir_get_strval(&text, text_param); if (!encoding_param) { @@ -71,8 +67,6 @@ PHP_METHOD(Phalcon_Support_Helper_Str_Upper, __invoke) } else { zephir_get_strval(&encoding, encoding_param); } - - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "toupper", NULL, 0, &text, &encoding); zephir_check_call_status(); RETURN_MM(); diff --git a/ext/phalcon/support/helperfactory.zep.c b/ext/phalcon/support/helperfactory.zep.c index 999e70aba4a..2a726b086a8 100644 --- a/ext/phalcon/support/helperfactory.zep.c +++ b/ext/phalcon/support/helperfactory.zep.c @@ -110,16 +110,12 @@ PHP_METHOD(Phalcon_Support_HelperFactory, __construct) zval *this_ptr = getThis(); ZVAL_UNDEF(&services); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(services) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &services_param); if (!services_param) { ZEPHIR_INIT_VAR(&services); @@ -127,8 +123,6 @@ PHP_METHOD(Phalcon_Support_HelperFactory, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&services, services_param); } - - ZEPHIR_CALL_METHOD(NULL, this_ptr, "init", NULL, 0, &services); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); @@ -155,21 +149,15 @@ PHP_METHOD(Phalcon_Support_HelperFactory, __call) ZVAL_UNDEF(&_1); ZVAL_UNDEF(&arguments); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(name) Z_PARAM_ARRAY(arguments) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &name_param, &arguments_param); zephir_get_strval(&name, name_param); zephir_get_arrval(&arguments, arguments_param); - - ZEPHIR_CALL_METHOD(&helper, this_ptr, "newinstance", NULL, 0, &name); zephir_check_call_status(); ZEPHIR_INIT_VAR(&_0); @@ -199,19 +187,13 @@ PHP_METHOD(Phalcon_Support_HelperFactory, newInstance) ZVAL_UNDEF(&name); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &name_param); zephir_get_strval(&name, name_param); - - ZEPHIR_CALL_METHOD(&_0, this_ptr, "getservice", NULL, 0, &name); zephir_check_call_status(); ZEPHIR_LAST_CALL_STATUS = zephir_create_instance(return_value, &_0); @@ -224,9 +206,6 @@ PHP_METHOD(Phalcon_Support_HelperFactory, newInstance) */ PHP_METHOD(Phalcon_Support_HelperFactory, getExceptionClass) { - zval *this_ptr = getThis(); - - RETURN_STRING("Phalcon\\Support\\Exception"); } @@ -238,9 +217,6 @@ PHP_METHOD(Phalcon_Support_HelperFactory, getExceptionClass) */ PHP_METHOD(Phalcon_Support_HelperFactory, getServices) { - zval *this_ptr = getThis(); - - zephir_create_array(return_value, 59, 0); add_assoc_stringl_ex(return_value, SL("blacklist"), SL("Phalcon\\Support\\Helper\\Arr\\Blacklist")); diff --git a/ext/phalcon/support/helperfactory.zep.h b/ext/phalcon/support/helperfactory.zep.h index 70e55e37822..a61059457a0 100644 --- a/ext/phalcon/support/helperfactory.zep.h +++ b/ext/phalcon/support/helperfactory.zep.h @@ -10,11 +10,7 @@ PHP_METHOD(Phalcon_Support_HelperFactory, getExceptionClass); PHP_METHOD(Phalcon_Support_HelperFactory, getServices); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_support_helperfactory___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, services, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, services, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, services, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_support_helperfactory___call, 0, 0, 2) diff --git a/ext/phalcon/support/registry.zep.c b/ext/phalcon/support/registry.zep.c index eeab06d3bd3..3ab121910c4 100644 --- a/ext/phalcon/support/registry.zep.c +++ b/ext/phalcon/support/registry.zep.c @@ -92,22 +92,16 @@ PHP_METHOD(Phalcon_Support_Registry, __construct) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *data_param = NULL; zval data; - zval *this_ptr = getThis(); ZVAL_UNDEF(&data); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &data_param); if (!data_param) { ZEPHIR_INIT_VAR(&data); @@ -115,9 +109,7 @@ PHP_METHOD(Phalcon_Support_Registry, __construct) } else { ZEPHIR_OBS_COPY_OR_DUP(&data, data_param); } - - - ZEPHIR_CALL_PARENT(NULL, phalcon_support_registry_ce, getThis(), "__construct", &_0, 0, &data); + ZEPHIR_CALL_PARENT(NULL, phalcon_support_registry_ce, getThis(), "__construct", NULL, 0, &data); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -129,21 +121,15 @@ PHP_METHOD(Phalcon_Support_Registry, __get) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *element_param = NULL; zval element; - zval *this_ptr = getThis(); ZVAL_UNDEF(&element); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(element) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &element_param); if (UNEXPECTED(Z_TYPE_P(element_param) != IS_STRING && Z_TYPE_P(element_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'element' must be of the type string")); @@ -154,9 +140,7 @@ PHP_METHOD(Phalcon_Support_Registry, __get) } else { ZEPHIR_INIT_VAR(&element); } - - - ZEPHIR_RETURN_CALL_PARENT(phalcon_support_registry_ce, getThis(), "get", &_0, 0, &element); + ZEPHIR_RETURN_CALL_PARENT(phalcon_support_registry_ce, getThis(), "get", NULL, 0, &element); zephir_check_call_status(); RETURN_MM(); } @@ -168,21 +152,15 @@ PHP_METHOD(Phalcon_Support_Registry, __isset) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *element_param = NULL; zval element; - zval *this_ptr = getThis(); ZVAL_UNDEF(&element); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(element) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &element_param); if (UNEXPECTED(Z_TYPE_P(element_param) != IS_STRING && Z_TYPE_P(element_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'element' must be of the type string")); @@ -193,9 +171,7 @@ PHP_METHOD(Phalcon_Support_Registry, __isset) } else { ZEPHIR_INIT_VAR(&element); } - - - ZEPHIR_RETURN_CALL_PARENT(phalcon_support_registry_ce, getThis(), "has", &_0, 0, &element); + ZEPHIR_RETURN_CALL_PARENT(phalcon_support_registry_ce, getThis(), "has", NULL, 0, &element); zephir_check_call_status(); RETURN_MM(); } @@ -207,23 +183,17 @@ PHP_METHOD(Phalcon_Support_Registry, __set) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *element_param = NULL, *value, value_sub; zval element; - zval *this_ptr = getThis(); ZVAL_UNDEF(&element); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(element) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &element_param, &value); if (UNEXPECTED(Z_TYPE_P(element_param) != IS_STRING && Z_TYPE_P(element_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'element' must be of the type string")); @@ -234,9 +204,7 @@ PHP_METHOD(Phalcon_Support_Registry, __set) } else { ZEPHIR_INIT_VAR(&element); } - - - ZEPHIR_CALL_PARENT(NULL, phalcon_support_registry_ce, getThis(), "set", &_0, 0, &element, value); + ZEPHIR_CALL_PARENT(NULL, phalcon_support_registry_ce, getThis(), "set", NULL, 0, &element, value); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -248,21 +216,15 @@ PHP_METHOD(Phalcon_Support_Registry, __unset) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *element_param = NULL; zval element; - zval *this_ptr = getThis(); ZVAL_UNDEF(&element); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(element) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &element_param); if (UNEXPECTED(Z_TYPE_P(element_param) != IS_STRING && Z_TYPE_P(element_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'element' must be of the type string")); @@ -273,9 +235,7 @@ PHP_METHOD(Phalcon_Support_Registry, __unset) } else { ZEPHIR_INIT_VAR(&element); } - - - ZEPHIR_CALL_PARENT(NULL, phalcon_support_registry_ce, getThis(), "remove", &_0, 0, &element); + ZEPHIR_CALL_PARENT(NULL, phalcon_support_registry_ce, getThis(), "remove", NULL, 0, &element); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -287,14 +247,10 @@ PHP_METHOD(Phalcon_Support_Registry, clear) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; - zval *this_ptr = getThis(); - - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - ZEPHIR_CALL_PARENT(NULL, phalcon_support_registry_ce, getThis(), "clear", &_0, 0); + ZEPHIR_CALL_PARENT(NULL, phalcon_support_registry_ce, getThis(), "clear", NULL, 0); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -308,14 +264,10 @@ PHP_METHOD(Phalcon_Support_Registry, count) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; - zval *this_ptr = getThis(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - - ZEPHIR_MM_GROW(); - - ZEPHIR_RETURN_CALL_PARENT(phalcon_support_registry_ce, getThis(), "count", &_0, 0); + ZEPHIR_RETURN_CALL_PARENT(phalcon_support_registry_ce, getThis(), "count", NULL, 0); zephir_check_call_status(); RETURN_MM(); } @@ -327,16 +279,13 @@ PHP_METHOD(Phalcon_Support_Registry, get) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *element_param = NULL, *defaultValue = NULL, defaultValue_sub, *cast_param = NULL, __$null; zval element, cast; - zval *this_ptr = getThis(); ZVAL_UNDEF(&element); ZVAL_UNDEF(&cast); ZVAL_UNDEF(&defaultValue_sub); ZVAL_NULL(&__$null); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(element) @@ -344,10 +293,8 @@ PHP_METHOD(Phalcon_Support_Registry, get) Z_PARAM_ZVAL_OR_NULL(defaultValue) Z_PARAM_STR_OR_NULL(cast) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, &element_param, &defaultValue, &cast_param); if (UNEXPECTED(Z_TYPE_P(element_param) != IS_STRING && Z_TYPE_P(element_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'element' must be of the type string")); @@ -375,9 +322,7 @@ PHP_METHOD(Phalcon_Support_Registry, get) ZEPHIR_INIT_VAR(&cast); } } - - - ZEPHIR_RETURN_CALL_PARENT(phalcon_support_registry_ce, getThis(), "get", &_0, 0, &element, defaultValue, &cast); + ZEPHIR_RETURN_CALL_PARENT(phalcon_support_registry_ce, getThis(), "get", NULL, 0, &element, defaultValue, &cast); zephir_check_call_status(); RETURN_MM(); } @@ -389,14 +334,10 @@ PHP_METHOD(Phalcon_Support_Registry, getIterator) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; - zval *this_ptr = getThis(); - - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - ZEPHIR_RETURN_CALL_PARENT(phalcon_support_registry_ce, getThis(), "getiterator", &_0, 0); + ZEPHIR_RETURN_CALL_PARENT(phalcon_support_registry_ce, getThis(), "getiterator", NULL, 0); zephir_check_call_status(); RETURN_MM(); } @@ -408,21 +349,15 @@ PHP_METHOD(Phalcon_Support_Registry, has) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *element_param = NULL; zval element; - zval *this_ptr = getThis(); ZVAL_UNDEF(&element); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(element) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &element_param); if (UNEXPECTED(Z_TYPE_P(element_param) != IS_STRING && Z_TYPE_P(element_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'element' must be of the type string")); @@ -433,9 +368,7 @@ PHP_METHOD(Phalcon_Support_Registry, has) } else { ZEPHIR_INIT_VAR(&element); } - - - ZEPHIR_RETURN_CALL_PARENT(phalcon_support_registry_ce, getThis(), "has", &_0, 0, &element); + ZEPHIR_RETURN_CALL_PARENT(phalcon_support_registry_ce, getThis(), "has", NULL, 0, &element); zephir_check_call_status(); RETURN_MM(); } @@ -447,22 +380,16 @@ PHP_METHOD(Phalcon_Support_Registry, init) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *data_param = NULL; zval data; - zval *this_ptr = getThis(); ZVAL_UNDEF(&data); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &data_param); if (!data_param) { ZEPHIR_INIT_VAR(&data); @@ -470,9 +397,7 @@ PHP_METHOD(Phalcon_Support_Registry, init) } else { ZEPHIR_OBS_COPY_OR_DUP(&data, data_param); } - - - ZEPHIR_CALL_PARENT(NULL, phalcon_support_registry_ce, getThis(), "init", &_0, 0, &data); + ZEPHIR_CALL_PARENT(NULL, phalcon_support_registry_ce, getThis(), "init", NULL, 0, &data); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -486,14 +411,10 @@ PHP_METHOD(Phalcon_Support_Registry, jsonSerialize) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; - zval *this_ptr = getThis(); - - + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - ZEPHIR_MM_GROW(); - - ZEPHIR_RETURN_CALL_PARENT(phalcon_support_registry_ce, getThis(), "jsonserialize", &_0, 0); + ZEPHIR_RETURN_CALL_PARENT(phalcon_support_registry_ce, getThis(), "jsonserialize", NULL, 0); zephir_check_call_status(); RETURN_MM(); } @@ -507,24 +428,16 @@ PHP_METHOD(Phalcon_Support_Registry, offsetExists) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *element, element_sub; - zval *this_ptr = getThis(); ZVAL_UNDEF(&element_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(element) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &element); - - - ZEPHIR_RETURN_CALL_PARENT(phalcon_support_registry_ce, getThis(), "has", &_0, 0, element); + ZEPHIR_RETURN_CALL_PARENT(phalcon_support_registry_ce, getThis(), "has", NULL, 0, element); zephir_check_call_status(); RETURN_MM(); } @@ -538,25 +451,17 @@ PHP_METHOD(Phalcon_Support_Registry, offsetGet) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval element_sub; zval *element; - zval *this_ptr = getThis(); ZVAL_UNDEF(&element_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(element) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &element); - - - ZEPHIR_RETURN_CALL_PARENT(phalcon_support_registry_ce, getThis(), "get", &_0, 0, element); + ZEPHIR_RETURN_CALL_PARENT(phalcon_support_registry_ce, getThis(), "get", NULL, 0, element); zephir_check_call_status(); RETURN_MM(); } @@ -570,26 +475,18 @@ PHP_METHOD(Phalcon_Support_Registry, offsetSet) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; - zval *element, element_sub, *value, value_sub; - zval *this_ptr = getThis(); + zval *offset, offset_sub, *value, value_sub; - ZVAL_UNDEF(&element_sub); + ZVAL_UNDEF(&offset_sub); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) - Z_PARAM_ZVAL(element) + Z_PARAM_ZVAL(offset) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); - zephir_fetch_params(1, 2, 0, &element, &value); - - - ZEPHIR_CALL_PARENT(NULL, phalcon_support_registry_ce, getThis(), "set", &_0, 0, element, value); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); + zephir_fetch_params(1, 2, 0, &offset, &value); + ZEPHIR_CALL_PARENT(NULL, phalcon_support_registry_ce, getThis(), "set", NULL, 0, offset, value); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -603,24 +500,16 @@ PHP_METHOD(Phalcon_Support_Registry, offsetUnset) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *element, element_sub; - zval *this_ptr = getThis(); ZVAL_UNDEF(&element_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(element) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &element); - - - ZEPHIR_CALL_PARENT(NULL, phalcon_support_registry_ce, getThis(), "remove", &_0, 0, element); + ZEPHIR_CALL_PARENT(NULL, phalcon_support_registry_ce, getThis(), "remove", NULL, 0, element); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -632,21 +521,15 @@ PHP_METHOD(Phalcon_Support_Registry, remove) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *element_param = NULL; zval element; - zval *this_ptr = getThis(); ZVAL_UNDEF(&element); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(element) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &element_param); if (UNEXPECTED(Z_TYPE_P(element_param) != IS_STRING && Z_TYPE_P(element_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'element' must be of the type string")); @@ -657,9 +540,7 @@ PHP_METHOD(Phalcon_Support_Registry, remove) } else { ZEPHIR_INIT_VAR(&element); } - - - ZEPHIR_CALL_PARENT(NULL, phalcon_support_registry_ce, getThis(), "remove", &_0, 0, &element); + ZEPHIR_CALL_PARENT(NULL, phalcon_support_registry_ce, getThis(), "remove", NULL, 0, &element); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -673,14 +554,10 @@ PHP_METHOD(Phalcon_Support_Registry, serialize) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; - zval *this_ptr = getThis(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - - ZEPHIR_MM_GROW(); - - ZEPHIR_RETURN_CALL_PARENT(phalcon_support_registry_ce, getThis(), "serialize", &_0, 0); + ZEPHIR_RETURN_CALL_PARENT(phalcon_support_registry_ce, getThis(), "serialize", NULL, 0); zephir_check_call_status(); RETURN_MM(); } @@ -692,23 +569,17 @@ PHP_METHOD(Phalcon_Support_Registry, set) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *element_param = NULL, *value, value_sub; zval element; - zval *this_ptr = getThis(); ZVAL_UNDEF(&element); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(element) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &element_param, &value); if (UNEXPECTED(Z_TYPE_P(element_param) != IS_STRING && Z_TYPE_P(element_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'element' must be of the type string")); @@ -719,9 +590,7 @@ PHP_METHOD(Phalcon_Support_Registry, set) } else { ZEPHIR_INIT_VAR(&element); } - - - ZEPHIR_CALL_PARENT(NULL, phalcon_support_registry_ce, getThis(), "set", &_0, 0, &element, value); + ZEPHIR_CALL_PARENT(NULL, phalcon_support_registry_ce, getThis(), "set", NULL, 0, &element, value); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } @@ -733,14 +602,10 @@ PHP_METHOD(Phalcon_Support_Registry, toArray) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; - zval *this_ptr = getThis(); - - + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - ZEPHIR_MM_GROW(); - - ZEPHIR_RETURN_CALL_PARENT(phalcon_support_registry_ce, getThis(), "toarray", &_0, 0); + ZEPHIR_RETURN_CALL_PARENT(phalcon_support_registry_ce, getThis(), "toarray", NULL, 0); zephir_check_call_status(); RETURN_MM(); } @@ -757,32 +622,23 @@ PHP_METHOD(Phalcon_Support_Registry, toArray) PHP_METHOD(Phalcon_Support_Registry, toJson) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zephir_fcall_cache_entry *_0 = NULL; - zval *options_param = NULL, _1; + zval *options_param = NULL, _0; zend_long options, ZEPHIR_LAST_CALL_STATUS; - zval *this_ptr = getThis(); - ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; + ZVAL_UNDEF(&_0); ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_LONG(options) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 1, &options_param); if (!options_param) { options = 79; } else { - options = zephir_get_intval(options_param); - } - - - ZVAL_LONG(&_1, options); - ZEPHIR_RETURN_CALL_PARENT(phalcon_support_registry_ce, getThis(), "tojson", &_0, 0, &_1); + } + ZVAL_LONG(&_0, options); + ZEPHIR_RETURN_CALL_PARENT(phalcon_support_registry_ce, getThis(), "tojson", NULL, 0, &_0); zephir_check_call_status(); RETURN_MM(); } @@ -796,24 +652,16 @@ PHP_METHOD(Phalcon_Support_Registry, unserialize) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *serialized, serialized_sub; - zval *this_ptr = getThis(); ZVAL_UNDEF(&serialized_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(serialized) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &serialized); - - - ZEPHIR_CALL_PARENT(NULL, phalcon_support_registry_ce, getThis(), "unserialize", &_0, 0, serialized); + ZEPHIR_CALL_PARENT(NULL, phalcon_support_registry_ce, getThis(), "unserialize", NULL, 0, serialized); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); } diff --git a/ext/phalcon/support/registry.zep.h b/ext/phalcon/support/registry.zep.h index 36411810765..ee7955e4ab5 100644 --- a/ext/phalcon/support/registry.zep.h +++ b/ext/phalcon/support/registry.zep.h @@ -27,11 +27,7 @@ PHP_METHOD(Phalcon_Support_Registry, toJson); PHP_METHOD(Phalcon_Support_Registry, unserialize); ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_support_registry___construct, 0, 0, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, data, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, data, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, data, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_support_registry___get, 0, 0, 1) @@ -74,11 +70,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_support_registry_init, 0, 0, IS_VOID, 0) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, data, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, data, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, data, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_support_registry_jsonserialize, 0, 0, IS_ARRAY, 0) @@ -88,17 +80,13 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_support_registry_offsete ZEND_ARG_INFO(0, element) ZEND_END_ARG_INFO() -#if PHP_VERSION_ID >= 80000 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_support_registry_offsetget, 0, 1, IS_MIXED, 0) -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_support_registry_offsetget, 0, 0, 1) -#endif ZEND_ARG_INFO(0, element) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_support_registry_offsetset, 0, 2, IS_VOID, 0) - ZEND_ARG_INFO(0, element) + ZEND_ARG_INFO(0, offset) ZEND_ARG_INFO(0, value) ZEND_END_ARG_INFO() diff --git a/ext/phalcon/support/version.zep.c b/ext/phalcon/support/version.zep.c index 983c1a1caa2..d31e6aeb152 100644 --- a/ext/phalcon/support/version.zep.c +++ b/ext/phalcon/support/version.zep.c @@ -102,19 +102,17 @@ PHP_METHOD(Phalcon_Support_Version, getVersion) { zval _0; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_create_array(return_value, 5, 0); ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, 5); zephir_array_fast_append(return_value, &_0); ZEPHIR_INIT_NVAR(&_0); - ZVAL_LONG(&_0, 4); + ZVAL_LONG(&_0, 5); zephir_array_fast_append(return_value, &_0); ZEPHIR_INIT_NVAR(&_0); ZVAL_LONG(&_0, 0); @@ -136,22 +134,14 @@ PHP_METHOD(Phalcon_Support_Version, getSpecial) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *special_param = NULL, suffix; zend_long special; - zval *this_ptr = getThis(); ZVAL_UNDEF(&suffix); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(special) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &special_param); - special = zephir_get_intval(special_param); - - do { if (special == 1) { ZEPHIR_INIT_VAR(&suffix); @@ -200,21 +190,20 @@ PHP_METHOD(Phalcon_Support_Version, get) ZVAL_UNDEF(&suffix); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&result); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&version, this_ptr, "getversion", NULL, 0); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&major); + zephir_memory_observe(&major); zephir_array_fetch_long(&major, &version, 0, PH_NOISY, "phalcon/Support/Version.zep", 122); - ZEPHIR_OBS_VAR(&medium); + zephir_memory_observe(&medium); zephir_array_fetch_long(&medium, &version, 1, PH_NOISY, "phalcon/Support/Version.zep", 123); - ZEPHIR_OBS_VAR(&minor); + zephir_memory_observe(&minor); zephir_array_fetch_long(&minor, &version, 2, PH_NOISY, "phalcon/Support/Version.zep", 124); - ZEPHIR_OBS_VAR(&special); + zephir_memory_observe(&special); zephir_array_fetch_long(&special, &version, 3, PH_NOISY, "phalcon/Support/Version.zep", 125); - ZEPHIR_OBS_VAR(&specialNumber); + zephir_memory_observe(&specialNumber); zephir_array_fetch_long(&specialNumber, &version, 4, PH_NOISY, "phalcon/Support/Version.zep", 126); ZEPHIR_INIT_VAR(&_0); ZEPHIR_CONCAT_VSVSV(&_0, &major, ".", &medium, ".", &minor); @@ -253,29 +242,28 @@ PHP_METHOD(Phalcon_Support_Version, getId) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_CALL_METHOD(&version, this_ptr, "getversion", NULL, 0); zephir_check_call_status(); - ZEPHIR_OBS_VAR(&major); + zephir_memory_observe(&major); zephir_array_fetch_long(&major, &version, 0, PH_NOISY, "phalcon/Support/Version.zep", 160); - ZEPHIR_OBS_VAR(&medium); + zephir_memory_observe(&medium); zephir_array_fetch_long(&medium, &version, 1, PH_NOISY, "phalcon/Support/Version.zep", 161); - ZEPHIR_OBS_VAR(&minor); + zephir_memory_observe(&minor); zephir_array_fetch_long(&minor, &version, 2, PH_NOISY, "phalcon/Support/Version.zep", 162); - ZEPHIR_OBS_VAR(&special); + zephir_memory_observe(&special); zephir_array_fetch_long(&special, &version, 3, PH_NOISY, "phalcon/Support/Version.zep", 163); - ZEPHIR_OBS_VAR(&specialNumber); + zephir_memory_observe(&specialNumber); zephir_array_fetch_long(&specialNumber, &version, 4, PH_NOISY, "phalcon/Support/Version.zep", 164); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "%02s"); - ZEPHIR_CALL_FUNCTION(&_1, "sprintf", NULL, 116, &_0, &medium); + ZEPHIR_CALL_FUNCTION(&_1, "sprintf", NULL, 117, &_0, &medium); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_0); ZVAL_STRING(&_0, "%02s"); - ZEPHIR_CALL_FUNCTION(&_2, "sprintf", NULL, 116, &_0, &minor); + ZEPHIR_CALL_FUNCTION(&_2, "sprintf", NULL, 117, &_0, &minor); zephir_check_call_status(); ZEPHIR_CONCAT_VVVVV(return_value, &major, &_1, &_2, &special, &specialNumber); RETURN_MM(); @@ -301,24 +289,17 @@ PHP_METHOD(Phalcon_Support_Version, getPart) ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_2$$4); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(part) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &part_param); - part = zephir_get_intval(part_param); - - ZEPHIR_CALL_METHOD(&version, this_ptr, "getversion", NULL, 0); zephir_check_call_status(); do { if (part == 0 || part == 1 || part == 2 || part == 4) { - ZEPHIR_OBS_VAR(&_0$$3); + zephir_memory_observe(&_0$$3); zephir_array_fetch_long(&_0$$3, &version, part, PH_NOISY, "phalcon/Support/Version.zep", 192); zephir_cast_to_string(&_1$$3, &_0$$3); RETURN_CTOR(&_1$$3); diff --git a/ext/phalcon/tag.zep.c b/ext/phalcon/tag.zep.c index 71d5f30d233..66189a714fd 100644 --- a/ext/phalcon/tag.zep.c +++ b/ext/phalcon/tag.zep.c @@ -120,23 +120,16 @@ PHP_METHOD(Phalcon_Tag, appendTitle) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *title, title_sub, _0, _1$$3; - zval *this_ptr = getThis(); ZVAL_UNDEF(&title_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(title) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &title); - - zephir_read_static_property_ce(&_0, phalcon_tag_ce, SL("documentAppendTitle"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_0) == IS_NULL) { ZEPHIR_INIT_VAR(&_1$$3); @@ -167,22 +160,15 @@ PHP_METHOD(Phalcon_Tag, checkField) zend_long ZEPHIR_LAST_CALL_STATUS; zephir_fcall_cache_entry *_0 = NULL; zval *parameters, parameters_sub, _1; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, ¶meters); - - ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "checkbox"); ZEPHIR_RETURN_CALL_SELF("inputfieldchecked", &_0, 0, &_1, parameters); @@ -206,22 +192,15 @@ PHP_METHOD(Phalcon_Tag, colorField) zend_long ZEPHIR_LAST_CALL_STATUS; zephir_fcall_cache_entry *_0 = NULL; zval *parameters, parameters_sub, _1; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, ¶meters); - - ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "color"); ZEPHIR_RETURN_CALL_SELF("inputfield", &_0, 0, &_1, parameters); @@ -245,22 +224,15 @@ PHP_METHOD(Phalcon_Tag, dateField) zend_long ZEPHIR_LAST_CALL_STATUS; zephir_fcall_cache_entry *_0 = NULL; zval *parameters, parameters_sub, _1; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, ¶meters); - - ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "date"); ZEPHIR_RETURN_CALL_SELF("inputfield", &_0, 0, &_1, parameters); @@ -284,22 +256,15 @@ PHP_METHOD(Phalcon_Tag, dateTimeField) zend_long ZEPHIR_LAST_CALL_STATUS; zephir_fcall_cache_entry *_0 = NULL; zval *parameters, parameters_sub, _1; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, ¶meters); - - ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "datetime"); ZEPHIR_RETURN_CALL_SELF("inputfield", &_0, 0, &_1, parameters); @@ -323,22 +288,15 @@ PHP_METHOD(Phalcon_Tag, dateTimeLocalField) zend_long ZEPHIR_LAST_CALL_STATUS; zephir_fcall_cache_entry *_0 = NULL; zval *parameters, parameters_sub, _1; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, ¶meters); - - ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "datetime-local"); ZEPHIR_RETURN_CALL_SELF("inputfield", &_0, 0, &_1, parameters); @@ -355,20 +313,15 @@ PHP_METHOD(Phalcon_Tag, displayTo) zend_long ZEPHIR_LAST_CALL_STATUS; zval *id_param = NULL, *value, value_sub; zval id; - zval *this_ptr = getThis(); ZVAL_UNDEF(&id); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(id) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &id_param, &value); if (UNEXPECTED(Z_TYPE_P(id_param) != IS_STRING && Z_TYPE_P(id_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'id' must be of the type string")); @@ -379,8 +332,6 @@ PHP_METHOD(Phalcon_Tag, displayTo) } else { ZEPHIR_INIT_VAR(&id); } - - ZEPHIR_CALL_SELF(NULL, "setdefault", NULL, 0, &id, value); zephir_check_call_status(); ZEPHIR_MM_RESTORE(); @@ -402,22 +353,15 @@ PHP_METHOD(Phalcon_Tag, emailField) zend_long ZEPHIR_LAST_CALL_STATUS; zephir_fcall_cache_entry *_0 = NULL; zval *parameters, parameters_sub, _1; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, ¶meters); - - ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "email"); ZEPHIR_RETURN_CALL_SELF("inputfield", &_0, 0, &_1, parameters); @@ -430,9 +374,6 @@ PHP_METHOD(Phalcon_Tag, emailField) */ PHP_METHOD(Phalcon_Tag, endForm) { - zval *this_ptr = getThis(); - - RETURN_STRING(""); } @@ -453,22 +394,15 @@ PHP_METHOD(Phalcon_Tag, fileField) zend_long ZEPHIR_LAST_CALL_STATUS; zephir_fcall_cache_entry *_0 = NULL; zval *parameters, parameters_sub, _1; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, ¶meters); - - ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "file"); ZEPHIR_RETURN_CALL_SELF("inputfield", &_0, 0, &_1, parameters); @@ -493,7 +427,6 @@ PHP_METHOD(Phalcon_Tag, formLegacy) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *parameters = NULL, parameters_sub, params, paramsAction, action, code, _3, _0$$6, _1$$7, _2$$8; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_UNDEF(¶ms); @@ -504,19 +437,13 @@ PHP_METHOD(Phalcon_Tag, formLegacy) ZVAL_UNDEF(&_0$$6); ZVAL_UNDEF(&_1$$7); ZVAL_UNDEF(&_2$$8); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, ¶meters); ZEPHIR_SEPARATE_PARAM(parameters); - - if (Z_TYPE_P(parameters) != IS_ARRAY) { ZEPHIR_INIT_VAR(¶ms); zephir_create_array(¶ms, 1, 0); @@ -524,7 +451,7 @@ PHP_METHOD(Phalcon_Tag, formLegacy) } else { ZEPHIR_CPY_WRT(¶ms, parameters); } - ZEPHIR_OBS_VAR(¶msAction); + zephir_memory_observe(¶msAction); if (!(zephir_array_isset_long_fetch(¶msAction, ¶ms, 0, 0))) { ZEPHIR_OBS_NVAR(¶msAction); zephir_array_isset_string_fetch(¶msAction, ¶ms, SL("action"), 0); @@ -569,7 +496,6 @@ PHP_METHOD(Phalcon_Tag, friendlyTitle) zend_bool lowercase; zval *text_param = NULL, *separator_param = NULL, *lowercase_param = NULL, *replace = NULL, replace_sub, __$null, ex, _2, _0$$3, _1$$3, _3$$4, _4$$4; zval text, separator; - zval *this_ptr = getThis(); ZVAL_UNDEF(&text); ZVAL_UNDEF(&separator); @@ -581,7 +507,6 @@ PHP_METHOD(Phalcon_Tag, friendlyTitle) ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_3$$4); ZVAL_UNDEF(&_4$$4); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 4) Z_PARAM_STR(text) @@ -590,10 +515,8 @@ PHP_METHOD(Phalcon_Tag, friendlyTitle) Z_PARAM_BOOL(lowercase) Z_PARAM_ZVAL_OR_NULL(replace) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 3, &text_param, &separator_param, &lowercase_param, &replace); zephir_get_strval(&text, text_param); if (!separator_param) { @@ -605,15 +528,11 @@ PHP_METHOD(Phalcon_Tag, friendlyTitle) if (!lowercase_param) { lowercase = 1; } else { - lowercase = zephir_get_boolval(lowercase_param); - } + } if (!replace) { replace = &replace_sub; replace = &__$null; } - - - /* try_start_1: */ ZEPHIR_INIT_VAR(&_0$$3); @@ -645,7 +564,7 @@ PHP_METHOD(Phalcon_Tag, friendlyTitle) object_init_ex(&_3$$4, phalcon_tag_exception_ce); ZEPHIR_CALL_METHOD(&_4$$4, &ex, "getmessage", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_METHOD(NULL, &_3$$4, "__construct", NULL, 32, &_4$$4); + ZEPHIR_CALL_METHOD(NULL, &_3$$4, "__construct", NULL, 33, &_4$$4); zephir_check_call_status(); zephir_throw_exception_debug(&_3$$4, "phalcon/Tag.zep", 308); ZEPHIR_MM_RESTORE(); @@ -661,7 +580,6 @@ PHP_METHOD(Phalcon_Tag, getDocType) { zval _0, _1$$3, _2$$4, _3$$4, _4$$5, _5$$5, _6$$6, _7$$6, _8$$7, _9$$7, _10$$8, _11$$8, _12$$9, _13$$9, _14$$10, _15$$10, _16$$11, _17$$11, _18$$12; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; - zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); @@ -682,9 +600,8 @@ PHP_METHOD(Phalcon_Tag, getDocType) ZVAL_UNDEF(&_16$$11); ZVAL_UNDEF(&_17$$11); ZVAL_UNDEF(&_18$$12); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_read_static_property_ce(&_0, phalcon_tag_ce, SL("documentType"), PH_NOISY_CC | PH_READONLY); do { @@ -778,24 +695,17 @@ PHP_METHOD(Phalcon_Tag, getEscaper) zend_long ZEPHIR_LAST_CALL_STATUS; zval *params_param = NULL, autoescape; zval params; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶ms); ZVAL_UNDEF(&autoescape); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ARRAY(params) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, ¶ms_param); ZEPHIR_OBS_COPY_OR_DUP(¶ms, params_param); - - - ZEPHIR_OBS_VAR(&autoescape); + zephir_memory_observe(&autoescape); if (!(zephir_array_isset_string_fetch(&autoescape, ¶ms, SL("escape"), 0))) { ZEPHIR_OBS_NVAR(&autoescape); zephir_read_static_property_ce(&autoescape, phalcon_tag_ce, SL("autoEscape"), PH_NOISY_CC); @@ -816,18 +726,15 @@ PHP_METHOD(Phalcon_Tag, getDI) zval di; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; - zval *this_ptr = getThis(); ZVAL_UNDEF(&di); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_OBS_VAR(&di); + zephir_memory_observe(&di); zephir_read_static_property_ce(&di, phalcon_tag_ce, SL("container"), PH_NOISY_CC); if (Z_TYPE_P(&di) == IS_NULL) { - ZEPHIR_CALL_CE_STATIC(&di, phalcon_di_di_ce, "getdefault", &_0, 0); + ZEPHIR_CALL_CE_STATIC(&di, phalcon_di_di_ce, "getdefault", NULL, 0); zephir_check_call_status(); } RETURN_CCTOR(&di); @@ -841,17 +748,15 @@ PHP_METHOD(Phalcon_Tag, getEscaperService) zval escaper, container, _0$$3, _1$$3; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *this_ptr = getThis(); ZVAL_UNDEF(&escaper); ZVAL_UNDEF(&container); ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_1$$3); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_OBS_VAR(&escaper); + zephir_memory_observe(&escaper); zephir_read_static_property_ce(&escaper, phalcon_tag_ce, SL("escaperService"), PH_NOISY_CC); if (Z_TYPE_P(&escaper) != IS_OBJECT) { ZEPHIR_CALL_SELF(&container, "getdi", NULL, 0); @@ -881,7 +786,6 @@ PHP_METHOD(Phalcon_Tag, getTitle) zend_long ZEPHIR_LAST_CALL_STATUS; zval *prepend_param = NULL, *append_param = NULL, __$true, items, output, title, documentTitle, documentAppendTitle, documentPrependTitle, documentTitleSeparator, escaper, _0, _2, _3, _4$$3, _6$$3, _5$$4, tmp$$5, *_7$$5, _8$$5, _9$$6, _11$$7, _13$$9, _15$$9, _14$$10, *_16$$11, _17$$11, _18$$12, _20$$13; zend_bool prepend, append; - zval *this_ptr = getThis(); ZVAL_BOOL(&__$true, 1); ZVAL_UNDEF(&items); @@ -909,30 +813,22 @@ PHP_METHOD(Phalcon_Tag, getTitle) ZVAL_UNDEF(&_18$$12); ZVAL_UNDEF(&_20$$13); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_BOOL(prepend) Z_PARAM_BOOL(append) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 2, &prepend_param, &append_param); if (!prepend_param) { prepend = 1; } else { - prepend = zephir_get_boolval(prepend_param); - } + } if (!append_param) { append = 1; } else { - append = zephir_get_boolval(append_param); - } - - + } ZEPHIR_INIT_VAR(&_1); zephir_create_array(&_1, 1, 0); zephir_array_update_string(&_1, SL("escape"), &__$true, PH_COPY | PH_SEPARATE); @@ -956,11 +852,11 @@ PHP_METHOD(Phalcon_Tag, getTitle) array_init(&_5$$4); zephir_update_static_property_ce(phalcon_tag_ce, ZEND_STRL("documentPrependTitle"), &_5$$4); } - ZEPHIR_OBS_VAR(&_6$$3); + zephir_memory_observe(&_6$$3); zephir_read_static_property_ce(&_6$$3, phalcon_tag_ce, SL("documentPrependTitle"), PH_NOISY_CC); ZEPHIR_CPY_WRT(&documentPrependTitle, &_6$$3); if (!(ZEPHIR_IS_EMPTY(&documentPrependTitle))) { - ZEPHIR_CALL_FUNCTION(&tmp$$5, "array_reverse", NULL, 295, &documentPrependTitle); + ZEPHIR_CALL_FUNCTION(&tmp$$5, "array_reverse", NULL, 297, &documentPrependTitle); zephir_check_call_status(); zephir_is_iterable(&tmp$$5, 0, "phalcon/Tag.zep", 443); if (Z_TYPE_P(&tmp$$5) == IS_ARRAY) { @@ -1003,7 +899,7 @@ PHP_METHOD(Phalcon_Tag, getTitle) array_init(&_14$$10); zephir_update_static_property_ce(phalcon_tag_ce, ZEND_STRL("documentAppendTitle"), &_14$$10); } - ZEPHIR_OBS_VAR(&_15$$9); + zephir_memory_observe(&_15$$9); zephir_read_static_property_ce(&_15$$9, phalcon_tag_ce, SL("documentAppendTitle"), PH_NOISY_CC); ZEPHIR_CPY_WRT(&documentAppendTitle, &_15$$9); if (!(ZEPHIR_IS_EMPTY(&documentAppendTitle))) { @@ -1055,12 +951,8 @@ PHP_METHOD(Phalcon_Tag, getTitle) PHP_METHOD(Phalcon_Tag, getTitleSeparator) { zval _0; - zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); - - - zephir_read_static_property_ce(&_0, phalcon_tag_ce, SL("documentTitleSeparator"), PH_NOISY_CC | PH_READONLY); RETURN_CTORW(&_0); } @@ -1073,17 +965,15 @@ PHP_METHOD(Phalcon_Tag, getUrlService) zval url, container, _0$$3, _1$$3; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *this_ptr = getThis(); ZVAL_UNDEF(&url); ZVAL_UNDEF(&container); ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(&_1$$3); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); - - ZEPHIR_MM_GROW(); - - ZEPHIR_OBS_VAR(&url); + zephir_memory_observe(&url); zephir_read_static_property_ce(&url, phalcon_tag_ce, SL("urlService"), PH_NOISY_CC); if (Z_TYPE_P(&url) != IS_OBJECT) { ZEPHIR_CALL_SELF(&container, "getdi", NULL, 0); @@ -1111,24 +1001,19 @@ PHP_METHOD(Phalcon_Tag, getValue) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval params; zval *name, name_sub, *params_param = NULL, _POST, value, _0$$3; - zval *this_ptr = getThis(); ZVAL_UNDEF(&name_sub); ZVAL_UNDEF(&_POST); ZVAL_UNDEF(&value); ZVAL_UNDEF(&_0$$3); ZVAL_UNDEF(¶ms); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ZVAL(name) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(params) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_get_global(&_POST, SL("_POST")); zephir_fetch_params(1, 1, 1, &name, ¶ms_param); if (!params_param) { @@ -1137,9 +1022,7 @@ PHP_METHOD(Phalcon_Tag, getValue) } else { zephir_get_arrval(¶ms, params_param); } - - - ZEPHIR_OBS_VAR(&value); + zephir_memory_observe(&value); if (!(zephir_array_isset_string_fetch(&value, ¶ms, SL("value"), 0))) { ZEPHIR_OBS_NVAR(&value); zephir_read_static_property_ce(&_0$$3, phalcon_tag_ce, SL("displayValues"), PH_NOISY_CC | PH_READONLY); @@ -1161,23 +1044,15 @@ PHP_METHOD(Phalcon_Tag, hasValue) { zend_bool _1; zval *name, name_sub, _POST, _0; - zval *this_ptr = getThis(); ZVAL_UNDEF(&name_sub); ZVAL_UNDEF(&_POST); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(name) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_get_global(&_POST, SL("_POST")); zephir_fetch_params_without_memory_grow(1, 0, &name); - - zephir_read_static_property_ce(&_0, phalcon_tag_ce, SL("displayValues"), PH_NOISY_CC | PH_READONLY); _1 = zephir_array_isset(&_0, name); if (!(_1)) { @@ -1203,22 +1078,15 @@ PHP_METHOD(Phalcon_Tag, hiddenField) zend_long ZEPHIR_LAST_CALL_STATUS; zephir_fcall_cache_entry *_0 = NULL; zval *parameters, parameters_sub, _1; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, ¶meters); - - ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "hidden"); ZEPHIR_RETURN_CALL_SELF("inputfield", &_0, 0, &_1, parameters); @@ -1242,7 +1110,6 @@ PHP_METHOD(Phalcon_Tag, image) zend_long ZEPHIR_LAST_CALL_STATUS; zend_bool local; zval *parameters = NULL, parameters_sub, *local_param = NULL, __$null, params, code, src, _5, _6, _0$$5, _1$$8, _2$$9, _3$$9, _4$$9; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_NULL(&__$null); @@ -1256,17 +1123,14 @@ PHP_METHOD(Phalcon_Tag, image) ZVAL_UNDEF(&_2$$9); ZVAL_UNDEF(&_3$$9); ZVAL_UNDEF(&_4$$9); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(parameters) Z_PARAM_BOOL(local) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 2, ¶meters, &local_param); if (!parameters) { parameters = ¶meters_sub; @@ -1275,10 +1139,7 @@ PHP_METHOD(Phalcon_Tag, image) if (!local_param) { local = 1; } else { - local = zephir_get_boolval(local_param); - } - - + } if (Z_TYPE_P(parameters) != IS_ARRAY) { ZEPHIR_INIT_VAR(¶ms); zephir_create_array(¶ms, 1, 0); @@ -1286,13 +1147,13 @@ PHP_METHOD(Phalcon_Tag, image) } else { ZEPHIR_CPY_WRT(¶ms, parameters); if (zephir_array_isset_long(¶ms, 1)) { - ZEPHIR_OBS_VAR(&_0$$5); + zephir_memory_observe(&_0$$5); zephir_array_fetch_long(&_0$$5, ¶ms, 1, PH_NOISY, "phalcon/Tag.zep", 581); local = zephir_get_boolval(&_0$$5); } } if (!(zephir_array_isset_string(¶ms, SL("src")))) { - ZEPHIR_OBS_VAR(&src); + zephir_memory_observe(&src); if (zephir_array_isset_long_fetch(&src, ¶ms, 0, 0)) { zephir_array_update_string(¶ms, SL("src"), &src, PH_COPY | PH_SEPARATE); } else { @@ -1338,23 +1199,16 @@ PHP_METHOD(Phalcon_Tag, imageInput) zend_long ZEPHIR_LAST_CALL_STATUS; zephir_fcall_cache_entry *_0 = NULL; zval *parameters, parameters_sub, _1, _2; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, ¶meters); - - ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "image"); ZVAL_BOOL(&_2, 1); @@ -1379,7 +1233,6 @@ PHP_METHOD(Phalcon_Tag, javascriptInclude) zend_long ZEPHIR_LAST_CALL_STATUS; zend_bool local, _3; zval *parameters = NULL, parameters_sub, *local_param = NULL, __$null, params, code, _4, _11, _12, _0$$3, _1$$5, _2$$7, _5$$8, _6$$10, _7$$11, _8$$12, _9$$12, _10$$12; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_NULL(&__$null); @@ -1397,17 +1250,14 @@ PHP_METHOD(Phalcon_Tag, javascriptInclude) ZVAL_UNDEF(&_8$$12); ZVAL_UNDEF(&_9$$12); ZVAL_UNDEF(&_10$$12); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(parameters) Z_PARAM_BOOL(local) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 2, ¶meters, &local_param); if (!parameters) { parameters = ¶meters_sub; @@ -1416,10 +1266,7 @@ PHP_METHOD(Phalcon_Tag, javascriptInclude) if (!local_param) { local = 1; } else { - local = zephir_get_boolval(local_param); - } - - + } if (Z_TYPE_P(parameters) != IS_ARRAY) { ZEPHIR_INIT_VAR(¶ms); zephir_create_array(¶ms, 2, 0); @@ -1431,12 +1278,12 @@ PHP_METHOD(Phalcon_Tag, javascriptInclude) ZEPHIR_CPY_WRT(¶ms, parameters); } if (zephir_array_isset_long(¶ms, 1)) { - ZEPHIR_OBS_VAR(&_1$$5); + zephir_memory_observe(&_1$$5); zephir_array_fetch_long(&_1$$5, ¶ms, 1, PH_NOISY, "phalcon/Tag.zep", 650); local = zephir_get_boolval(&_1$$5); } else { if (zephir_array_isset_string(¶ms, SL("local"))) { - ZEPHIR_OBS_VAR(&_2$$7); + zephir_memory_observe(&_2$$7); zephir_array_fetch_string(&_2$$7, ¶ms, SL("local"), PH_NOISY, "phalcon/Tag.zep", 653); local = zephir_get_boolval(&_2$$7); zephir_array_unset_string(¶ms, SL("local"), PH_SEPARATE); @@ -1501,7 +1348,6 @@ PHP_METHOD(Phalcon_Tag, linkTo) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *parameters, parameters_sub, *text = NULL, text_sub, *local = NULL, local_sub, __$null, __$true, params, action, query, url, code, _0, _1, _2; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_UNDEF(&text_sub); @@ -1516,7 +1362,6 @@ PHP_METHOD(Phalcon_Tag, linkTo) ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_ZVAL(parameters) @@ -1524,10 +1369,8 @@ PHP_METHOD(Phalcon_Tag, linkTo) Z_PARAM_ZVAL_OR_NULL(text) Z_PARAM_ZVAL(local) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 2, ¶meters, &text, &local); if (!text) { text = &text_sub; @@ -1541,8 +1384,6 @@ PHP_METHOD(Phalcon_Tag, linkTo) } else { ZEPHIR_SEPARATE_PARAM(local); } - - if (Z_TYPE_P(parameters) != IS_ARRAY) { ZEPHIR_INIT_VAR(¶ms); zephir_create_array(¶ms, 3, 0); @@ -1552,7 +1393,7 @@ PHP_METHOD(Phalcon_Tag, linkTo) } else { ZEPHIR_CPY_WRT(¶ms, parameters); } - ZEPHIR_OBS_VAR(&action); + zephir_memory_observe(&action); if (!(zephir_array_isset_long_fetch(&action, ¶ms, 0, 0))) { ZEPHIR_OBS_NVAR(&action); if (!(zephir_array_isset_string_fetch(&action, ¶ms, SL("action"), 0))) { @@ -1582,7 +1423,7 @@ PHP_METHOD(Phalcon_Tag, linkTo) zephir_array_unset_string(¶ms, SL("local"), PH_SEPARATE); } } - ZEPHIR_OBS_VAR(&query); + zephir_memory_observe(&query); if (zephir_array_isset_string_fetch(&query, ¶ms, SL("query"), 0)) { zephir_array_unset_string(¶ms, SL("query"), PH_SEPARATE); } else { @@ -1621,22 +1462,15 @@ PHP_METHOD(Phalcon_Tag, monthField) zend_long ZEPHIR_LAST_CALL_STATUS; zephir_fcall_cache_entry *_0 = NULL; zval *parameters, parameters_sub, _1; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, ¶meters); - - ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "month"); ZEPHIR_RETURN_CALL_SELF("inputfield", &_0, 0, &_1, parameters); @@ -1661,22 +1495,15 @@ PHP_METHOD(Phalcon_Tag, numericField) zend_long ZEPHIR_LAST_CALL_STATUS; zephir_fcall_cache_entry *_0 = NULL; zval *parameters, parameters_sub, _1; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, ¶meters); - - ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "number"); ZEPHIR_RETURN_CALL_SELF("inputfield", &_0, 0, &_1, parameters); @@ -1701,22 +1528,15 @@ PHP_METHOD(Phalcon_Tag, passwordField) zend_long ZEPHIR_LAST_CALL_STATUS; zephir_fcall_cache_entry *_0 = NULL; zval *parameters, parameters_sub, _1; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, ¶meters); - - ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "password"); ZEPHIR_RETURN_CALL_SELF("inputfield", &_0, 0, &_1, parameters); @@ -1733,23 +1553,16 @@ PHP_METHOD(Phalcon_Tag, prependTitle) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *title, title_sub, _0, _1$$3; - zval *this_ptr = getThis(); ZVAL_UNDEF(&title_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(title) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &title); - - zephir_read_static_property_ce(&_0, phalcon_tag_ce, SL("documentPrependTitle"), PH_NOISY_CC | PH_READONLY); if (Z_TYPE_P(&_0) == IS_NULL) { ZEPHIR_INIT_VAR(&_1$$3); @@ -1774,7 +1587,6 @@ PHP_METHOD(Phalcon_Tag, preload) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *parameters, parameters_sub, attributes, container, header, href, link, params, response, _2, _3, _0$$3, _4$$7, _5$$5, _6$$5, _7$$5, _8$$5, _9$$5; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_UNDEF(&attributes); @@ -1794,18 +1606,12 @@ PHP_METHOD(Phalcon_Tag, preload) ZVAL_UNDEF(&_8$$5); ZVAL_UNDEF(&_9$$5); ZVAL_UNDEF(&_10$$5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, ¶meters); - - ZEPHIR_INIT_VAR(¶ms); array_init(¶ms); if (Z_TYPE_P(parameters) != IS_ARRAY) { @@ -1816,7 +1622,7 @@ PHP_METHOD(Phalcon_Tag, preload) } else { ZEPHIR_CPY_WRT(¶ms, parameters); } - ZEPHIR_OBS_VAR(&href); + zephir_memory_observe(&href); zephir_array_isset_long_fetch(&href, ¶ms, 0, 0); ZEPHIR_CALL_SELF(&container, "getdi", NULL, 0); zephir_check_call_status(); @@ -1830,7 +1636,7 @@ PHP_METHOD(Phalcon_Tag, preload) } if (_1) { if (zephir_array_isset_long(¶ms, 1)) { - ZEPHIR_OBS_VAR(&attributes); + zephir_memory_observe(&attributes); zephir_array_fetch_long(&attributes, ¶ms, 1, PH_NOISY, "phalcon/Tag.zep", 840); } else { ZEPHIR_INIT_VAR(&_4$$7); @@ -1852,7 +1658,7 @@ PHP_METHOD(Phalcon_Tag, preload) zephir_fast_str_replace(&_5$$5, &_6$$5, &_7$$5, &href); ZEPHIR_INIT_VAR(&_8$$5); ZVAL_STRING(&_8$$5, "preload"); - ZEPHIR_CALL_METHOD(NULL, &link, "__construct", NULL, 498, &_8$$5, &_5$$5, &attributes); + ZEPHIR_CALL_METHOD(NULL, &link, "__construct", NULL, 499, &_8$$5, &_5$$5, &attributes); zephir_check_call_status(); ZEPHIR_INIT_NVAR(&_8$$5); object_init_ex(&_8$$5, phalcon_html_link_serializer_header_ce); @@ -1864,7 +1670,7 @@ PHP_METHOD(Phalcon_Tag, preload) ZEPHIR_INIT_VAR(&_10$$5); zephir_create_array(&_10$$5, 1, 0); zephir_array_fast_append(&_10$$5, &link); - ZEPHIR_CALL_METHOD(&_9$$5, &_8$$5, "serialize", NULL, 499, &_10$$5); + ZEPHIR_CALL_METHOD(&_9$$5, &_8$$5, "serialize", NULL, 500, &_10$$5); zephir_check_call_status(); ZEPHIR_INIT_VAR(&header); ZEPHIR_CONCAT_SV(&header, "Link: ", &_9$$5); @@ -1891,22 +1697,15 @@ PHP_METHOD(Phalcon_Tag, radioField) zend_long ZEPHIR_LAST_CALL_STATUS; zephir_fcall_cache_entry *_0 = NULL; zval *parameters, parameters_sub, _1; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, ¶meters); - - ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "radio"); ZEPHIR_RETURN_CALL_SELF("inputfieldchecked", &_0, 0, &_1, parameters); @@ -1931,22 +1730,15 @@ PHP_METHOD(Phalcon_Tag, rangeField) zend_long ZEPHIR_LAST_CALL_STATUS; zephir_fcall_cache_entry *_0 = NULL; zval *parameters, parameters_sub, _1; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, ¶meters); - - ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "range"); ZEPHIR_RETURN_CALL_SELF("inputfield", &_0, 0, &_1, parameters); @@ -1981,7 +1773,6 @@ PHP_METHOD(Phalcon_Tag, renderAttributes) zval attributes; zval *code_param = NULL, *attributes_param = NULL, __$null, order, escaper, attrs, attribute, value, escaped, key, newCode, *_0, _1, *_4, _5, _8, *_9, _10, _20$$12, _15$$13, _16$$13, _17$$13, _27$$17, _23$$18, _24$$18, _25$$18; zval code; - zval *this_ptr = getThis(); ZVAL_UNDEF(&code); ZVAL_NULL(&__$null); @@ -2006,16 +1797,12 @@ PHP_METHOD(Phalcon_Tag, renderAttributes) ZVAL_UNDEF(&_24$$18); ZVAL_UNDEF(&_25$$18); ZVAL_UNDEF(&attributes); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(code) Z_PARAM_ARRAY(attributes) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &code_param, &attributes_param); if (UNEXPECTED(Z_TYPE_P(code_param) != IS_STRING && Z_TYPE_P(code_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'code' must be of the type string")); @@ -2027,8 +1814,6 @@ PHP_METHOD(Phalcon_Tag, renderAttributes) ZEPHIR_INIT_VAR(&code); } ZEPHIR_OBS_COPY_OR_DUP(&attributes, attributes_param); - - ZEPHIR_INIT_VAR(&order); zephir_create_array(&order, 10, 0); zephir_array_update_string(&order, SL("rel"), &__$null, PH_COPY | PH_SEPARATE); @@ -2154,7 +1939,7 @@ PHP_METHOD(Phalcon_Tag, renderAttributes) zephir_gettype(&_16$$13, &value); ZEPHIR_INIT_NVAR(&_17$$13); ZEPHIR_CONCAT_SVSVS(&_17$$13, "Value at index: '", &key, "' type: '", &_16$$13, "' cannot be rendered"); - ZEPHIR_CALL_METHOD(NULL, &_15$$13, "__construct", &_18, 32, &_17$$13); + ZEPHIR_CALL_METHOD(NULL, &_15$$13, "__construct", &_18, 33, &_17$$13); zephir_check_call_status(); zephir_throw_exception_debug(&_15$$13, "phalcon/Tag.zep", 952); ZEPHIR_MM_RESTORE(); @@ -2200,7 +1985,7 @@ PHP_METHOD(Phalcon_Tag, renderAttributes) zephir_gettype(&_24$$18, &value); ZEPHIR_INIT_NVAR(&_25$$18); ZEPHIR_CONCAT_SVSVS(&_25$$18, "Value at index: '", &key, "' type: '", &_24$$18, "' cannot be rendered"); - ZEPHIR_CALL_METHOD(NULL, &_23$$18, "__construct", &_18, 32, &_25$$18); + ZEPHIR_CALL_METHOD(NULL, &_23$$18, "__construct", &_18, 33, &_25$$18); zephir_check_call_status(); zephir_throw_exception_debug(&_23$$18, "phalcon/Tag.zep", 952); ZEPHIR_MM_RESTORE(); @@ -2234,36 +2019,27 @@ PHP_METHOD(Phalcon_Tag, renderTitle) zend_long ZEPHIR_LAST_CALL_STATUS; zval *prepend_param = NULL, *append_param = NULL, _0, _1, _2, _3; zend_bool prepend, append; - zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_BOOL(prepend) Z_PARAM_BOOL(append) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 2, &prepend_param, &append_param); if (!prepend_param) { prepend = 1; } else { - prepend = zephir_get_boolval(prepend_param); - } + } if (!append_param) { append = 1; } else { - append = zephir_get_boolval(append_param); - } - - + } if (prepend) { ZVAL_BOOL(&_1, 1); } else { @@ -2292,15 +2068,13 @@ PHP_METHOD(Phalcon_Tag, resetInput) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval __$null, _0, _1, _2; - zval *this_ptr = getThis(); ZVAL_NULL(&__$null); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); ZEPHIR_INIT_VAR(&_0); array_init(&_0); @@ -2333,22 +2107,15 @@ PHP_METHOD(Phalcon_Tag, searchField) zend_long ZEPHIR_LAST_CALL_STATUS; zephir_fcall_cache_entry *_0 = NULL; zval *parameters, parameters_sub, _1; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, ¶meters); - - ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "search"); ZEPHIR_RETURN_CALL_SELF("inputfield", &_0, 0, &_1, parameters); @@ -2372,32 +2139,25 @@ PHP_METHOD(Phalcon_Tag, select) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *parameters, parameters_sub, *data = NULL, data_sub, __$null; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_UNDEF(&data_sub); ZVAL_NULL(&__$null); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ZVAL(parameters) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, ¶meters, &data); if (!data) { data = &data_sub; data = &__$null; } - - - ZEPHIR_RETURN_CALL_CE_STATIC(phalcon_tag_select_ce, "selectfield", &_0, 0, parameters, data); + ZEPHIR_RETURN_CALL_CE_STATIC(phalcon_tag_select_ce, "selectfield", NULL, 0, parameters, data); zephir_check_call_status(); RETURN_MM(); } @@ -2418,32 +2178,25 @@ PHP_METHOD(Phalcon_Tag, selectStatic) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_0 = NULL; zval *parameters, parameters_sub, *data = NULL, data_sub, __$null; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_UNDEF(&data_sub); ZVAL_NULL(&__$null); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ZVAL(parameters) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, ¶meters, &data); if (!data) { data = &data_sub; data = &__$null; } - - - ZEPHIR_RETURN_CALL_CE_STATIC(phalcon_tag_select_ce, "selectfield", &_0, 0, parameters, data); + ZEPHIR_RETURN_CALL_CE_STATIC(phalcon_tag_select_ce, "selectfield", NULL, 0, parameters, data); zephir_check_call_status(); RETURN_MM(); } @@ -2455,22 +2208,13 @@ PHP_METHOD(Phalcon_Tag, setAutoescape) { zval *autoescape_param = NULL, _0; zend_bool autoescape; - zval *this_ptr = getThis(); ZVAL_UNDEF(&_0); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_BOOL(autoescape) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &autoescape_param); - autoescape = zephir_get_boolval(autoescape_param); - - - ZEPHIR_INIT_ZVAL_NREF(_0); + ZVAL_UNDEF(&_0); ZVAL_BOOL(&_0, autoescape); zephir_update_static_property_ce(phalcon_tag_ce, ZEND_STRL("autoEscape"), &_0); } @@ -2484,20 +2228,15 @@ PHP_METHOD(Phalcon_Tag, setDefault) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *id_param = NULL, *value, value_sub; zval id; - zval *this_ptr = getThis(); ZVAL_UNDEF(&id); ZVAL_UNDEF(&value_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(id) Z_PARAM_ZVAL(value) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &id_param, &value); if (UNEXPECTED(Z_TYPE_P(id_param) != IS_STRING && Z_TYPE_P(id_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'id' must be of the type string")); @@ -2508,8 +2247,6 @@ PHP_METHOD(Phalcon_Tag, setDefault) } else { ZEPHIR_INIT_VAR(&id); } - - if (Z_TYPE_P(value) != IS_NULL) { _0$$3 = Z_TYPE_P(value) == IS_ARRAY; if (!(_0$$3)) { @@ -2533,35 +2270,27 @@ PHP_METHOD(Phalcon_Tag, setDefaults) zend_bool merge, _0; zval *values_param = NULL, *merge_param = NULL, _1, _2$$3, _3$$3; zval values; - zval *this_ptr = getThis(); ZVAL_UNDEF(&values); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(values) Z_PARAM_OPTIONAL Z_PARAM_BOOL(merge) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &values_param, &merge_param); ZEPHIR_OBS_COPY_OR_DUP(&values, values_param); if (!merge_param) { merge = 0; } else { - merge = zephir_get_boolval(merge_param); - } - - + } _0 = merge; if (_0) { - ZEPHIR_OBS_VAR(&_1); + zephir_memory_observe(&_1); zephir_read_static_property_ce(&_1, phalcon_tag_ce, SL("displayValues"), PH_NOISY_CC); _0 = Z_TYPE_P(&_1) == IS_ARRAY; } @@ -2582,20 +2311,12 @@ PHP_METHOD(Phalcon_Tag, setDefaults) PHP_METHOD(Phalcon_Tag, setDI) { zval *container, container_sub; - zval *this_ptr = getThis(); ZVAL_UNDEF(&container_sub); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_OBJECT_OF_CLASS(container, phalcon_di_diinterface_ce) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &container); - - zephir_update_static_property_ce(phalcon_tag_ce, ZEND_STRL("container"), container); } @@ -2607,32 +2328,23 @@ PHP_METHOD(Phalcon_Tag, setDocType) zend_bool _0; zval *doctype_param = NULL, _1$$3, _2$$4; zend_long doctype; - zval *this_ptr = getThis(); ZVAL_UNDEF(&_1$$3); ZVAL_UNDEF(&_2$$4); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(doctype) ZEND_PARSE_PARAMETERS_END(); -#endif - - zephir_fetch_params_without_memory_grow(1, 0, &doctype_param); - doctype = zephir_get_intval(doctype_param); - - _0 = doctype < 1; if (!(_0)) { _0 = doctype > 11; } if (_0) { - ZEPHIR_INIT_ZVAL_NREF(_1$$3); + ZVAL_UNDEF(&_1$$3); ZVAL_LONG(&_1$$3, 5); zephir_update_static_property_ce(phalcon_tag_ce, ZEND_STRL("documentType"), &_1$$3); } else { - ZEPHIR_INIT_ZVAL_NREF(_2$$4); + ZVAL_UNDEF(&_2$$4); ZVAL_LONG(&_2$$4, doctype); zephir_update_static_property_ce(phalcon_tag_ce, ZEND_STRL("documentType"), &_2$$4); } @@ -2646,22 +2358,15 @@ PHP_METHOD(Phalcon_Tag, setTitle) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *title_param = NULL; zval title; - zval *this_ptr = getThis(); ZVAL_UNDEF(&title); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(title) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &title_param); zephir_get_strval(&title, title_param); - - zephir_update_static_property_ce(phalcon_tag_ce, ZEND_STRL("documentTitle"), &title); ZEPHIR_MM_RESTORE(); } @@ -2674,22 +2379,15 @@ PHP_METHOD(Phalcon_Tag, setTitleSeparator) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zval *titleSeparator_param = NULL; zval titleSeparator; - zval *this_ptr = getThis(); ZVAL_UNDEF(&titleSeparator); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(titleSeparator) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, &titleSeparator_param); zephir_get_strval(&titleSeparator, titleSeparator_param); - - zephir_update_static_property_ce(phalcon_tag_ce, ZEND_STRL("documentTitleSeparator"), &titleSeparator); ZEPHIR_MM_RESTORE(); } @@ -2703,7 +2401,6 @@ PHP_METHOD(Phalcon_Tag, stylesheetLink) zend_long ZEPHIR_LAST_CALL_STATUS; zend_bool local; zval *parameters = NULL, parameters_sub, *local_param = NULL, __$null, params, code, _10, _11, _0$$3, _1$$5, _2$$7, _3$$8, _4$$10, _5$$11, _6$$12, _7$$12, _8$$12, _9$$13, _12$$14, _13$$14, _14$$15, _15$$15; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_NULL(&__$null); @@ -2725,17 +2422,14 @@ PHP_METHOD(Phalcon_Tag, stylesheetLink) ZVAL_UNDEF(&_13$$14); ZVAL_UNDEF(&_14$$15); ZVAL_UNDEF(&_15$$15); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(parameters) Z_PARAM_BOOL(local) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 0, 2, ¶meters, &local_param); if (!parameters) { parameters = ¶meters_sub; @@ -2744,10 +2438,7 @@ PHP_METHOD(Phalcon_Tag, stylesheetLink) if (!local_param) { local = 1; } else { - local = zephir_get_boolval(local_param); - } - - + } if (Z_TYPE_P(parameters) != IS_ARRAY) { ZEPHIR_INIT_VAR(¶ms); zephir_create_array(¶ms, 2, 0); @@ -2759,12 +2450,12 @@ PHP_METHOD(Phalcon_Tag, stylesheetLink) ZEPHIR_CPY_WRT(¶ms, parameters); } if (zephir_array_isset_long(¶ms, 1)) { - ZEPHIR_OBS_VAR(&_1$$5); + zephir_memory_observe(&_1$$5); zephir_array_fetch_long(&_1$$5, ¶ms, 1, PH_NOISY, "phalcon/Tag.zep", 1127); local = zephir_get_boolval(&_1$$5); } else { if (zephir_array_isset_string(¶ms, SL("local"))) { - ZEPHIR_OBS_VAR(&_2$$7); + zephir_memory_observe(&_2$$7); zephir_array_fetch_string(&_2$$7, ¶ms, SL("local"), PH_NOISY, "phalcon/Tag.zep", 1130); local = zephir_get_boolval(&_2$$7); zephir_array_unset_string(¶ms, SL("local"), PH_SEPARATE); @@ -2828,23 +2519,16 @@ PHP_METHOD(Phalcon_Tag, submitButton) zend_long ZEPHIR_LAST_CALL_STATUS; zephir_fcall_cache_entry *_0 = NULL; zval *parameters, parameters_sub, _1, _2; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, ¶meters); - - ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "submit"); ZVAL_BOOL(&_2, 1); @@ -2863,7 +2547,6 @@ PHP_METHOD(Phalcon_Tag, tagHtml) zend_bool selfClose, onlyStart, useEol; zval *tagName_param = NULL, *parameters = NULL, parameters_sub, *selfClose_param = NULL, *onlyStart_param = NULL, *useEol_param = NULL, __$null, params, localCode, _1, _3$$11; zval tagName, _0, _2$$10; - zval *this_ptr = getThis(); ZVAL_UNDEF(&tagName); ZVAL_UNDEF(&_0); @@ -2874,7 +2557,6 @@ PHP_METHOD(Phalcon_Tag, tagHtml) ZVAL_UNDEF(&localCode); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_3$$11); -#if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 5) Z_PARAM_STR(tagName) @@ -2884,10 +2566,8 @@ PHP_METHOD(Phalcon_Tag, tagHtml) Z_PARAM_BOOL(onlyStart) Z_PARAM_BOOL(useEol) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 4, &tagName_param, ¶meters, &selfClose_param, &onlyStart_param, &useEol_param); zephir_get_strval(&tagName, tagName_param); if (!parameters) { @@ -2897,20 +2577,15 @@ PHP_METHOD(Phalcon_Tag, tagHtml) if (!selfClose_param) { selfClose = 0; } else { - selfClose = zephir_get_boolval(selfClose_param); - } + } if (!onlyStart_param) { onlyStart = 0; } else { - onlyStart = zephir_get_boolval(onlyStart_param); - } + } if (!useEol_param) { useEol = 0; } else { - useEol = zephir_get_boolval(useEol_param); - } - - + } if (Z_TYPE_P(parameters) != IS_ARRAY) { ZEPHIR_INIT_VAR(¶ms); zephir_create_array(¶ms, 1, 0); @@ -2955,30 +2630,22 @@ PHP_METHOD(Phalcon_Tag, tagHtmlClose) zend_bool useEol; zval *tagName_param = NULL, *useEol_param = NULL, _0$$3; zval tagName; - zval *this_ptr = getThis(); ZVAL_UNDEF(&tagName); ZVAL_UNDEF(&_0$$3); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(tagName) Z_PARAM_OPTIONAL Z_PARAM_BOOL(useEol) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, &tagName_param, &useEol_param); zephir_get_strval(&tagName, tagName_param); if (!useEol_param) { useEol = 0; } else { - useEol = zephir_get_boolval(useEol_param); - } - - + } if (useEol) { ZEPHIR_INIT_VAR(&_0$$3); ZEPHIR_GET_CONSTANT(&_0$$3, "PHP_EOL"); @@ -3005,22 +2672,15 @@ PHP_METHOD(Phalcon_Tag, telField) zend_long ZEPHIR_LAST_CALL_STATUS; zephir_fcall_cache_entry *_0 = NULL; zval *parameters, parameters_sub, _1; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, ¶meters); - - ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "tel"); ZEPHIR_RETURN_CALL_SELF("inputfield", &_0, 0, &_1, parameters); @@ -3043,7 +2703,6 @@ PHP_METHOD(Phalcon_Tag, textArea) zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; zval *parameters, parameters_sub, params, id, name, content, code, _1, _2, _3, _0$$6; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_UNDEF(¶ms); @@ -3055,18 +2714,12 @@ PHP_METHOD(Phalcon_Tag, textArea) ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZVAL_UNDEF(&_0$$6); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, ¶meters); - - if (Z_TYPE_P(parameters) != IS_ARRAY) { ZEPHIR_INIT_VAR(¶ms); zephir_create_array(¶ms, 1, 0); @@ -3080,12 +2733,12 @@ PHP_METHOD(Phalcon_Tag, textArea) zephir_array_update_long(¶ms, 0, &_0$$6, PH_COPY | PH_SEPARATE ZEPHIR_DEBUG_PARAMS_DUMMY); } } - ZEPHIR_OBS_VAR(&id); + zephir_memory_observe(&id); zephir_array_fetch_long(&id, ¶ms, 0, PH_NOISY, "phalcon/Tag.zep", 1281); if (!(zephir_array_isset_string(¶ms, SL("name")))) { zephir_array_update_string(¶ms, SL("name"), &id, PH_COPY | PH_SEPARATE); } else { - ZEPHIR_OBS_VAR(&name); + zephir_memory_observe(&name); zephir_array_fetch_string(&name, ¶ms, SL("name"), PH_NOISY, "phalcon/Tag.zep", 1286); if (ZEPHIR_IS_EMPTY(&name)) { zephir_array_update_string(¶ms, SL("name"), &id, PH_COPY | PH_SEPARATE); @@ -3095,7 +2748,7 @@ PHP_METHOD(Phalcon_Tag, textArea) zephir_array_update_string(¶ms, SL("id"), &id, PH_COPY | PH_SEPARATE); } if (zephir_array_isset_string(¶ms, SL("value"))) { - ZEPHIR_OBS_VAR(&content); + zephir_memory_observe(&content); zephir_array_fetch_string(&content, ¶ms, SL("value"), PH_NOISY, "phalcon/Tag.zep", 1298); zephir_array_unset_string(¶ms, SL("value"), PH_SEPARATE); } else { @@ -3110,7 +2763,7 @@ PHP_METHOD(Phalcon_Tag, textArea) ZVAL_STRING(&_1, "", &_2, ""); @@ -3134,22 +2787,15 @@ PHP_METHOD(Phalcon_Tag, textField) zend_long ZEPHIR_LAST_CALL_STATUS; zephir_fcall_cache_entry *_0 = NULL; zval *parameters, parameters_sub, _1; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, ¶meters); - - ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "text"); ZEPHIR_RETURN_CALL_SELF("inputfield", &_0, 0, &_1, parameters); @@ -3173,22 +2819,15 @@ PHP_METHOD(Phalcon_Tag, timeField) zend_long ZEPHIR_LAST_CALL_STATUS; zephir_fcall_cache_entry *_0 = NULL; zval *parameters, parameters_sub, _1; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, ¶meters); - - ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "time"); ZEPHIR_RETURN_CALL_SELF("inputfield", &_0, 0, &_1, parameters); @@ -3212,22 +2851,15 @@ PHP_METHOD(Phalcon_Tag, urlField) zend_long ZEPHIR_LAST_CALL_STATUS; zephir_fcall_cache_entry *_0 = NULL; zval *parameters, parameters_sub, _1; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, ¶meters); - - ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "url"); ZEPHIR_RETURN_CALL_SELF("inputfield", &_0, 0, &_1, parameters); @@ -3251,22 +2883,15 @@ PHP_METHOD(Phalcon_Tag, weekField) zend_long ZEPHIR_LAST_CALL_STATUS; zephir_fcall_cache_entry *_0 = NULL; zval *parameters, parameters_sub, _1; - zval *this_ptr = getThis(); ZVAL_UNDEF(¶meters_sub); ZVAL_UNDEF(&_1); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_ZVAL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 0, ¶meters); - - ZEPHIR_INIT_VAR(&_1); ZVAL_STRING(&_1, "week"); ZEPHIR_RETURN_CALL_SELF("inputfield", &_0, 0, &_1, parameters); @@ -3292,7 +2917,6 @@ PHP_METHOD(Phalcon_Tag, inputField) zend_bool asValue, _1$$10; zval *type_param = NULL, *parameters, parameters_sub, *asValue_param = NULL, params, id, value, code, name, _3, _4, _0$$6, _2$$5; zval type; - zval *this_ptr = getThis(); ZVAL_UNDEF(&type); ZVAL_UNDEF(¶meters_sub); @@ -3305,27 +2929,20 @@ PHP_METHOD(Phalcon_Tag, inputField) ZVAL_UNDEF(&_4); ZVAL_UNDEF(&_0$$6); ZVAL_UNDEF(&_2$$5); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(type) Z_PARAM_ZVAL(parameters) Z_PARAM_OPTIONAL Z_PARAM_BOOL(asValue) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 1, &type_param, ¶meters, &asValue_param); zephir_get_strval(&type, type_param); if (!asValue_param) { asValue = 0; } else { - asValue = zephir_get_boolval(asValue_param); - } - - + } ZEPHIR_INIT_VAR(¶ms); array_init(¶ms); if (Z_TYPE_P(parameters) != IS_ARRAY) { @@ -3334,12 +2951,12 @@ PHP_METHOD(Phalcon_Tag, inputField) ZEPHIR_CPY_WRT(¶ms, parameters); } if (asValue == 0) { - ZEPHIR_OBS_VAR(&id); + zephir_memory_observe(&id); if (!(zephir_array_isset_long_fetch(&id, ¶ms, 0, 0))) { zephir_array_fetch_string(&_0$$6, ¶ms, SL("id"), PH_NOISY | PH_READONLY, "phalcon/Tag.zep", 1403); zephir_array_update_long(¶ms, 0, &_0$$6, PH_COPY | PH_SEPARATE ZEPHIR_DEBUG_PARAMS_DUMMY); } - ZEPHIR_OBS_VAR(&name); + zephir_memory_observe(&name); if (zephir_array_isset_string_fetch(&name, ¶ms, SL("name"), 0)) { if (ZEPHIR_IS_EMPTY(&name)) { zephir_array_update_string(¶ms, SL("name"), &id, PH_COPY | PH_SEPARATE); @@ -3361,7 +2978,7 @@ PHP_METHOD(Phalcon_Tag, inputField) zephir_array_update_string(¶ms, SL("value"), &_2$$5, PH_COPY | PH_SEPARATE); } else { if (!(zephir_array_isset_string(¶ms, SL("value")))) { - ZEPHIR_OBS_VAR(&value); + zephir_memory_observe(&value); if (zephir_array_isset_long_fetch(&value, ¶ms, 0, 0)) { zephir_array_update_string(¶ms, SL("value"), &value, PH_COPY | PH_SEPARATE); } @@ -3391,7 +3008,6 @@ PHP_METHOD(Phalcon_Tag, inputFieldChecked) zend_long ZEPHIR_LAST_CALL_STATUS; zval *type_param = NULL, *parameters, parameters_sub, params, value, id, code, name, currentValue, _1, _2, _6, _7, _0$$5, _4$$12, _5$$14; zval type; - zval *this_ptr = getThis(); ZVAL_UNDEF(&type); ZVAL_UNDEF(¶meters_sub); @@ -3408,20 +3024,14 @@ PHP_METHOD(Phalcon_Tag, inputFieldChecked) ZVAL_UNDEF(&_0$$5); ZVAL_UNDEF(&_4$$12); ZVAL_UNDEF(&_5$$14); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR(type) Z_PARAM_ZVAL(parameters) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 2, 0, &type_param, ¶meters); zephir_get_strval(&type, type_param); - - if (Z_TYPE_P(parameters) != IS_ARRAY) { ZEPHIR_INIT_VAR(¶ms); zephir_create_array(¶ms, 1, 0); @@ -3433,12 +3043,12 @@ PHP_METHOD(Phalcon_Tag, inputFieldChecked) zephir_array_fetch_string(&_0$$5, ¶ms, SL("id"), PH_NOISY | PH_READONLY, "phalcon/Tag.zep", 1464); zephir_array_update_long(¶ms, 0, &_0$$5, PH_COPY | PH_SEPARATE ZEPHIR_DEBUG_PARAMS_DUMMY); } - ZEPHIR_OBS_VAR(&id); + zephir_memory_observe(&id); zephir_array_fetch_long(&id, ¶ms, 0, PH_NOISY, "phalcon/Tag.zep", 1467); if (!(zephir_array_isset_string(¶ms, SL("name")))) { zephir_array_update_string(¶ms, SL("name"), &id, PH_COPY | PH_SEPARATE); } else { - ZEPHIR_OBS_VAR(&name); + zephir_memory_observe(&name); zephir_array_fetch_string(&name, ¶ms, SL("name"), PH_NOISY, "phalcon/Tag.zep", 1472); if (ZEPHIR_IS_EMPTY(&name)) { zephir_array_update_string(¶ms, SL("name"), &id, PH_COPY | PH_SEPARATE); @@ -3453,7 +3063,7 @@ PHP_METHOD(Phalcon_Tag, inputFieldChecked) zephir_array_update_string(¶ms, SL("id"), &id, PH_COPY | PH_SEPARATE); } } - ZEPHIR_OBS_VAR(¤tValue); + zephir_memory_observe(¤tValue); if (zephir_array_isset_string_fetch(¤tValue, ¶ms, SL("value"), 0)) { zephir_array_unset_string(¶ms, SL("value"), PH_SEPARATE); ZEPHIR_CALL_SELF(&value, "getvalue", NULL, 0, &id, ¶ms); diff --git a/ext/phalcon/tag.zep.h b/ext/phalcon/tag.zep.h index 5b75292974f..6568c3e0095 100644 --- a/ext/phalcon/tag.zep.h +++ b/ext/phalcon/tag.zep.h @@ -141,11 +141,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_tag_getvalue, 0, 0, 1) ZEND_ARG_INFO(0, name) -#if PHP_VERSION_ID >= 80000 - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, params, IS_ARRAY, 0, "[]") -#else - ZEND_ARG_ARRAY_INFO(0, params, 0) -#endif +ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, params, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_tag_hasvalue, 0, 1, _IS_BOOL, 0) diff --git a/ext/phalcon/tag/select.zep.c b/ext/phalcon/tag/select.zep.c index 8a4e960c661..8c992a655a2 100644 --- a/ext/phalcon/tag/select.zep.c +++ b/ext/phalcon/tag/select.zep.c @@ -59,12 +59,11 @@ ZEPHIR_INIT_CLASS(Phalcon_Tag_Select) */ PHP_METHOD(Phalcon_Tag_Select, selectField) { - zend_bool _2$$19; + zend_bool _1$$19; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; + zephir_fcall_cache_entry *_7 = NULL, *_11 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_1 = NULL, *_4 = NULL, *_9 = NULL, *_13 = NULL; - zval *parameters, parameters_sub, *data = NULL, data_sub, __$null, params, name, id, value, useEmpty, code, emptyValue, emptyText, options, using, _3, _5, _0$$5, _6$$22, _7$$22, _8$$23, _10$$23, _11$$23, _12$$25, _14$$25, _15$$25; - zval *this_ptr = getThis(); + zval *parameters, parameters_sub, *data = NULL, data_sub, __$null, params, name, id, value, useEmpty, code, emptyValue, emptyText, options, using, _2, _3, _0$$5, _4$$22, _5$$22, _6$$23, _8$$23, _9$$23, _10$$25, _12$$25, _13$$25; ZVAL_UNDEF(¶meters_sub); ZVAL_UNDEF(&data_sub); @@ -79,35 +78,30 @@ PHP_METHOD(Phalcon_Tag_Select, selectField) ZVAL_UNDEF(&emptyText); ZVAL_UNDEF(&options); ZVAL_UNDEF(&using); + ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); - ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_0$$5); - ZVAL_UNDEF(&_6$$22); - ZVAL_UNDEF(&_7$$22); + ZVAL_UNDEF(&_4$$22); + ZVAL_UNDEF(&_5$$22); + ZVAL_UNDEF(&_6$$23); ZVAL_UNDEF(&_8$$23); - ZVAL_UNDEF(&_10$$23); - ZVAL_UNDEF(&_11$$23); + ZVAL_UNDEF(&_9$$23); + ZVAL_UNDEF(&_10$$25); ZVAL_UNDEF(&_12$$25); - ZVAL_UNDEF(&_14$$25); - ZVAL_UNDEF(&_15$$25); -#if PHP_VERSION_ID >= 80000 + ZVAL_UNDEF(&_13$$25); bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ZVAL(parameters) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_OR_NULL(data) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 1, 1, ¶meters, &data); if (!data) { data = &data_sub; data = &__$null; } - - if (Z_TYPE_P(parameters) != IS_ARRAY) { ZEPHIR_INIT_VAR(¶ms); zephir_create_array(¶ms, 2, 0); @@ -116,7 +110,7 @@ PHP_METHOD(Phalcon_Tag_Select, selectField) } else { ZEPHIR_CPY_WRT(¶ms, parameters); } - ZEPHIR_OBS_VAR(&id); + zephir_memory_observe(&id); if (!(zephir_array_isset_long_fetch(&id, ¶ms, 0, 0))) { zephir_array_fetch_string(&_0$$5, ¶ms, SL("id"), PH_NOISY | PH_READONLY, "phalcon/Tag/Select.zep", 50); zephir_array_update_long(¶ms, 0, &_0$$5, PH_COPY | PH_SEPARATE ZEPHIR_DEBUG_PARAMS_DUMMY); @@ -126,7 +120,7 @@ PHP_METHOD(Phalcon_Tag_Select, selectField) zephir_array_update_string(¶ms, SL("id"), &id, PH_COPY | PH_SEPARATE); } } - ZEPHIR_OBS_VAR(&name); + zephir_memory_observe(&name); if (!(zephir_array_isset_string_fetch(&name, ¶ms, SL("name"), 0))) { zephir_array_update_string(¶ms, SL("name"), &id, PH_COPY | PH_SEPARATE); } else { @@ -134,23 +128,23 @@ PHP_METHOD(Phalcon_Tag_Select, selectField) zephir_array_update_string(¶ms, SL("name"), &id, PH_COPY | PH_SEPARATE); } } - ZEPHIR_OBS_VAR(&value); + zephir_memory_observe(&value); if (!(zephir_array_isset_string_fetch(&value, ¶ms, SL("value"), 0))) { - ZEPHIR_CALL_CE_STATIC(&value, phalcon_tag_ce, "getvalue", &_1, 0, &id, ¶ms); + ZEPHIR_CALL_CE_STATIC(&value, phalcon_tag_ce, "getvalue", NULL, 0, &id, ¶ms); zephir_check_call_status(); } else { zephir_array_unset_string(¶ms, SL("value"), PH_SEPARATE); } - ZEPHIR_OBS_VAR(&useEmpty); + zephir_memory_observe(&useEmpty); if (zephir_array_isset_string_fetch(&useEmpty, ¶ms, SL("useEmpty"), 0)) { - ZEPHIR_OBS_VAR(&emptyValue); + zephir_memory_observe(&emptyValue); if (!(zephir_array_isset_string_fetch(&emptyValue, ¶ms, SL("emptyValue"), 0))) { ZEPHIR_INIT_NVAR(&emptyValue); ZVAL_STRING(&emptyValue, ""); } else { zephir_array_unset_string(¶ms, SL("emptyValue"), PH_SEPARATE); } - ZEPHIR_OBS_VAR(&emptyText); + zephir_memory_observe(&emptyText); if (!(zephir_array_isset_string_fetch(&emptyText, ¶ms, SL("emptyText"), 0))) { ZEPHIR_INIT_NVAR(&emptyText); ZVAL_STRING(&emptyText, "Choose..."); @@ -159,58 +153,58 @@ PHP_METHOD(Phalcon_Tag_Select, selectField) } zephir_array_unset_string(¶ms, SL("useEmpty"), PH_SEPARATE); } - ZEPHIR_OBS_VAR(&options); + zephir_memory_observe(&options); if (!(zephir_array_isset_long_fetch(&options, ¶ms, 1, 0))) { ZEPHIR_CPY_WRT(&options, data); } if (Z_TYPE_P(&options) == IS_OBJECT) { - ZEPHIR_OBS_VAR(&using); + zephir_memory_observe(&using); if (UNEXPECTED(!(zephir_array_isset_string_fetch(&using, ¶ms, SL("using"), 0)))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_tag_exception_ce, "The 'using' parameter is required", "phalcon/Tag/Select.zep", 101); return; } - _2$$19 = Z_TYPE_P(&using) != IS_ARRAY; - if (_2$$19) { - _2$$19 = Z_TYPE_P(&using) != IS_OBJECT; + _1$$19 = Z_TYPE_P(&using) != IS_ARRAY; + if (_1$$19) { + _1$$19 = Z_TYPE_P(&using) != IS_OBJECT; } - if (UNEXPECTED(_2$$19)) { + if (UNEXPECTED(_1$$19)) { ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_tag_exception_ce, "The 'using' parameter should be an array", "phalcon/Tag/Select.zep", 107); return; } } zephir_array_unset_string(¶ms, SL("using"), PH_SEPARATE); - ZEPHIR_INIT_VAR(&_5); - ZVAL_STRING(&_5, "", &_5); + ZEPHIR_CONCAT_VSV(&code, &_2, ">", &_3); if (zephir_is_true(&useEmpty)) { - ZEPHIR_INIT_VAR(&_6$$22); - ZEPHIR_GET_CONSTANT(&_6$$22, "PHP_EOL"); - ZEPHIR_INIT_VAR(&_7$$22); - ZEPHIR_CONCAT_SVSVSV(&_7$$22, "\t", &_6$$22); - zephir_concat_self(&code, &_7$$22); + ZEPHIR_INIT_VAR(&_4$$22); + ZEPHIR_GET_CONSTANT(&_4$$22, "PHP_EOL"); + ZEPHIR_INIT_VAR(&_5$$22); + ZEPHIR_CONCAT_SVSVSV(&_5$$22, "\t", &_4$$22); + zephir_concat_self(&code, &_5$$22); } if (Z_TYPE_P(&options) == IS_OBJECT) { - ZEPHIR_INIT_VAR(&_10$$23); - ZEPHIR_GET_CONSTANT(&_10$$23, "PHP_EOL"); - ZEPHIR_INIT_VAR(&_11$$23); - ZEPHIR_CONCAT_SV(&_11$$23, "", &_10$$23); - ZEPHIR_CALL_SELF(&_8$$23, "optionsfromresultset", &_9, 0, &options, &using, &value, &_11$$23); + ZEPHIR_INIT_VAR(&_8$$23); + ZEPHIR_GET_CONSTANT(&_8$$23, "PHP_EOL"); + ZEPHIR_INIT_VAR(&_9$$23); + ZEPHIR_CONCAT_SV(&_9$$23, "", &_8$$23); + ZEPHIR_CALL_SELF(&_6$$23, "optionsfromresultset", &_7, 0, &options, &using, &value, &_9$$23); zephir_check_call_status(); - zephir_concat_self(&code, &_8$$23); + zephir_concat_self(&code, &_6$$23); } else { if (Z_TYPE_P(&options) == IS_ARRAY) { - ZEPHIR_INIT_VAR(&_14$$25); - ZEPHIR_GET_CONSTANT(&_14$$25, "PHP_EOL"); - ZEPHIR_INIT_VAR(&_15$$25); - ZEPHIR_CONCAT_SV(&_15$$25, "", &_14$$25); - ZEPHIR_CALL_SELF(&_12$$25, "optionsfromarray", &_13, 0, &options, &value, &_15$$25); + ZEPHIR_INIT_VAR(&_12$$25); + ZEPHIR_GET_CONSTANT(&_12$$25, "PHP_EOL"); + ZEPHIR_INIT_VAR(&_13$$25); + ZEPHIR_CONCAT_SV(&_13$$25, "", &_12$$25); + ZEPHIR_CALL_SELF(&_10$$25, "optionsfromarray", &_11, 0, &options, &value, &_13$$25); zephir_check_call_status(); - zephir_concat_self(&code, &_12$$25); + zephir_concat_self(&code, &_10$$25); } } zephir_concat_self_str(&code, SL("")); @@ -230,7 +224,6 @@ PHP_METHOD(Phalcon_Tag_Select, optionsFromArray) zval closeOption, _12$$8, _13$$8, _22$$16, _23$$16; zval *data_param = NULL, *value, value_sub, *closeOption_param = NULL, strValue, strOptionValue, code, optionValue, optionText, escaped, *_0, _1, _5$$4, _6$$4, _8$$4, _9$$4, _10$$6, _11$$7, _14$$9, _15$$10, _16$$12, _17$$12, _18$$12, _19$$12, _20$$14, _21$$15, _24$$17, _25$$18; zval data; - zval *this_ptr = getThis(); ZVAL_UNDEF(&data); ZVAL_UNDEF(&value_sub); @@ -262,22 +255,16 @@ PHP_METHOD(Phalcon_Tag_Select, optionsFromArray) ZVAL_UNDEF(&_13$$8); ZVAL_UNDEF(&_22$$16); ZVAL_UNDEF(&_23$$16); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_ARRAY(data) Z_PARAM_ZVAL(value) Z_PARAM_STR(closeOption) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 3, 0, &data_param, &value, &closeOption_param); zephir_get_arrval(&data, data_param); zephir_get_strval(&closeOption, closeOption_param); - - ZEPHIR_INIT_VAR(&code); ZVAL_STRING(&code, ""); zephir_is_iterable(&data, 0, "phalcon/Tag/Select.zep", 186); @@ -292,7 +279,7 @@ PHP_METHOD(Phalcon_Tag_Select, optionsFromArray) } ZEPHIR_INIT_NVAR(&optionText); ZVAL_COPY(&optionText, _0); - ZEPHIR_CALL_FUNCTION(&escaped, "htmlspecialchars", &_4, 285, &optionValue); + ZEPHIR_CALL_FUNCTION(&escaped, "htmlspecialchars", &_4, 286, &optionValue); zephir_check_call_status(); if (Z_TYPE_P(&optionText) == IS_ARRAY) { ZEPHIR_INIT_NVAR(&_5$$4); @@ -345,7 +332,7 @@ PHP_METHOD(Phalcon_Tag_Select, optionsFromArray) zephir_check_call_status(); ZEPHIR_CALL_METHOD(&optionText, &data, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_CALL_FUNCTION(&escaped, "htmlspecialchars", &_4, 285, &optionValue); + ZEPHIR_CALL_FUNCTION(&escaped, "htmlspecialchars", &_4, 286, &optionValue); zephir_check_call_status(); if (Z_TYPE_P(&optionText) == IS_ARRAY) { ZEPHIR_INIT_NVAR(&_16$$12); @@ -400,13 +387,12 @@ PHP_METHOD(Phalcon_Tag_Select, optionsFromArray) */ PHP_METHOD(Phalcon_Tag_Select, optionsFromResultset) { - zend_object_iterator *_2; + zend_object_iterator *_1; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; + zephir_fcall_cache_entry *_3 = NULL, *_4 = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zephir_fcall_cache_entry *_1 = NULL, *_4 = NULL, *_5 = NULL; - zval closeOption, _8$$15, _9$$15; - zval *resultset, resultset_sub, *using, using_sub, *value, value_sub, *closeOption_param = NULL, code, params, option, usingZero, usingOne, escaper, optionValue, optionText, strValue, strOptionValue, _0, _3$$6, _6$$13, _7$$14, _10$$16, _11$$17, _12$$19; - zval *this_ptr = getThis(); + zval closeOption, _7$$15, _8$$15; + zval *resultset, resultset_sub, *using, using_sub, *value, value_sub, *closeOption_param = NULL, code, params, option, usingZero, usingOne, escaper, optionValue, optionText, strValue, strOptionValue, _0, _2$$6, _5$$13, _6$$14, _9$$16, _10$$17, _11$$19; ZVAL_UNDEF(&resultset_sub); ZVAL_UNDEF(&using_sub); @@ -422,31 +408,25 @@ PHP_METHOD(Phalcon_Tag_Select, optionsFromResultset) ZVAL_UNDEF(&strValue); ZVAL_UNDEF(&strOptionValue); ZVAL_UNDEF(&_0); - ZVAL_UNDEF(&_3$$6); - ZVAL_UNDEF(&_6$$13); - ZVAL_UNDEF(&_7$$14); - ZVAL_UNDEF(&_10$$16); - ZVAL_UNDEF(&_11$$17); - ZVAL_UNDEF(&_12$$19); + ZVAL_UNDEF(&_2$$6); + ZVAL_UNDEF(&_5$$13); + ZVAL_UNDEF(&_6$$14); + ZVAL_UNDEF(&_9$$16); + ZVAL_UNDEF(&_10$$17); + ZVAL_UNDEF(&_11$$19); ZVAL_UNDEF(&closeOption); + ZVAL_UNDEF(&_7$$15); ZVAL_UNDEF(&_8$$15); - ZVAL_UNDEF(&_9$$15); -#if PHP_VERSION_ID >= 80000 - bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(4, 4) Z_PARAM_OBJECT_OF_CLASS(resultset, phalcon_mvc_model_resultsetinterface_ce) Z_PARAM_ZVAL(using) Z_PARAM_ZVAL(value) Z_PARAM_STR(closeOption) ZEND_PARSE_PARAMETERS_END(); -#endif - - - ZEPHIR_MM_GROW(); + ZEPHIR_METHOD_GLOBALS_PTR = pecalloc(1, sizeof(zephir_method_globals), 0); + zephir_memory_grow_stack(ZEPHIR_METHOD_GLOBALS_PTR, __func__); zephir_fetch_params(1, 4, 0, &resultset, &using, &value, &closeOption_param); zephir_get_strval(&closeOption, closeOption_param); - - ZEPHIR_INIT_VAR(&code); ZVAL_STRING(&code, ""); ZEPHIR_INIT_VAR(¶ms); @@ -456,19 +436,19 @@ PHP_METHOD(Phalcon_Tag_Select, optionsFromResultset) ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_tag_exception_ce, "Parameter 'using' requires two values", "phalcon/Tag/Select.zep", 209); return; } - ZEPHIR_OBS_VAR(&usingZero); + zephir_memory_observe(&usingZero); zephir_array_fetch_long(&usingZero, using, 0, PH_NOISY, "phalcon/Tag/Select.zep", 212); - ZEPHIR_OBS_VAR(&usingOne); + zephir_memory_observe(&usingOne); zephir_array_fetch_long(&usingOne, using, 1, PH_NOISY, "phalcon/Tag/Select.zep", 213); } - ZEPHIR_CALL_CE_STATIC(&_0, phalcon_tag_ce, "getescaperservice", &_1, 0); + ZEPHIR_CALL_CE_STATIC(&_0, phalcon_tag_ce, "getescaperservice", NULL, 0); zephir_check_call_status(); ZEPHIR_CPY_WRT(&escaper, &_0); - _2 = zephir_get_iterator(resultset); - _2->funcs->rewind(_2); - for (;_2->funcs->valid(_2) == SUCCESS && !EG(exception); _2->funcs->move_forward(_2)) { + _1 = zephir_get_iterator(resultset); + _1->funcs->rewind(_1); + for (;_1->funcs->valid(_1) == SUCCESS && !EG(exception); _1->funcs->move_forward(_1)) { { - ZEPHIR_ITERATOR_COPY(&option, _2); + ZEPHIR_ITERATOR_COPY(&option, _1); } if (Z_TYPE_P(using) == IS_ARRAY) { if (Z_TYPE_P(&option) == IS_OBJECT) { @@ -493,35 +473,35 @@ PHP_METHOD(Phalcon_Tag_Select, optionsFromResultset) ZEPHIR_OBS_NVAR(&optionText); zephir_array_fetch(&optionText, &option, &usingOne, PH_NOISY, "phalcon/Tag/Select.zep", 236); } - ZEPHIR_CALL_METHOD(&_3$$6, &escaper, "escapehtmlattr", &_4, 0, &optionValue); + ZEPHIR_CALL_METHOD(&_2$$6, &escaper, "escapehtmlattr", &_3, 0, &optionValue); zephir_check_call_status(); - ZEPHIR_CPY_WRT(&optionValue, &_3$$6); - ZEPHIR_CALL_METHOD(&_3$$6, &escaper, "escapehtml", &_5, 0, &optionText); + ZEPHIR_CPY_WRT(&optionValue, &_2$$6); + ZEPHIR_CALL_METHOD(&_2$$6, &escaper, "escapehtml", &_4, 0, &optionText); zephir_check_call_status(); - ZEPHIR_CPY_WRT(&optionText, &_3$$6); + ZEPHIR_CPY_WRT(&optionText, &_2$$6); if (Z_TYPE_P(value) == IS_ARRAY) { if (zephir_fast_in_array(&optionValue, value)) { - ZEPHIR_INIT_NVAR(&_6$$13); - ZEPHIR_CONCAT_SVSVV(&_6$$13, "\t