diff --git a/ext/config.m4 b/ext/config.m4
index 9e0c13272a5..bebf09b4cea 100644
--- a/ext/config.m4
+++ b/ext/config.m4
@@ -9,7 +9,7 @@ if test "$PHP_PHALCON" = "yes"; then
fi
AC_DEFINE(HAVE_PHALCON, 1, [Whether you have Phalcon])
- phalcon_sources="phalcon.c kernel/main.c kernel/memory.c kernel/exception.c kernel/hash.c kernel/debug.c kernel/backtrace.c kernel/object.c kernel/array.c kernel/extended/array.c kernel/string.c kernel/fcall.c kernel/extended/fcall.c kernel/require.c kernel/file.c kernel/operators.c kernel/math.c kernel/concat.c kernel/variables.c kernel/filter.c kernel/iterator.c kernel/time.c kernel/exit.c phalcon/di/injectionawareinterface.zep.c
+ phalcon_sources="phalcon.c kernel/main.c kernel/memory.c kernel/exception.c kernel/debug.c kernel/backtrace.c kernel/object.c kernel/array.c kernel/string.c kernel/fcall.c kernel/extended/fcall.c kernel/require.c kernel/file.c kernel/operators.c kernel/math.c kernel/concat.c kernel/variables.c kernel/filter.c kernel/iterator.c kernel/time.c kernel/exit.c phalcon/di/injectionawareinterface.zep.c
phalcon/exception.zep.c
phalcon/events/eventsawareinterface.zep.c
phalcon/validation/validatorinterface.zep.c
diff --git a/ext/config.w32 b/ext/config.w32
index 0f553dba35d..e65e3820c7a 100644
--- a/ext/config.w32
+++ b/ext/config.w32
@@ -1,8 +1,8 @@
ARG_ENABLE("phalcon", "enable phalcon", "no");
if (PHP_PHALCON != "no") {
EXTENSION("phalcon", "phalcon.c", null, "-I"+configure_module_dirname);
- ADD_SOURCES(configure_module_dirname + "/kernel", "main.c memory.c exception.c hash.c debug.c backtrace.c object.c array.c string.c fcall.c require.c file.c operators.c math.c concat.c variables.c filter.c iterator.c exit.c time.c", "phalcon");
- ADD_SOURCES(configure_module_dirname + "/kernel/extended", "array.c fcall.c", "phalcon");
+ ADD_SOURCES(configure_module_dirname + "/kernel", "main.c memory.c exception.c debug.c backtrace.c object.c array.c string.c fcall.c require.c file.c operators.c math.c concat.c variables.c filter.c iterator.c exit.c time.c", "phalcon");
+ ADD_SOURCES(configure_module_dirname + "/kernel/extended", "fcall.c", "phalcon");
/* PCRE is always included on WIN32 */
AC_DEFINE("ZEPHIR_USE_PHP_PCRE", 1, "Whether PHP pcre extension is present at compile time");
if (PHP_JSON != "no") {
diff --git a/ext/kernel/array.c b/ext/kernel/array.c
index 5e361b5393a..d7c5fcf56ae 100644
--- a/ext/kernel/array.c
+++ b/ext/kernel/array.c
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
@@ -32,9 +32,27 @@
#include "kernel/debug.h"
#include "kernel/array.h"
#include "kernel/operators.h"
-#include "kernel/hash.h"
#include "kernel/backtrace.h"
+static zval zephir_get_current_key_w(const HashTable *hash_table, HashPosition *hash_position)
+{
+ Bucket *p;
+ zval result;
+
+ INIT_ZVAL(result);
+ p = hash_position ? (*hash_position) : hash_table->pInternalPointer;
+
+ if (p) {
+ if (p->nKeyLength) {
+ ZVAL_STRINGL(&result, (char *) p->arKey, p->nKeyLength - 1, 0);
+ } else {
+ ZVAL_LONG(&result, p->h);
+ }
+ }
+
+ return result;
+}
+
/**
* @brief Fetches @a index if it exists from the array @a arr
* @param[out] fetched &$arr[$index]
; @a fetched is modified only when the function returns 1
@@ -64,7 +82,7 @@ int zephir_array_isset_fetch(zval **fetched, const zval *arr, zval *index, int r
h = Z_ARRVAL_P(arr);
switch (Z_TYPE_P(index)) {
case IS_NULL:
- result = zephir_hash_find(h, SS(""), (void**)&val);
+ result = zend_hash_find(h, SS(""), (void**)&val);
break;
case IS_DOUBLE:
@@ -109,8 +127,8 @@ int zephir_array_isset_quick_string_fetch(zval **fetched, zval *arr, char *index
zval **zv;
- if (likely(Z_TYPE_P(arr) == IS_ARRAY)) {
- if (zephir_hash_quick_find(Z_ARRVAL_P(arr), index, index_length, key, (void**) &zv) == SUCCESS) {
+ if (EXPECTED(Z_TYPE_P(arr) == IS_ARRAY)) {
+ if (zend_hash_quick_find(Z_ARRVAL_P(arr), index, index_length, key, (void**) &zv) == SUCCESS) {
*fetched = *zv;
if (!readonly) {
Z_ADDREF_P(*fetched);
@@ -135,7 +153,7 @@ int zephir_array_isset_long_fetch(zval **fetched, zval *arr, unsigned long index
zval **zv;
- if (likely(Z_TYPE_P(arr) == IS_ARRAY)) {
+ if (EXPECTED(Z_TYPE_P(arr) == IS_ARRAY)) {
if (zend_hash_index_find(Z_ARRVAL_P(arr), index, (void**)&zv) == SUCCESS) {
*fetched = *zv;
if (!readonly) {
@@ -173,7 +191,7 @@ int ZEPHIR_FASTCALL zephir_array_isset(const zval *arr, zval *index) {
h = Z_ARRVAL_P(arr);
switch (Z_TYPE_P(index)) {
case IS_NULL:
- return zephir_hash_exists(h, SS(""));
+ return zend_hash_exists(h, SS(""));
case IS_DOUBLE:
return zend_hash_index_exists(h, (ulong)Z_DVAL_P(index));
@@ -220,7 +238,7 @@ int ZEPHIR_FASTCALL zephir_array_isset_string(const zval *arr, const char *index
*/
int ZEPHIR_FASTCALL zephir_array_isset_quick_string(const zval *arr, const char *index, uint index_length, unsigned long key) {
- if (likely(Z_TYPE_P(arr) == IS_ARRAY)) {
+ if (EXPECTED(Z_TYPE_P(arr) == IS_ARRAY)) {
return zend_hash_quick_exists(Z_ARRVAL_P(arr), index, index_length, key);
}
@@ -237,7 +255,7 @@ int ZEPHIR_FASTCALL zephir_array_isset_quick_string(const zval *arr, const char
*/
int ZEPHIR_FASTCALL zephir_array_isset_long(const zval *arr, unsigned long index) {
- if (likely(Z_TYPE_P(arr) == IS_ARRAY)) {
+ if (EXPECTED(Z_TYPE_P(arr) == IS_ARRAY)) {
return zend_hash_index_exists(Z_ARRVAL_P(arr), index);
}
@@ -807,7 +825,7 @@ int zephir_array_fetch(zval **return_value, zval *arr, zval *index, int flags ZE
ht = Z_ARRVAL_P(arr);
switch (Z_TYPE_P(index)) {
case IS_NULL:
- result = zephir_hash_find(ht, SS(""), (void**) &zv);
+ result = zend_hash_find(ht, SS(""), (void**) &zv);
sidx = "";
break;
@@ -879,8 +897,8 @@ int zephir_array_fetch_quick_string(zval **return_value, zval *arr, const char *
zval **zv;
- if (likely(Z_TYPE_P(arr) == IS_ARRAY)) {
- if (zephir_hash_quick_find(Z_ARRVAL_P(arr), index, index_length, key, (void**) &zv) == SUCCESS) {
+ if (EXPECTED(Z_TYPE_P(arr) == IS_ARRAY)) {
+ if (zend_hash_quick_find(Z_ARRVAL_P(arr), index, index_length, key, (void**) &zv) == SUCCESS) {
*return_value = *zv;
if ((flags & PH_READONLY) != PH_READONLY) {
Z_ADDREF_PP(return_value);
@@ -942,7 +960,7 @@ int zephir_array_fetch_long(zval **return_value, zval *arr, unsigned long index,
zval **zv;
- if (likely(Z_TYPE_P(arr) == IS_ARRAY)) {
+ if (EXPECTED(Z_TYPE_P(arr) == IS_ARRAY)) {
if (zend_hash_index_find(Z_ARRVAL_P(arr), index, (void**)&zv) == SUCCESS) {
*return_value = *zv;
if ((flags & PH_READONLY) != PH_READONLY) {
@@ -1135,7 +1153,7 @@ void zephir_array_merge_recursive_n(zval **a1, zval *a2 TSRMLS_DC)
*/
void zephir_array_unshift(zval *arr, zval *arg TSRMLS_DC)
{
- if (likely(Z_TYPE_P(arr) == IS_ARRAY)) {
+ if (EXPECTED(Z_TYPE_P(arr) == IS_ARRAY)) {
zval** args[1] = { &arg };
@@ -1167,7 +1185,7 @@ void zephir_array_keys(zval *return_value, zval *input TSRMLS_DC)
ulong num_key;
HashPosition pos;
- if (likely(Z_TYPE_P(input) == IS_ARRAY)) {
+ if (EXPECTED(Z_TYPE_P(input) == IS_ARRAY)) {
array_init_size(return_value, zend_hash_num_elements(Z_ARRVAL_P(input)));
@@ -1197,7 +1215,7 @@ void zephir_array_keys(zval *return_value, zval *input TSRMLS_DC)
void zephir_array_values(zval *return_value, zval *arr)
{
- if (likely(Z_TYPE_P(arr) == IS_ARRAY)) {
+ if (EXPECTED(Z_TYPE_P(arr) == IS_ARRAY)) {
zval **entry;
HashPosition pos;
@@ -1238,7 +1256,7 @@ int zephir_array_key_exists(zval *arr, zval *key TSRMLS_DC)
int zephir_array_is_associative(zval *arr) {
- if (likely(Z_TYPE_P(arr) == IS_ARRAY)) {
+ if (EXPECTED(Z_TYPE_P(arr) == IS_ARRAY)) {
HashPosition pos;
zval **entry;
char *skey;
@@ -1481,7 +1499,7 @@ void ZEPHIR_FASTCALL zephir_create_array(zval *return_value, uint size, int init
if (size > 0) {
hashTable = (HashTable *) emalloc(sizeof(HashTable));
- zephir_hash_init(hashTable, size, NULL, ZVAL_PTR_DTOR, 0);
+ zend_hash_init(hashTable, size, NULL, ZVAL_PTR_DTOR, 0);
if (initialize) {
diff --git a/ext/kernel/array.h b/ext/kernel/array.h
index 68444af46a2..926fa0d36fa 100644
--- a/ext/kernel/array.h
+++ b/ext/kernel/array.h
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
diff --git a/ext/kernel/assert.c b/ext/kernel/assert.c
deleted file mode 100644
index d94d9a1d03a..00000000000
--- a/ext/kernel/assert.c
+++ /dev/null
@@ -1,47 +0,0 @@
-
-/*
- +------------------------------------------------------------------------+
- | Zephir Language |
- +------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
- +------------------------------------------------------------------------+
- | This source file is subject to the New BSD License that is bundled |
- | with this package in the file docs/LICENSE.txt. |
- | |
- | If you did not receive a copy of the license and are unable to |
- | obtain it through the world-wide-web, please send an email |
- | to license@zephir-lang.com so we can send you a copy immediately. |
- +------------------------------------------------------------------------+
- | Authors: Andres Gutierrez |
- | Eduar Carvajal |
- +------------------------------------------------------------------------+
-*/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include
-#include "php_ext.h"
-#include "kernel/debug.h"
-
-#ifndef ZEPHIR_RELEASE
-
-int zephir_assert_class(zval *object, char *class_name TSRMLS_DC) {
- if (object) {
- if (Z_TYPE_P(object) != IS_OBJECT) {
- zephir_error_space();
- fprintf(zephir_log, "AssertClass: [Failed] Value is not an object\n");
- return FAILURE;
- } else {
- if (strcmp(Z_OBJCE_P(object)->name, class_name)) {
- zephir_error_space();
- fprintf(zephir_log, "AssertClass: [Failed] Object is not class %s, is %s\n", class_name, Z_OBJCE_P(object)->name);
- return FAILURE;
- }
- }
- }
- return SUCCESS;
-}
-
-#endif
diff --git a/ext/kernel/assert.h b/ext/kernel/assert.h
deleted file mode 100644
index 91ae569df6c..00000000000
--- a/ext/kernel/assert.h
+++ /dev/null
@@ -1,31 +0,0 @@
-
-/*
- +------------------------------------------------------------------------+
- | Zephir Language |
- +------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
- +------------------------------------------------------------------------+
- | This source file is subject to the New BSD License that is bundled |
- | with this package in the file docs/LICENSE.txt. |
- | |
- | If you did not receive a copy of the license and are unable to |
- | obtain it through the world-wide-web, please send an email |
- | to license@zephir-lang.com so we can send you a copy immediately. |
- +------------------------------------------------------------------------+
- | Authors: Andres Gutierrez |
- | Eduar Carvajal |
- +------------------------------------------------------------------------+
-*/
-
-#ifndef ZEPHIR_KERNEL_ASSERT_H
-#define ZEPHIR_KERNEL_ASSERT_H
-
-#ifndef ZEPHIR_RELEASE
-
-#include
-#include
-
-extern int zephir_assert_class(zval *object, char *class_name TSRMLS_DC);
-
-#endif
-#endif /* ZEPHIR_KERNEL_ASSERT_H */
diff --git a/ext/kernel/backtrace.c b/ext/kernel/backtrace.c
index a424f92649c..527ebdbb0ed 100644
--- a/ext/kernel/backtrace.c
+++ b/ext/kernel/backtrace.c
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
diff --git a/ext/kernel/backtrace.h b/ext/kernel/backtrace.h
index 3f1cf23c193..45723a94734 100644
--- a/ext/kernel/backtrace.h
+++ b/ext/kernel/backtrace.h
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
@@ -23,7 +23,7 @@
#ifndef ZEPHIR_RELEASE
-extern void zephir_print_backtrace(void);
+void zephir_print_backtrace(void);
#else
diff --git a/ext/kernel/debug.c b/ext/kernel/debug.c
index f5ee1d7f65c..55a007ee50c 100644
--- a/ext/kernel/debug.c
+++ b/ext/kernel/debug.c
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
diff --git a/ext/kernel/debug.h b/ext/kernel/debug.h
index ac0f6c64467..f34b86f7e05 100644
--- a/ext/kernel/debug.h
+++ b/ext/kernel/debug.h
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
@@ -65,4 +65,4 @@ int zephir_error_space();
int zephir_debug_space();
#endif
-#endif
\ No newline at end of file
+#endif
diff --git a/ext/kernel/exception.c b/ext/kernel/exception.c
index d613f8d94b4..8478cbedc13 100644
--- a/ext/kernel/exception.c
+++ b/ext/kernel/exception.c
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
diff --git a/ext/kernel/exception.h b/ext/kernel/exception.h
index 3f4746912c0..bfaedd467c5 100644
--- a/ext/kernel/exception.h
+++ b/ext/kernel/exception.h
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
diff --git a/ext/kernel/exit.c b/ext/kernel/exit.c
index 60711990a6e..1484ff25b50 100644
--- a/ext/kernel/exit.c
+++ b/ext/kernel/exit.c
@@ -2,7 +2,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
@@ -26,8 +26,8 @@
#include "kernel/main.h"
#include "kernel/exit.h"
-void zephir_exit_empty() {
- TSRMLS_FETCH();
+void zephir_exit_empty()
+{
zend_bailout();
}
diff --git a/ext/kernel/exit.h b/ext/kernel/exit.h
index 23cd28be39d..e2730eaf7b7 100644
--- a/ext/kernel/exit.h
+++ b/ext/kernel/exit.h
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
diff --git a/ext/kernel/extended/array.c b/ext/kernel/extended/array.c
deleted file mode 100644
index 0593ca58ad5..00000000000
--- a/ext/kernel/extended/array.c
+++ /dev/null
@@ -1,18 +0,0 @@
-
-/*
- +------------------------------------------------------------------------+
- | Zephir Language |
- +------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
- +------------------------------------------------------------------------+
- | This source file is subject to the New BSD License that is bundled |
- | with this package in the file docs/LICENSE.txt. |
- | |
- | If you did not receive a copy of the license and are unable to |
- | obtain it through the world-wide-web, please send an email |
- | to license@zephir-lang.com so we can send you a copy immediately. |
- +------------------------------------------------------------------------+
- | Authors: Andres Gutierrez |
- | Eduar Carvajal |
- +------------------------------------------------------------------------+
-*/
diff --git a/ext/kernel/extended/array.h b/ext/kernel/extended/array.h
deleted file mode 100644
index 0593ca58ad5..00000000000
--- a/ext/kernel/extended/array.h
+++ /dev/null
@@ -1,18 +0,0 @@
-
-/*
- +------------------------------------------------------------------------+
- | Zephir Language |
- +------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
- +------------------------------------------------------------------------+
- | This source file is subject to the New BSD License that is bundled |
- | with this package in the file docs/LICENSE.txt. |
- | |
- | If you did not receive a copy of the license and are unable to |
- | obtain it through the world-wide-web, please send an email |
- | to license@zephir-lang.com so we can send you a copy immediately. |
- +------------------------------------------------------------------------+
- | Authors: Andres Gutierrez |
- | Eduar Carvajal |
- +------------------------------------------------------------------------+
-*/
diff --git a/ext/kernel/extended/fcall.c b/ext/kernel/extended/fcall.c
index a98660ba42f..2fd1d6892a0 100644
--- a/ext/kernel/extended/fcall.c
+++ b/ext/kernel/extended/fcall.c
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
@@ -26,7 +26,6 @@
#include "kernel/main.h"
#include "kernel/fcall.h"
#include "kernel/memory.h"
-#include "kernel/hash.h"
#include "kernel/string.h"
#include "kernel/operators.h"
#include "kernel/exception.h"
diff --git a/ext/kernel/extended/fcall.h b/ext/kernel/extended/fcall.h
index fdfe164f32d..7b0feedc38c 100644
--- a/ext/kernel/extended/fcall.h
+++ b/ext/kernel/extended/fcall.h
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
diff --git a/ext/kernel/fcall.c b/ext/kernel/fcall.c
index f3dd181a1cf..8555ee34c15 100644
--- a/ext/kernel/fcall.c
+++ b/ext/kernel/fcall.c
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (https://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
@@ -26,10 +26,9 @@
#include
#include "kernel/main.h"
-#include "kernel/fcall.h"
#include "kernel/extended/fcall.h"
#include "kernel/memory.h"
-#include "kernel/hash.h"
+#include "kernel/fcall.h"
#include "kernel/operators.h"
#include "kernel/exception.h"
#include "kernel/backtrace.h"
@@ -753,7 +752,6 @@ int zephir_call_class_method_aparams(zval **return_value_ptr, zend_class_entry *
zephir_fcall_cache_entry **cache_entry, int cache_slot,
uint param_count, zval **params TSRMLS_DC)
{
- char *possible_method;
zval *rv = NULL, **rvp = return_value_ptr ? return_value_ptr : &rv;
zval *fn = NULL;
#if PHP_VERSION_ID < 50600
@@ -860,29 +858,13 @@ int zephir_call_class_method_aparams(zval **return_value_ptr, zend_class_entry *
#endif
if (status == FAILURE && !EG(exception)) {
-
- if (ce) {
- possible_method = zephir_fcall_possible_method(ce, method_name TSRMLS_CC);
- } else {
- possible_method = "undefined";
- }
-
switch (type) {
-
case zephir_fcall_parent:
- if (possible_method) {
- zephir_throw_exception_format(spl_ce_RuntimeException TSRMLS_CC, "Call to undefined method parent::%s(), did you mean '%s'?", method_name, possible_method);
- } else {
- zephir_throw_exception_format(spl_ce_RuntimeException TSRMLS_CC, "Call to undefined method parent::%s()", method_name);
- }
+ zephir_throw_exception_format(spl_ce_RuntimeException TSRMLS_CC, "Call to undefined method parent::%s()", method_name);
break;
case zephir_fcall_self:
- if (possible_method) {
- zephir_throw_exception_format(spl_ce_RuntimeException TSRMLS_CC, "Call to undefined method self::%s(), did you mean '%s'?", method_name, possible_method);
- } else {
- zephir_throw_exception_format(spl_ce_RuntimeException TSRMLS_CC, "Call to undefined method self::%s()", method_name);
- }
+ zephir_throw_exception_format(spl_ce_RuntimeException TSRMLS_CC, "Call to undefined method self::%s()", method_name);
break;
case zephir_fcall_static:
@@ -894,11 +876,7 @@ int zephir_call_class_method_aparams(zval **return_value_ptr, zend_class_entry *
break;
case zephir_fcall_method:
- if (possible_method) {
- zephir_throw_exception_format(spl_ce_RuntimeException TSRMLS_CC, "Call to undefined method %s::%s(), did you mean '%s'?", ce->name, method_name, possible_method);
- } else {
- zephir_throw_exception_format(spl_ce_RuntimeException TSRMLS_CC, "Call to undefined method %s::%s()", ce->name, method_name);
- }
+ zephir_throw_exception_format(spl_ce_RuntimeException TSRMLS_CC, "Call to undefined method %s::%s()", ce->name, method_name);
break;
default:
diff --git a/ext/kernel/fcall.h b/ext/kernel/fcall.h
index f612db28c64..4a06fb6567b 100644
--- a/ext/kernel/fcall.h
+++ b/ext/kernel/fcall.h
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
diff --git a/ext/kernel/file.c b/ext/kernel/file.c
index 4de3c9b9c79..8845df50e33 100644
--- a/ext/kernel/file.c
+++ b/ext/kernel/file.c
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
@@ -417,7 +417,7 @@ void zephir_file_put_contents(zval *return_value, zval *filename, zval *data TSR
void zephir_is_dir(zval *return_value, zval *path TSRMLS_DC)
{
- if (likely(Z_TYPE_P(path) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(path) == IS_STRING)) {
php_stat(Z_STRVAL_P(path), (php_stat_len)(Z_STRLEN_P(path)), FS_IS_DIR, return_value TSRMLS_CC);
} else {
ZVAL_FALSE(return_value);
@@ -426,12 +426,12 @@ void zephir_is_dir(zval *return_value, zval *path TSRMLS_DC)
void zephir_unlink(zval *return_value, zval *path TSRMLS_DC)
{
- if (likely(Z_TYPE_P(path) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(path) == IS_STRING)) {
php_stream_context *context;
php_stream_wrapper *wrapper;
zval *zctx = NULL;
- if (unlikely(strlen(Z_STRVAL_P(path)) != Z_STRLEN_P(path))) {
+ if (UNEXPECTED(strlen(Z_STRVAL_P(path)) != Z_STRLEN_P(path))) {
ZVAL_FALSE(return_value);
return;
}
@@ -454,7 +454,7 @@ void zephir_unlink(zval *return_value, zval *path TSRMLS_DC)
void zephir_filemtime(zval *return_value, zval *path TSRMLS_DC)
{
- if (likely(Z_TYPE_P(path) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(path) == IS_STRING)) {
php_stat(Z_STRVAL_P(path), (php_stat_len)(Z_STRLEN_P(path)), FS_MTIME, return_value TSRMLS_CC);
} else {
ZVAL_FALSE(return_value);
@@ -463,7 +463,7 @@ void zephir_filemtime(zval *return_value, zval *path TSRMLS_DC)
void zephir_basename(zval *return_value, zval *path TSRMLS_DC)
{
- if (likely(Z_TYPE_P(path) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(path) == IS_STRING)) {
char *ret;
size_t ret_len;
diff --git a/ext/kernel/file.h b/ext/kernel/file.h
index 5429c1d4e4d..6a11b171e2c 100644
--- a/ext/kernel/file.h
+++ b/ext/kernel/file.h
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
diff --git a/ext/kernel/filter.c b/ext/kernel/filter.c
index 8a9b2ffccf9..2ddae44a3e2 100644
--- a/ext/kernel/filter.c
+++ b/ext/kernel/filter.c
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
diff --git a/ext/kernel/filter.h b/ext/kernel/filter.h
index b86b1ea4970..ed8d794baab 100644
--- a/ext/kernel/filter.h
+++ b/ext/kernel/filter.h
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
@@ -35,4 +35,4 @@ void zephir_escape_js(zval *return_value, zval *param);
void zephir_escape_htmlattr(zval *return_value, zval *param);
void zephir_escape_html(zval *return_value, zval *str, zval *quote_style, zval *charset TSRMLS_DC);
-#endif
\ No newline at end of file
+#endif
diff --git a/ext/kernel/globals.h b/ext/kernel/globals.h
index a8dce4f14bc..6a5988f97ea 100644
--- a/ext/kernel/globals.h
+++ b/ext/kernel/globals.h
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
@@ -112,10 +112,6 @@ typedef zend_function zephir_fcall_cache_entry;
# define HASH_KEY_NON_EXISTENT HASH_KEY_NON_EXISTANT
#endif
-/** Macros for branch prediction */
-#define likely(x) EXPECTED(x)
-#define unlikely(x) UNEXPECTED(x)
-
#if defined(__GNUC__) && (defined(__clang__) || ((__GNUC__ * 100 + __GNUC_MINOR__) >= 405))
# define UNREACHABLE() __builtin_unreachable()
# define ASSUME(x) if (x) {} else __builtin_unreachable()
@@ -146,10 +142,6 @@ typedef zend_function zephir_fcall_cache_entry;
# define __builtin_constant_p(s) (0)
#endif
-#ifndef ZEND_MOD_END
-# define ZEND_MOD_END { NULL, NULL, NULL, 0 }
-#endif
-
#ifndef __func__
# define __func__ __FUNCTION__
#endif
@@ -160,12 +152,7 @@ typedef zend_function zephir_fcall_cache_entry;
# define ZEPHIR_NO_OPT
#endif
-#ifdef ZTS
-#define zephir_nts_static
-#else
-#define zephir_nts_static
-#endif
-
-#define ZEPHIR_STATIC
+#define likely(x) EXPECTED(x)
+#define unlikely(x) UNEXPECTED(x)
#endif
diff --git a/ext/kernel/hash.c b/ext/kernel/hash.c
deleted file mode 100644
index eac4ab522d7..00000000000
--- a/ext/kernel/hash.c
+++ /dev/null
@@ -1,362 +0,0 @@
-
-/*
- +------------------------------------------------------------------------+
- | Zephir Language |
- +------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
- +------------------------------------------------------------------------+
- | This source file is subject to the New BSD License that is bundled |
- | with this package in the file docs/LICENSE.txt. |
- | |
- | If you did not receive a copy of the license and are unable to |
- | obtain it through the world-wide-web, please send an email |
- | to license@zephir-lang.com so we can send you a copy immediately. |
- +------------------------------------------------------------------------+
- | Authors: Andres Gutierrez |
- | Eduar Carvajal |
- | Vladimir Kolesnikov |
- +------------------------------------------------------------------------+
-*/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "php.h"
-#include "php_ext.h"
-#include
-
-#include "kernel/memory.h"
-
-int zephir_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent)
-{
- if (nSize >= 0x80000000) {
- ht->nTableSize = 0x80000000;
- } else {
- if (nSize > 3) {
- ht->nTableSize = nSize + (nSize >> 2);
- } else {
- ht->nTableSize = 3;
- }
- }
-
-#if ZEND_DEBUG
- ht->inconsistent = 0;
-#endif
-
- ht->nTableMask = 0; /* 0 means that ht->arBuckets is uninitialized */
- ht->pDestructor = pDestructor;
- ht->arBuckets = NULL;
- ht->pListHead = NULL;
- ht->pListTail = NULL;
- ht->nNumOfElements = 0;
- ht->nNextFreeElement = 0;
- ht->pInternalPointer = NULL;
- ht->persistent = persistent;
- ht->nApplyCount = 0;
- ht->bApplyProtection = 1;
-
- return SUCCESS;
-}
-
-int zephir_hash_exists(const HashTable *ht, const char *arKey, uint nKeyLength)
-{
- ulong h;
- uint nIndex;
- Bucket *p;
-
- h = zend_inline_hash_func(arKey, nKeyLength);
- nIndex = h & ht->nTableMask;
-
- p = ht->arBuckets[nIndex];
- while (p != NULL) {
- if (p->arKey == arKey || ((p->h == h) && (p->nKeyLength == nKeyLength))) {
- if (!memcmp(p->arKey, arKey, nKeyLength)) {
- return 1;
- }
- }
- p = p->pNext;
- }
- return 0;
-}
-
-int zephir_hash_quick_exists(const HashTable *ht, const char *arKey, uint nKeyLength, ulong h)
-{
- uint nIndex;
- Bucket *p;
-
- if (nKeyLength == 0) {
- return zend_hash_index_exists(ht, h);
- }
-
- nIndex = h & ht->nTableMask;
-
- p = ht->arBuckets[nIndex];
- while (p != NULL) {
- if (p->arKey == arKey || ((p->h == h) && (p->nKeyLength == nKeyLength))) {
- if (!memcmp(p->arKey, arKey, nKeyLength)) {
- return 1;
- }
- }
- p = p->pNext;
- }
- return 0;
-}
-
-int zephir_hash_find(const HashTable *ht, const char *arKey, uint nKeyLength, void **pData)
-{
- ulong h;
- uint nIndex;
- Bucket *p;
-
- h = zend_inline_hash_func(arKey, nKeyLength);
- nIndex = h & ht->nTableMask;
-
- p = ht->arBuckets[nIndex];
- while (p != NULL) {
- if (p->arKey == arKey || ((p->h == h) && (p->nKeyLength == nKeyLength))) {
- if (!memcmp(p->arKey, arKey, nKeyLength)) {
- *pData = p->pData;
- return SUCCESS;
- }
- }
- p = p->pNext;
- }
- return FAILURE;
-}
-
-int zephir_hash_quick_find(const HashTable *ht, const char *arKey, uint nKeyLength, ulong h, void **pData)
-{
- uint nIndex;
- Bucket *p;
-
- if (nKeyLength == 0) {
- return zend_hash_index_find(ht, h, pData);
- }
-
- nIndex = h & ht->nTableMask;
-
- p = ht->arBuckets[nIndex];
- while (p != NULL) {
- if (p->arKey == arKey || ((p->h == h) && (p->nKeyLength == nKeyLength))) {
- if (!memcmp(p->arKey, arKey, nKeyLength)) {
- *pData = p->pData;
- return SUCCESS;
- }
- }
- p = p->pNext;
- }
- return FAILURE;
-}
-
-/**
- * Assigns the current value in a hash traversing to a zval
- */
-void zephir_get_current_key(zval **key, const HashTable *hash_table, HashPosition *hash_position TSRMLS_DC)
-{
- Bucket *p;
-
- ZEPHIR_INIT_NVAR_PNULL(*key);
-
- p = hash_position ? (*hash_position) : hash_table->pInternalPointer;
-
- if (p) {
- if (p->nKeyLength) {
- ZVAL_STRINGL(*key, (char *) p->arKey, p->nKeyLength - 1, 0);
- } else {
- ZVAL_LONG(*key, p->h);
- }
- }
-
-}
-
-zval zephir_get_current_key_w(const HashTable *hash_table, HashPosition *hash_position)
-{
- Bucket *p;
- zval result;
-
- INIT_ZVAL(result);
- p = hash_position ? (*hash_position) : hash_table->pInternalPointer;
-
- if (p) {
- if (p->nKeyLength) {
- ZVAL_STRINGL(&result, (char *) p->arKey, p->nKeyLength - 1, 0);
- } else {
- ZVAL_LONG(&result, p->h);
- }
- }
-
- return result;
-}
-
-/**
- * Traverses the hash checking if at least one of the keys is numeric
- */
-int zephir_has_numeric_keys(const zval *data)
-{
- HashTable *ht;
-
- if (Z_TYPE_P(data) == IS_ARRAY) {
-
- ht = Z_ARRVAL_P(data);
-
- ht->pInternalPointer = ht->pListHead;
- while (ht->pInternalPointer) {
- if (!ht->pInternalPointer->nKeyLength) {
- return 1;
- }
- ht->pInternalPointer = ht->pInternalPointer->pListNext;
- }
-
- }
-
- return 0;
-}
-
-/**
- * @brief Adds or updates item @a key in the hash table @a ht
- * @param ht Hash table
- * @param[in] key Key
- * @param[in] value Value
- * @note @a value's reference count in not updated
- * @note If @a key is @c NULL or is @c IS_NULL, @a value is appended to @a ht
- * @throw E_WARNING if @a key type is not supported
- */
-void zephir_hash_update_or_insert(HashTable *ht, zval *key, zval *value)
-{
- if (!key || Z_TYPE_P(key) == IS_NULL) {
- zend_hash_next_index_insert(ht, (void**)&value, sizeof(zval*), NULL);
- return;
- }
-
- switch (Z_TYPE_P(key)) {
- case IS_STRING:
- zend_symtable_update(ht, Z_STRVAL_P(key), Z_STRLEN_P(key)+1, (void**)&value, sizeof(zval*), NULL);
- return;
-
- case IS_RESOURCE:
- case IS_DOUBLE:
- case IS_BOOL:
- case IS_LONG:
- zend_hash_index_update(ht, ((Z_TYPE_P(key) == IS_DOUBLE) ? (ulong)Z_DVAL_P(key) : Z_LVAL_P(key)), (void*)&value, sizeof(zval*), NULL);
- return;
-
- default:
- zend_error(E_WARNING, "Illegal offset type");
- return;
- }
-}
-
-/**
- * @brief Returns the entry @a ht identified by @a key
- * @param[in] ht Hash table
- * @param[in] key
- * @param[in] type One of @c BP_VAR_XXX values
- * @return Pointer to the stored value or a pointer to the special variable / @c NULL if @a key was not found
- * @retval &EG(error_zval_ptr) when @a key was not found and @a type is one of @c BP_VAR_W, @c BP_VAR_RW
- * @retval &EG(uninitialized_zval_ptr) when @a key was not found and @a type is one of @c BP_VAR_R, @c BP_VAR_UNSET, @c BP_VAR_IS
- * @retval @c NULL when @a key was not found and @a type is not any of the above
- * @throw @c E_WARNING when @a key is of not supported typel in this case the function never returns @c NULL
- * @throw @c E_STRICT when @a key is a resource
- * @throw @c E_NOTICE if @a key was not found and @a type is @c BP_VAR_R or @c BP_VAR_RW
- * @note Reference count of the returned item is not modified
- * @note The implementation is suitable for @c read_property, @c get_property_ptr_ptr and @c read_dimension object handlers
- * @warning If @a type is @c BP_VAR_W or @c BP_VAR_RW and @a key was not found, it is added to @a ht and its value is set to @c IS_NULL
- */
-zval** zephir_hash_get(HashTable *ht, zval *key, int type)
-{
- zval **ret = NULL;
-
- switch (Z_TYPE_P(key)) {
- case IS_RESOURCE:
- zend_error(E_STRICT, "Resource ID#%ld used as offset, casting to integer (%ld)", Z_LVAL_P(key), Z_LVAL_P(key));
- /* no break */
- case IS_LONG:
- case IS_DOUBLE:
- case IS_BOOL: {
- ulong index = (Z_TYPE_P(key) == IS_DOUBLE) ? ((long int)Z_DVAL_P(key)) : Z_LVAL_P(key);
- if (FAILURE == zend_hash_index_find(ht, index, (void**)&ret)) {
- switch (type) {
- case BP_VAR_R:
- zend_error(E_NOTICE, "Undefined offset: %ld", index);
- /* no break */
- case BP_VAR_UNSET:
- case BP_VAR_IS: {
- TSRMLS_FETCH();
- ret = &EG(uninitialized_zval_ptr);
- break;
- }
-
- case BP_VAR_RW:
- zend_error(E_NOTICE, "Undefined offset: %ld", index);
- /* no break */
- case BP_VAR_W: {
- zval *value;
- ALLOC_INIT_ZVAL(value);
- zend_hash_index_update(ht, index, (void**)&value, sizeof(void*), (void**)&ret);
- break;
- }
- }
- }
-
- return ret;
- }
-
- case IS_STRING:
- if (FAILURE == zend_symtable_find(ht, Z_STRVAL_P(key), Z_STRLEN_P(key)+1, (void**)&ret)) {
- switch (type) {
- case BP_VAR_R:
- zend_error(E_NOTICE, "Undefined offset: %s", Z_STRVAL_P(key));
- /* no break */
- case BP_VAR_UNSET:
- case BP_VAR_IS: {
- TSRMLS_FETCH();
- ret = &EG(uninitialized_zval_ptr);
- break;
- }
-
- case BP_VAR_RW:
- zend_error(E_NOTICE, "Undefined offset: %s", Z_STRVAL_P(key));
- /* no break */
- case BP_VAR_W: {
- zval *value;
- ALLOC_INIT_ZVAL(value);
- zend_symtable_update(ht, Z_STRVAL_P(key), Z_STRLEN_P(key)+1, (void**)&value, sizeof(void*), (void**)&ret);
- break;
- }
- }
- }
-
- return ret;
-
- default: {
- TSRMLS_FETCH();
- zend_error(E_WARNING, "Illegal offset type");
- return (type == BP_VAR_W || type == BP_VAR_RW) ? &EG(error_zval_ptr) : &EG(uninitialized_zval_ptr);
- }
- }
-}
-
-/**
- * @brief Unset @a key from @a ht
- * @param ht
- * @param key
- * @return
- */
-int zephir_hash_unset(HashTable *ht, zval *key)
-{
- switch (Z_TYPE_P(key)) {
- case IS_LONG:
- case IS_DOUBLE:
- case IS_BOOL:
- case IS_RESOURCE:
- return (zend_hash_index_del(ht, (Z_TYPE_P(key) == IS_DOUBLE) ? ((long int)Z_DVAL_P(key)) : Z_LVAL_P(key)) == SUCCESS);
-
- case IS_STRING:
- return (zend_symtable_del(ht, Z_STRVAL_P(key), Z_STRLEN_P(key) + 1) == SUCCESS);
-
- default:
- zend_error(E_WARNING, "Illegal offset type");
- return 0;
- }
-}
diff --git a/ext/kernel/hash.h b/ext/kernel/hash.h
deleted file mode 100644
index 83b0f796ac1..00000000000
--- a/ext/kernel/hash.h
+++ /dev/null
@@ -1,86 +0,0 @@
-
-/*
- +------------------------------------------------------------------------+
- | Zephir Language |
- +------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
- +------------------------------------------------------------------------+
- | This source file is subject to the New BSD License that is bundled |
- | with this package in the file docs/LICENSE.txt. |
- | |
- | If you did not receive a copy of the license and are unable to |
- | obtain it through the world-wide-web, please send an email |
- | to license@zephir-lang.com so we can send you a copy immediately. |
- +------------------------------------------------------------------------+
- | Authors: Andres Gutierrez |
- | Eduar Carvajal |
- | Vladimir Kolesnikov |
- +------------------------------------------------------------------------+
-*/
-
-#ifndef ZEPHIR_KERNEL_HASH_H
-#define ZEPHIR_KERNEL_HASH_H
-
-#include
-#include
-#include
-
-int zephir_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent);
-
-int zephir_hash_exists(const HashTable *ht, const char *arKey, uint nKeyLength);
-int zephir_hash_quick_exists(const HashTable *ht, const char *arKey, uint nKeyLength, ulong h);
-int zephir_hash_find(const HashTable *ht, const char *arKey, uint nKeyLength, void **pData);
-int zephir_hash_quick_find(const HashTable *ht, const char *arKey, uint nKeyLength, ulong h, void **pData);
-void zephir_get_current_key(zval **key, const HashTable *hash_table, HashPosition *hash_position TSRMLS_DC);
-zval zephir_get_current_key_w(const HashTable *hash_table, HashPosition *hash_position);
-int zephir_has_numeric_keys(const zval *data);
-void zephir_hash_update_or_insert(HashTable *ht, zval *offset, zval *value);
-zval** zephir_hash_get(HashTable *ht, zval *key, int type);
-int zephir_hash_unset(HashTable *ht, zval *offset);
-
-#define zephir_hash_move_forward_ex(ht, pos) *pos = (*pos ? (*pos)->pListNext : NULL)
-
-static zend_always_inline int zephir_hash_get_current_data_ex(HashTable *ht, void **pData, HashPosition *pos)
-{
- Bucket *p;
- p = pos ? (*pos) : ht->pInternalPointer;
- if (p) {
- *pData = p->pData;
- return SUCCESS;
- } else {
- return FAILURE;
- }
-}
-
-static zend_always_inline int zephir_hash_move_backwards_ex(HashTable *ht, HashPosition *pos)
-{
-#if PHP_VERSION_ID < 70000
- HashPosition *current = pos ? pos : &ht->pInternalPointer;
- if (*current) {
- *current = (*current)->pListLast;
- return SUCCESS;
- } else {
- return FAILURE;
- }
-#else
- uint idx = *pos;
-
- IS_CONSISTENT(ht);
-
- if (idx != INVALID_IDX) {
- while (idx > 0) {
- idx--;
- if (Z_TYPE(ht->arData[idx].val) != IS_UNDEF) {
- *pos = idx;
- return SUCCESS;
- }
- }
- *pos = INVALID_IDX;
- return SUCCESS;
- } else {
- return FAILURE;
- }
-#endif
-}
-
-#endif
diff --git a/ext/kernel/iterator.c b/ext/kernel/iterator.c
index 26a3e46f988..b5d0e037d5a 100644
--- a/ext/kernel/iterator.c
+++ b/ext/kernel/iterator.c
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
diff --git a/ext/kernel/iterator.h b/ext/kernel/iterator.h
index 1645823fbf6..0969ae53f8c 100644
--- a/ext/kernel/iterator.h
+++ b/ext/kernel/iterator.h
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
diff --git a/ext/kernel/main.c b/ext/kernel/main.c
index c87504996ed..9cc42517ed6 100644
--- a/ext/kernel/main.c
+++ b/ext/kernel/main.c
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
@@ -301,7 +301,7 @@ int zephir_is_scalar(zval *var) {
*/
int zephir_is_iterable_ex(zval *arr, HashTable **arr_hash, HashPosition *hash_position, int duplicate, int reverse) {
- if (unlikely(Z_TYPE_P(arr) != IS_ARRAY)) {
+ if (UNEXPECTED(Z_TYPE_P(arr) != IS_ARRAY)) {
return 0;
}
@@ -439,3 +439,49 @@ zend_class_entry* zephir_get_internal_ce(const char *class_name, unsigned int cl
return *temp_ce;
}
+
+void zephir_get_args(zval *return_value TSRMLS_DC)
+{
+ zend_execute_data *ex = EG(current_execute_data);
+ void **p = ex->function_state.arguments;
+ int arg_count = (int)(zend_uintptr_t)*p;
+ int i;
+
+ array_init_size(return_value, arg_count);
+ for (i=0; ifunction_state.arguments;
+ int arg_count = (int)(zend_uintptr_t)*p;
+ zval *arg;
+
+ if (UNEXPECTED(idx < 0)) {
+ zend_error(E_WARNING, "zephir_get_arg(): The argument number should be >= 0");
+ RETURN_FALSE;
+ }
+
+ if (UNEXPECTED((zend_ulong)idx >= arg_count)) {
+ zend_error(E_WARNING, "zephir_get_arg(): Argument %d not passed to function", idx);
+ RETURN_FALSE;
+ }
+
+ arg = *((zval**)(p - arg_count + idx));
+ RETURN_ZVAL(arg, 1, 0);
+}
diff --git a/ext/kernel/main.h b/ext/kernel/main.h
index cc3970ef269..c0e340338dd 100644
--- a/ext/kernel/main.h
+++ b/ext/kernel/main.h
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
@@ -567,4 +567,7 @@ static inline char *_str_erealloc(char *str, size_t new_len, size_t old_len) {
#define zephir_is_php_version(id) (PHP_VERSION_ID / 10 == id / 10 ? 1 : 0)
+void zephir_get_args(zval* return_value TSRMLS_DC);
+void zephir_get_arg(zval* return_value, int idx TSRMLS_DC);
+
#endif /* ZEPHIR_KERNEL_MAIN_H */
diff --git a/ext/kernel/math.c b/ext/kernel/math.c
index f5593c58ce8..8f3cac03ce9 100644
--- a/ext/kernel/math.c
+++ b/ext/kernel/math.c
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
diff --git a/ext/kernel/math.h b/ext/kernel/math.h
index bbcae53f1cc..9720bf864e7 100644
--- a/ext/kernel/math.h
+++ b/ext/kernel/math.h
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
diff --git a/ext/kernel/memory.c b/ext/kernel/memory.c
index ec9b0b3c312..7db8bc368f5 100644
--- a/ext/kernel/memory.c
+++ b/ext/kernel/memory.c
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
diff --git a/ext/kernel/memory.h b/ext/kernel/memory.h
index c9f79a33993..592458cbb13 100644
--- a/ext/kernel/memory.h
+++ b/ext/kernel/memory.h
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
diff --git a/ext/kernel/object.c b/ext/kernel/object.c
index 4d583bae667..f197185f7a2 100644
--- a/ext/kernel/object.c
+++ b/ext/kernel/object.c
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
@@ -32,7 +32,6 @@
#include "kernel/object.h"
#include "kernel/exception.h"
#include "kernel/fcall.h"
-#include "kernel/hash.h"
#include "kernel/array.h"
#include "kernel/operators.h"
@@ -44,7 +43,7 @@ int zephir_get_class_constant(zval *return_value, zend_class_entry *ce, char *co
zval **result_ptr;
- if (zephir_hash_find(&ce->constants_table, constant_name, constant_length, (void **) &result_ptr) != SUCCESS) {
+ if (zend_hash_find(&ce->constants_table, constant_name, constant_length, (void **) &result_ptr) != SUCCESS) {
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Undefined class constant '%s::%s'", ce->name, constant_name);
return FAILURE;
}
@@ -400,10 +399,10 @@ int zephir_clone(zval *destination, zval *obj TSRMLS_DC) {
int zephir_isset_property_quick(zval *object, const char *property_name, unsigned int property_length, unsigned long hash TSRMLS_DC) {
if (Z_TYPE_P(object) == IS_OBJECT) {
- if (likely(zephir_hash_quick_exists(&Z_OBJCE_P(object)->properties_info, property_name, property_length, hash))) {
+ if (EXPECTED(zend_hash_quick_exists(&Z_OBJCE_P(object)->properties_info, property_name, property_length, hash))) {
return 1;
} else {
- return zephir_hash_quick_exists(Z_OBJ_HT_P(object)->get_properties(object TSRMLS_CC), property_name, property_length, hash);
+ return zend_hash_quick_exists(Z_OBJ_HT_P(object)->get_properties(object TSRMLS_CC), property_name, property_length, hash);
}
}
@@ -430,10 +429,10 @@ int zephir_isset_property_zval(zval *object, const zval *property TSRMLS_DC) {
hash = zend_inline_hash_func(Z_STRVAL_P(property), Z_STRLEN_P(property) + 1);
- if (likely(zephir_hash_quick_exists(&Z_OBJCE_P(object)->properties_info, Z_STRVAL_P(property), Z_STRLEN_P(property) + 1, hash))) {
+ if (EXPECTED(zend_hash_quick_exists(&Z_OBJCE_P(object)->properties_info, Z_STRVAL_P(property), Z_STRLEN_P(property) + 1, hash))) {
return 1;
} else {
- return zephir_hash_quick_exists(Z_OBJ_HT_P(object)->get_properties(object TSRMLS_CC), Z_STRVAL_P(property), Z_STRLEN_P(property) + 1, hash);
+ return zend_hash_quick_exists(Z_OBJ_HT_P(object)->get_properties(object TSRMLS_CC), Z_STRVAL_P(property), Z_STRLEN_P(property) + 1, hash);
}
}
}
@@ -450,7 +449,7 @@ static inline zend_class_entry *zephir_lookup_class_ce_quick(zend_class_entry *c
zend_class_entry *original_ce = ce;
while (ce) {
- if (zephir_hash_quick_exists(&ce->properties_info, property_name, property_length + 1, hash)) {
+ if (zend_hash_quick_exists(&ce->properties_info, property_name, property_length + 1, hash)) {
return ce;
}
ce = ce->parent;
@@ -528,7 +527,7 @@ zval* zephir_fetch_property_this_quick(zval *object, const char *property_name,
zend_property_info *property_info;
zend_class_entry *ce, *old_scope;
- if (likely(Z_TYPE_P(object) == IS_OBJECT)) {
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
ce = Z_OBJCE_P(object);
if (ce->parent) {
@@ -540,7 +539,7 @@ zval* zephir_fetch_property_this_quick(zval *object, const char *property_name,
zobj = zend_objects_get_address(object TSRMLS_CC);
- if (zephir_hash_quick_find(&ce->properties_info, property_name, property_length + 1, key, (void **) &property_info) == SUCCESS) {
+ if (zend_hash_quick_find(&ce->properties_info, property_name, property_length + 1, key, (void **) &property_info) == SUCCESS) {
int flag;
if (EXPECTED((property_info->flags & ZEND_ACC_STATIC) == 0) && property_info->offset >= 0) {
if (zobj->properties) {
@@ -552,22 +551,22 @@ zval* zephir_fetch_property_this_quick(zval *object, const char *property_name,
}
} else if (UNEXPECTED(!zobj->properties)) {
flag = 1;
- } else if (UNEXPECTED(zephir_hash_quick_find(zobj->properties, property_info->name, property_info->name_length+1, property_info->h, (void **) &zv) == FAILURE)) {
+ } else if (UNEXPECTED(zend_hash_quick_find(zobj->properties, property_info->name, property_info->name_length+1, property_info->h, (void **) &zv) == FAILURE)) {
flag = 2;
} else {
flag = 0;
}
- if (unlikely(flag) && zobj->properties) {
+ if (UNEXPECTED(flag) && zobj->properties) {
if (
- (flag == 2 || zephir_hash_quick_find(zobj->properties, property_info->name, property_info->name_length+1, property_info->h, (void **) &zv) == FAILURE)
+ (flag == 2 || zend_hash_quick_find(zobj->properties, property_info->name, property_info->name_length+1, property_info->h, (void **) &zv) == FAILURE)
&& zv && *zv
) {
flag = 0;
}
}
- if (likely(!flag)) {
+ if (EXPECTED(!flag)) {
EG(scope) = old_scope;
return *zv;
}
@@ -594,7 +593,7 @@ int zephir_return_property_quick(zval *return_value, zval **return_value_ptr, zv
zend_property_info *property_info;
zend_class_entry *ce, *old_scope;
- if (likely(Z_TYPE_P(object) == IS_OBJECT)) {
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
ce = Z_OBJCE_P(object);
if (ce->parent) {
@@ -606,7 +605,7 @@ int zephir_return_property_quick(zval *return_value, zval **return_value_ptr, zv
zobj = zend_objects_get_address(object TSRMLS_CC);
- if (zephir_hash_quick_find(&ce->properties_info, property_name, property_length + 1, key, (void **) &property_info) == SUCCESS) {
+ if (zend_hash_quick_find(&ce->properties_info, property_name, property_length + 1, key, (void **) &property_info) == SUCCESS) {
int flag;
if (EXPECTED((property_info->flags & ZEND_ACC_STATIC) == 0) && property_info->offset >= 0) {
if (zobj->properties) {
@@ -618,22 +617,22 @@ int zephir_return_property_quick(zval *return_value, zval **return_value_ptr, zv
}
} else if (UNEXPECTED(!zobj->properties)) {
flag = 1;
- } else if (UNEXPECTED(zephir_hash_quick_find(zobj->properties, property_info->name, property_info->name_length+1, property_info->h, (void **) &zv) == FAILURE)) {
+ } else if (UNEXPECTED(zend_hash_quick_find(zobj->properties, property_info->name, property_info->name_length+1, property_info->h, (void **) &zv) == FAILURE)) {
flag = 2;
} else {
flag = 0;
}
- if (unlikely(flag) && zobj->properties) {
+ if (UNEXPECTED(flag) && zobj->properties) {
if (
- (flag == 2 || zephir_hash_quick_find(zobj->properties, property_info->name, property_info->name_length+1, property_info->h, (void **) &zv) == FAILURE)
+ (flag == 2 || zend_hash_quick_find(zobj->properties, property_info->name, property_info->name_length+1, property_info->h, (void **) &zv) == FAILURE)
&& zv && *zv
) {
flag = 0;
}
}
- if (likely(!flag)) {
+ if (EXPECTED(!flag)) {
EG(scope) = old_scope;
if (return_value_ptr) {
@@ -672,7 +671,7 @@ int zephir_return_property(zval *return_value, zval **return_value_ptr, zval *ob
*/
int zephir_read_property_zval(zval **result, zval *object, zval *property, int flags TSRMLS_DC) {
- if (unlikely(Z_TYPE_P(property) != IS_STRING)) {
+ if (UNEXPECTED(Z_TYPE_P(property) != IS_STRING)) {
if ((flags & PH_NOISY) == PH_NOISY) {
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Cannot access empty property %d", Z_TYPE_P(property));
@@ -791,7 +790,7 @@ int zephir_update_property_this_quick(zval *object, const char *property_name, z
zend_class_entry *ce, *old_scope;
- if (unlikely(Z_TYPE_P(object) != IS_OBJECT)) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Attempt to assign property of non-object");
return FAILURE;
}
@@ -811,11 +810,11 @@ int zephir_update_property_this_quick(zval *object, const char *property_name, z
zobj = zend_objects_get_address(object TSRMLS_CC);
- if (likely(zephir_hash_quick_find(&ce->properties_info, property_name, property_length + 1, key, (void **) &property_info) == SUCCESS)) {
+ if (EXPECTED(zend_hash_quick_find(&ce->properties_info, property_name, property_length + 1, key, (void **) &property_info) == SUCCESS)) {
assert(property_info != NULL);
/** This is as zend_std_write_property, but we're not interesed in validate properties visibility */
- if (property_info->offset >= 0 ? (zobj->properties ? ((variable_ptr = (zval**) zobj->properties_table[property_info->offset]) != NULL) : (*(variable_ptr = &zobj->properties_table[property_info->offset]) != NULL)) : (EXPECTED(zobj->properties != NULL) && EXPECTED(zephir_hash_quick_find(zobj->properties, property_info->name, property_info->name_length + 1, property_info->h, (void **) &variable_ptr) == SUCCESS))) {
+ if (property_info->offset >= 0 ? (zobj->properties ? ((variable_ptr = (zval**) zobj->properties_table[property_info->offset]) != NULL) : (*(variable_ptr = &zobj->properties_table[property_info->offset]) != NULL)) : (EXPECTED(zobj->properties != NULL) && EXPECTED(zend_hash_quick_find(zobj->properties, property_info->name, property_info->name_length + 1, property_info->h, (void **) &variable_ptr) == SUCCESS))) {
if (EXPECTED(*variable_ptr != value)) {
@@ -1009,7 +1008,7 @@ int zephir_update_property_array_string(zval *object, char *property, unsigned i
zval *tmp;
int separated = 0;
- if (likely(Z_TYPE_P(object) == IS_OBJECT)) {
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
zephir_read_property(&tmp, object, property, property_length, PH_NOISY_CC);
@@ -1220,7 +1219,7 @@ int zephir_method_quick_exists_ex(const zval *object, const char *method_name, u
zend_class_entry *ce;
- if (likely(Z_TYPE_P(object) == IS_OBJECT)) {
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
ce = Z_OBJCE_P(object);
} else {
if (Z_TYPE_P(object) == IS_STRING) {
@@ -1231,7 +1230,7 @@ int zephir_method_quick_exists_ex(const zval *object, const char *method_name, u
}
while (ce) {
- if (zephir_hash_quick_exists(&ce->function_table, method_name, method_len, hash)) {
+ if (zend_hash_quick_exists(&ce->function_table, method_name, method_len, hash)) {
return SUCCESS;
}
ce = ce->parent;
@@ -1482,7 +1481,7 @@ int zephir_read_class_property(zval **result, int type, const char *property, in
type &= ZEND_FETCH_CLASS_MASK;
ce = zend_fetch_class(NULL, 0, type TSRMLS_CC);
- if (likely(ce != NULL)) {
+ if (EXPECTED(ce != NULL)) {
return zephir_read_static_property_ce(result, ce, property, len TSRMLS_CC);
}
@@ -1553,7 +1552,7 @@ int zephir_create_instance_params(zval *return_value, const zval *class_name, zv
zval **item;
int i = 0;
- if (likely(param_count) <= 10) {
+ if (EXPECTED(param_count <= 10)) {
params_ptr = static_params;
} else {
params_arr = emalloc(param_count * sizeof(zval*));
@@ -1573,7 +1572,7 @@ int zephir_create_instance_params(zval *return_value, const zval *class_name, zv
outcome = zephir_call_class_method_aparams(NULL, ce, zephir_fcall_method, return_value, SL("__construct"), NULL, 0, param_count, params_ptr TSRMLS_CC);
- if (unlikely(params_arr != NULL)) {
+ if (UNEXPECTED(params_arr != NULL)) {
efree(params_arr);
}
}
@@ -1697,7 +1696,7 @@ int zephir_fetch_property(zval **result, zval *object, const char *property_name
*/
int zephir_fetch_property_zval(zval **result, zval *object, zval *property, int silent TSRMLS_DC) {
- if (unlikely(Z_TYPE_P(property) != IS_STRING)) {
+ if (UNEXPECTED(Z_TYPE_P(property) != IS_STRING)) {
*result = ZEPHIR_GLOBAL(global_null);
Z_ADDREF_P(*result);
return 0;
diff --git a/ext/kernel/object.h b/ext/kernel/object.h
index 3c429af7560..1cd3a54a266 100644
--- a/ext/kernel/object.h
+++ b/ext/kernel/object.h
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
diff --git a/ext/kernel/operators.c b/ext/kernel/operators.c
index 68260b62a38..ff811c09bb9 100644
--- a/ext/kernel/operators.c
+++ b/ext/kernel/operators.c
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
diff --git a/ext/kernel/operators.h b/ext/kernel/operators.h
index 300afd0d089..64a9d1e6cd9 100644
--- a/ext/kernel/operators.h
+++ b/ext/kernel/operators.h
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
diff --git a/ext/kernel/output.c b/ext/kernel/output.c
index dfae7334b51..8facd517ea5 100644
--- a/ext/kernel/output.c
+++ b/ext/kernel/output.c
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
diff --git a/ext/kernel/output.h b/ext/kernel/output.h
index d3c0bf32665..d6c05095f6d 100644
--- a/ext/kernel/output.h
+++ b/ext/kernel/output.h
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
diff --git a/ext/kernel/persistent.c b/ext/kernel/persistent.c
deleted file mode 100644
index 4fc9dbd5016..00000000000
--- a/ext/kernel/persistent.c
+++ /dev/null
@@ -1,58 +0,0 @@
-
-/*
- +------------------------------------------------------------------------+
- | Zephir Language |
- +------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
- +------------------------------------------------------------------------+
- | This source file is subject to the New BSD License that is bundled |
- | with this package in the file docs/LICENSE.txt. |
- | |
- | If you did not receive a copy of the license and are unable to |
- | obtain it through the world-wide-web, please send an email |
- | to license@zephir-lang.com so we can send you a copy immediately. |
- +------------------------------------------------------------------------+
- | Authors: Andres Gutierrez |
- | Eduar Carvajal |
- +------------------------------------------------------------------------+
-*/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "php.h"
-#include "php_ext.h"
-
-/* represents a connection to a database */
-struct _zephir_persist_obj {
- char *data;
-} zephir_persist_obj;
-
-int zephir_persistent_fetch(zval *return_value, zval *service TSRMLS_DC){
- zend_rsrc_list_entry *le;
-
- /* try to find if we already have this link in our persistent list */
- if (zend_hash_find(&EG(persistent_list), Z_STRVAL_P(service), Z_STRLEN_P(service)+1, (void **) &le)==FAILURE) {
-
- }
-}
-
-int zephir_persistent_store(zval *service, zval *object TSRMLS_DC){
-
- //pdo_dbh_t *dbh = NULL;
-
- //zend_object_store_set_object(object, dbh TSRMLS_CC);
-
-
- zend_rsrc_list_entry new_le;
-
- Z_TYPE(new_le) = 1;
- new_le.ptr = pestrdup("hello", 1);
- if (zend_hash_update(&EG(persistent_list), Z_STRVAL_P(service), Z_STRLEN_P(service)+1, (void *) &new_le, sizeof(zend_rsrc_list_entry), NULL)==FAILURE) {
- //goto err;
- }
-
- //zephir_persistent_store
-
-}
diff --git a/ext/kernel/persistent.h b/ext/kernel/persistent.h
deleted file mode 100644
index 35bf4fed83d..00000000000
--- a/ext/kernel/persistent.h
+++ /dev/null
@@ -1,28 +0,0 @@
-
-/*
- +------------------------------------------------------------------------+
- | Zephir Language |
- +------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
- +------------------------------------------------------------------------+
- | This source file is subject to the New BSD License that is bundled |
- | with this package in the file docs/LICENSE.txt. |
- | |
- | If you did not receive a copy of the license and are unable to |
- | obtain it through the world-wide-web, please send an email |
- | to license@zephir-lang.com so we can send you a copy immediately. |
- +------------------------------------------------------------------------+
- | Authors: Andres Gutierrez |
- | Eduar Carvajal |
- +------------------------------------------------------------------------+
-*/
-
-#ifndef ZEPHIR_KERNEL_PERSISTENT_H
-#define ZEPHIR_KERNEL_PERSISTENT_H
-
-#include
-
-int zephir_persistent_store(zval *service, zval *object TSRMLS_DC);
-int zephir_persistent_fetch(zval *return_value, zval *service TSRMLS_DC);
-
-#endif
\ No newline at end of file
diff --git a/ext/kernel/require.c b/ext/kernel/require.c
index 1c23125e4a7..1880553168a 100644
--- a/ext/kernel/require.c
+++ b/ext/kernel/require.c
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
@@ -40,7 +40,7 @@
int zephir_require_ret(zval **return_value_ptr, const char *require_path TSRMLS_DC)
{
zend_file_handle file_handle;
- int ret, use_ret;
+ int ret;
zend_op_array *new_op_array;
#ifndef ZEPHIR_RELEASE
@@ -56,8 +56,6 @@ int zephir_require_ret(zval **return_value_ptr, const char *require_path TSRMLS_
return FAILURE;
}
- use_ret = !!return_value_ptr;
-
file_handle.filename = require_path;
file_handle.free_filename = 0;
file_handle.type = ZEND_HANDLE_FILENAME;
diff --git a/ext/kernel/require.h b/ext/kernel/require.h
index a74daafc7c1..c3bdb7b5a5c 100644
--- a/ext/kernel/require.h
+++ b/ext/kernel/require.h
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
diff --git a/ext/kernel/session.c b/ext/kernel/session.c
index 28a0e732be0..714b84d5ad6 100644
--- a/ext/kernel/session.c
+++ b/ext/kernel/session.c
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
@@ -66,7 +66,7 @@ void zephir_set_session_id(zval *sid TSRMLS_DC)
zval copy;
int use_copy = 0;
- if (unlikely(Z_TYPE_P(sid) != IS_STRING)) {
+ if (UNEXPECTED(Z_TYPE_P(sid) != IS_STRING)) {
zend_make_printable_zval(sid, ©, &use_copy);
if (use_copy) {
sid = ©
@@ -79,7 +79,7 @@ void zephir_set_session_id(zval *sid TSRMLS_DC)
PS(id) = estrndup(Z_STRVAL_P(sid), Z_STRLEN_P(sid));
- if (unlikely(use_copy)) {
+ if (UNEXPECTED(use_copy)) {
zval_dtor(©);
}
#else
diff --git a/ext/kernel/session.h b/ext/kernel/session.h
index 6e3e38e5917..7239a00e35a 100644
--- a/ext/kernel/session.h
+++ b/ext/kernel/session.h
@@ -3,7 +3,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
diff --git a/ext/kernel/string.c b/ext/kernel/string.c
index 0919d878789..1f4b8481794 100644
--- a/ext/kernel/string.c
+++ b/ext/kernel/string.c
@@ -2,7 +2,7 @@
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
- | Copyright (c) 2011-2016 Zephir Team (http://www.zephir-lang.com) |
+ | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
@@ -133,7 +133,7 @@ void zephir_fast_strtolower(zval *return_value, zval *str){
}
void zephir_strtolower_inplace(zval *s) {
- if (likely(Z_TYPE_P(s) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(s) == IS_STRING)) {
php_strtolower(Z_STRVAL_P(s), Z_STRLEN_P(s));
}
}
@@ -261,7 +261,7 @@ void zephir_camelize(zval *return_value, const zval *str, const zval *delimiter)
smart_str camelize_str = {0};
char *marker, ch, *delim;
- if (unlikely(Z_TYPE_P(str) != IS_STRING)) {
+ if (UNEXPECTED(Z_TYPE_P(str) != IS_STRING)) {
zend_error(E_WARNING, "Invalid arguments supplied for camelize()");
RETURN_EMPTY_STRING();
}
@@ -361,7 +361,7 @@ void zephir_uncamelize(zval *return_value, const zval *str, const zval *delimite
*/
void zephir_fast_explode(zval *return_value, zval *delimiter, zval *str, long limit TSRMLS_DC) {
- if (unlikely(Z_TYPE_P(str) != IS_STRING || Z_TYPE_P(delimiter) != IS_STRING)) {
+ if (UNEXPECTED(Z_TYPE_P(str) != IS_STRING || Z_TYPE_P(delimiter) != IS_STRING)) {
zend_error(E_WARNING, "Invalid arguments supplied for explode()");
RETURN_EMPTY_STRING();
}
@@ -377,7 +377,7 @@ void zephir_fast_explode_str(zval *return_value, const char *delimiter, int deli
zval delimiter_zval;
- if (unlikely(Z_TYPE_P(str) != IS_STRING)) {
+ if (UNEXPECTED(Z_TYPE_P(str) != IS_STRING)) {
zend_error(E_WARNING, "Invalid arguments supplied for explode()");
RETURN_EMPTY_STRING();
}
@@ -437,7 +437,7 @@ void zephir_fast_strpos(zval *return_value, const zval *haystack, const zval *ne
const char *found = NULL;
- if (unlikely(Z_TYPE_P(haystack) != IS_STRING || Z_TYPE_P(needle) != IS_STRING)) {
+ if (UNEXPECTED(Z_TYPE_P(haystack) != IS_STRING || Z_TYPE_P(needle) != IS_STRING)) {
ZVAL_NULL(return_value);
zend_error(E_WARNING, "Invalid arguments supplied for strpos()");
return;
@@ -472,7 +472,7 @@ void zephir_fast_strpos_str(zval *return_value, const zval *haystack, char *need
const char *found = NULL;
- if (unlikely(Z_TYPE_P(haystack) != IS_STRING)) {
+ if (UNEXPECTED(Z_TYPE_P(haystack) != IS_STRING)) {
ZVAL_NULL(return_value);
zend_error(E_WARNING, "Invalid arguments supplied for strpos()");
return;
@@ -495,7 +495,7 @@ void zephir_fast_stripos_str(zval *return_value, zval *haystack, char *needle, u
const char *found = NULL;
char *needle_dup, *haystack_dup;
- if (unlikely(Z_TYPE_P(haystack) != IS_STRING)) {
+ if (UNEXPECTED(Z_TYPE_P(haystack) != IS_STRING)) {
ZVAL_NULL(return_value);
zend_error(E_WARNING, "Invalid arguments supplied for stripos()");
return;
@@ -1360,7 +1360,7 @@ int zephir_json_decode(zval *return_value, zval **return_value_ptr, zval *v, zen
zval copy;
int use_copy = 0;
- if (unlikely(Z_TYPE_P(v) != IS_STRING)) {
+ if (UNEXPECTED(Z_TYPE_P(v) != IS_STRING)) {
zend_make_printable_zval(v, ©, &use_copy);
if (use_copy) {
v = ©
@@ -1369,7 +1369,7 @@ int zephir_json_decode(zval *return_value, zval **return_value_ptr, zval *v, zen
php_json_decode(return_value, Z_STRVAL_P(v), Z_STRLEN_P(v), assoc, 512 /* JSON_PARSER_DEFAULT_DEPTH */ TSRMLS_CC);
- if (unlikely(use_copy)) {
+ if (UNEXPECTED(use_copy)) {
zval_dtor(©);
}
@@ -1414,7 +1414,7 @@ void zephir_lcfirst(zval *return_value, zval *s) {
char *c;
int use_copy = 0;
- if (unlikely(Z_TYPE_P(s) != IS_STRING)) {
+ if (UNEXPECTED(Z_TYPE_P(s) != IS_STRING)) {
zend_make_printable_zval(s, ©, &use_copy);
if (use_copy) {
s = ©
@@ -1430,7 +1430,7 @@ void zephir_lcfirst(zval *return_value, zval *s) {
*c = tolower((unsigned char)*c);
}
- if (unlikely(use_copy)) {
+ if (UNEXPECTED(use_copy)) {
zval_dtor(©);
}
}
@@ -1441,7 +1441,7 @@ void zephir_ucfirst(zval *return_value, zval *s) {
char *c;
int use_copy = 0;
- if (unlikely(Z_TYPE_P(s) != IS_STRING)) {
+ if (UNEXPECTED(Z_TYPE_P(s) != IS_STRING)) {
zend_make_printable_zval(s, ©, &use_copy);
if (use_copy) {
s = ©
@@ -1457,7 +1457,7 @@ void zephir_ucfirst(zval *return_value, zval *s) {
*c = toupper((unsigned char)*c);
}
- if (unlikely(use_copy)) {
+ if (UNEXPECTED(use_copy)) {
zval_dtor(©);
}
}
@@ -1498,7 +1498,7 @@ void zephir_htmlspecialchars(zval *return_value, zval *string, zval *quoting, zv
int qs, use_copy = 0;
size_t escaped_len;
- if (unlikely(Z_TYPE_P(string) != IS_STRING)) {
+ if (UNEXPECTED(Z_TYPE_P(string) != IS_STRING)) {
zend_make_printable_zval(string, ©, &use_copy);
if (use_copy) {
string = ©
@@ -1511,7 +1511,7 @@ void zephir_htmlspecialchars(zval *return_value, zval *string, zval *quoting, zv
escaped = php_escape_html_entities_ex((unsigned char *)(Z_STRVAL_P(string)), Z_STRLEN_P(string), &escaped_len, 0, qs, cs, 1 TSRMLS_CC);
ZVAL_STRINGL(return_value, escaped, escaped_len, 0);
- if (unlikely(use_copy)) {
+ if (UNEXPECTED(use_copy)) {
zval_dtor(©);
}
}
@@ -1523,7 +1523,7 @@ void zephir_htmlentities(zval *return_value, zval *string, zval *quoting, zval *
int qs, use_copy = 0;
size_t escaped_len;
- if (unlikely(Z_TYPE_P(string) != IS_STRING)) {
+ if (UNEXPECTED(Z_TYPE_P(string) != IS_STRING)) {
zend_make_printable_zval(string, ©, &use_copy);
if (use_copy) {
string = ©
@@ -1536,7 +1536,7 @@ void zephir_htmlentities(zval *return_value, zval *string, zval *quoting, zval *
escaped = php_escape_html_entities_ex((unsigned char *)(Z_STRVAL_P(string)), Z_STRLEN_P(string), &escaped_len, 1, qs, cs, 1 TSRMLS_CC);
ZVAL_STRINGL(return_value, escaped, escaped_len, 0);
- if (unlikely(use_copy)) {
+ if (UNEXPECTED(use_copy)) {
zval_dtor(©);
}
}
@@ -1562,7 +1562,7 @@ void zephir_date(zval *return_value, zval *format, zval *timestamp TSRMLS_DC)
int use_copy = 0;
char *formatted;
- if (unlikely(Z_TYPE_P(format) != IS_STRING)) {
+ if (UNEXPECTED(Z_TYPE_P(format) != IS_STRING)) {
zend_make_printable_zval(format, ©, &use_copy);
if (use_copy) {
format = ©
@@ -1574,7 +1574,7 @@ void zephir_date(zval *return_value, zval *format, zval *timestamp TSRMLS_DC)
formatted = php_format_date(Z_STRVAL_P(format), Z_STRLEN_P(format), ts, 1 TSRMLS_CC);
ZVAL_STRING(return_value, formatted, 0);
- if (unlikely(use_copy)) {
+ if (UNEXPECTED(use_copy)) {
zval_dtor(©);
}
}
@@ -1584,7 +1584,7 @@ void zephir_addslashes(zval *return_value, zval *str TSRMLS_DC)
zval copy;
int use_copy = 0;
- if (unlikely(Z_TYPE_P(str) != IS_STRING)) {
+ if (UNEXPECTED(Z_TYPE_P(str) != IS_STRING)) {
zend_make_printable_zval(str, ©, &use_copy);
if (use_copy) {
str = ©
@@ -1593,7 +1593,7 @@ void zephir_addslashes(zval *return_value, zval *str TSRMLS_DC)
ZVAL_STRING(return_value, php_addslashes(Z_STRVAL_P(str), Z_STRLEN_P(str), &Z_STRLEN_P(return_value), 0 TSRMLS_CC), 0);
- if (unlikely(use_copy)) {
+ if (UNEXPECTED(use_copy)) {
zval_dtor(©);
}
}
@@ -1603,7 +1603,7 @@ void zephir_stripslashes(zval *return_value, zval *str TSRMLS_DC)
zval copy;
int use_copy = 0;
- if (unlikely(Z_TYPE_P(str) != IS_STRING)) {
+ if (UNEXPECTED(Z_TYPE_P(str) != IS_STRING)) {
zend_make_printable_zval(str, ©, &use_copy);
if (use_copy) {
str = ©
@@ -1613,7 +1613,7 @@ void zephir_stripslashes(zval *return_value, zval *str TSRMLS_DC)
ZVAL_STRINGL(return_value, Z_STRVAL_P(str), Z_STRLEN_P(str), 1);
php_stripslashes(Z_STRVAL_P(return_value), &Z_STRLEN_P(return_value) TSRMLS_CC);
- if (unlikely(use_copy)) {
+ if (UNEXPECTED(use_copy)) {
zval_dtor(©);
}
}
@@ -1624,7 +1624,7 @@ void zephir_stripcslashes(zval *return_value, zval *str TSRMLS_DC)
zval copy;
int use_copy = 0;
- if (unlikely(Z_TYPE_P(str) != IS_STRING)) {
+ if (UNEXPECTED(Z_TYPE_P(str) != IS_STRING)) {
zend_make_printable_zval(str, ©, &use_copy);
if (use_copy) {
str = ©
@@ -1634,7 +1634,7 @@ void zephir_stripcslashes(zval *return_value, zval *str TSRMLS_DC)
ZVAL_STRINGL(return_value, Z_STRVAL_P(str), Z_STRLEN_P(str), 1);
php_stripcslashes(Z_STRVAL_P(return_value), &Z_STRLEN_P(return_value));
- if (unlikely(use_copy)) {
+ if (UNEXPECTED(use_copy)) {
zval_dtor(©);
}
}
@@ -1666,3 +1666,32 @@ int zephir_hash_equals(const zval *known_zval, const zval *user_zval)
return (int) (result == 0);
}
+
+void zephir_string_to_hex(zval *return_value, zval *var)
+{
+ int use_copy = 0;
+ zval copy;
+ size_t i;
+ char *s;
+ char *res;
+
+ if (Z_TYPE_P(var) != IS_STRING) {
+ zend_make_printable_zval(var, ©, &use_copy);
+ if (use_copy) {
+ var = ©
+ }
+ }
+
+ res = emalloc(2*Z_STRLEN_P(var) + 1);
+ s = Z_STRVAL_P(var);
+ for (i=0; iKey | Value | ") TSRMLS_CC);
zephir_is_iterable(_REQUEST, &_17$$5, &_16$$5, 0, 0, "phalcon/debug.zep", 673);
for (
- ; zephir_hash_get_current_data_ex(_17$$5, (void**) &_18$$5, &_16$$5) == SUCCESS
- ; zephir_hash_move_forward_ex(_17$$5, &_16$$5)
+ ; zend_hash_get_current_data_ex(_17$$5, (void**) &_18$$5, &_16$$5) == SUCCESS
+ ; zend_hash_move_forward_ex(_17$$5, &_16$$5)
) {
ZEPHIR_GET_HMKEY(keyRequest, _17$$5, _16$$5);
ZEPHIR_GET_HVALUE(value, _18$$5);
@@ -950,8 +949,8 @@ PHP_METHOD(Phalcon_Debug, onUncaughtException) {
zephir_concat_self_str(&html, SL("Key | Value |
") TSRMLS_CC);
zephir_is_iterable(_SERVER, &_24$$5, &_23$$5, 0, 0, "phalcon/debug.zep", 683);
for (
- ; zephir_hash_get_current_data_ex(_24$$5, (void**) &_25$$5, &_23$$5) == SUCCESS
- ; zephir_hash_move_forward_ex(_24$$5, &_23$$5)
+ ; zend_hash_get_current_data_ex(_24$$5, (void**) &_25$$5, &_23$$5) == SUCCESS
+ ; zend_hash_move_forward_ex(_24$$5, &_23$$5)
) {
ZEPHIR_GET_HMKEY(keyServer, _24$$5, _23$$5);
ZEPHIR_GET_HVALUE(value, _25$$5);
@@ -968,8 +967,8 @@ PHP_METHOD(Phalcon_Debug, onUncaughtException) {
zephir_check_call_status();
zephir_is_iterable(_29$$5, &_31$$5, &_30$$5, 0, 0, "phalcon/debug.zep", 693);
for (
- ; zephir_hash_get_current_data_ex(_31$$5, (void**) &_32$$5, &_30$$5) == SUCCESS
- ; zephir_hash_move_forward_ex(_31$$5, &_30$$5)
+ ; zend_hash_get_current_data_ex(_31$$5, (void**) &_32$$5, &_30$$5) == SUCCESS
+ ; zend_hash_move_forward_ex(_31$$5, &_30$$5)
) {
ZEPHIR_GET_HMKEY(keyFile, _31$$5, _30$$5);
ZEPHIR_GET_HVALUE(value, _32$$5);
@@ -990,8 +989,8 @@ PHP_METHOD(Phalcon_Debug, onUncaughtException) {
zephir_concat_self_str(&html, SL("Key | Value |
") TSRMLS_CC);
zephir_is_iterable(dataVars, &_37$$13, &_36$$13, 0, 0, "phalcon/debug.zep", 711);
for (
- ; zephir_hash_get_current_data_ex(_37$$13, (void**) &_38$$13, &_36$$13) == SUCCESS
- ; zephir_hash_move_forward_ex(_37$$13, &_36$$13)
+ ; zend_hash_get_current_data_ex(_37$$13, (void**) &_38$$13, &_36$$13) == SUCCESS
+ ; zend_hash_move_forward_ex(_37$$13, &_36$$13)
) {
ZEPHIR_GET_HMKEY(keyVar, _37$$13, _36$$13);
ZEPHIR_GET_HVALUE(dataVar, _38$$13);
diff --git a/ext/phalcon/debug/dump.zep.c b/ext/phalcon/debug/dump.zep.c
index d8ff6cef692..6a70f74944b 100644
--- a/ext/phalcon/debug/dump.zep.c
+++ b/ext/phalcon/debug/dump.zep.c
@@ -17,10 +17,10 @@
#include "kernel/fcall.h"
#include "kernel/operators.h"
#include "kernel/array.h"
+#include "kernel/main.h"
#include "ext/spl/spl_exceptions.h"
#include "kernel/exception.h"
#include "kernel/concat.h"
-#include "kernel/hash.h"
#include "kernel/string.h"
@@ -138,8 +138,7 @@ PHP_METHOD(Phalcon_Debug_Dump, all) {
ZVAL_STRING(_1, "variables", 1);
zephir_array_fast_append(_0, _1);
ZEPHIR_INIT_NVAR(_1);
- array_init(_1);
- zend_copy_parameters_array(ZEND_NUM_ARGS(), _1 TSRMLS_CC);
+ zephir_get_args(_1 TSRMLS_CC);
ZEPHIR_CALL_USER_FUNC_ARRAY(return_value, _0, _1);
zephir_check_call_status();
RETURN_MM();
@@ -157,11 +156,11 @@ PHP_METHOD(Phalcon_Debug_Dump, getStyle) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &type_param);
- if (unlikely(Z_TYPE_P(type_param) != IS_STRING && Z_TYPE_P(type_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(type_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(type_param) == IS_STRING)) {
zephir_get_strval(type, type_param);
} else {
ZEPHIR_INIT_VAR(type);
@@ -307,8 +306,8 @@ PHP_METHOD(Phalcon_Debug_Dump, output) {
zephir_concat_self(&output, _2$$4 TSRMLS_CC);
zephir_is_iterable(variable, &_8$$4, &_7$$4, 0, 0, "phalcon/debug/dump.zep", 161);
for (
- ; zephir_hash_get_current_data_ex(_8$$4, (void**) &_9$$4, &_7$$4) == SUCCESS
- ; zephir_hash_move_forward_ex(_8$$4, &_7$$4)
+ ; zend_hash_get_current_data_ex(_8$$4, (void**) &_9$$4, &_7$$4) == SUCCESS
+ ; zend_hash_move_forward_ex(_8$$4, &_7$$4)
) {
ZEPHIR_GET_HMKEY(key, _8$$4, _7$$4);
ZEPHIR_GET_HVALUE(value, _9$$4);
@@ -418,8 +417,8 @@ PHP_METHOD(Phalcon_Debug_Dump, output) {
zephir_check_call_status();
zephir_is_iterable(_40$$11, &_42$$11, &_41$$11, 0, 0, "phalcon/debug/dump.zep", 194);
for (
- ; zephir_hash_get_current_data_ex(_42$$11, (void**) &_43$$11, &_41$$11) == SUCCESS
- ; zephir_hash_move_forward_ex(_42$$11, &_41$$11)
+ ; zend_hash_get_current_data_ex(_42$$11, (void**) &_43$$11, &_41$$11) == SUCCESS
+ ; zend_hash_move_forward_ex(_42$$11, &_41$$11)
) {
ZEPHIR_GET_HMKEY(key, _42$$11, _41$$11);
ZEPHIR_GET_HVALUE(value, _43$$11);
@@ -565,8 +564,8 @@ PHP_METHOD(Phalcon_Debug_Dump, output) {
} else {
zephir_is_iterable(attr, &_76$$20, &_75$$20, 0, 0, "phalcon/debug/dump.zep", 243);
for (
- ; zephir_hash_get_current_data_ex(_76$$20, (void**) &_77$$20, &_75$$20) == SUCCESS
- ; zephir_hash_move_forward_ex(_76$$20, &_75$$20)
+ ; zend_hash_get_current_data_ex(_76$$20, (void**) &_77$$20, &_75$$20) == SUCCESS
+ ; zend_hash_move_forward_ex(_76$$20, &_75$$20)
) {
ZEPHIR_GET_HVALUE(value, _77$$20);
ZEPHIR_INIT_NVAR(_78$$21);
@@ -842,12 +841,11 @@ PHP_METHOD(Phalcon_Debug_Dump, variables) {
ZEPHIR_INIT_VAR(output);
ZVAL_STRING(output, "", 1);
ZEPHIR_INIT_VAR(_0);
- array_init(_0);
- zend_copy_parameters_array(ZEND_NUM_ARGS(), _0 TSRMLS_CC);
+ zephir_get_args(_0 TSRMLS_CC);
zephir_is_iterable(_0, &_2, &_1, 0, 0, "phalcon/debug/dump.zep", 315);
for (
- ; zephir_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
- ; zephir_hash_move_forward_ex(_2, &_1)
+ ; zend_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
+ ; zend_hash_move_forward_ex(_2, &_1)
) {
ZEPHIR_GET_HMKEY(key, _2, _1);
ZEPHIR_GET_HVALUE(value, _3);
diff --git a/ext/phalcon/di.zep.c b/ext/phalcon/di.zep.c
index da2c7a1ed7b..99d3b931711 100644
--- a/ext/phalcon/di.zep.c
+++ b/ext/phalcon/di.zep.c
@@ -153,11 +153,11 @@ PHP_METHOD(Phalcon_Di, set) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 1, &name_param, &definition, &shared_param);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -197,11 +197,11 @@ PHP_METHOD(Phalcon_Di, setShared) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &name_param, &definition);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -229,11 +229,11 @@ PHP_METHOD(Phalcon_Di, remove) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &name_param);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -264,11 +264,11 @@ PHP_METHOD(Phalcon_Di, attempt) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 1, &name_param, &definition, &shared_param);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -311,11 +311,11 @@ PHP_METHOD(Phalcon_Di, setRaw) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &name_param, &rawDefinition);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -341,11 +341,11 @@ PHP_METHOD(Phalcon_Di, getRaw) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &name_param);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -384,11 +384,11 @@ PHP_METHOD(Phalcon_Di, getService) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &name_param);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -427,11 +427,11 @@ PHP_METHOD(Phalcon_Di, get) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &name_param, ¶meters);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -529,11 +529,11 @@ PHP_METHOD(Phalcon_Di, getShared) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &name_param, ¶meters);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -577,11 +577,11 @@ PHP_METHOD(Phalcon_Di, has) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &name_param);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -628,11 +628,11 @@ PHP_METHOD(Phalcon_Di, offsetExists) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &name_param);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -662,11 +662,11 @@ PHP_METHOD(Phalcon_Di, offsetSet) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &name_param, &definition);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -696,11 +696,11 @@ PHP_METHOD(Phalcon_Di, offsetGet) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &name_param);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -725,11 +725,11 @@ PHP_METHOD(Phalcon_Di, offsetUnset) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &name_param);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -754,11 +754,11 @@ PHP_METHOD(Phalcon_Di, __call) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &method_param, &arguments);
- if (unlikely(Z_TYPE_P(method_param) != IS_STRING && Z_TYPE_P(method_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(method_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(method_param) == IS_STRING)) {
zephir_get_strval(method, method_param);
} else {
ZEPHIR_INIT_VAR(method);
diff --git a/ext/phalcon/di/injectable.zep.c b/ext/phalcon/di/injectable.zep.c
index 332d57217dd..12ec61dcad7 100644
--- a/ext/phalcon/di/injectable.zep.c
+++ b/ext/phalcon/di/injectable.zep.c
@@ -153,11 +153,11 @@ PHP_METHOD(Phalcon_Di_Injectable, __get) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &propertyName_param);
- if (unlikely(Z_TYPE_P(propertyName_param) != IS_STRING && Z_TYPE_P(propertyName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(propertyName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(propertyName_param) == IS_STRING)) {
zephir_get_strval(propertyName, propertyName_param);
} else {
ZEPHIR_INIT_VAR(propertyName);
diff --git a/ext/phalcon/di/service.zep.c b/ext/phalcon/di/service.zep.c
index 4630b1442e7..52b81fb5502 100644
--- a/ext/phalcon/di/service.zep.c
+++ b/ext/phalcon/di/service.zep.c
@@ -72,11 +72,11 @@ PHP_METHOD(Phalcon_Di_Service, __construct) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 1, &name_param, &definition, &shared_param);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
diff --git a/ext/phalcon/di/service/builder.zep.c b/ext/phalcon/di/service/builder.zep.c
index f76f922bedc..cbff86bc885 100644
--- a/ext/phalcon/di/service/builder.zep.c
+++ b/ext/phalcon/di/service/builder.zep.c
@@ -19,7 +19,6 @@
#include "kernel/concat.h"
#include "kernel/operators.h"
#include "ext/spl/spl_exceptions.h"
-#include "kernel/hash.h"
#include "kernel/object.h"
@@ -181,8 +180,8 @@ PHP_METHOD(Phalcon_Di_Service_Builder, _buildParameters) {
array_init(buildArguments);
zephir_is_iterable(arguments, &_1, &_0, 0, 0, "phalcon/di/service/builder.zep", 119);
for (
- ; zephir_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
- ; zephir_hash_move_forward_ex(_1, &_0)
+ ; zend_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
+ ; zend_hash_move_forward_ex(_1, &_0)
) {
ZEPHIR_GET_HMKEY(position, _1, _0);
ZEPHIR_GET_HVALUE(argument, _2);
@@ -261,8 +260,8 @@ PHP_METHOD(Phalcon_Di_Service_Builder, build) {
}
zephir_is_iterable(paramCalls, &_3$$10, &_2$$10, 0, 0, "phalcon/di/service/builder.zep", 235);
for (
- ; zephir_hash_get_current_data_ex(_3$$10, (void**) &_4$$10, &_2$$10) == SUCCESS
- ; zephir_hash_move_forward_ex(_3$$10, &_2$$10)
+ ; zend_hash_get_current_data_ex(_3$$10, (void**) &_4$$10, &_2$$10) == SUCCESS
+ ; zend_hash_move_forward_ex(_3$$10, &_2$$10)
) {
ZEPHIR_GET_HMKEY(methodPosition, _3$$10, _2$$10);
ZEPHIR_GET_HVALUE(method, _4$$10);
@@ -332,8 +331,8 @@ PHP_METHOD(Phalcon_Di_Service_Builder, build) {
}
zephir_is_iterable(paramCalls, &_16$$19, &_15$$19, 0, 0, "phalcon/di/service/builder.zep", 283);
for (
- ; zephir_hash_get_current_data_ex(_16$$19, (void**) &_17$$19, &_15$$19) == SUCCESS
- ; zephir_hash_move_forward_ex(_16$$19, &_15$$19)
+ ; zend_hash_get_current_data_ex(_16$$19, (void**) &_17$$19, &_15$$19) == SUCCESS
+ ; zend_hash_move_forward_ex(_16$$19, &_15$$19)
) {
ZEPHIR_GET_HMKEY(propertyPosition, _16$$19, _15$$19);
ZEPHIR_GET_HVALUE(property, _17$$19);
diff --git a/ext/phalcon/dispatcher.zep.c b/ext/phalcon/dispatcher.zep.c
index 52356ed6126..f945522f09f 100644
--- a/ext/phalcon/dispatcher.zep.c
+++ b/ext/phalcon/dispatcher.zep.c
@@ -628,7 +628,7 @@ PHP_METHOD(Phalcon_Dispatcher, getModelBinder) {
*/
PHP_METHOD(Phalcon_Dispatcher, dispatch) {
- zval *handler = NULL, *e = NULL, *_0$$4 = NULL;
+ zval *handler = NULL, *e = NULL, *_0, *_1$$4 = NULL;
int ZEPHIR_LAST_CALL_STATUS;
ZEPHIR_MM_GROW();
@@ -642,12 +642,14 @@ PHP_METHOD(Phalcon_Dispatcher, dispatch) {
try_end_1:
if (EG(exception)) {
- ZEPHIR_CPY_WRT(e, EG(exception));
- if (zephir_instance_of_ev(e, zend_exception_get_default(TSRMLS_C) TSRMLS_CC)) {
+ ZEPHIR_INIT_VAR(_0);
+ ZEPHIR_CPY_WRT(_0, EG(exception));
+ if (zephir_instance_of_ev(_0, zend_exception_get_default(TSRMLS_C) TSRMLS_CC)) {
zend_clear_exception(TSRMLS_C);
- ZEPHIR_CALL_METHOD(&_0$$4, this_ptr, "_handleexception", NULL, 0, e);
+ ZEPHIR_CPY_WRT(e, _0);
+ ZEPHIR_CALL_METHOD(&_1$$4, this_ptr, "_handleexception", NULL, 0, e);
zephir_check_call_status();
- if (ZEPHIR_IS_FALSE_IDENTICAL(_0$$4)) {
+ if (ZEPHIR_IS_FALSE_IDENTICAL(_1$$4)) {
RETURN_MM_BOOL(0);
}
zephir_throw_exception_debug(e, "phalcon/dispatcher.zep", 413 TSRMLS_CC);
@@ -667,9 +669,9 @@ PHP_METHOD(Phalcon_Dispatcher, dispatch) {
PHP_METHOD(Phalcon_Dispatcher, _dispatch) {
zval *_30$$6 = NULL;
- zval *value = NULL, *handler = NULL, *dependencyInjector = NULL, *namespaceName = NULL, *handlerName = NULL, *actionName = NULL, *params = NULL, *eventsManager = NULL, *actionSuffix = NULL, *handlerClass = NULL, *status = NULL, *actionMethod = NULL, *modelBinder = NULL, *e = NULL, *bindCacheKey = NULL, *_0, *_1$$3, *_2$$3, *_3$$4 = NULL, *_4$$4, *_5$$7 = NULL, *_6$$7 = NULL, *_10$$8 = NULL, *_11$$8 = NULL, *_13$$8, *_14$$6 = NULL, *_49$$6, *_16$$12 = NULL, *_17$$12 = NULL, *_19$$13, *_22$$16 = NULL, *_23$$16 = NULL, *_25$$17, *_26$$19 = NULL, *_27$$19 = NULL, *_29$$20, *_31$$23 = NULL, *_32$$23 = NULL, *_34$$23, *_35$$22 = NULL, *_36$$22 = NULL, *_38$$26, *_39$$28 = NULL, *_40$$28 = NULL, *_42$$28, *_43$$31 = NULL, *_44$$31, *_45$$36 = NULL, *_46$$36 = NULL, *_48$$36, *_50$$39 = NULL, *_51$$40 = NULL, *_52$$40 = NULL, *_54$$40, *_55$$43 = NULL, *_56$$43, *_57$$46 = NULL, *_59$$47 = NULL, *_61$$48, *_62$$51 = NULL, *_63$$51 = NULL, *_65$$51, *_67$$54 = NULL, *_68$$54, *_69$$57;
+ zval *value = NULL, *handler = NULL, *dependencyInjector = NULL, *namespaceName = NULL, *handlerName = NULL, *actionName = NULL, *params = NULL, *eventsManager = NULL, *actionSuffix = NULL, *handlerClass = NULL, *status = NULL, *actionMethod = NULL, *modelBinder = NULL, *e = NULL, *bindCacheKey = NULL, *_0, *_1$$3, *_2$$3, *_3$$4 = NULL, *_4$$4, *_5$$7 = NULL, *_6$$7 = NULL, *_10$$8 = NULL, *_11$$8 = NULL, *_13$$8, *_14$$6 = NULL, *_49$$6, *_59$$6 = NULL, *_16$$12 = NULL, *_17$$12 = NULL, *_19$$13, *_22$$16 = NULL, *_23$$16 = NULL, *_25$$17, *_26$$19 = NULL, *_27$$19 = NULL, *_29$$20, *_31$$23 = NULL, *_32$$23 = NULL, *_34$$23, *_35$$22 = NULL, *_36$$22 = NULL, *_38$$26, *_39$$28 = NULL, *_40$$28 = NULL, *_42$$28, *_43$$31 = NULL, *_44$$31, *_45$$36 = NULL, *_46$$36 = NULL, *_48$$36, *_50$$39 = NULL, *_51$$40 = NULL, *_52$$40 = NULL, *_54$$40, *_55$$43 = NULL, *_56$$43, *_57$$46 = NULL, *_60$$47 = NULL, *_62$$48, *_63$$51 = NULL, *_64$$51 = NULL, *_66$$51, *_68$$54 = NULL, *_69$$54, *_70$$57;
zend_bool hasService = 0, wasFresh;
- zephir_fcall_cache_entry *_7 = NULL, *_8 = NULL, *_9 = NULL, *_12 = NULL, *_15 = NULL, *_18 = NULL, *_20 = NULL, *_21 = NULL, *_24 = NULL, *_28 = NULL, *_33 = NULL, *_37 = NULL, *_41 = NULL, *_47 = NULL, *_53 = NULL, *_58 = NULL, *_60 = NULL, *_64 = NULL, *_66 = NULL;
+ zephir_fcall_cache_entry *_7 = NULL, *_8 = NULL, *_9 = NULL, *_12 = NULL, *_15 = NULL, *_18 = NULL, *_20 = NULL, *_21 = NULL, *_24 = NULL, *_28 = NULL, *_33 = NULL, *_37 = NULL, *_41 = NULL, *_47 = NULL, *_53 = NULL, *_58 = NULL, *_61 = NULL, *_65 = NULL, *_67 = NULL;
int ZEPHIR_LAST_CALL_STATUS, numberDispatches = 0;
ZEPHIR_MM_GROW();
@@ -945,14 +947,16 @@ PHP_METHOD(Phalcon_Dispatcher, _dispatch) {
try_end_1:
if (EG(exception)) {
- ZEPHIR_CPY_WRT(e, EG(exception));
- if (zephir_instance_of_ev(e, zend_exception_get_default(TSRMLS_C) TSRMLS_CC)) {
+ ZEPHIR_INIT_NVAR(_59$$6);
+ ZEPHIR_CPY_WRT(_59$$6, EG(exception));
+ if (zephir_instance_of_ev(_59$$6, zend_exception_get_default(TSRMLS_C) TSRMLS_CC)) {
zend_clear_exception(TSRMLS_C);
- ZEPHIR_CALL_METHOD(&_59$$47, this_ptr, "_handleexception", &_60, 0, e);
+ ZEPHIR_CPY_WRT(e, _59$$6);
+ ZEPHIR_CALL_METHOD(&_60$$47, this_ptr, "_handleexception", &_61, 0, e);
zephir_check_call_status();
- if (ZEPHIR_IS_FALSE_IDENTICAL(_59$$47)) {
- _61$$48 = zephir_fetch_nproperty_this(this_ptr, SL("_finished"), PH_NOISY_CC);
- if (ZEPHIR_IS_FALSE_IDENTICAL(_61$$48)) {
+ if (ZEPHIR_IS_FALSE_IDENTICAL(_60$$47)) {
+ _62$$48 = zephir_fetch_nproperty_this(this_ptr, SL("_finished"), PH_NOISY_CC);
+ if (ZEPHIR_IS_FALSE_IDENTICAL(_62$$48)) {
continue;
}
} else {
@@ -963,41 +967,41 @@ PHP_METHOD(Phalcon_Dispatcher, _dispatch) {
}
}
if (Z_TYPE_P(eventsManager) == IS_OBJECT) {
- ZEPHIR_INIT_NVAR(_63$$51);
- ZVAL_STRING(_63$$51, "dispatch:afterExecuteRoute", ZEPHIR_TEMP_PARAM_COPY);
- ZEPHIR_CALL_METHOD(&_62$$51, eventsManager, "fire", &_64, 0, _63$$51, this_ptr, value);
- zephir_check_temp_parameter(_63$$51);
+ ZEPHIR_INIT_NVAR(_64$$51);
+ ZVAL_STRING(_64$$51, "dispatch:afterExecuteRoute", ZEPHIR_TEMP_PARAM_COPY);
+ ZEPHIR_CALL_METHOD(&_63$$51, eventsManager, "fire", &_65, 0, _64$$51, this_ptr, value);
+ zephir_check_temp_parameter(_64$$51);
zephir_check_call_status();
- if (ZEPHIR_IS_FALSE_IDENTICAL(_62$$51)) {
+ if (ZEPHIR_IS_FALSE_IDENTICAL(_63$$51)) {
continue;
}
- _65$$51 = zephir_fetch_nproperty_this(this_ptr, SL("_finished"), PH_NOISY_CC);
- if (ZEPHIR_IS_FALSE_IDENTICAL(_65$$51)) {
+ _66$$51 = zephir_fetch_nproperty_this(this_ptr, SL("_finished"), PH_NOISY_CC);
+ if (ZEPHIR_IS_FALSE_IDENTICAL(_66$$51)) {
continue;
}
- ZEPHIR_INIT_NVAR(_63$$51);
- ZVAL_STRING(_63$$51, "dispatch:afterDispatch", ZEPHIR_TEMP_PARAM_COPY);
- ZEPHIR_CALL_METHOD(NULL, eventsManager, "fire", &_66, 0, _63$$51, this_ptr);
- zephir_check_temp_parameter(_63$$51);
+ ZEPHIR_INIT_NVAR(_64$$51);
+ ZVAL_STRING(_64$$51, "dispatch:afterDispatch", ZEPHIR_TEMP_PARAM_COPY);
+ ZEPHIR_CALL_METHOD(NULL, eventsManager, "fire", &_67, 0, _64$$51, this_ptr);
+ zephir_check_temp_parameter(_64$$51);
zephir_check_call_status();
}
if ((zephir_method_exists_ex(handler, SS("afterexecuteroute") TSRMLS_CC) == SUCCESS)) {
- ZEPHIR_CALL_METHOD(&_67$$54, handler, "afterexecuteroute", NULL, 0, this_ptr, value);
+ ZEPHIR_CALL_METHOD(&_68$$54, handler, "afterexecuteroute", NULL, 0, this_ptr, value);
zephir_check_call_status();
- if (ZEPHIR_IS_FALSE_IDENTICAL(_67$$54)) {
+ if (ZEPHIR_IS_FALSE_IDENTICAL(_68$$54)) {
continue;
}
- _68$$54 = zephir_fetch_nproperty_this(this_ptr, SL("_finished"), PH_NOISY_CC);
- if (ZEPHIR_IS_FALSE_IDENTICAL(_68$$54)) {
+ _69$$54 = zephir_fetch_nproperty_this(this_ptr, SL("_finished"), PH_NOISY_CC);
+ if (ZEPHIR_IS_FALSE_IDENTICAL(_69$$54)) {
continue;
}
}
}
if (Z_TYPE_P(eventsManager) == IS_OBJECT) {
- ZEPHIR_INIT_VAR(_69$$57);
- ZVAL_STRING(_69$$57, "dispatch:afterDispatchLoop", ZEPHIR_TEMP_PARAM_COPY);
- ZEPHIR_CALL_METHOD(NULL, eventsManager, "fire", NULL, 0, _69$$57, this_ptr);
- zephir_check_temp_parameter(_69$$57);
+ ZEPHIR_INIT_VAR(_70$$57);
+ ZVAL_STRING(_70$$57, "dispatch:afterDispatchLoop", ZEPHIR_TEMP_PARAM_COPY);
+ ZEPHIR_CALL_METHOD(NULL, eventsManager, "fire", NULL, 0, _70$$57, this_ptr);
+ zephir_check_temp_parameter(_70$$57);
zephir_check_call_status();
}
RETURN_CCTOR(handler);
diff --git a/ext/phalcon/escaper.zep.c b/ext/phalcon/escaper.zep.c
index 25163a384b2..16d06c67ffb 100644
--- a/ext/phalcon/escaper.zep.c
+++ b/ext/phalcon/escaper.zep.c
@@ -17,7 +17,6 @@
#include "kernel/memory.h"
#include "kernel/filter.h"
#include "kernel/array.h"
-#include "kernel/hash.h"
#include "kernel/fcall.h"
#include "kernel/exception.h"
@@ -181,8 +180,8 @@ PHP_METHOD(Phalcon_Escaper, detectEncoding) {
zephir_array_fast_append(_0, _1);
zephir_is_iterable(_0, &_3, &_2, 0, 0, "phalcon/escaper.zep", 132);
for (
- ; zephir_hash_get_current_data_ex(_3, (void**) &_4, &_2) == SUCCESS
- ; zephir_hash_move_forward_ex(_3, &_2)
+ ; zend_hash_get_current_data_ex(_3, (void**) &_4, &_2) == SUCCESS
+ ; zend_hash_move_forward_ex(_3, &_2)
) {
ZEPHIR_GET_HVALUE(charset, _4);
ZEPHIR_CALL_FUNCTION(&_5$$5, "mb_detect_encoding", &_6, 184, str, charset, ZEPHIR_GLOBAL(global_true));
diff --git a/ext/phalcon/events/event.zep.c b/ext/phalcon/events/event.zep.c
index 9172982ccca..264354f77f0 100644
--- a/ext/phalcon/events/event.zep.c
+++ b/ext/phalcon/events/event.zep.c
@@ -118,11 +118,11 @@ PHP_METHOD(Phalcon_Events_Event, __construct) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 2, &type_param, &source, &data, &cancelable_param);
- if (unlikely(Z_TYPE_P(type_param) != IS_STRING && Z_TYPE_P(type_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(type_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(type_param) == IS_STRING)) {
zephir_get_strval(type, type_param);
} else {
ZEPHIR_INIT_VAR(type);
@@ -185,11 +185,11 @@ PHP_METHOD(Phalcon_Events_Event, setType) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &type_param);
- if (unlikely(Z_TYPE_P(type_param) != IS_STRING && Z_TYPE_P(type_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(type_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(type_param) == IS_STRING)) {
zephir_get_strval(type, type_param);
} else {
ZEPHIR_INIT_VAR(type);
diff --git a/ext/phalcon/events/manager.zep.c b/ext/phalcon/events/manager.zep.c
index 6b3092de500..d8d5fe0f9a3 100644
--- a/ext/phalcon/events/manager.zep.c
+++ b/ext/phalcon/events/manager.zep.c
@@ -21,7 +21,6 @@
#include "kernel/fcall.h"
#include "ext/spl/spl_exceptions.h"
#include "Zend/zend_closures.h"
-#include "kernel/hash.h"
#include "kernel/string.h"
#include "kernel/concat.h"
@@ -67,11 +66,11 @@ PHP_METHOD(Phalcon_Events_Manager, attach) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 1, &eventType_param, &handler, &priority_param);
- if (unlikely(Z_TYPE_P(eventType_param) != IS_STRING && Z_TYPE_P(eventType_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(eventType_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(eventType_param) == IS_STRING)) {
zephir_get_strval(eventType, eventType_param);
} else {
ZEPHIR_INIT_VAR(eventType);
@@ -80,7 +79,7 @@ PHP_METHOD(Phalcon_Events_Manager, attach) {
if (!priority_param) {
priority = 100;
} else {
- if (unlikely(Z_TYPE_P(priority_param) != IS_LONG)) {
+ if (UNEXPECTED(Z_TYPE_P(priority_param) != IS_LONG)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'priority' must be a int") TSRMLS_CC);
RETURN_MM_NULL();
}
@@ -141,11 +140,11 @@ PHP_METHOD(Phalcon_Events_Manager, detach) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &eventType_param, &handler);
- if (unlikely(Z_TYPE_P(eventType_param) != IS_STRING && Z_TYPE_P(eventType_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(eventType_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(eventType_param) == IS_STRING)) {
zephir_get_strval(eventType, eventType_param);
} else {
ZEPHIR_INIT_VAR(eventType);
@@ -303,11 +302,11 @@ PHP_METHOD(Phalcon_Events_Manager, detachAll) {
ZEPHIR_INIT_VAR(type);
ZVAL_EMPTY_STRING(type);
} else {
- if (unlikely(Z_TYPE_P(type_param) != IS_STRING && Z_TYPE_P(type_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(type_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(type_param) == IS_STRING)) {
zephir_get_strval(type, type_param);
} else {
ZEPHIR_INIT_VAR(type);
@@ -452,8 +451,8 @@ PHP_METHOD(Phalcon_Events_Manager, fireQueue) {
} else {
zephir_is_iterable(queue, &_12$$21, &_11$$21, 0, 0, "phalcon/events/manager.zep", 358);
for (
- ; zephir_hash_get_current_data_ex(_12$$21, (void**) &_13$$21, &_11$$21) == SUCCESS
- ; zephir_hash_move_forward_ex(_12$$21, &_11$$21)
+ ; zend_hash_get_current_data_ex(_12$$21, (void**) &_13$$21, &_11$$21) == SUCCESS
+ ; zend_hash_move_forward_ex(_12$$21, &_11$$21)
) {
ZEPHIR_GET_HVALUE(handler, _13$$21);
if (Z_TYPE_P(handler) == IS_OBJECT) {
@@ -525,11 +524,11 @@ PHP_METHOD(Phalcon_Events_Manager, fire) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 2, &eventType_param, &source, &data, &cancelable_param);
- if (unlikely(Z_TYPE_P(eventType_param) != IS_STRING && Z_TYPE_P(eventType_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(eventType_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(eventType_param) == IS_STRING)) {
zephir_get_strval(eventType, eventType_param);
} else {
ZEPHIR_INIT_VAR(eventType);
@@ -634,11 +633,11 @@ PHP_METHOD(Phalcon_Events_Manager, hasListeners) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &type_param);
- if (unlikely(Z_TYPE_P(type_param) != IS_STRING && Z_TYPE_P(type_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(type_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(type_param) == IS_STRING)) {
zephir_get_strval(type, type_param);
} else {
ZEPHIR_INIT_VAR(type);
@@ -665,11 +664,11 @@ PHP_METHOD(Phalcon_Events_Manager, getListeners) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &type_param);
- if (unlikely(Z_TYPE_P(type_param) != IS_STRING && Z_TYPE_P(type_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(type_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(type_param) == IS_STRING)) {
zephir_get_strval(type, type_param);
} else {
ZEPHIR_INIT_VAR(type);
diff --git a/ext/phalcon/filter.zep.c b/ext/phalcon/filter.zep.c
index 7caad0eca85..097b783d5da 100644
--- a/ext/phalcon/filter.zep.c
+++ b/ext/phalcon/filter.zep.c
@@ -17,7 +17,6 @@
#include "ext/spl/spl_exceptions.h"
#include "kernel/operators.h"
#include "kernel/memory.h"
-#include "kernel/hash.h"
#include "kernel/fcall.h"
#include "kernel/array.h"
#include "Zend/zend_closures.h"
@@ -88,11 +87,11 @@ PHP_METHOD(Phalcon_Filter, add) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &name_param, &handler);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -140,8 +139,8 @@ PHP_METHOD(Phalcon_Filter, sanitize) {
if (Z_TYPE_P(value) != IS_NULL) {
zephir_is_iterable(filters, &_1$$4, &_0$$4, 0, 0, "phalcon/filter.zep", 108);
for (
- ; zephir_hash_get_current_data_ex(_1$$4, (void**) &_2$$4, &_0$$4) == SUCCESS
- ; zephir_hash_move_forward_ex(_1$$4, &_0$$4)
+ ; zend_hash_get_current_data_ex(_1$$4, (void**) &_2$$4, &_0$$4) == SUCCESS
+ ; zend_hash_move_forward_ex(_1$$4, &_0$$4)
) {
ZEPHIR_GET_HVALUE(filter, _2$$4);
_3$$5 = Z_TYPE_P(value) == IS_ARRAY;
@@ -153,8 +152,8 @@ PHP_METHOD(Phalcon_Filter, sanitize) {
array_init(arrayValue);
zephir_is_iterable(value, &_5$$6, &_4$$6, 0, 0, "phalcon/filter.zep", 103);
for (
- ; zephir_hash_get_current_data_ex(_5$$6, (void**) &_6$$6, &_4$$6) == SUCCESS
- ; zephir_hash_move_forward_ex(_5$$6, &_4$$6)
+ ; zend_hash_get_current_data_ex(_5$$6, (void**) &_6$$6, &_4$$6) == SUCCESS
+ ; zend_hash_move_forward_ex(_5$$6, &_4$$6)
) {
ZEPHIR_GET_HMKEY(itemKey, _5$$6, _4$$6);
ZEPHIR_GET_HVALUE(itemValue, _6$$6);
@@ -182,8 +181,8 @@ PHP_METHOD(Phalcon_Filter, sanitize) {
array_init(sanitizedValue);
zephir_is_iterable(value, &_12$$9, &_11$$9, 0, 0, "phalcon/filter.zep", 120);
for (
- ; zephir_hash_get_current_data_ex(_12$$9, (void**) &_13$$9, &_11$$9) == SUCCESS
- ; zephir_hash_move_forward_ex(_12$$9, &_11$$9)
+ ; zend_hash_get_current_data_ex(_12$$9, (void**) &_13$$9, &_11$$9) == SUCCESS
+ ; zend_hash_move_forward_ex(_12$$9, &_11$$9)
) {
ZEPHIR_GET_HMKEY(itemKey, _12$$9, _11$$9);
ZEPHIR_GET_HVALUE(itemValue, _13$$9);
@@ -214,11 +213,11 @@ PHP_METHOD(Phalcon_Filter, _sanitize) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &value, &filter_param);
- if (unlikely(Z_TYPE_P(filter_param) != IS_STRING && Z_TYPE_P(filter_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(filter_param) != IS_STRING && Z_TYPE_P(filter_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'filter' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(filter_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(filter_param) == IS_STRING)) {
zephir_get_strval(filter, filter_param);
} else {
ZEPHIR_INIT_VAR(filter);
diff --git a/ext/phalcon/flash.zep.c b/ext/phalcon/flash.zep.c
index 3844222bf46..2c9a81d77f4 100644
--- a/ext/phalcon/flash.zep.c
+++ b/ext/phalcon/flash.zep.c
@@ -21,7 +21,6 @@
#include "kernel/exception.h"
#include "kernel/concat.h"
#include "kernel/string.h"
-#include "kernel/hash.h"
/**
@@ -434,8 +433,8 @@ PHP_METHOD(Phalcon_Flash, outputMessage) {
}
zephir_is_iterable(message, &_3$$9, &_2$$9, 0, 0, "phalcon/flash.zep", 288);
for (
- ; zephir_hash_get_current_data_ex(_3$$9, (void**) &_4$$9, &_2$$9) == SUCCESS
- ; zephir_hash_move_forward_ex(_3$$9, &_2$$9)
+ ; zend_hash_get_current_data_ex(_3$$9, (void**) &_4$$9, &_2$$9) == SUCCESS
+ ; zend_hash_move_forward_ex(_3$$9, &_2$$9)
) {
ZEPHIR_GET_HVALUE(msg, _4$$9);
if (autoEscape == 1) {
diff --git a/ext/phalcon/flash/direct.zep.c b/ext/phalcon/flash/direct.zep.c
index de9ae166a72..b9e557a32fe 100644
--- a/ext/phalcon/flash/direct.zep.c
+++ b/ext/phalcon/flash/direct.zep.c
@@ -16,7 +16,6 @@
#include "kernel/operators.h"
#include "kernel/memory.h"
#include "kernel/object.h"
-#include "kernel/hash.h"
/**
@@ -80,8 +79,8 @@ PHP_METHOD(Phalcon_Flash_Direct, output) {
if (Z_TYPE_P(messages) == IS_ARRAY) {
zephir_is_iterable(messages, &_1$$3, &_0$$3, 0, 0, "phalcon/flash/direct.zep", 52);
for (
- ; zephir_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_1$$3, &_0$$3)
+ ; zend_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_1$$3, &_0$$3)
) {
ZEPHIR_GET_HVALUE(message, _2$$3);
zend_print_zval(message, 0);
diff --git a/ext/phalcon/flash/session.zep.c b/ext/phalcon/flash/session.zep.c
index 746a28fbca4..aa6fa7e6075 100644
--- a/ext/phalcon/flash/session.zep.c
+++ b/ext/phalcon/flash/session.zep.c
@@ -18,7 +18,6 @@
#include "kernel/operators.h"
#include "ext/spl/spl_exceptions.h"
#include "kernel/exception.h"
-#include "kernel/hash.h"
/**
@@ -259,8 +258,8 @@ PHP_METHOD(Phalcon_Flash_Session, output) {
if (Z_TYPE_P(messages) == IS_ARRAY) {
zephir_is_iterable(messages, &_2$$3, &_1$$3, 0, 0, "phalcon/flash/session.zep", 136);
for (
- ; zephir_hash_get_current_data_ex(_2$$3, (void**) &_3$$3, &_1$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_2$$3, &_1$$3)
+ ; zend_hash_get_current_data_ex(_2$$3, (void**) &_3$$3, &_1$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_2$$3, &_1$$3)
) {
ZEPHIR_GET_HMKEY(type, _2$$3, _1$$3);
ZEPHIR_GET_HVALUE(message, _3$$3);
diff --git a/ext/phalcon/forms/element.zep.c b/ext/phalcon/forms/element.zep.c
index 31cde5cac38..e6e7903235b 100644
--- a/ext/phalcon/forms/element.zep.c
+++ b/ext/phalcon/forms/element.zep.c
@@ -128,11 +128,11 @@ PHP_METHOD(Phalcon_Forms_Element, setName) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &name_param);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
diff --git a/ext/phalcon/forms/element/select.zep.c b/ext/phalcon/forms/element/select.zep.c
index 23a63cfc88f..c8796206115 100644
--- a/ext/phalcon/forms/element/select.zep.c
+++ b/ext/phalcon/forms/element/select.zep.c
@@ -16,7 +16,6 @@
#include "kernel/fcall.h"
#include "kernel/operators.h"
#include "kernel/memory.h"
-#include "kernel/hash.h"
/**
@@ -119,8 +118,8 @@ PHP_METHOD(Phalcon_Forms_Element_Select, addOption) {
if (Z_TYPE_P(option) == IS_ARRAY) {
zephir_is_iterable(option, &_1$$3, &_0$$3, 0, 0, "phalcon/forms/element/select.zep", 84);
for (
- ; zephir_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_1$$3, &_0$$3)
+ ; zend_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_1$$3, &_0$$3)
) {
ZEPHIR_GET_HMKEY(key, _1$$3, _0$$3);
ZEPHIR_GET_HVALUE(value, _2$$3);
diff --git a/ext/phalcon/forms/form.zep.c b/ext/phalcon/forms/form.zep.c
index 7b457971b98..a6211804e23 100644
--- a/ext/phalcon/forms/form.zep.c
+++ b/ext/phalcon/forms/form.zep.c
@@ -20,7 +20,6 @@
#include "ext/spl/spl_exceptions.h"
#include "kernel/operators.h"
#include "kernel/array.h"
-#include "kernel/hash.h"
#include "kernel/concat.h"
#include "kernel/string.h"
#include "kernel/iterator.h"
@@ -132,11 +131,11 @@ PHP_METHOD(Phalcon_Forms_Form, setAction) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &action_param);
- if (unlikely(Z_TYPE_P(action_param) != IS_STRING && Z_TYPE_P(action_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(action_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(action_param) == IS_STRING)) {
zephir_get_strval(action, action_param);
} else {
ZEPHIR_INIT_VAR(action);
@@ -311,8 +310,8 @@ PHP_METHOD(Phalcon_Forms_Form, bind) {
ZVAL_NULL(filter);
zephir_is_iterable(data, &_2, &_1, 0, 0, "phalcon/forms/form.zep", 246);
for (
- ; zephir_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
- ; zephir_hash_move_forward_ex(_2, &_1)
+ ; zend_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
+ ; zend_hash_move_forward_ex(_2, &_1)
) {
ZEPHIR_GET_HMKEY(key, _2, _1);
ZEPHIR_GET_HVALUE(value, _3);
@@ -432,8 +431,8 @@ PHP_METHOD(Phalcon_Forms_Form, isValid) {
_6 = zephir_fetch_nproperty_this(this_ptr, SL("_elements"), PH_NOISY_CC);
zephir_is_iterable(_6, &_8, &_7, 0, 0, "phalcon/forms/form.zep", 338);
for (
- ; zephir_hash_get_current_data_ex(_8, (void**) &_9, &_7) == SUCCESS
- ; zephir_hash_move_forward_ex(_8, &_7)
+ ; zend_hash_get_current_data_ex(_8, (void**) &_9, &_7) == SUCCESS
+ ; zend_hash_move_forward_ex(_8, &_7)
) {
ZEPHIR_GET_HVALUE(element, _9);
ZEPHIR_CALL_METHOD(&validators, element, "getvalidators", NULL, 0);
@@ -449,8 +448,8 @@ PHP_METHOD(Phalcon_Forms_Form, isValid) {
zephir_check_call_status();
zephir_is_iterable(validators, &_12$$11, &_11$$11, 0, 0, "phalcon/forms/form.zep", 325);
for (
- ; zephir_hash_get_current_data_ex(_12$$11, (void**) &_13$$11, &_11$$11) == SUCCESS
- ; zephir_hash_move_forward_ex(_12$$11, &_11$$11)
+ ; zend_hash_get_current_data_ex(_12$$11, (void**) &_13$$11, &_11$$11) == SUCCESS
+ ; zend_hash_move_forward_ex(_12$$11, &_11$$11)
) {
ZEPHIR_GET_HVALUE(validator, _13$$11);
ZEPHIR_CALL_METHOD(NULL, validation, "add", &_14, 217, name, validator);
@@ -545,11 +544,11 @@ PHP_METHOD(Phalcon_Forms_Form, getMessagesFor) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &name_param);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -585,11 +584,11 @@ PHP_METHOD(Phalcon_Forms_Form, hasMessagesFor) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &name_param);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -650,8 +649,8 @@ PHP_METHOD(Phalcon_Forms_Form, add) {
_2$$4 = zephir_fetch_nproperty_this(this_ptr, SL("_elements"), PH_NOISY_CC);
zephir_is_iterable(_2$$4, &_4$$4, &_3$$4, 0, 0, "phalcon/forms/form.zep", 449);
for (
- ; zephir_hash_get_current_data_ex(_4$$4, (void**) &_5$$4, &_3$$4) == SUCCESS
- ; zephir_hash_move_forward_ex(_4$$4, &_3$$4)
+ ; zend_hash_get_current_data_ex(_4$$4, (void**) &_5$$4, &_3$$4) == SUCCESS
+ ; zend_hash_move_forward_ex(_4$$4, &_3$$4)
) {
ZEPHIR_GET_HMKEY(key, _4$$4, _3$$4);
ZEPHIR_GET_HVALUE(value, _5$$4);
@@ -688,11 +687,11 @@ PHP_METHOD(Phalcon_Forms_Form, render) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &name_param, &attributes);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -734,11 +733,11 @@ PHP_METHOD(Phalcon_Forms_Form, get) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &name_param);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -776,11 +775,11 @@ PHP_METHOD(Phalcon_Forms_Form, label) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &name_param, &attributes_param);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -825,11 +824,11 @@ PHP_METHOD(Phalcon_Forms_Form, getLabel) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &name_param);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -871,11 +870,11 @@ PHP_METHOD(Phalcon_Forms_Form, getValue) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &name_param);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -956,11 +955,11 @@ PHP_METHOD(Phalcon_Forms_Form, has) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &name_param);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -984,11 +983,11 @@ PHP_METHOD(Phalcon_Forms_Form, remove) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &name_param);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -1036,8 +1035,8 @@ PHP_METHOD(Phalcon_Forms_Form, clear) {
if (Z_TYPE_P(fields) == IS_ARRAY) {
zephir_is_iterable(fields, &_1$$5, &_0$$5, 0, 0, "phalcon/forms/form.zep", 652);
for (
- ; zephir_hash_get_current_data_ex(_1$$5, (void**) &_2$$5, &_0$$5) == SUCCESS
- ; zephir_hash_move_forward_ex(_1$$5, &_0$$5)
+ ; zend_hash_get_current_data_ex(_1$$5, (void**) &_2$$5, &_0$$5) == SUCCESS
+ ; zend_hash_move_forward_ex(_1$$5, &_0$$5)
) {
ZEPHIR_GET_HVALUE(field, _2$$5);
if (zephir_array_isset(data, field)) {
@@ -1056,8 +1055,8 @@ PHP_METHOD(Phalcon_Forms_Form, clear) {
if (Z_TYPE_P(elements) == IS_ARRAY) {
zephir_is_iterable(elements, &_4$$10, &_3$$10, 0, 0, "phalcon/forms/form.zep", 672);
for (
- ; zephir_hash_get_current_data_ex(_4$$10, (void**) &_5$$10, &_3$$10) == SUCCESS
- ; zephir_hash_move_forward_ex(_4$$10, &_3$$10)
+ ; zend_hash_get_current_data_ex(_4$$10, (void**) &_5$$10, &_3$$10) == SUCCESS
+ ; zend_hash_move_forward_ex(_4$$10, &_3$$10)
) {
ZEPHIR_GET_HVALUE(element, _5$$10);
if (Z_TYPE_P(fields) != IS_ARRAY) {
diff --git a/ext/phalcon/http/cookie.zep.c b/ext/phalcon/http/cookie.zep.c
index b3097a8dc33..676bf8bee95 100644
--- a/ext/phalcon/http/cookie.zep.c
+++ b/ext/phalcon/http/cookie.zep.c
@@ -82,11 +82,11 @@ PHP_METHOD(Phalcon_Http_Cookie, __construct) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 6, &name_param, &value, &expire, &path, &secure, &domain, &httpOnly);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -563,11 +563,11 @@ PHP_METHOD(Phalcon_Http_Cookie, setPath) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &path_param);
- if (unlikely(Z_TYPE_P(path_param) != IS_STRING && Z_TYPE_P(path_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(path_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(path_param) == IS_STRING)) {
zephir_get_strval(path, path_param);
} else {
ZEPHIR_INIT_VAR(path);
@@ -627,11 +627,11 @@ PHP_METHOD(Phalcon_Http_Cookie, setDomain) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &domain_param);
- if (unlikely(Z_TYPE_P(domain_param) != IS_STRING && Z_TYPE_P(domain_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(domain_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(domain_param) == IS_STRING)) {
zephir_get_strval(domain, domain_param);
} else {
ZEPHIR_INIT_VAR(domain);
diff --git a/ext/phalcon/http/request.zep.c b/ext/phalcon/http/request.zep.c
index 717662ad3da..72fe5a64365 100644
--- a/ext/phalcon/http/request.zep.c
+++ b/ext/phalcon/http/request.zep.c
@@ -22,7 +22,6 @@
#include "kernel/string.h"
#include "kernel/concat.h"
#include "kernel/file.h"
-#include "kernel/hash.h"
/**
@@ -142,11 +141,11 @@ PHP_METHOD(Phalcon_Http_Request, get) {
ZEPHIR_INIT_VAR(name);
ZVAL_EMPTY_STRING(name);
} else {
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -216,11 +215,11 @@ PHP_METHOD(Phalcon_Http_Request, getPost) {
ZEPHIR_INIT_VAR(name);
ZVAL_EMPTY_STRING(name);
} else {
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -288,11 +287,11 @@ PHP_METHOD(Phalcon_Http_Request, getPut) {
ZEPHIR_INIT_VAR(name);
ZVAL_EMPTY_STRING(name);
} else {
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -378,11 +377,11 @@ PHP_METHOD(Phalcon_Http_Request, getQuery) {
ZEPHIR_INIT_VAR(name);
ZVAL_EMPTY_STRING(name);
} else {
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -445,11 +444,11 @@ PHP_METHOD(Phalcon_Http_Request, getHelper) {
ZEPHIR_INIT_VAR(name);
ZVAL_EMPTY_STRING(name);
} else {
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -534,11 +533,11 @@ PHP_METHOD(Phalcon_Http_Request, getServer) {
zephir_get_global(&_SERVER, SS("_SERVER") TSRMLS_CC);
zephir_fetch_params(1, 1, 0, &name_param);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -565,11 +564,11 @@ PHP_METHOD(Phalcon_Http_Request, has) {
zephir_get_global(&_REQUEST, SS("_REQUEST") TSRMLS_CC);
zephir_fetch_params(1, 1, 0, &name_param);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -593,11 +592,11 @@ PHP_METHOD(Phalcon_Http_Request, hasPost) {
zephir_get_global(&_POST, SS("_POST") TSRMLS_CC);
zephir_fetch_params(1, 1, 0, &name_param);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -621,11 +620,11 @@ PHP_METHOD(Phalcon_Http_Request, hasPut) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &name_param);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -651,11 +650,11 @@ PHP_METHOD(Phalcon_Http_Request, hasQuery) {
zephir_get_global(&_GET, SS("_GET") TSRMLS_CC);
zephir_fetch_params(1, 1, 0, &name_param);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -679,11 +678,11 @@ PHP_METHOD(Phalcon_Http_Request, hasServer) {
zephir_get_global(&_SERVER, SS("_SERVER") TSRMLS_CC);
zephir_fetch_params(1, 1, 0, &name_param);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -708,11 +707,11 @@ PHP_METHOD(Phalcon_Http_Request, getHeader) {
zephir_get_global(&_SERVER, SS("_SERVER") TSRMLS_CC);
zephir_fetch_params(1, 1, 0, &header_param);
- if (unlikely(Z_TYPE_P(header_param) != IS_STRING && Z_TYPE_P(header_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(header_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(header_param) == IS_STRING)) {
zephir_get_strval(header, header_param);
} else {
ZEPHIR_INIT_VAR(header);
@@ -1244,7 +1243,7 @@ PHP_METHOD(Phalcon_Http_Request, getMethod) {
ZEPHIR_INIT_VAR(returnMethod);
ZVAL_EMPTY_STRING(returnMethod);
ZEPHIR_OBS_VAR(requestMethod);
- if (likely(zephir_array_isset_string_fetch(&requestMethod, _SERVER, SS("REQUEST_METHOD"), 0 TSRMLS_CC))) {
+ if (EXPECTED(zephir_array_isset_string_fetch(&requestMethod, _SERVER, SS("REQUEST_METHOD"), 0 TSRMLS_CC))) {
ZEPHIR_INIT_NVAR(returnMethod);
zephir_fast_strtoupper(returnMethod, requestMethod);
} else {
@@ -1370,8 +1369,8 @@ PHP_METHOD(Phalcon_Http_Request, isMethod) {
if (Z_TYPE_P(methods) == IS_ARRAY) {
zephir_is_iterable(methods, &_5$$5, &_4$$5, 0, 0, "phalcon/http/request.zep", 680);
for (
- ; zephir_hash_get_current_data_ex(_5$$5, (void**) &_6$$5, &_4$$5) == SUCCESS
- ; zephir_hash_move_forward_ex(_5$$5, &_4$$5)
+ ; zend_hash_get_current_data_ex(_5$$5, (void**) &_6$$5, &_4$$5) == SUCCESS
+ ; zend_hash_move_forward_ex(_5$$5, &_4$$5)
) {
ZEPHIR_GET_HVALUE(method, _6$$5);
ZEPHIR_INIT_NVAR(_8$$6);
@@ -1586,8 +1585,8 @@ PHP_METHOD(Phalcon_Http_Request, hasFiles) {
}
zephir_is_iterable(files, &_1, &_0, 0, 0, "phalcon/http/request.zep", 799);
for (
- ; zephir_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
- ; zephir_hash_move_forward_ex(_1, &_0)
+ ; zend_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
+ ; zend_hash_move_forward_ex(_1, &_0)
) {
ZEPHIR_GET_HVALUE(file, _2);
ZEPHIR_OBS_NVAR(error);
@@ -1642,8 +1641,8 @@ PHP_METHOD(Phalcon_Http_Request, hasFileHelper) {
}
zephir_is_iterable(data, &_1, &_0, 0, 0, "phalcon/http/request.zep", 826);
for (
- ; zephir_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
- ; zephir_hash_move_forward_ex(_1, &_0)
+ ; zend_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
+ ; zend_hash_move_forward_ex(_1, &_0)
) {
ZEPHIR_GET_HVALUE(value, _2);
if (Z_TYPE_P(value) != IS_ARRAY) {
@@ -1701,8 +1700,8 @@ PHP_METHOD(Phalcon_Http_Request, getUploadedFiles) {
if (zephir_fast_count_int(superFiles TSRMLS_CC) > 0) {
zephir_is_iterable(superFiles, &_1$$3, &_0$$3, 0, 0, "phalcon/http/request.zep", 871);
for (
- ; zephir_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_1$$3, &_0$$3)
+ ; zend_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_1$$3, &_0$$3)
) {
ZEPHIR_GET_HMKEY(prefix, _1$$3, _0$$3);
ZEPHIR_GET_HVALUE(input, _2$$3);
@@ -1718,8 +1717,8 @@ PHP_METHOD(Phalcon_Http_Request, getUploadedFiles) {
zephir_check_call_status();
zephir_is_iterable(smoothInput, &_11$$5, &_10$$5, 0, 0, "phalcon/http/request.zep", 865);
for (
- ; zephir_hash_get_current_data_ex(_11$$5, (void**) &_12$$5, &_10$$5) == SUCCESS
- ; zephir_hash_move_forward_ex(_11$$5, &_10$$5)
+ ; zend_hash_get_current_data_ex(_11$$5, (void**) &_12$$5, &_10$$5) == SUCCESS
+ ; zend_hash_move_forward_ex(_11$$5, &_10$$5)
) {
ZEPHIR_GET_HVALUE(file, _12$$5);
_13$$6 = onlySuccessful == 0;
@@ -1801,8 +1800,8 @@ PHP_METHOD(Phalcon_Http_Request, smoothFiles) {
array_init(files);
zephir_is_iterable(names, &_1, &_0, 0, 0, "phalcon/http/request.zep", 916);
for (
- ; zephir_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
- ; zephir_hash_move_forward_ex(_1, &_0)
+ ; zend_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
+ ; zend_hash_move_forward_ex(_1, &_0)
) {
ZEPHIR_GET_HMKEY(idx, _1, _0);
ZEPHIR_GET_HVALUE(name, _2);
@@ -1837,8 +1836,8 @@ PHP_METHOD(Phalcon_Http_Request, smoothFiles) {
zephir_check_call_status();
zephir_is_iterable(parentFiles, &_12$$5, &_11$$5, 0, 0, "phalcon/http/request.zep", 913);
for (
- ; zephir_hash_get_current_data_ex(_12$$5, (void**) &_13$$5, &_11$$5) == SUCCESS
- ; zephir_hash_move_forward_ex(_12$$5, &_11$$5)
+ ; zend_hash_get_current_data_ex(_12$$5, (void**) &_13$$5, &_11$$5) == SUCCESS
+ ; zend_hash_move_forward_ex(_12$$5, &_11$$5)
) {
ZEPHIR_GET_HVALUE(file, _13$$5);
zephir_array_append(&files, file, PH_SEPARATE, "phalcon/http/request.zep", 911);
@@ -1887,8 +1886,8 @@ PHP_METHOD(Phalcon_Http_Request, getHeaders) {
zephir_array_update_string(&contentHeaders, SL("CONTENT_MD5"), &ZEPHIR_GLOBAL(global_true), PH_COPY | PH_SEPARATE);
zephir_is_iterable(_SERVER, &_1, &_0, 0, 0, "phalcon/http/request.zep", 953);
for (
- ; zephir_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
- ; zephir_hash_move_forward_ex(_1, &_0)
+ ; zend_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
+ ; zend_hash_move_forward_ex(_1, &_0)
) {
ZEPHIR_GET_HMKEY(name, _1, _0);
ZEPHIR_GET_HVALUE(value, _2);
@@ -2048,11 +2047,11 @@ PHP_METHOD(Phalcon_Http_Request, _getBestQuality) {
zephir_fetch_params(1, 2, 0, &qualityParts_param, &name_param);
zephir_get_arrval(qualityParts, qualityParts_param);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -2066,8 +2065,8 @@ PHP_METHOD(Phalcon_Http_Request, _getBestQuality) {
ZVAL_STRING(selectedName, "", 1);
zephir_is_iterable(qualityParts, &_1, &_0, 0, 0, "phalcon/http/request.zep", 1029);
for (
- ; zephir_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
- ; zephir_hash_move_forward_ex(_1, &_0)
+ ; zend_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
+ ; zend_hash_move_forward_ex(_1, &_0)
) {
ZEPHIR_GET_HVALUE(accept, _2);
if (i == 0) {
@@ -2307,8 +2306,8 @@ PHP_METHOD(Phalcon_Http_Request, getDigestAuth) {
if (Z_TYPE_P(matches) == IS_ARRAY) {
zephir_is_iterable(matches, &_4$$5, &_3$$5, 0, 0, "phalcon/http/request.zep", 1136);
for (
- ; zephir_hash_get_current_data_ex(_4$$5, (void**) &_5$$5, &_3$$5) == SUCCESS
- ; zephir_hash_move_forward_ex(_4$$5, &_3$$5)
+ ; zend_hash_get_current_data_ex(_4$$5, (void**) &_5$$5, &_3$$5) == SUCCESS
+ ; zend_hash_move_forward_ex(_4$$5, &_3$$5)
) {
ZEPHIR_GET_HVALUE(match, _5$$5);
zephir_array_fetch_long(&_6$$6, match, 3, PH_NOISY | PH_READONLY, "phalcon/http/request.zep", 1134 TSRMLS_CC);
@@ -2337,21 +2336,21 @@ PHP_METHOD(Phalcon_Http_Request, _getQualityHeader) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &serverIndex_param, &name_param);
- if (unlikely(Z_TYPE_P(serverIndex_param) != IS_STRING && Z_TYPE_P(serverIndex_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(serverIndex_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(serverIndex_param) == IS_STRING)) {
zephir_get_strval(serverIndex, serverIndex_param);
} else {
ZEPHIR_INIT_VAR(serverIndex);
ZVAL_EMPTY_STRING(serverIndex);
}
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -2373,8 +2372,8 @@ PHP_METHOD(Phalcon_Http_Request, _getQualityHeader) {
zephir_check_call_status();
zephir_is_iterable(_4, &_7, &_6, 0, 0, "phalcon/http/request.zep", 1170);
for (
- ; zephir_hash_get_current_data_ex(_7, (void**) &_8, &_6) == SUCCESS
- ; zephir_hash_move_forward_ex(_7, &_6)
+ ; zend_hash_get_current_data_ex(_7, (void**) &_8, &_6) == SUCCESS
+ ; zend_hash_move_forward_ex(_7, &_6)
) {
ZEPHIR_GET_HVALUE(part, _8);
ZEPHIR_INIT_NVAR(headerParts);
@@ -2391,8 +2390,8 @@ PHP_METHOD(Phalcon_Http_Request, _getQualityHeader) {
zephir_check_call_status();
zephir_is_iterable(_13$$3, &_15$$3, &_14$$3, 0, 0, "phalcon/http/request.zep", 1167);
for (
- ; zephir_hash_get_current_data_ex(_15$$3, (void**) &_16$$3, &_14$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_15$$3, &_14$$3)
+ ; zend_hash_get_current_data_ex(_15$$3, (void**) &_16$$3, &_14$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_15$$3, &_14$$3)
) {
ZEPHIR_GET_HVALUE(headerPart, _16$$3);
ZEPHIR_SINIT_NVAR(_17$$4);
diff --git a/ext/phalcon/http/request/file.zep.c b/ext/phalcon/http/request/file.zep.c
index 482e570ccd4..2a8c3704eb0 100644
--- a/ext/phalcon/http/request/file.zep.c
+++ b/ext/phalcon/http/request/file.zep.c
@@ -266,11 +266,11 @@ PHP_METHOD(Phalcon_Http_Request_File, moveTo) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &destination_param);
- if (unlikely(Z_TYPE_P(destination_param) != IS_STRING && Z_TYPE_P(destination_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(destination_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(destination_param) == IS_STRING)) {
zephir_get_strval(destination, destination_param);
} else {
ZEPHIR_INIT_VAR(destination);
diff --git a/ext/phalcon/http/response.zep.c b/ext/phalcon/http/response.zep.c
index 8d49dcf825c..a1d44293827 100644
--- a/ext/phalcon/http/response.zep.c
+++ b/ext/phalcon/http/response.zep.c
@@ -17,7 +17,6 @@
#include "kernel/object.h"
#include "kernel/operators.h"
#include "kernel/exception.h"
-#include "kernel/hash.h"
#include "kernel/array.h"
#include "kernel/concat.h"
#include "ext/date/php_date.h"
@@ -182,8 +181,8 @@ PHP_METHOD(Phalcon_Http_Response, setStatusCode) {
ZEPHIR_INIT_VAR(_0$$3);
zephir_is_iterable(currentHeadersRaw, &_2$$3, &_1$$3, 0, 0, "phalcon/http/response.zep", 132);
for (
- ; zephir_hash_get_current_data_ex(_2$$3, (void**) &_3$$3, &_1$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_2$$3, &_1$$3)
+ ; zend_hash_get_current_data_ex(_2$$3, (void**) &_3$$3, &_1$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_2$$3, &_1$$3)
) {
ZEPHIR_GET_HMKEY(key, _2$$3, _1$$3);
ZEPHIR_GET_HVALUE(_0$$3, _3$$3);
@@ -561,7 +560,7 @@ PHP_METHOD(Phalcon_Http_Response, setCache) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &minutes_param);
- if (unlikely(Z_TYPE_P(minutes_param) != IS_LONG)) {
+ if (UNEXPECTED(Z_TYPE_P(minutes_param) != IS_LONG)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'minutes' must be a int") TSRMLS_CC);
RETURN_MM_NULL();
}
diff --git a/ext/phalcon/http/response/cookies.zep.c b/ext/phalcon/http/response/cookies.zep.c
index c6e86eb4119..6f1f4374157 100644
--- a/ext/phalcon/http/response/cookies.zep.c
+++ b/ext/phalcon/http/response/cookies.zep.c
@@ -19,7 +19,6 @@
#include "kernel/fcall.h"
#include "kernel/exception.h"
#include "ext/spl/spl_exceptions.h"
-#include "kernel/hash.h"
/**
@@ -120,11 +119,11 @@ PHP_METHOD(Phalcon_Http_Response_Cookies, set) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 6, &name_param, &value, &expire_param, &path_param, &secure_param, &domain_param, &httpOnly_param);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -153,11 +152,11 @@ PHP_METHOD(Phalcon_Http_Response_Cookies, set) {
ZEPHIR_INIT_VAR(domain);
ZVAL_EMPTY_STRING(domain);
} else {
- if (unlikely(Z_TYPE_P(domain_param) != IS_STRING && Z_TYPE_P(domain_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(domain_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(domain_param) == IS_STRING)) {
zephir_get_strval(domain, domain_param);
} else {
ZEPHIR_INIT_VAR(domain);
@@ -272,11 +271,11 @@ PHP_METHOD(Phalcon_Http_Response_Cookies, get) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &name_param);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -327,11 +326,11 @@ PHP_METHOD(Phalcon_Http_Response_Cookies, has) {
zephir_get_global(&_COOKIE, SS("_COOKIE") TSRMLS_CC);
zephir_fetch_params(1, 1, 0, &name_param);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -363,11 +362,11 @@ PHP_METHOD(Phalcon_Http_Response_Cookies, delete) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &name_param);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -405,8 +404,8 @@ PHP_METHOD(Phalcon_Http_Response_Cookies, send) {
_1$$3 = zephir_fetch_nproperty_this(this_ptr, SL("_cookies"), PH_NOISY_CC);
zephir_is_iterable(_1$$3, &_3$$3, &_2$$3, 0, 0, "phalcon/http/response/cookies.zep", 242);
for (
- ; zephir_hash_get_current_data_ex(_3$$3, (void**) &_4$$3, &_2$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_3$$3, &_2$$3)
+ ; zend_hash_get_current_data_ex(_3$$3, (void**) &_4$$3, &_2$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_3$$3, &_2$$3)
) {
ZEPHIR_GET_HVALUE(cookie, _4$$3);
ZEPHIR_CALL_METHOD(NULL, cookie, "send", NULL, 0);
diff --git a/ext/phalcon/http/response/headers.zep.c b/ext/phalcon/http/response/headers.zep.c
index 42df7382248..9f7d95e01f8 100644
--- a/ext/phalcon/http/response/headers.zep.c
+++ b/ext/phalcon/http/response/headers.zep.c
@@ -17,7 +17,6 @@
#include "kernel/memory.h"
#include "kernel/array.h"
#include "kernel/fcall.h"
-#include "kernel/hash.h"
#include "kernel/concat.h"
#include "kernel/string.h"
#include "ext/spl/spl_exceptions.h"
@@ -145,8 +144,8 @@ PHP_METHOD(Phalcon_Http_Response_Headers, send) {
_1$$3 = zephir_fetch_nproperty_this(this_ptr, SL("_headers"), PH_NOISY_CC);
zephir_is_iterable(_1$$3, &_3$$3, &_2$$3, 0, 0, "phalcon/http/response/headers.zep", 94);
for (
- ; zephir_hash_get_current_data_ex(_3$$3, (void**) &_4$$3, &_2$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_3$$3, &_2$$3)
+ ; zend_hash_get_current_data_ex(_3$$3, (void**) &_4$$3, &_2$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_3$$3, &_2$$3)
) {
ZEPHIR_GET_HMKEY(header, _3$$3, _2$$3);
ZEPHIR_GET_HVALUE(value, _4$$3);
@@ -238,8 +237,8 @@ PHP_METHOD(Phalcon_Http_Response_Headers, __set_state) {
if (zephir_array_isset_string_fetch(&dataHeaders, data, SS("_headers"), 0 TSRMLS_CC)) {
zephir_is_iterable(dataHeaders, &_1$$3, &_0$$3, 0, 0, "phalcon/http/response/headers.zep", 126);
for (
- ; zephir_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_1$$3, &_0$$3)
+ ; zend_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_1$$3, &_0$$3)
) {
ZEPHIR_GET_HMKEY(key, _1$$3, _0$$3);
ZEPHIR_GET_HVALUE(value, _2$$3);
diff --git a/ext/phalcon/image/adapter/gd.zep.c b/ext/phalcon/image/adapter/gd.zep.c
index 6a56ec0928b..a5e0bc79a7a 100644
--- a/ext/phalcon/image/adapter/gd.zep.c
+++ b/ext/phalcon/image/adapter/gd.zep.c
@@ -108,11 +108,11 @@ PHP_METHOD(Phalcon_Image_Adapter_Gd, __construct) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 2, &file_param, &width_param, &height_param);
- if (unlikely(Z_TYPE_P(file_param) != IS_STRING && Z_TYPE_P(file_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(file_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(file_param) == IS_STRING)) {
zephir_get_strval(file, file_param);
} else {
ZEPHIR_INIT_VAR(file);
diff --git a/ext/phalcon/image/adapter/imagick.zep.c b/ext/phalcon/image/adapter/imagick.zep.c
index 24a42ff7080..6614030f719 100644
--- a/ext/phalcon/image/adapter/imagick.zep.c
+++ b/ext/phalcon/image/adapter/imagick.zep.c
@@ -100,11 +100,11 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, __construct) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 2, &file_param, &width_param, &height_param);
- if (unlikely(Z_TYPE_P(file_param) != IS_STRING && Z_TYPE_P(file_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(file_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(file_param) == IS_STRING)) {
zephir_get_strval(file, file_param);
} else {
ZEPHIR_INIT_VAR(file);
@@ -803,10 +803,9 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, _reflection) {
*/
PHP_METHOD(Phalcon_Image_Adapter_Imagick, _watermark) {
- zend_class_entry *_0$$3;
- zephir_fcall_cache_entry *_8 = NULL;
+ zephir_fcall_cache_entry *_7 = NULL;
int offsetX, offsetY, opacity, ZEPHIR_LAST_CALL_STATUS;
- zval *image, *offsetX_param = NULL, *offsetY_param = NULL, *opacity_param = NULL, *watermark = NULL, *ret = NULL, *version = NULL, *method = NULL, *_2 = NULL, *_3 = NULL, *_4, *_1$$3, *_5$$5, _6$$5 = zval_used_for_init, *_7$$5 = NULL, *_9$$5 = NULL, *_10$$5 = NULL, *_11$$5, *_12$$5 = NULL;
+ zval *image, *offsetX_param = NULL, *offsetY_param = NULL, *opacity_param = NULL, *watermark = NULL, *ret = NULL, *version = NULL, *method = NULL, *_1 = NULL, *_2 = NULL, *_3, *_0$$3, *_4$$5, _5$$5 = zval_used_for_init, *_6$$5 = NULL, *_8$$5 = NULL, *_9$$5 = NULL, *_10$$5, *_11$$5 = NULL;
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 4, 0, &image, &offsetX_param, &offsetY_param, &opacity_param);
@@ -823,49 +822,48 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, _watermark) {
zephir_check_call_status();
ZEPHIR_INIT_VAR(method);
ZVAL_STRING(method, "setImageOpacity", 1);
- if (likely((zephir_method_exists_ex(watermark, SS("getversion") TSRMLS_CC) == SUCCESS))) {
- _0$$3 = zend_fetch_class(SL("Imagick"), ZEND_FETCH_CLASS_AUTO TSRMLS_CC);
- ZEPHIR_CALL_CE_STATIC(&version, _0$$3, "getversion", NULL, 0);
+ if (EXPECTED((zephir_method_exists_ex(watermark, SS("getversion") TSRMLS_CC) == SUCCESS))) {
+ ZEPHIR_CALL_METHOD(&version, watermark, "getversion", NULL, 0);
zephir_check_call_status();
- zephir_array_fetch_string(&_1$$3, version, SL("versionNumber"), PH_NOISY | PH_READONLY, "phalcon/image/adapter/imagick.zep", 365 TSRMLS_CC);
- if (ZEPHIR_GE_LONG(_1$$3, 0x700)) {
+ zephir_array_fetch_string(&_0$$3, version, SL("versionNumber"), PH_NOISY | PH_READONLY, "phalcon/image/adapter/imagick.zep", 365 TSRMLS_CC);
+ if (ZEPHIR_GE_LONG(_0$$3, 0x700)) {
ZEPHIR_INIT_NVAR(method);
ZVAL_STRING(method, "setImageAlpha", 1);
}
}
- ZEPHIR_CALL_METHOD(&_2, image, "render", NULL, 0);
+ ZEPHIR_CALL_METHOD(&_1, image, "render", NULL, 0);
zephir_check_call_status();
- ZEPHIR_CALL_METHOD(NULL, watermark, "readimageblob", NULL, 0, _2);
+ ZEPHIR_CALL_METHOD(NULL, watermark, "readimageblob", NULL, 0, _1);
zephir_check_call_status();
- ZEPHIR_INIT_VAR(_3);
- ZVAL_LONG(_3, opacity);
- ZEPHIR_CALL_METHOD_ZVAL(NULL, watermark, method, NULL, 0, _3);
+ ZEPHIR_INIT_VAR(_2);
+ ZVAL_LONG(_2, opacity);
+ ZEPHIR_CALL_METHOD_ZVAL(NULL, watermark, method, NULL, 0, _2);
zephir_check_call_status();
- _4 = zephir_fetch_nproperty_this(this_ptr, SL("_image"), PH_NOISY_CC);
- ZEPHIR_INIT_NVAR(_3);
- ZVAL_LONG(_3, 0);
- ZEPHIR_CALL_METHOD(NULL, _4, "setiteratorindex", NULL, 0, _3);
+ _3 = zephir_fetch_nproperty_this(this_ptr, SL("_image"), PH_NOISY_CC);
+ ZEPHIR_INIT_NVAR(_2);
+ ZVAL_LONG(_2, 0);
+ ZEPHIR_CALL_METHOD(NULL, _3, "setiteratorindex", NULL, 0, _2);
zephir_check_call_status();
while (1) {
- _5$$5 = zephir_fetch_nproperty_this(this_ptr, SL("_image"), PH_NOISY_CC);
- ZEPHIR_SINIT_NVAR(_6$$5);
- ZVAL_STRING(&_6$$5, "Imagick::COMPOSITE_OVER", 0);
- ZEPHIR_CALL_FUNCTION(&_7$$5, "constant", &_8, 196, &_6$$5);
+ _4$$5 = zephir_fetch_nproperty_this(this_ptr, SL("_image"), PH_NOISY_CC);
+ ZEPHIR_SINIT_NVAR(_5$$5);
+ ZVAL_STRING(&_5$$5, "Imagick::COMPOSITE_OVER", 0);
+ ZEPHIR_CALL_FUNCTION(&_6$$5, "constant", &_7, 196, &_5$$5);
zephir_check_call_status();
+ ZEPHIR_INIT_NVAR(_8$$5);
+ ZVAL_LONG(_8$$5, offsetX);
ZEPHIR_INIT_NVAR(_9$$5);
- ZVAL_LONG(_9$$5, offsetX);
- ZEPHIR_INIT_NVAR(_10$$5);
- ZVAL_LONG(_10$$5, offsetY);
- ZEPHIR_CALL_METHOD(&ret, _5$$5, "compositeimage", NULL, 0, watermark, _7$$5, _9$$5, _10$$5);
+ ZVAL_LONG(_9$$5, offsetY);
+ ZEPHIR_CALL_METHOD(&ret, _4$$5, "compositeimage", NULL, 0, watermark, _6$$5, _8$$5, _9$$5);
zephir_check_call_status();
if (!ZEPHIR_IS_TRUE_IDENTICAL(ret)) {
ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_image_exception_ce, "Imagick::compositeImage failed", "phalcon/image/adapter/imagick.zep", 379);
return;
}
- _11$$5 = zephir_fetch_nproperty_this(this_ptr, SL("_image"), PH_NOISY_CC);
- ZEPHIR_CALL_METHOD(&_12$$5, _11$$5, "nextimage", NULL, 0);
+ _10$$5 = zephir_fetch_nproperty_this(this_ptr, SL("_image"), PH_NOISY_CC);
+ ZEPHIR_CALL_METHOD(&_11$$5, _10$$5, "nextimage", NULL, 0);
zephir_check_call_status();
- if (ZEPHIR_IS_FALSE_IDENTICAL(_12$$5)) {
+ if (ZEPHIR_IS_FALSE_IDENTICAL(_11$$5)) {
break;
}
}
diff --git a/ext/phalcon/kernel.zep.c b/ext/phalcon/kernel.zep.c
index c5ba35f0e29..f197ff14019 100644
--- a/ext/phalcon/kernel.zep.c
+++ b/ext/phalcon/kernel.zep.c
@@ -46,11 +46,11 @@ PHP_METHOD(Phalcon_Kernel, preComputeHashKey) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &key_param);
- if (unlikely(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(key_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(key_param) == IS_STRING)) {
zephir_get_strval(key, key_param);
} else {
ZEPHIR_INIT_VAR(key);
diff --git a/ext/phalcon/loader.zep.c b/ext/phalcon/loader.zep.c
index 15ac917d8e2..c121e4ceb4f 100644
--- a/ext/phalcon/loader.zep.c
+++ b/ext/phalcon/loader.zep.c
@@ -17,7 +17,6 @@
#include "ext/spl/spl_exceptions.h"
#include "kernel/exception.h"
#include "kernel/fcall.h"
-#include "kernel/hash.h"
#include "kernel/array.h"
#include "kernel/operators.h"
#include "kernel/require.h"
@@ -164,8 +163,8 @@ PHP_METHOD(Phalcon_Loader, registerNamespaces) {
if (merge) {
zephir_is_iterable(preparedNamespaces, &_1$$3, &_0$$3, 0, 0, "phalcon/loader.zep", 123);
for (
- ; zephir_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_1$$3, &_0$$3)
+ ; zend_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_1$$3, &_0$$3)
) {
ZEPHIR_GET_HMKEY(name, _1$$3, _0$$3);
ZEPHIR_GET_HVALUE(paths, _2$$3);
@@ -205,8 +204,8 @@ PHP_METHOD(Phalcon_Loader, prepareNamespace) {
array_init(prepared);
zephir_is_iterable(namespace, &_1, &_0, 0, 0, "phalcon/loader.zep", 145);
for (
- ; zephir_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
- ; zephir_hash_move_forward_ex(_1, &_0)
+ ; zend_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
+ ; zend_hash_move_forward_ex(_1, &_0)
) {
ZEPHIR_GET_HMKEY(name, _1, _0);
ZEPHIR_GET_HVALUE(paths, _2);
@@ -455,8 +454,8 @@ PHP_METHOD(Phalcon_Loader, loadFiles) {
_0 = zephir_fetch_nproperty_this(this_ptr, SL("_files"), PH_NOISY_CC);
zephir_is_iterable(_0, &_2, &_1, 0, 0, "phalcon/loader.zep", 288);
for (
- ; zephir_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
- ; zephir_hash_move_forward_ex(_2, &_1)
+ ; zend_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
+ ; zend_hash_move_forward_ex(_2, &_1)
) {
ZEPHIR_GET_HVALUE(filePath, _3);
ZEPHIR_OBS_NVAR(_4$$3);
@@ -508,11 +507,11 @@ PHP_METHOD(Phalcon_Loader, autoLoad) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &className_param);
- if (unlikely(Z_TYPE_P(className_param) != IS_STRING && Z_TYPE_P(className_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(className_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(className_param) == IS_STRING)) {
zephir_get_strval(className, className_param);
} else {
ZEPHIR_INIT_VAR(className);
@@ -556,8 +555,8 @@ PHP_METHOD(Phalcon_Loader, autoLoad) {
zephir_read_property_this(&namespaces, this_ptr, SL("_namespaces"), PH_NOISY_CC);
zephir_is_iterable(namespaces, &_3, &_2, 0, 0, "phalcon/loader.zep", 392);
for (
- ; zephir_hash_get_current_data_ex(_3, (void**) &_4, &_2) == SUCCESS
- ; zephir_hash_move_forward_ex(_3, &_2)
+ ; zend_hash_get_current_data_ex(_3, (void**) &_4, &_2) == SUCCESS
+ ; zend_hash_move_forward_ex(_3, &_2)
) {
ZEPHIR_GET_HMKEY(nsPrefix, _3, _2);
ZEPHIR_GET_HVALUE(directories, _4);
@@ -578,8 +577,8 @@ PHP_METHOD(Phalcon_Loader, autoLoad) {
ZEPHIR_CPY_WRT(fileName, _7$$6);
zephir_is_iterable(directories, &_9$$6, &_8$$6, 0, 0, "phalcon/loader.zep", 387);
for (
- ; zephir_hash_get_current_data_ex(_9$$6, (void**) &_10$$6, &_8$$6) == SUCCESS
- ; zephir_hash_move_forward_ex(_9$$6, &_8$$6)
+ ; zend_hash_get_current_data_ex(_9$$6, (void**) &_10$$6, &_8$$6) == SUCCESS
+ ; zend_hash_move_forward_ex(_9$$6, &_8$$6)
) {
ZEPHIR_GET_HVALUE(directory, _10$$6);
ZEPHIR_INIT_NVAR(_11$$9);
@@ -588,8 +587,8 @@ PHP_METHOD(Phalcon_Loader, autoLoad) {
ZEPHIR_CONCAT_VV(fixedDirectory, _11$$9, ds);
zephir_is_iterable(extensions, &_13$$9, &_12$$9, 0, 0, "phalcon/loader.zep", 386);
for (
- ; zephir_hash_get_current_data_ex(_13$$9, (void**) &_14$$9, &_12$$9) == SUCCESS
- ; zephir_hash_move_forward_ex(_13$$9, &_12$$9)
+ ; zend_hash_get_current_data_ex(_13$$9, (void**) &_14$$9, &_12$$9) == SUCCESS
+ ; zend_hash_move_forward_ex(_13$$9, &_12$$9)
) {
ZEPHIR_GET_HVALUE(extension, _14$$9);
ZEPHIR_INIT_NVAR(filePath);
@@ -629,8 +628,8 @@ PHP_METHOD(Phalcon_Loader, autoLoad) {
zephir_read_property_this(&directories, this_ptr, SL("_directories"), PH_NOISY_CC);
zephir_is_iterable(directories, &_23, &_22, 0, 0, "phalcon/loader.zep", 447);
for (
- ; zephir_hash_get_current_data_ex(_23, (void**) &_24, &_22) == SUCCESS
- ; zephir_hash_move_forward_ex(_23, &_22)
+ ; zend_hash_get_current_data_ex(_23, (void**) &_24, &_22) == SUCCESS
+ ; zend_hash_move_forward_ex(_23, &_22)
) {
ZEPHIR_GET_HVALUE(directory, _24);
ZEPHIR_INIT_NVAR(_25$$14);
@@ -639,8 +638,8 @@ PHP_METHOD(Phalcon_Loader, autoLoad) {
ZEPHIR_CONCAT_VV(fixedDirectory, _25$$14, ds);
zephir_is_iterable(extensions, &_27$$14, &_26$$14, 0, 0, "phalcon/loader.zep", 442);
for (
- ; zephir_hash_get_current_data_ex(_27$$14, (void**) &_28$$14, &_26$$14) == SUCCESS
- ; zephir_hash_move_forward_ex(_27$$14, &_26$$14)
+ ; zend_hash_get_current_data_ex(_27$$14, (void**) &_28$$14, &_26$$14) == SUCCESS
+ ; zend_hash_move_forward_ex(_27$$14, &_26$$14)
) {
ZEPHIR_GET_HVALUE(extension, _28$$14);
ZEPHIR_INIT_NVAR(filePath);
diff --git a/ext/phalcon/logger/adapter.zep.c b/ext/phalcon/logger/adapter.zep.c
index e3b77f9533f..a17efa236c3 100644
--- a/ext/phalcon/logger/adapter.zep.c
+++ b/ext/phalcon/logger/adapter.zep.c
@@ -16,7 +16,6 @@
#include "kernel/memory.h"
#include "kernel/operators.h"
#include "kernel/exception.h"
-#include "kernel/hash.h"
#include "kernel/fcall.h"
#include "ext/spl/spl_exceptions.h"
#include "kernel/time.h"
@@ -155,8 +154,8 @@ PHP_METHOD(Phalcon_Logger_Adapter, commit) {
_1 = zephir_fetch_nproperty_this(this_ptr, SL("_queue"), PH_NOISY_CC);
zephir_is_iterable(_1, &_3, &_2, 0, 0, "phalcon/logger/adapter.zep", 125);
for (
- ; zephir_hash_get_current_data_ex(_3, (void**) &_4, &_2) == SUCCESS
- ; zephir_hash_move_forward_ex(_3, &_2)
+ ; zend_hash_get_current_data_ex(_3, (void**) &_4, &_2) == SUCCESS
+ ; zend_hash_move_forward_ex(_3, &_2)
) {
ZEPHIR_GET_HVALUE(message, _4);
ZEPHIR_CALL_METHOD(&_5$$4, message, "getmessage", NULL, 0);
@@ -228,11 +227,11 @@ PHP_METHOD(Phalcon_Logger_Adapter, critical) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &message_param, &context_param);
- if (unlikely(Z_TYPE_P(message_param) != IS_STRING && Z_TYPE_P(message_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(message_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(message_param) == IS_STRING)) {
zephir_get_strval(message, message_param);
} else {
ZEPHIR_INIT_VAR(message);
@@ -267,11 +266,11 @@ PHP_METHOD(Phalcon_Logger_Adapter, emergency) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &message_param, &context_param);
- if (unlikely(Z_TYPE_P(message_param) != IS_STRING && Z_TYPE_P(message_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(message_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(message_param) == IS_STRING)) {
zephir_get_strval(message, message_param);
} else {
ZEPHIR_INIT_VAR(message);
@@ -306,11 +305,11 @@ PHP_METHOD(Phalcon_Logger_Adapter, debug) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &message_param, &context_param);
- if (unlikely(Z_TYPE_P(message_param) != IS_STRING && Z_TYPE_P(message_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(message_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(message_param) == IS_STRING)) {
zephir_get_strval(message, message_param);
} else {
ZEPHIR_INIT_VAR(message);
@@ -345,11 +344,11 @@ PHP_METHOD(Phalcon_Logger_Adapter, error) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &message_param, &context_param);
- if (unlikely(Z_TYPE_P(message_param) != IS_STRING && Z_TYPE_P(message_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(message_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(message_param) == IS_STRING)) {
zephir_get_strval(message, message_param);
} else {
ZEPHIR_INIT_VAR(message);
@@ -384,11 +383,11 @@ PHP_METHOD(Phalcon_Logger_Adapter, info) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &message_param, &context_param);
- if (unlikely(Z_TYPE_P(message_param) != IS_STRING && Z_TYPE_P(message_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(message_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(message_param) == IS_STRING)) {
zephir_get_strval(message, message_param);
} else {
ZEPHIR_INIT_VAR(message);
@@ -423,11 +422,11 @@ PHP_METHOD(Phalcon_Logger_Adapter, notice) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &message_param, &context_param);
- if (unlikely(Z_TYPE_P(message_param) != IS_STRING && Z_TYPE_P(message_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(message_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(message_param) == IS_STRING)) {
zephir_get_strval(message, message_param);
} else {
ZEPHIR_INIT_VAR(message);
@@ -462,11 +461,11 @@ PHP_METHOD(Phalcon_Logger_Adapter, warning) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &message_param, &context_param);
- if (unlikely(Z_TYPE_P(message_param) != IS_STRING && Z_TYPE_P(message_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(message_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(message_param) == IS_STRING)) {
zephir_get_strval(message, message_param);
} else {
ZEPHIR_INIT_VAR(message);
@@ -501,11 +500,11 @@ PHP_METHOD(Phalcon_Logger_Adapter, alert) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &message_param, &context_param);
- if (unlikely(Z_TYPE_P(message_param) != IS_STRING && Z_TYPE_P(message_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(message_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(message_param) == IS_STRING)) {
zephir_get_strval(message, message_param);
} else {
ZEPHIR_INIT_VAR(message);
diff --git a/ext/phalcon/logger/adapter/file.zep.c b/ext/phalcon/logger/adapter/file.zep.c
index 87d148737ca..691d13b414a 100644
--- a/ext/phalcon/logger/adapter/file.zep.c
+++ b/ext/phalcon/logger/adapter/file.zep.c
@@ -90,11 +90,11 @@ PHP_METHOD(Phalcon_Logger_Adapter_File, __construct) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &name_param, &options);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
diff --git a/ext/phalcon/logger/adapter/firephp.zep.c b/ext/phalcon/logger/adapter/firephp.zep.c
index 5baa5ac5aeb..4310cd1af1a 100644
--- a/ext/phalcon/logger/adapter/firephp.zep.c
+++ b/ext/phalcon/logger/adapter/firephp.zep.c
@@ -16,7 +16,6 @@
#include "kernel/object.h"
#include "kernel/fcall.h"
#include "kernel/operators.h"
-#include "kernel/hash.h"
#include "kernel/concat.h"
#include "kernel/array.h"
@@ -131,8 +130,8 @@ PHP_METHOD(Phalcon_Logger_Adapter_Firephp, logInternal) {
zephir_read_property_this(&index, this_ptr, SL("_index"), PH_NOISY_CC);
zephir_is_iterable(chunk, &_8, &_7, 0, 0, "phalcon/logger/adapter/firephp.zep", 92);
for (
- ; zephir_hash_get_current_data_ex(_8, (void**) &_9, &_7) == SUCCESS
- ; zephir_hash_move_forward_ex(_8, &_7)
+ ; zend_hash_get_current_data_ex(_8, (void**) &_9, &_7) == SUCCESS
+ ; zend_hash_move_forward_ex(_8, &_7)
) {
ZEPHIR_GET_HMKEY(key, _8, _7);
ZEPHIR_GET_HVALUE(chString, _9);
diff --git a/ext/phalcon/logger/adapter/stream.zep.c b/ext/phalcon/logger/adapter/stream.zep.c
index 842759acba8..2cb67f45478 100644
--- a/ext/phalcon/logger/adapter/stream.zep.c
+++ b/ext/phalcon/logger/adapter/stream.zep.c
@@ -70,11 +70,11 @@ PHP_METHOD(Phalcon_Logger_Adapter_Stream, __construct) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &name_param, &options);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
diff --git a/ext/phalcon/logger/formatter.zep.c b/ext/phalcon/logger/formatter.zep.c
index 605687d6c78..23df28e942b 100644
--- a/ext/phalcon/logger/formatter.zep.c
+++ b/ext/phalcon/logger/formatter.zep.c
@@ -14,7 +14,6 @@
#include "kernel/main.h"
#include "kernel/operators.h"
#include "kernel/memory.h"
-#include "kernel/hash.h"
#include "kernel/concat.h"
#include "kernel/array.h"
#include "kernel/fcall.h"
@@ -118,8 +117,8 @@ PHP_METHOD(Phalcon_Logger_Formatter, interpolate) {
array_init(replace);
zephir_is_iterable(context, &_2$$3, &_1$$3, 0, 0, "phalcon/logger/formatter.zep", 89);
for (
- ; zephir_hash_get_current_data_ex(_2$$3, (void**) &_3$$3, &_1$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_2$$3, &_1$$3)
+ ; zend_hash_get_current_data_ex(_2$$3, (void**) &_3$$3, &_1$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_2$$3, &_1$$3)
) {
ZEPHIR_GET_HMKEY(key, _2$$3, _1$$3);
ZEPHIR_GET_HVALUE(value, _3$$3);
diff --git a/ext/phalcon/logger/formatter/firephp.zep.c b/ext/phalcon/logger/formatter/firephp.zep.c
index daa2412a2ff..926dce6c5ce 100644
--- a/ext/phalcon/logger/formatter/firephp.zep.c
+++ b/ext/phalcon/logger/formatter/firephp.zep.c
@@ -17,7 +17,6 @@
#include "kernel/object.h"
#include "kernel/fcall.h"
#include "kernel/array.h"
-#include "kernel/hash.h"
#include "kernel/string.h"
#include "kernel/concat.h"
@@ -208,8 +207,8 @@ PHP_METHOD(Phalcon_Logger_Formatter_Firephp, format) {
}
zephir_is_iterable(backtrace, &_7$$4, &_6$$4, 1, 0, "phalcon/logger/formatter/firephp.zep", 141);
for (
- ; zephir_hash_get_current_data_ex(_7$$4, (void**) &_8$$4, &_6$$4) == SUCCESS
- ; zephir_hash_move_forward_ex(_7$$4, &_6$$4)
+ ; zend_hash_get_current_data_ex(_7$$4, (void**) &_8$$4, &_6$$4) == SUCCESS
+ ; zend_hash_move_forward_ex(_7$$4, &_6$$4)
) {
ZEPHIR_GET_HMKEY(key$$4, _7$$4, _6$$4);
ZEPHIR_GET_HVALUE(backtraceItem$$4, _8$$4);
diff --git a/ext/phalcon/logger/multiple.zep.c b/ext/phalcon/logger/multiple.zep.c
index e2c646fb16b..bf603d1329d 100644
--- a/ext/phalcon/logger/multiple.zep.c
+++ b/ext/phalcon/logger/multiple.zep.c
@@ -14,7 +14,6 @@
#include "kernel/main.h"
#include "kernel/object.h"
#include "kernel/memory.h"
-#include "kernel/hash.h"
#include "kernel/fcall.h"
#include "kernel/operators.h"
#include "ext/spl/spl_exceptions.h"
@@ -99,8 +98,8 @@ PHP_METHOD(Phalcon_Logger_Multiple, setFormatter) {
if (Z_TYPE_P(loggers) == IS_ARRAY) {
zephir_is_iterable(loggers, &_1$$3, &_0$$3, 0, 0, "phalcon/logger/multiple.zep", 61);
for (
- ; zephir_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_1$$3, &_0$$3)
+ ; zend_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_1$$3, &_0$$3)
) {
ZEPHIR_GET_HVALUE(logger, _2$$3);
ZEPHIR_CALL_METHOD(NULL, logger, "setformatter", NULL, 0, formatter);
@@ -133,8 +132,8 @@ PHP_METHOD(Phalcon_Logger_Multiple, setLogLevel) {
if (Z_TYPE_P(loggers) == IS_ARRAY) {
zephir_is_iterable(loggers, &_1$$3, &_0$$3, 0, 0, "phalcon/logger/multiple.zep", 77);
for (
- ; zephir_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_1$$3, &_0$$3)
+ ; zend_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_1$$3, &_0$$3)
) {
ZEPHIR_GET_HVALUE(logger, _2$$3);
ZEPHIR_INIT_NVAR(_3$$4);
@@ -180,8 +179,8 @@ PHP_METHOD(Phalcon_Logger_Multiple, log) {
if (Z_TYPE_P(loggers) == IS_ARRAY) {
zephir_is_iterable(loggers, &_1$$3, &_0$$3, 0, 0, "phalcon/logger/multiple.zep", 93);
for (
- ; zephir_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_1$$3, &_0$$3)
+ ; zend_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_1$$3, &_0$$3)
) {
ZEPHIR_GET_HVALUE(logger, _2$$3);
ZEPHIR_CALL_METHOD(NULL, logger, "log", NULL, 0, type, message, context);
@@ -205,11 +204,11 @@ PHP_METHOD(Phalcon_Logger_Multiple, critical) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &message_param, &context_param);
- if (unlikely(Z_TYPE_P(message_param) != IS_STRING && Z_TYPE_P(message_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(message_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(message_param) == IS_STRING)) {
zephir_get_strval(message, message_param);
} else {
ZEPHIR_INIT_VAR(message);
@@ -244,11 +243,11 @@ PHP_METHOD(Phalcon_Logger_Multiple, emergency) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &message_param, &context_param);
- if (unlikely(Z_TYPE_P(message_param) != IS_STRING && Z_TYPE_P(message_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(message_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(message_param) == IS_STRING)) {
zephir_get_strval(message, message_param);
} else {
ZEPHIR_INIT_VAR(message);
@@ -283,11 +282,11 @@ PHP_METHOD(Phalcon_Logger_Multiple, debug) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &message_param, &context_param);
- if (unlikely(Z_TYPE_P(message_param) != IS_STRING && Z_TYPE_P(message_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(message_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(message_param) == IS_STRING)) {
zephir_get_strval(message, message_param);
} else {
ZEPHIR_INIT_VAR(message);
@@ -322,11 +321,11 @@ PHP_METHOD(Phalcon_Logger_Multiple, error) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &message_param, &context_param);
- if (unlikely(Z_TYPE_P(message_param) != IS_STRING && Z_TYPE_P(message_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(message_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(message_param) == IS_STRING)) {
zephir_get_strval(message, message_param);
} else {
ZEPHIR_INIT_VAR(message);
@@ -361,11 +360,11 @@ PHP_METHOD(Phalcon_Logger_Multiple, info) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &message_param, &context_param);
- if (unlikely(Z_TYPE_P(message_param) != IS_STRING && Z_TYPE_P(message_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(message_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(message_param) == IS_STRING)) {
zephir_get_strval(message, message_param);
} else {
ZEPHIR_INIT_VAR(message);
@@ -400,11 +399,11 @@ PHP_METHOD(Phalcon_Logger_Multiple, notice) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &message_param, &context_param);
- if (unlikely(Z_TYPE_P(message_param) != IS_STRING && Z_TYPE_P(message_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(message_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(message_param) == IS_STRING)) {
zephir_get_strval(message, message_param);
} else {
ZEPHIR_INIT_VAR(message);
@@ -439,11 +438,11 @@ PHP_METHOD(Phalcon_Logger_Multiple, warning) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &message_param, &context_param);
- if (unlikely(Z_TYPE_P(message_param) != IS_STRING && Z_TYPE_P(message_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(message_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(message_param) == IS_STRING)) {
zephir_get_strval(message, message_param);
} else {
ZEPHIR_INIT_VAR(message);
@@ -478,11 +477,11 @@ PHP_METHOD(Phalcon_Logger_Multiple, alert) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &message_param, &context_param);
- if (unlikely(Z_TYPE_P(message_param) != IS_STRING && Z_TYPE_P(message_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(message_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(message_param) == IS_STRING)) {
zephir_get_strval(message, message_param);
} else {
ZEPHIR_INIT_VAR(message);
diff --git a/ext/phalcon/mvc/collection.zep.c b/ext/phalcon/mvc/collection.zep.c
index 7d3a3e17f4d..9fd4f2c7fdd 100644
--- a/ext/phalcon/mvc/collection.zep.c
+++ b/ext/phalcon/mvc/collection.zep.c
@@ -20,7 +20,6 @@
#include "kernel/array.h"
#include "ext/spl/spl_exceptions.h"
#include "kernel/string.h"
-#include "kernel/hash.h"
#include "kernel/concat.h"
@@ -321,11 +320,11 @@ PHP_METHOD(Phalcon_Mvc_Collection, setSource) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &source_param);
- if (unlikely(Z_TYPE_P(source_param) != IS_STRING && Z_TYPE_P(source_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(source_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(source_param) == IS_STRING)) {
zephir_get_strval(source, source_param);
} else {
ZEPHIR_INIT_VAR(source);
@@ -372,11 +371,11 @@ PHP_METHOD(Phalcon_Mvc_Collection, setConnectionService) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &connectionService_param);
- if (unlikely(Z_TYPE_P(connectionService_param) != IS_STRING && Z_TYPE_P(connectionService_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(connectionService_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(connectionService_param) == IS_STRING)) {
zephir_get_strval(connectionService, connectionService_param);
} else {
ZEPHIR_INIT_VAR(connectionService);
@@ -450,11 +449,11 @@ PHP_METHOD(Phalcon_Mvc_Collection, readAttribute) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &attribute_param);
- if (unlikely(Z_TYPE_P(attribute_param) != IS_STRING && Z_TYPE_P(attribute_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(attribute_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(attribute_param) == IS_STRING)) {
zephir_get_strval(attribute, attribute_param);
} else {
ZEPHIR_INIT_VAR(attribute);
@@ -521,8 +520,8 @@ PHP_METHOD(Phalcon_Mvc_Collection, cloneResult) {
}
zephir_is_iterable(document, &_1, &_0, 0, 0, "phalcon/mvc/collection.zep", 332);
for (
- ; zephir_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
- ; zephir_hash_move_forward_ex(_1, &_0)
+ ; zend_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
+ ; zend_hash_move_forward_ex(_1, &_0)
) {
ZEPHIR_GET_HMKEY(key, _1, _0);
ZEPHIR_GET_HVALUE(value, _2);
@@ -661,8 +660,8 @@ PHP_METHOD(Phalcon_Mvc_Collection, _getResultset) {
zephir_check_call_status();
zephir_is_iterable(_6, &_8, &_7, 0, 0, "phalcon/mvc/collection.zep", 457);
for (
- ; zephir_hash_get_current_data_ex(_8, (void**) &_9, &_7) == SUCCESS
- ; zephir_hash_move_forward_ex(_8, &_7)
+ ; zend_hash_get_current_data_ex(_8, (void**) &_9, &_7) == SUCCESS
+ ; zend_hash_move_forward_ex(_8, &_7)
) {
ZEPHIR_GET_HVALUE(document, _9);
ZEPHIR_CALL_STATIC(&_10$$19, "cloneresult", &_11, 0, base, document);
@@ -969,8 +968,8 @@ PHP_METHOD(Phalcon_Mvc_Collection, validate) {
zephir_check_call_status();
zephir_is_iterable(_1$$4, &_3$$4, &_2$$4, 0, 0, "phalcon/mvc/collection.zep", 698);
for (
- ; zephir_hash_get_current_data_ex(_3$$4, (void**) &_4$$4, &_2$$4) == SUCCESS
- ; zephir_hash_move_forward_ex(_3$$4, &_2$$4)
+ ; zend_hash_get_current_data_ex(_3$$4, (void**) &_4$$4, &_2$$4) == SUCCESS
+ ; zend_hash_move_forward_ex(_3$$4, &_2$$4)
) {
ZEPHIR_GET_HVALUE(message, _4$$4);
zephir_update_property_array_append(this_ptr, SL("_errorMessages"), message TSRMLS_CC);
@@ -1066,11 +1065,11 @@ PHP_METHOD(Phalcon_Mvc_Collection, fireEvent) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &eventName_param);
- if (unlikely(Z_TYPE_P(eventName_param) != IS_STRING && Z_TYPE_P(eventName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(eventName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(eventName_param) == IS_STRING)) {
zephir_get_strval(eventName, eventName_param);
} else {
ZEPHIR_INIT_VAR(eventName);
@@ -1101,11 +1100,11 @@ PHP_METHOD(Phalcon_Mvc_Collection, fireEventCancel) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &eventName_param);
- if (unlikely(Z_TYPE_P(eventName_param) != IS_STRING && Z_TYPE_P(eventName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(eventName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(eventName_param) == IS_STRING)) {
zephir_get_strval(eventName, eventName_param);
} else {
ZEPHIR_INIT_VAR(eventName);
@@ -2014,11 +2013,11 @@ PHP_METHOD(Phalcon_Mvc_Collection, summatory) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 2, &field_param, &conditions, &finalize);
- if (unlikely(Z_TYPE_P(field_param) != IS_STRING && Z_TYPE_P(field_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(field_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(field_param) == IS_STRING)) {
zephir_get_strval(field, field_param);
} else {
ZEPHIR_INIT_VAR(field);
@@ -2281,8 +2280,8 @@ PHP_METHOD(Phalcon_Mvc_Collection, toArray) {
zephir_check_call_status();
zephir_is_iterable(_0, &_2, &_1, 0, 0, "phalcon/mvc/collection.zep", 1633);
for (
- ; zephir_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
- ; zephir_hash_move_forward_ex(_2, &_1)
+ ; zend_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
+ ; zend_hash_move_forward_ex(_2, &_1)
) {
ZEPHIR_GET_HMKEY(key, _2, _1);
ZEPHIR_GET_HVALUE(value, _3);
@@ -2333,11 +2332,11 @@ PHP_METHOD(Phalcon_Mvc_Collection, unserialize) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &data_param);
- if (unlikely(Z_TYPE_P(data_param) != IS_STRING && Z_TYPE_P(data_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(data_param) != IS_STRING && Z_TYPE_P(data_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'data' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(data_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(data_param) == IS_STRING)) {
zephir_get_strval(data, data_param);
} else {
ZEPHIR_INIT_VAR(data);
@@ -2367,8 +2366,8 @@ PHP_METHOD(Phalcon_Mvc_Collection, unserialize) {
zephir_update_property_this(this_ptr, SL("_modelsManager"), manager TSRMLS_CC);
zephir_is_iterable(attributes, &_3$$3, &_2$$3, 0, 0, "phalcon/mvc/collection.zep", 1689);
for (
- ; zephir_hash_get_current_data_ex(_3$$3, (void**) &_4$$3, &_2$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_3$$3, &_2$$3)
+ ; zend_hash_get_current_data_ex(_3$$3, (void**) &_4$$3, &_2$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_3$$3, &_2$$3)
) {
ZEPHIR_GET_HMKEY(key, _3$$3, _2$$3);
ZEPHIR_GET_HVALUE(value, _4$$3);
diff --git a/ext/phalcon/mvc/collection/behavior.zep.c b/ext/phalcon/mvc/collection/behavior.zep.c
index 5de124a1daf..c1da0c4c2f1 100644
--- a/ext/phalcon/mvc/collection/behavior.zep.c
+++ b/ext/phalcon/mvc/collection/behavior.zep.c
@@ -67,11 +67,11 @@ PHP_METHOD(Phalcon_Mvc_Collection_Behavior, mustTakeAction) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &eventName_param);
- if (unlikely(Z_TYPE_P(eventName_param) != IS_STRING && Z_TYPE_P(eventName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(eventName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(eventName_param) == IS_STRING)) {
zephir_get_strval(eventName, eventName_param);
} else {
ZEPHIR_INIT_VAR(eventName);
@@ -102,11 +102,11 @@ PHP_METHOD(Phalcon_Mvc_Collection_Behavior, getOptions) {
ZEPHIR_INIT_VAR(eventName);
ZVAL_EMPTY_STRING(eventName);
} else {
- if (unlikely(Z_TYPE_P(eventName_param) != IS_STRING && Z_TYPE_P(eventName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(eventName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(eventName_param) == IS_STRING)) {
zephir_get_strval(eventName, eventName_param);
} else {
ZEPHIR_INIT_VAR(eventName);
diff --git a/ext/phalcon/mvc/collection/behavior/softdelete.zep.c b/ext/phalcon/mvc/collection/behavior/softdelete.zep.c
index 2ef7a8b3a1f..48a6c1e6419 100644
--- a/ext/phalcon/mvc/collection/behavior/softdelete.zep.c
+++ b/ext/phalcon/mvc/collection/behavior/softdelete.zep.c
@@ -18,7 +18,6 @@
#include "kernel/memory.h"
#include "kernel/exception.h"
#include "kernel/object.h"
-#include "kernel/hash.h"
#include "ext/spl/spl_exceptions.h"
@@ -51,11 +50,11 @@ PHP_METHOD(Phalcon_Mvc_Collection_Behavior_SoftDelete, notify) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &type_param, &model);
- if (unlikely(Z_TYPE_P(type_param) != IS_STRING && Z_TYPE_P(type_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(type_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(type_param) == IS_STRING)) {
zephir_get_strval(type, type_param);
} else {
ZEPHIR_INIT_VAR(type);
@@ -96,8 +95,8 @@ PHP_METHOD(Phalcon_Mvc_Collection_Behavior_SoftDelete, notify) {
zephir_check_call_status();
zephir_is_iterable(_3$$7, &_5$$7, &_4$$7, 0, 0, "phalcon/mvc/collection/behavior/softdelete.zep", 89);
for (
- ; zephir_hash_get_current_data_ex(_5$$7, (void**) &_6$$7, &_4$$7) == SUCCESS
- ; zephir_hash_move_forward_ex(_5$$7, &_4$$7)
+ ; zend_hash_get_current_data_ex(_5$$7, (void**) &_6$$7, &_4$$7) == SUCCESS
+ ; zend_hash_move_forward_ex(_5$$7, &_4$$7)
) {
ZEPHIR_GET_HVALUE(message, _6$$7);
ZEPHIR_CALL_METHOD(NULL, model, "appendmessage", &_7, 0, message);
diff --git a/ext/phalcon/mvc/collection/behavior/timestampable.zep.c b/ext/phalcon/mvc/collection/behavior/timestampable.zep.c
index 843777d91c8..e3f511424b7 100644
--- a/ext/phalcon/mvc/collection/behavior/timestampable.zep.c
+++ b/ext/phalcon/mvc/collection/behavior/timestampable.zep.c
@@ -20,7 +20,6 @@
#include "Zend/zend_closures.h"
#include "kernel/object.h"
#include "kernel/time.h"
-#include "kernel/hash.h"
#include "ext/spl/spl_exceptions.h"
@@ -53,11 +52,11 @@ PHP_METHOD(Phalcon_Mvc_Collection_Behavior_Timestampable, notify) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &type_param, &model);
- if (unlikely(Z_TYPE_P(type_param) != IS_STRING && Z_TYPE_P(type_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(type_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(type_param) == IS_STRING)) {
zephir_get_strval(type, type_param);
} else {
ZEPHIR_INIT_VAR(type);
@@ -103,8 +102,8 @@ PHP_METHOD(Phalcon_Mvc_Collection_Behavior_Timestampable, notify) {
if (Z_TYPE_P(field) == IS_ARRAY) {
zephir_is_iterable(field, &_2$$12, &_1$$12, 0, 0, "phalcon/mvc/collection/behavior/timestampable.zep", 94);
for (
- ; zephir_hash_get_current_data_ex(_2$$12, (void**) &_3$$12, &_1$$12) == SUCCESS
- ; zephir_hash_move_forward_ex(_2$$12, &_1$$12)
+ ; zend_hash_get_current_data_ex(_2$$12, (void**) &_3$$12, &_1$$12) == SUCCESS
+ ; zend_hash_move_forward_ex(_2$$12, &_1$$12)
) {
ZEPHIR_GET_HVALUE(singleField, _3$$12);
ZEPHIR_CALL_METHOD(NULL, model, "writeattribute", &_4, 0, singleField, timestamp);
diff --git a/ext/phalcon/mvc/collection/document.zep.c b/ext/phalcon/mvc/collection/document.zep.c
index 78baf468c29..91ca7b65a79 100644
--- a/ext/phalcon/mvc/collection/document.zep.c
+++ b/ext/phalcon/mvc/collection/document.zep.c
@@ -51,11 +51,11 @@ PHP_METHOD(Phalcon_Mvc_Collection_Document, offsetExists) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &index_param);
- if (unlikely(Z_TYPE_P(index_param) != IS_STRING && Z_TYPE_P(index_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(index_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(index_param) == IS_STRING)) {
zephir_get_strval(index, index_param);
} else {
ZEPHIR_INIT_VAR(index);
@@ -78,11 +78,11 @@ PHP_METHOD(Phalcon_Mvc_Collection_Document, offsetGet) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &index_param);
- if (unlikely(Z_TYPE_P(index_param) != IS_STRING && Z_TYPE_P(index_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(index_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(index_param) == IS_STRING)) {
zephir_get_strval(index, index_param);
} else {
ZEPHIR_INIT_VAR(index);
@@ -110,11 +110,11 @@ PHP_METHOD(Phalcon_Mvc_Collection_Document, offsetSet) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &index_param, &value);
- if (unlikely(Z_TYPE_P(index_param) != IS_STRING && Z_TYPE_P(index_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(index_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(index_param) == IS_STRING)) {
zephir_get_strval(index, index_param);
} else {
ZEPHIR_INIT_VAR(index);
@@ -190,11 +190,11 @@ PHP_METHOD(Phalcon_Mvc_Collection_Document, writeAttribute) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &attribute_param, &value);
- if (unlikely(Z_TYPE_P(attribute_param) != IS_STRING && Z_TYPE_P(attribute_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(attribute_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(attribute_param) == IS_STRING)) {
zephir_get_strval(attribute, attribute_param);
} else {
ZEPHIR_INIT_VAR(attribute);
diff --git a/ext/phalcon/mvc/collection/manager.zep.c b/ext/phalcon/mvc/collection/manager.zep.c
index e6cad7b9630..478127cdda6 100644
--- a/ext/phalcon/mvc/collection/manager.zep.c
+++ b/ext/phalcon/mvc/collection/manager.zep.c
@@ -20,7 +20,6 @@
#include "ext/spl/spl_exceptions.h"
#include "kernel/exception.h"
#include "kernel/operators.h"
-#include "kernel/hash.h"
#include "kernel/concat.h"
@@ -239,11 +238,11 @@ PHP_METHOD(Phalcon_Mvc_Collection_Manager, isInitialized) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &modelName_param);
- if (unlikely(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(modelName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(modelName_param) == IS_STRING)) {
zephir_get_strval(modelName, modelName_param);
} else {
ZEPHIR_INIT_VAR(modelName);
@@ -280,11 +279,11 @@ PHP_METHOD(Phalcon_Mvc_Collection_Manager, setConnectionService) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &model, &connectionService_param);
- if (unlikely(Z_TYPE_P(connectionService_param) != IS_STRING && Z_TYPE_P(connectionService_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(connectionService_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(connectionService_param) == IS_STRING)) {
zephir_get_strval(connectionService, connectionService_param);
} else {
ZEPHIR_INIT_VAR(connectionService);
@@ -429,11 +428,11 @@ PHP_METHOD(Phalcon_Mvc_Collection_Manager, notifyEvent) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &eventName_param, &model);
- if (unlikely(Z_TYPE_P(eventName_param) != IS_STRING && Z_TYPE_P(eventName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(eventName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(eventName_param) == IS_STRING)) {
zephir_get_strval(eventName, eventName_param);
} else {
ZEPHIR_INIT_VAR(eventName);
@@ -452,8 +451,8 @@ PHP_METHOD(Phalcon_Mvc_Collection_Manager, notifyEvent) {
if (zephir_array_isset_fetch(&modelsBehaviors, behaviors, _0$$3, 0 TSRMLS_CC)) {
zephir_is_iterable(modelsBehaviors, &_2$$4, &_1$$4, 0, 0, "phalcon/mvc/collection/manager.zep", 289);
for (
- ; zephir_hash_get_current_data_ex(_2$$4, (void**) &_3$$4, &_1$$4) == SUCCESS
- ; zephir_hash_move_forward_ex(_2$$4, &_1$$4)
+ ; zend_hash_get_current_data_ex(_2$$4, (void**) &_3$$4, &_1$$4) == SUCCESS
+ ; zend_hash_move_forward_ex(_2$$4, &_1$$4)
) {
ZEPHIR_GET_HVALUE(behavior, _3$$4);
ZEPHIR_CALL_METHOD(&status, behavior, "notify", NULL, 0, eventName, model);
@@ -510,11 +509,11 @@ PHP_METHOD(Phalcon_Mvc_Collection_Manager, missingMethod) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 3, 0, &model, &eventName_param, &data);
- if (unlikely(Z_TYPE_P(eventName_param) != IS_STRING && Z_TYPE_P(eventName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(eventName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(eventName_param) == IS_STRING)) {
zephir_get_strval(eventName, eventName_param);
} else {
ZEPHIR_INIT_VAR(eventName);
@@ -531,8 +530,8 @@ PHP_METHOD(Phalcon_Mvc_Collection_Manager, missingMethod) {
if (zephir_array_isset_fetch(&modelsBehaviors, behaviors, _0$$3, 0 TSRMLS_CC)) {
zephir_is_iterable(modelsBehaviors, &_2$$4, &_1$$4, 0, 0, "phalcon/mvc/collection/manager.zep", 345);
for (
- ; zephir_hash_get_current_data_ex(_2$$4, (void**) &_3$$4, &_1$$4) == SUCCESS
- ; zephir_hash_move_forward_ex(_2$$4, &_1$$4)
+ ; zend_hash_get_current_data_ex(_2$$4, (void**) &_3$$4, &_1$$4) == SUCCESS
+ ; zend_hash_move_forward_ex(_2$$4, &_1$$4)
) {
ZEPHIR_GET_HVALUE(behavior, _3$$4);
ZEPHIR_CALL_METHOD(&result, behavior, "missingmethod", NULL, 0, model, eventName, data);
diff --git a/ext/phalcon/mvc/dispatcher.zep.c b/ext/phalcon/mvc/dispatcher.zep.c
index 535cb2e47fb..fdc561e59c1 100644
--- a/ext/phalcon/mvc/dispatcher.zep.c
+++ b/ext/phalcon/mvc/dispatcher.zep.c
@@ -67,11 +67,11 @@ PHP_METHOD(Phalcon_Mvc_Dispatcher, setControllerSuffix) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &controllerSuffix_param);
- if (unlikely(Z_TYPE_P(controllerSuffix_param) != IS_STRING && Z_TYPE_P(controllerSuffix_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(controllerSuffix_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(controllerSuffix_param) == IS_STRING)) {
zephir_get_strval(controllerSuffix, controllerSuffix_param);
} else {
ZEPHIR_INIT_VAR(controllerSuffix);
@@ -95,11 +95,11 @@ PHP_METHOD(Phalcon_Mvc_Dispatcher, setDefaultController) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &controllerName_param);
- if (unlikely(Z_TYPE_P(controllerName_param) != IS_STRING && Z_TYPE_P(controllerName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(controllerName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(controllerName_param) == IS_STRING)) {
zephir_get_strval(controllerName, controllerName_param);
} else {
ZEPHIR_INIT_VAR(controllerName);
@@ -123,11 +123,11 @@ PHP_METHOD(Phalcon_Mvc_Dispatcher, setControllerName) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &controllerName_param);
- if (unlikely(Z_TYPE_P(controllerName_param) != IS_STRING && Z_TYPE_P(controllerName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(controllerName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(controllerName_param) == IS_STRING)) {
zephir_get_strval(controllerName, controllerName_param);
} else {
ZEPHIR_INIT_VAR(controllerName);
@@ -196,11 +196,11 @@ PHP_METHOD(Phalcon_Mvc_Dispatcher, _throwDispatchException) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &message_param, &exceptionCode_param);
- if (unlikely(Z_TYPE_P(message_param) != IS_STRING && Z_TYPE_P(message_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(message_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(message_param) == IS_STRING)) {
zephir_get_strval(message, message_param);
} else {
ZEPHIR_INIT_VAR(message);
diff --git a/ext/phalcon/mvc/micro.zep.c b/ext/phalcon/mvc/micro.zep.c
index a18c5d2eae3..0ccd127a1b8 100644
--- a/ext/phalcon/mvc/micro.zep.c
+++ b/ext/phalcon/mvc/micro.zep.c
@@ -18,7 +18,6 @@
#include "kernel/operators.h"
#include "ext/spl/spl_exceptions.h"
#include "kernel/exception.h"
-#include "kernel/hash.h"
#include "kernel/array.h"
#include "kernel/concat.h"
#include "Zend/zend_closures.h"
@@ -153,11 +152,11 @@ PHP_METHOD(Phalcon_Mvc_Micro, map) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &routePattern_param, &handler);
- if (unlikely(Z_TYPE_P(routePattern_param) != IS_STRING && Z_TYPE_P(routePattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(routePattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(routePattern_param) == IS_STRING)) {
zephir_get_strval(routePattern, routePattern_param);
} else {
ZEPHIR_INIT_VAR(routePattern);
@@ -192,11 +191,11 @@ PHP_METHOD(Phalcon_Mvc_Micro, get) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &routePattern_param, &handler);
- if (unlikely(Z_TYPE_P(routePattern_param) != IS_STRING && Z_TYPE_P(routePattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(routePattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(routePattern_param) == IS_STRING)) {
zephir_get_strval(routePattern, routePattern_param);
} else {
ZEPHIR_INIT_VAR(routePattern);
@@ -231,11 +230,11 @@ PHP_METHOD(Phalcon_Mvc_Micro, post) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &routePattern_param, &handler);
- if (unlikely(Z_TYPE_P(routePattern_param) != IS_STRING && Z_TYPE_P(routePattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(routePattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(routePattern_param) == IS_STRING)) {
zephir_get_strval(routePattern, routePattern_param);
} else {
ZEPHIR_INIT_VAR(routePattern);
@@ -270,11 +269,11 @@ PHP_METHOD(Phalcon_Mvc_Micro, put) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &routePattern_param, &handler);
- if (unlikely(Z_TYPE_P(routePattern_param) != IS_STRING && Z_TYPE_P(routePattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(routePattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(routePattern_param) == IS_STRING)) {
zephir_get_strval(routePattern, routePattern_param);
} else {
ZEPHIR_INIT_VAR(routePattern);
@@ -309,11 +308,11 @@ PHP_METHOD(Phalcon_Mvc_Micro, patch) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &routePattern_param, &handler);
- if (unlikely(Z_TYPE_P(routePattern_param) != IS_STRING && Z_TYPE_P(routePattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(routePattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(routePattern_param) == IS_STRING)) {
zephir_get_strval(routePattern, routePattern_param);
} else {
ZEPHIR_INIT_VAR(routePattern);
@@ -348,11 +347,11 @@ PHP_METHOD(Phalcon_Mvc_Micro, head) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &routePattern_param, &handler);
- if (unlikely(Z_TYPE_P(routePattern_param) != IS_STRING && Z_TYPE_P(routePattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(routePattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(routePattern_param) == IS_STRING)) {
zephir_get_strval(routePattern, routePattern_param);
} else {
ZEPHIR_INIT_VAR(routePattern);
@@ -387,11 +386,11 @@ PHP_METHOD(Phalcon_Mvc_Micro, delete) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &routePattern_param, &handler);
- if (unlikely(Z_TYPE_P(routePattern_param) != IS_STRING && Z_TYPE_P(routePattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(routePattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(routePattern_param) == IS_STRING)) {
zephir_get_strval(routePattern, routePattern_param);
} else {
ZEPHIR_INIT_VAR(routePattern);
@@ -426,11 +425,11 @@ PHP_METHOD(Phalcon_Mvc_Micro, options) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &routePattern_param, &handler);
- if (unlikely(Z_TYPE_P(routePattern_param) != IS_STRING && Z_TYPE_P(routePattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(routePattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(routePattern_param) == IS_STRING)) {
zephir_get_strval(routePattern, routePattern_param);
} else {
ZEPHIR_INIT_VAR(routePattern);
@@ -493,8 +492,8 @@ PHP_METHOD(Phalcon_Mvc_Micro, mount) {
zephir_check_call_status();
zephir_is_iterable(handlers, &_2$$5, &_1$$5, 0, 0, "phalcon/mvc/micro.zep", 444);
for (
- ; zephir_hash_get_current_data_ex(_2$$5, (void**) &_3$$5, &_1$$5) == SUCCESS
- ; zephir_hash_move_forward_ex(_2$$5, &_1$$5)
+ ; zend_hash_get_current_data_ex(_2$$5, (void**) &_3$$5, &_1$$5) == SUCCESS
+ ; zend_hash_move_forward_ex(_2$$5, &_1$$5)
) {
ZEPHIR_GET_HVALUE(handler, _3$$5);
if (Z_TYPE_P(handler) != IS_ARRAY) {
@@ -633,11 +632,11 @@ PHP_METHOD(Phalcon_Mvc_Micro, setService) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 1, &serviceName_param, &definition, &shared_param);
- if (unlikely(Z_TYPE_P(serviceName_param) != IS_STRING && Z_TYPE_P(serviceName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(serviceName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(serviceName_param) == IS_STRING)) {
zephir_get_strval(serviceName, serviceName_param);
} else {
ZEPHIR_INIT_VAR(serviceName);
@@ -683,11 +682,11 @@ PHP_METHOD(Phalcon_Mvc_Micro, hasService) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &serviceName_param);
- if (unlikely(Z_TYPE_P(serviceName_param) != IS_STRING && Z_TYPE_P(serviceName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(serviceName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(serviceName_param) == IS_STRING)) {
zephir_get_strval(serviceName, serviceName_param);
} else {
ZEPHIR_INIT_VAR(serviceName);
@@ -725,11 +724,11 @@ PHP_METHOD(Phalcon_Mvc_Micro, getService) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &serviceName_param);
- if (unlikely(Z_TYPE_P(serviceName_param) != IS_STRING && Z_TYPE_P(serviceName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(serviceName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(serviceName_param) == IS_STRING)) {
zephir_get_strval(serviceName, serviceName_param);
} else {
ZEPHIR_INIT_VAR(serviceName);
@@ -791,13 +790,13 @@ PHP_METHOD(Phalcon_Mvc_Micro, getSharedService) {
*/
PHP_METHOD(Phalcon_Mvc_Micro, handle) {
- zval *_58$$59;
+ zval *_59$$59;
zend_class_entry *_20$$20;
HashTable *_11$$12, *_30$$30, *_40$$38, *_51$$49;
HashPosition _10$$12, _29$$30, _39$$38, _50$$49;
zend_bool _18$$7, _26$$7, _23$$24, _32$$31;
int ZEPHIR_LAST_CALL_STATUS;
- zval *uri = NULL, *dependencyInjector = NULL, *eventsManager = NULL, *status = NULL, *router = NULL, *matchedRoute = NULL, *handler = NULL, *beforeHandlers = NULL, *params = NULL, *returnedValue = NULL, *e = NULL, *errorHandler = NULL, *afterHandlers = NULL, *notFoundHandler = NULL, *finishHandlers = NULL, *finish = NULL, *before = NULL, *after = NULL, *response = NULL, *modelBinder = NULL, *bindCacheKey = NULL, *routeName = NULL, *realHandler = NULL, *methodName = NULL, *lazyReturned = NULL, *afterBindingHandlers = NULL, *afterBinding = NULL, *_0$$5 = NULL, *_1$$5, *_2$$4 = NULL, *_3$$4, *_4$$7, *_5$$7 = NULL, *_6$$8, *_7$$8, *_8$$9 = NULL, *_9$$9, **_12$$12, *_13$$15, *_14$$17 = NULL, *_15$$17 = NULL, *_16$$13 = NULL, *_17$$13, *_19$$20 = NULL, *_21$$23 = NULL, *_22$$21 = NULL, *_24$$25, *_25$$25 = NULL, *_27$$28 = NULL, *_28$$28, **_31$$30, *_36$$31 = NULL, *_37$$31, *_33$$32, *_34$$34 = NULL, *_35$$34 = NULL, *_38$$37, **_41$$38, *_42$$41, *_43$$43 = NULL, *_44$$43 = NULL, *_45$$45 = NULL, *_46$$45, *_47$$47, *_48$$47, *_49$$48, **_52$$49, *_53$$52, *_54$$54 = NULL, *_55$$54 = NULL, *_56$$50, *_57$$58, *_59$$67 = NULL, *_60$$67;
+ zval *uri = NULL, *dependencyInjector = NULL, *eventsManager = NULL, *status = NULL, *router = NULL, *matchedRoute = NULL, *handler = NULL, *beforeHandlers = NULL, *params = NULL, *returnedValue = NULL, *e = NULL, *errorHandler = NULL, *afterHandlers = NULL, *notFoundHandler = NULL, *finishHandlers = NULL, *finish = NULL, *before = NULL, *after = NULL, *response = NULL, *modelBinder = NULL, *bindCacheKey = NULL, *routeName = NULL, *realHandler = NULL, *methodName = NULL, *lazyReturned = NULL, *afterBindingHandlers = NULL, *afterBinding = NULL, *_57, *_0$$5 = NULL, *_1$$5, *_2$$4 = NULL, *_3$$4, *_4$$7, *_5$$7 = NULL, *_6$$8, *_7$$8, *_8$$9 = NULL, *_9$$9, **_12$$12, *_13$$15, *_14$$17 = NULL, *_15$$17 = NULL, *_16$$13 = NULL, *_17$$13, *_19$$20 = NULL, *_21$$23 = NULL, *_22$$21 = NULL, *_24$$25, *_25$$25 = NULL, *_27$$28 = NULL, *_28$$28, **_31$$30, *_36$$31 = NULL, *_37$$31, *_33$$32, *_34$$34 = NULL, *_35$$34 = NULL, *_38$$37, **_41$$38, *_42$$41, *_43$$43 = NULL, *_44$$43 = NULL, *_45$$45 = NULL, *_46$$45, *_47$$47, *_48$$47, *_49$$48, **_52$$49, *_53$$52, *_54$$54 = NULL, *_55$$54 = NULL, *_56$$50, *_58$$58, *_60$$67 = NULL, *_61$$67;
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 0, 1, &uri);
@@ -885,8 +884,8 @@ PHP_METHOD(Phalcon_Mvc_Micro, handle) {
}
zephir_is_iterable(beforeHandlers, &_11$$12, &_10$$12, 0, 0, "phalcon/mvc/micro.zep", 696);
for (
- ; zephir_hash_get_current_data_ex(_11$$12, (void**) &_12$$12, &_10$$12) == SUCCESS
- ; zephir_hash_move_forward_ex(_11$$12, &_10$$12)
+ ; zend_hash_get_current_data_ex(_11$$12, (void**) &_12$$12, &_10$$12) == SUCCESS
+ ; zend_hash_move_forward_ex(_11$$12, &_10$$12)
) {
ZEPHIR_GET_HVALUE(before, _12$$12);
if (Z_TYPE_P(before) == IS_OBJECT) {
@@ -1007,8 +1006,8 @@ PHP_METHOD(Phalcon_Mvc_Micro, handle) {
}
zephir_is_iterable(afterBindingHandlers, &_30$$30, &_29$$30, 0, 0, "phalcon/mvc/micro.zep", 801);
for (
- ; zephir_hash_get_current_data_ex(_30$$30, (void**) &_31$$30, &_29$$30) == SUCCESS
- ; zephir_hash_move_forward_ex(_30$$30, &_29$$30)
+ ; zend_hash_get_current_data_ex(_30$$30, (void**) &_31$$30, &_29$$30) == SUCCESS
+ ; zend_hash_move_forward_ex(_30$$30, &_29$$30)
) {
ZEPHIR_GET_HVALUE(afterBinding, _31$$30);
_32$$31 = Z_TYPE_P(afterBinding) == IS_OBJECT;
@@ -1066,8 +1065,8 @@ PHP_METHOD(Phalcon_Mvc_Micro, handle) {
}
zephir_is_iterable(afterHandlers, &_40$$38, &_39$$38, 0, 0, "phalcon/mvc/micro.zep", 850);
for (
- ; zephir_hash_get_current_data_ex(_40$$38, (void**) &_41$$38, &_39$$38) == SUCCESS
- ; zephir_hash_move_forward_ex(_40$$38, &_39$$38)
+ ; zend_hash_get_current_data_ex(_40$$38, (void**) &_41$$38, &_39$$38) == SUCCESS
+ ; zend_hash_move_forward_ex(_40$$38, &_39$$38)
) {
ZEPHIR_GET_HVALUE(after, _41$$38);
if (Z_TYPE_P(after) == IS_OBJECT) {
@@ -1148,8 +1147,8 @@ PHP_METHOD(Phalcon_Mvc_Micro, handle) {
ZVAL_NULL(params);
zephir_is_iterable(finishHandlers, &_51$$49, &_50$$49, 0, 0, "phalcon/mvc/micro.zep", 940);
for (
- ; zephir_hash_get_current_data_ex(_51$$49, (void**) &_52$$49, &_50$$49) == SUCCESS
- ; zephir_hash_move_forward_ex(_51$$49, &_50$$49)
+ ; zend_hash_get_current_data_ex(_51$$49, (void**) &_52$$49, &_50$$49) == SUCCESS
+ ; zend_hash_move_forward_ex(_51$$49, &_50$$49)
) {
ZEPHIR_GET_HVALUE(finish, _52$$49);
if (Z_TYPE_P(finish) == IS_OBJECT) {
@@ -1193,16 +1192,18 @@ PHP_METHOD(Phalcon_Mvc_Micro, handle) {
try_end_1:
if (EG(exception)) {
- ZEPHIR_CPY_WRT(e, EG(exception));
- if (zephir_instance_of_ev(e, zend_exception_get_default(TSRMLS_C) TSRMLS_CC)) {
+ ZEPHIR_INIT_VAR(_57);
+ ZEPHIR_CPY_WRT(_57, EG(exception));
+ if (zephir_instance_of_ev(_57, zend_exception_get_default(TSRMLS_C) TSRMLS_CC)) {
zend_clear_exception(TSRMLS_C);
+ ZEPHIR_CPY_WRT(e, _57);
ZEPHIR_OBS_NVAR(eventsManager);
zephir_read_property_this(&eventsManager, this_ptr, SL("_eventsManager"), PH_NOISY_CC);
if (Z_TYPE_P(eventsManager) == IS_OBJECT) {
- ZEPHIR_INIT_VAR(_57$$58);
- ZVAL_STRING(_57$$58, "micro:beforeException", ZEPHIR_TEMP_PARAM_COPY);
- ZEPHIR_CALL_METHOD(&returnedValue, eventsManager, "fire", NULL, 0, _57$$58, this_ptr, e);
- zephir_check_temp_parameter(_57$$58);
+ ZEPHIR_INIT_VAR(_58$$58);
+ ZVAL_STRING(_58$$58, "micro:beforeException", ZEPHIR_TEMP_PARAM_COPY);
+ ZEPHIR_CALL_METHOD(&returnedValue, eventsManager, "fire", NULL, 0, _58$$58, this_ptr, e);
+ zephir_check_temp_parameter(_58$$58);
zephir_check_call_status();
}
ZEPHIR_OBS_VAR(errorHandler);
@@ -1212,11 +1213,11 @@ PHP_METHOD(Phalcon_Mvc_Micro, handle) {
ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_micro_exception_ce, "Error handler is not callable", "phalcon/mvc/micro.zep", 959);
return;
}
- ZEPHIR_INIT_VAR(_58$$59);
- zephir_create_array(_58$$59, 1, 0 TSRMLS_CC);
- zephir_array_fast_append(_58$$59, e);
+ ZEPHIR_INIT_VAR(_59$$59);
+ zephir_create_array(_59$$59, 1, 0 TSRMLS_CC);
+ zephir_array_fast_append(_59$$59, e);
ZEPHIR_INIT_NVAR(returnedValue);
- ZEPHIR_CALL_USER_FUNC_ARRAY(returnedValue, errorHandler, _58$$59);
+ ZEPHIR_CALL_USER_FUNC_ARRAY(returnedValue, errorHandler, _59$$59);
zephir_check_call_status();
if (Z_TYPE_P(returnedValue) == IS_OBJECT) {
if (!(zephir_instance_of_ev(returnedValue, phalcon_http_responseinterface_ce TSRMLS_CC))) {
@@ -1241,12 +1242,12 @@ PHP_METHOD(Phalcon_Mvc_Micro, handle) {
}
}
if (Z_TYPE_P(returnedValue) == IS_STRING) {
- ZEPHIR_INIT_VAR(_60$$67);
- ZVAL_STRING(_60$$67, "response", ZEPHIR_TEMP_PARAM_COPY);
- ZEPHIR_CALL_METHOD(&_59$$67, dependencyInjector, "getshared", NULL, 0, _60$$67);
- zephir_check_temp_parameter(_60$$67);
+ ZEPHIR_INIT_VAR(_61$$67);
+ ZVAL_STRING(_61$$67, "response", ZEPHIR_TEMP_PARAM_COPY);
+ ZEPHIR_CALL_METHOD(&_60$$67, dependencyInjector, "getshared", NULL, 0, _61$$67);
+ zephir_check_temp_parameter(_61$$67);
zephir_check_call_status();
- ZEPHIR_CPY_WRT(response, _59$$67);
+ ZEPHIR_CPY_WRT(response, _60$$67);
ZEPHIR_CALL_METHOD(NULL, response, "setcontent", NULL, 0, returnedValue);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(NULL, response, "send", NULL, 0);
diff --git a/ext/phalcon/mvc/micro/collection.zep.c b/ext/phalcon/mvc/micro/collection.zep.c
index 0fb3f0fa847..c109c42ac95 100644
--- a/ext/phalcon/mvc/micro/collection.zep.c
+++ b/ext/phalcon/mvc/micro/collection.zep.c
@@ -74,11 +74,11 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, _addMap) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 4, 0, &method_param, &routePattern, &handler, &name);
- if (unlikely(Z_TYPE_P(method_param) != IS_STRING && Z_TYPE_P(method_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(method_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(method_param) == IS_STRING)) {
zephir_get_strval(method, method_param);
} else {
ZEPHIR_INIT_VAR(method);
@@ -108,11 +108,11 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, setPrefix) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &prefix_param);
- if (unlikely(Z_TYPE_P(prefix_param) != IS_STRING && Z_TYPE_P(prefix_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(prefix_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(prefix_param) == IS_STRING)) {
zephir_get_strval(prefix, prefix_param);
} else {
ZEPHIR_INIT_VAR(prefix);
@@ -190,7 +190,7 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, setLazy) {
zephir_fetch_params(0, 1, 0, &lazy_param);
- if (unlikely(Z_TYPE_P(lazy_param) != IS_BOOL)) {
+ if (UNEXPECTED(Z_TYPE_P(lazy_param) != IS_BOOL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'lazy' must be a bool") TSRMLS_CC);
RETURN_NULL();
}
@@ -247,11 +247,11 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, map) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 1, &routePattern_param, &handler, &name);
- if (unlikely(Z_TYPE_P(routePattern_param) != IS_STRING && Z_TYPE_P(routePattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(routePattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(routePattern_param) == IS_STRING)) {
zephir_get_strval(routePattern, routePattern_param);
} else {
ZEPHIR_INIT_VAR(routePattern);
@@ -287,11 +287,11 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, get) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 1, &routePattern_param, &handler, &name);
- if (unlikely(Z_TYPE_P(routePattern_param) != IS_STRING && Z_TYPE_P(routePattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(routePattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(routePattern_param) == IS_STRING)) {
zephir_get_strval(routePattern, routePattern_param);
} else {
ZEPHIR_INIT_VAR(routePattern);
@@ -328,11 +328,11 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, post) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 1, &routePattern_param, &handler, &name);
- if (unlikely(Z_TYPE_P(routePattern_param) != IS_STRING && Z_TYPE_P(routePattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(routePattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(routePattern_param) == IS_STRING)) {
zephir_get_strval(routePattern, routePattern_param);
} else {
ZEPHIR_INIT_VAR(routePattern);
@@ -369,11 +369,11 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, put) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 1, &routePattern_param, &handler, &name);
- if (unlikely(Z_TYPE_P(routePattern_param) != IS_STRING && Z_TYPE_P(routePattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(routePattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(routePattern_param) == IS_STRING)) {
zephir_get_strval(routePattern, routePattern_param);
} else {
ZEPHIR_INIT_VAR(routePattern);
@@ -410,11 +410,11 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, patch) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 1, &routePattern_param, &handler, &name);
- if (unlikely(Z_TYPE_P(routePattern_param) != IS_STRING && Z_TYPE_P(routePattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(routePattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(routePattern_param) == IS_STRING)) {
zephir_get_strval(routePattern, routePattern_param);
} else {
ZEPHIR_INIT_VAR(routePattern);
@@ -451,11 +451,11 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, head) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 1, &routePattern_param, &handler, &name);
- if (unlikely(Z_TYPE_P(routePattern_param) != IS_STRING && Z_TYPE_P(routePattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(routePattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(routePattern_param) == IS_STRING)) {
zephir_get_strval(routePattern, routePattern_param);
} else {
ZEPHIR_INIT_VAR(routePattern);
@@ -492,11 +492,11 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, delete) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 1, &routePattern_param, &handler, &name);
- if (unlikely(Z_TYPE_P(routePattern_param) != IS_STRING && Z_TYPE_P(routePattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(routePattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(routePattern_param) == IS_STRING)) {
zephir_get_strval(routePattern, routePattern_param);
} else {
ZEPHIR_INIT_VAR(routePattern);
@@ -532,11 +532,11 @@ PHP_METHOD(Phalcon_Mvc_Micro_Collection, options) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 1, &routePattern_param, &handler, &name);
- if (unlikely(Z_TYPE_P(routePattern_param) != IS_STRING && Z_TYPE_P(routePattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(routePattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(routePattern_param) == IS_STRING)) {
zephir_get_strval(routePattern, routePattern_param);
} else {
ZEPHIR_INIT_VAR(routePattern);
diff --git a/ext/phalcon/mvc/micro/lazyloader.zep.c b/ext/phalcon/mvc/micro/lazyloader.zep.c
index 165c0376a0b..b5e31bc1345 100644
--- a/ext/phalcon/mvc/micro/lazyloader.zep.c
+++ b/ext/phalcon/mvc/micro/lazyloader.zep.c
@@ -60,11 +60,11 @@ PHP_METHOD(Phalcon_Mvc_Micro_LazyLoader, __construct) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &definition_param);
- if (unlikely(Z_TYPE_P(definition_param) != IS_STRING && Z_TYPE_P(definition_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(definition_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(definition_param) == IS_STRING)) {
zephir_get_strval(definition, definition_param);
} else {
ZEPHIR_INIT_VAR(definition);
@@ -95,11 +95,11 @@ PHP_METHOD(Phalcon_Mvc_Micro_LazyLoader, __call) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &method_param, &arguments);
- if (unlikely(Z_TYPE_P(method_param) != IS_STRING && Z_TYPE_P(method_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(method_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(method_param) == IS_STRING)) {
zephir_get_strval(method, method_param);
} else {
ZEPHIR_INIT_VAR(method);
@@ -158,11 +158,11 @@ PHP_METHOD(Phalcon_Mvc_Micro_LazyLoader, callMethod) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 1, &method_param, &arguments, &modelBinder);
- if (unlikely(Z_TYPE_P(method_param) != IS_STRING && Z_TYPE_P(method_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(method_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(method_param) == IS_STRING)) {
zephir_get_strval(method, method_param);
} else {
ZEPHIR_INIT_VAR(method);
diff --git a/ext/phalcon/mvc/model.zep.c b/ext/phalcon/mvc/model.zep.c
index dc4d99b5857..2282c349547 100644
--- a/ext/phalcon/mvc/model.zep.c
+++ b/ext/phalcon/mvc/model.zep.c
@@ -18,7 +18,6 @@
#include "kernel/memory.h"
#include "ext/spl/spl_exceptions.h"
#include "kernel/operators.h"
-#include "kernel/hash.h"
#include "kernel/array.h"
#include "kernel/concat.h"
#include "kernel/string.h"
@@ -346,11 +345,11 @@ PHP_METHOD(Phalcon_Mvc_Model, setSource) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &source_param);
- if (unlikely(Z_TYPE_P(source_param) != IS_STRING && Z_TYPE_P(source_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(source_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(source_param) == IS_STRING)) {
zephir_get_strval(source, source_param);
} else {
ZEPHIR_INIT_VAR(source);
@@ -394,11 +393,11 @@ PHP_METHOD(Phalcon_Mvc_Model, setSchema) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &schema_param);
- if (unlikely(Z_TYPE_P(schema_param) != IS_STRING && Z_TYPE_P(schema_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(schema_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(schema_param) == IS_STRING)) {
zephir_get_strval(schema, schema_param);
} else {
ZEPHIR_INIT_VAR(schema);
@@ -442,11 +441,11 @@ PHP_METHOD(Phalcon_Mvc_Model, setConnectionService) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &connectionService_param);
- if (unlikely(Z_TYPE_P(connectionService_param) != IS_STRING && Z_TYPE_P(connectionService_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(connectionService_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(connectionService_param) == IS_STRING)) {
zephir_get_strval(connectionService, connectionService_param);
} else {
ZEPHIR_INIT_VAR(connectionService);
@@ -473,11 +472,11 @@ PHP_METHOD(Phalcon_Mvc_Model, setReadConnectionService) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &connectionService_param);
- if (unlikely(Z_TYPE_P(connectionService_param) != IS_STRING && Z_TYPE_P(connectionService_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(connectionService_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(connectionService_param) == IS_STRING)) {
zephir_get_strval(connectionService, connectionService_param);
} else {
ZEPHIR_INIT_VAR(connectionService);
@@ -504,11 +503,11 @@ PHP_METHOD(Phalcon_Mvc_Model, setWriteConnectionService) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &connectionService_param);
- if (unlikely(Z_TYPE_P(connectionService_param) != IS_STRING && Z_TYPE_P(connectionService_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(connectionService_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(connectionService_param) == IS_STRING)) {
zephir_get_strval(connectionService, connectionService_param);
} else {
ZEPHIR_INIT_VAR(connectionService);
@@ -700,8 +699,8 @@ PHP_METHOD(Phalcon_Mvc_Model, assign) {
array_init(dataMapped);
zephir_is_iterable(data, &_1$$3, &_0$$3, 0, 0, "phalcon/mvc/model.zep", 465);
for (
- ; zephir_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_1$$3, &_0$$3)
+ ; zend_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_1$$3, &_0$$3)
) {
ZEPHIR_GET_HMKEY(key, _1$$3, _0$$3);
ZEPHIR_GET_HVALUE(value, _2$$3);
@@ -729,8 +728,8 @@ PHP_METHOD(Phalcon_Mvc_Model, assign) {
zephir_check_call_status();
zephir_is_iterable(_3, &_5, &_4, 0, 0, "phalcon/mvc/model.zep", 514);
for (
- ; zephir_hash_get_current_data_ex(_5, (void**) &_6, &_4) == SUCCESS
- ; zephir_hash_move_forward_ex(_5, &_4)
+ ; zend_hash_get_current_data_ex(_5, (void**) &_6, &_4) == SUCCESS
+ ; zend_hash_move_forward_ex(_5, &_4)
) {
ZEPHIR_GET_HVALUE(attribute, _6);
if (Z_TYPE_P(columnMap) == IS_ARRAY) {
@@ -827,8 +826,8 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMap) {
zephir_check_call_status();
zephir_is_iterable(data, &_2, &_1, 0, 0, "phalcon/mvc/model.zep", 616);
for (
- ; zephir_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
- ; zephir_hash_move_forward_ex(_2, &_1)
+ ; zend_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
+ ; zend_hash_move_forward_ex(_2, &_1)
) {
ZEPHIR_GET_HMKEY(key, _2, _1);
ZEPHIR_GET_HVALUE(value, _3);
@@ -956,8 +955,8 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResultMapHydrate) {
}
zephir_is_iterable(data, &_1, &_0, 0, 0, "phalcon/mvc/model.zep", 701);
for (
- ; zephir_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
- ; zephir_hash_move_forward_ex(_1, &_0)
+ ; zend_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
+ ; zend_hash_move_forward_ex(_1, &_0)
) {
ZEPHIR_GET_HMKEY(key, _1, _0);
ZEPHIR_GET_HVALUE(value, _2);
@@ -1055,8 +1054,8 @@ PHP_METHOD(Phalcon_Mvc_Model, cloneResult) {
zephir_check_call_status();
zephir_is_iterable(data, &_2, &_1, 0, 0, "phalcon/mvc/model.zep", 751);
for (
- ; zephir_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
- ; zephir_hash_move_forward_ex(_2, &_1)
+ ; zend_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
+ ; zend_hash_move_forward_ex(_2, &_1)
) {
ZEPHIR_GET_HMKEY(key, _2, _1);
ZEPHIR_GET_HVALUE(value, _3);
@@ -1404,8 +1403,8 @@ PHP_METHOD(Phalcon_Mvc_Model, _exists) {
array_init(uniqueTypes);
zephir_is_iterable(primaryKeys, &_1$$3, &_0$$3, 0, 0, "phalcon/mvc/model.zep", 1074);
for (
- ; zephir_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_1$$3, &_0$$3)
+ ; zend_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_1$$3, &_0$$3)
) {
ZEPHIR_GET_HVALUE(field, _2$$3);
if (Z_TYPE_P(columnMap) == IS_ARRAY) {
@@ -1538,21 +1537,21 @@ PHP_METHOD(Phalcon_Mvc_Model, _groupResult) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 3, 0, &functionName_param, &alias_param, ¶meters);
- if (unlikely(Z_TYPE_P(functionName_param) != IS_STRING && Z_TYPE_P(functionName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(functionName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(functionName_param) == IS_STRING)) {
zephir_get_strval(functionName, functionName_param);
} else {
ZEPHIR_INIT_VAR(functionName);
ZVAL_EMPTY_STRING(functionName);
}
- if (unlikely(Z_TYPE_P(alias_param) != IS_STRING && Z_TYPE_P(alias_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(alias_param) != IS_STRING && Z_TYPE_P(alias_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'alias' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(alias_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(alias_param) == IS_STRING)) {
zephir_get_strval(alias, alias_param);
} else {
ZEPHIR_INIT_VAR(alias);
@@ -1898,11 +1897,11 @@ PHP_METHOD(Phalcon_Mvc_Model, fireEvent) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &eventName_param);
- if (unlikely(Z_TYPE_P(eventName_param) != IS_STRING && Z_TYPE_P(eventName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(eventName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(eventName_param) == IS_STRING)) {
zephir_get_strval(eventName, eventName_param);
} else {
ZEPHIR_INIT_VAR(eventName);
@@ -1934,11 +1933,11 @@ PHP_METHOD(Phalcon_Mvc_Model, fireEventCancel) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &eventName_param);
- if (unlikely(Z_TYPE_P(eventName_param) != IS_STRING && Z_TYPE_P(eventName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(eventName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(eventName_param) == IS_STRING)) {
zephir_get_strval(eventName, eventName_param);
} else {
ZEPHIR_INIT_VAR(eventName);
@@ -2202,8 +2201,8 @@ PHP_METHOD(Phalcon_Mvc_Model, getMessages) {
_1$$3 = zephir_fetch_nproperty_this(this_ptr, SL("_errorMessages"), PH_NOISY_CC);
zephir_is_iterable(_1$$3, &_3$$3, &_2$$3, 0, 0, "phalcon/mvc/model.zep", 1594);
for (
- ; zephir_hash_get_current_data_ex(_3$$3, (void**) &_4$$3, &_2$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_3$$3, &_2$$3)
+ ; zend_hash_get_current_data_ex(_3$$3, (void**) &_4$$3, &_2$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_3$$3, &_2$$3)
) {
ZEPHIR_GET_HVALUE(message, _4$$3);
ZEPHIR_CALL_METHOD(&_5$$4, message, "getfield", NULL, 0);
@@ -2241,8 +2240,8 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysRestrict) {
error = 0;
zephir_is_iterable(belongsTo, &_2, &_1, 0, 0, "phalcon/mvc/model.zep", 1739);
for (
- ; zephir_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
- ; zephir_hash_move_forward_ex(_2, &_1)
+ ; zend_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
+ ; zend_hash_move_forward_ex(_2, &_1)
) {
ZEPHIR_GET_HVALUE(relation, _3);
validateWithNulls = 0;
@@ -2278,8 +2277,8 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysRestrict) {
if (Z_TYPE_P(fields) == IS_ARRAY) {
zephir_is_iterable(fields, &_8$$8, &_7$$8, 0, 0, "phalcon/mvc/model.zep", 1679);
for (
- ; zephir_hash_get_current_data_ex(_8$$8, (void**) &_9$$8, &_7$$8) == SUCCESS
- ; zephir_hash_move_forward_ex(_8$$8, &_7$$8)
+ ; zend_hash_get_current_data_ex(_8$$8, (void**) &_9$$8, &_7$$8) == SUCCESS
+ ; zend_hash_move_forward_ex(_8$$8, &_7$$8)
) {
ZEPHIR_GET_HMKEY(position, _8$$8, _7$$8);
ZEPHIR_GET_HVALUE(field, _9$$8);
@@ -2391,8 +2390,8 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseCascade) {
zephir_check_call_status();
zephir_is_iterable(relations, &_2, &_1, 0, 0, "phalcon/mvc/model.zep", 1852);
for (
- ; zephir_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
- ; zephir_hash_move_forward_ex(_2, &_1)
+ ; zend_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
+ ; zend_hash_move_forward_ex(_2, &_1)
) {
ZEPHIR_GET_HVALUE(relation, _3);
ZEPHIR_CALL_METHOD(&foreignKey, relation, "getforeignkey", NULL, 0);
@@ -2426,8 +2425,8 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseCascade) {
if (Z_TYPE_P(fields) == IS_ARRAY) {
zephir_is_iterable(fields, &_8$$8, &_7$$8, 0, 0, "phalcon/mvc/model.zep", 1821);
for (
- ; zephir_hash_get_current_data_ex(_8$$8, (void**) &_9$$8, &_7$$8) == SUCCESS
- ; zephir_hash_move_forward_ex(_8$$8, &_7$$8)
+ ; zend_hash_get_current_data_ex(_8$$8, (void**) &_9$$8, &_7$$8) == SUCCESS
+ ; zend_hash_move_forward_ex(_8$$8, &_7$$8)
) {
ZEPHIR_GET_HMKEY(position, _8$$8, _7$$8);
ZEPHIR_GET_HVALUE(field, _9$$8);
@@ -2491,8 +2490,8 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseRestrict) {
error = 0;
zephir_is_iterable(relations, &_2, &_1, 0, 0, "phalcon/mvc/model.zep", 1970);
for (
- ; zephir_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
- ; zephir_hash_move_forward_ex(_2, &_1)
+ ; zend_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
+ ; zend_hash_move_forward_ex(_2, &_1)
) {
ZEPHIR_GET_HVALUE(relation, _3);
ZEPHIR_CALL_METHOD(&foreignKey, relation, "getforeignkey", NULL, 0);
@@ -2526,8 +2525,8 @@ PHP_METHOD(Phalcon_Mvc_Model, _checkForeignKeysReverseRestrict) {
if (Z_TYPE_P(fields) == IS_ARRAY) {
zephir_is_iterable(fields, &_7$$8, &_6$$8, 0, 0, "phalcon/mvc/model.zep", 1932);
for (
- ; zephir_hash_get_current_data_ex(_7$$8, (void**) &_8$$8, &_6$$8) == SUCCESS
- ; zephir_hash_move_forward_ex(_7$$8, &_6$$8)
+ ; zend_hash_get_current_data_ex(_7$$8, (void**) &_8$$8, &_6$$8) == SUCCESS
+ ; zend_hash_move_forward_ex(_7$$8, &_6$$8)
) {
ZEPHIR_GET_HMKEY(position, _7$$8, _6$$8);
ZEPHIR_GET_HVALUE(field, _8$$8);
@@ -2675,8 +2674,8 @@ PHP_METHOD(Phalcon_Mvc_Model, _preSave) {
error = 0;
zephir_is_iterable(notNull, &_9$$12, &_8$$12, 0, 0, "phalcon/mvc/model.zep", 2136);
for (
- ; zephir_hash_get_current_data_ex(_9$$12, (void**) &_10$$12, &_8$$12) == SUCCESS
- ; zephir_hash_move_forward_ex(_9$$12, &_8$$12)
+ ; zend_hash_get_current_data_ex(_9$$12, (void**) &_10$$12, &_8$$12) == SUCCESS
+ ; zend_hash_move_forward_ex(_9$$12, &_8$$12)
) {
ZEPHIR_GET_HVALUE(field, _10$$12);
if (!(zephir_array_isset(automaticAttributes, field))) {
@@ -2941,8 +2940,8 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowInsert) {
}
zephir_is_iterable(attributes, &_2, &_1, 0, 0, "phalcon/mvc/model.zep", 2329);
for (
- ; zephir_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
- ; zephir_hash_move_forward_ex(_2, &_1)
+ ; zend_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
+ ; zend_hash_move_forward_ex(_2, &_1)
) {
ZEPHIR_GET_HVALUE(field, _3);
if (!(zephir_array_isset(automaticAttributes, field))) {
@@ -3175,8 +3174,8 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowUpdate) {
}
zephir_is_iterable(nonPrimary, &_3, &_2, 0, 0, "phalcon/mvc/model.zep", 2598);
for (
- ; zephir_hash_get_current_data_ex(_3, (void**) &_4, &_2) == SUCCESS
- ; zephir_hash_move_forward_ex(_3, &_2)
+ ; zend_hash_get_current_data_ex(_3, (void**) &_4, &_2) == SUCCESS
+ ; zend_hash_move_forward_ex(_3, &_2)
) {
ZEPHIR_GET_HVALUE(field, _4);
if (!(zephir_array_isset(automaticAttributes, field))) {
@@ -3301,8 +3300,8 @@ PHP_METHOD(Phalcon_Mvc_Model, _doLowUpdate) {
array_init(uniqueParams);
zephir_is_iterable(primaryKeys, &_18$$31, &_17$$31, 0, 0, "phalcon/mvc/model.zep", 2642);
for (
- ; zephir_hash_get_current_data_ex(_18$$31, (void**) &_19$$31, &_17$$31) == SUCCESS
- ; zephir_hash_move_forward_ex(_18$$31, &_17$$31)
+ ; zend_hash_get_current_data_ex(_18$$31, (void**) &_19$$31, &_17$$31) == SUCCESS
+ ; zend_hash_move_forward_ex(_18$$31, &_17$$31)
) {
ZEPHIR_GET_HVALUE(field, _19$$31);
if (Z_TYPE_P(columnMap) == IS_ARRAY) {
@@ -3397,8 +3396,8 @@ PHP_METHOD(Phalcon_Mvc_Model, _preSaveRelatedRecords) {
ZEPHIR_CPY_WRT(manager, _1);
zephir_is_iterable(related, &_3, &_2, 0, 0, "phalcon/mvc/model.zep", 2758);
for (
- ; zephir_hash_get_current_data_ex(_3, (void**) &_4, &_2) == SUCCESS
- ; zephir_hash_move_forward_ex(_3, &_2)
+ ; zend_hash_get_current_data_ex(_3, (void**) &_4, &_2) == SUCCESS
+ ; zend_hash_move_forward_ex(_3, &_2)
) {
ZEPHIR_GET_HMKEY(name, _3, _2);
ZEPHIR_GET_HVALUE(record, _4);
@@ -3446,8 +3445,8 @@ PHP_METHOD(Phalcon_Mvc_Model, _preSaveRelatedRecords) {
zephir_check_call_status();
zephir_is_iterable(_12$$8, &_14$$8, &_13$$8, 0, 0, "phalcon/mvc/model.zep", 2745);
for (
- ; zephir_hash_get_current_data_ex(_14$$8, (void**) &_15$$8, &_13$$8) == SUCCESS
- ; zephir_hash_move_forward_ex(_14$$8, &_13$$8)
+ ; zend_hash_get_current_data_ex(_14$$8, (void**) &_15$$8, &_13$$8) == SUCCESS
+ ; zend_hash_move_forward_ex(_14$$8, &_13$$8)
) {
ZEPHIR_GET_HVALUE(message, _15$$8);
if (Z_TYPE_P(message) == IS_OBJECT) {
@@ -3506,8 +3505,8 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) {
ZEPHIR_CPY_WRT(manager, _0);
zephir_is_iterable(related, &_2, &_1, 0, 0, "phalcon/mvc/model.zep", 2949);
for (
- ; zephir_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
- ; zephir_hash_move_forward_ex(_2, &_1)
+ ; zend_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
+ ; zend_hash_move_forward_ex(_2, &_1)
) {
ZEPHIR_GET_HMKEY(name, _2, _1);
ZEPHIR_GET_HVALUE(record, _3);
@@ -3594,8 +3593,8 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) {
}
zephir_is_iterable(relatedRecords, &_19$$4, &_18$$4, 0, 0, "phalcon/mvc/model.zep", 2935);
for (
- ; zephir_hash_get_current_data_ex(_19$$4, (void**) &_20$$4, &_18$$4) == SUCCESS
- ; zephir_hash_move_forward_ex(_19$$4, &_18$$4)
+ ; zend_hash_get_current_data_ex(_19$$4, (void**) &_20$$4, &_18$$4) == SUCCESS
+ ; zend_hash_move_forward_ex(_19$$4, &_18$$4)
) {
ZEPHIR_GET_HVALUE(recordAfter, _20$$4);
if (!(isThrough)) {
@@ -3609,8 +3608,8 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) {
zephir_check_call_status();
zephir_is_iterable(_22$$14, &_24$$14, &_23$$14, 0, 0, "phalcon/mvc/model.zep", 2877);
for (
- ; zephir_hash_get_current_data_ex(_24$$14, (void**) &_25$$14, &_23$$14) == SUCCESS
- ; zephir_hash_move_forward_ex(_24$$14, &_23$$14)
+ ; zend_hash_get_current_data_ex(_24$$14, (void**) &_25$$14, &_23$$14) == SUCCESS
+ ; zend_hash_move_forward_ex(_24$$14, &_23$$14)
) {
ZEPHIR_GET_HVALUE(message, _25$$14);
if (Z_TYPE_P(message) == IS_OBJECT) {
@@ -3648,8 +3647,8 @@ PHP_METHOD(Phalcon_Mvc_Model, _postSaveRelatedRecords) {
zephir_check_call_status();
zephir_is_iterable(_32$$18, &_34$$18, &_33$$18, 0, 0, "phalcon/mvc/model.zep", 2929);
for (
- ; zephir_hash_get_current_data_ex(_34$$18, (void**) &_35$$18, &_33$$18) == SUCCESS
- ; zephir_hash_move_forward_ex(_34$$18, &_33$$18)
+ ; zend_hash_get_current_data_ex(_34$$18, (void**) &_35$$18, &_33$$18) == SUCCESS
+ ; zend_hash_move_forward_ex(_34$$18, &_33$$18)
) {
ZEPHIR_GET_HVALUE(message, _35$$18);
if (Z_TYPE_P(message) == IS_OBJECT) {
@@ -4073,8 +4072,8 @@ PHP_METHOD(Phalcon_Mvc_Model, delete) {
}
zephir_is_iterable(primaryKeys, &_4, &_3, 0, 0, "phalcon/mvc/model.zep", 3307);
for (
- ; zephir_hash_get_current_data_ex(_4, (void**) &_5, &_3) == SUCCESS
- ; zephir_hash_move_forward_ex(_4, &_3)
+ ; zend_hash_get_current_data_ex(_4, (void**) &_5, &_3) == SUCCESS
+ ; zend_hash_move_forward_ex(_4, &_3)
) {
ZEPHIR_GET_HVALUE(primaryKey, _5);
ZEPHIR_OBS_NVAR(bindType);
@@ -4256,8 +4255,8 @@ PHP_METHOD(Phalcon_Mvc_Model, refresh) {
zephir_check_call_status();
zephir_is_iterable(_3, &_5, &_4, 0, 0, "phalcon/mvc/model.zep", 3427);
for (
- ; zephir_hash_get_current_data_ex(_5, (void**) &_6, &_4) == SUCCESS
- ; zephir_hash_move_forward_ex(_5, &_4)
+ ; zend_hash_get_current_data_ex(_5, (void**) &_6, &_4) == SUCCESS
+ ; zend_hash_move_forward_ex(_5, &_4)
) {
ZEPHIR_GET_HVALUE(attribute, _6);
ZEPHIR_INIT_NVAR(_7$$9);
@@ -4333,11 +4332,11 @@ PHP_METHOD(Phalcon_Mvc_Model, readAttribute) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &attribute_param);
- if (unlikely(Z_TYPE_P(attribute_param) != IS_STRING && Z_TYPE_P(attribute_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(attribute_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(attribute_param) == IS_STRING)) {
zephir_get_strval(attribute, attribute_param);
} else {
ZEPHIR_INIT_VAR(attribute);
@@ -4369,11 +4368,11 @@ PHP_METHOD(Phalcon_Mvc_Model, writeAttribute) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &attribute_param, &value);
- if (unlikely(Z_TYPE_P(attribute_param) != IS_STRING && Z_TYPE_P(attribute_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(attribute_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(attribute_param) == IS_STRING)) {
zephir_get_strval(attribute, attribute_param);
} else {
ZEPHIR_INIT_VAR(attribute);
@@ -4464,8 +4463,8 @@ PHP_METHOD(Phalcon_Mvc_Model, skipAttributesOnCreate) {
array_init(keysAttributes);
zephir_is_iterable(attributes, &_1, &_0, 0, 0, "phalcon/mvc/model.zep", 3541);
for (
- ; zephir_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
- ; zephir_hash_move_forward_ex(_1, &_0)
+ ; zend_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
+ ; zend_hash_move_forward_ex(_1, &_0)
) {
ZEPHIR_GET_HVALUE(attribute, _2);
zephir_array_update_zval(&keysAttributes, attribute, &ZEPHIR_GLOBAL(global_null), PH_COPY | PH_SEPARATE);
@@ -4516,8 +4515,8 @@ PHP_METHOD(Phalcon_Mvc_Model, skipAttributesOnUpdate) {
array_init(keysAttributes);
zephir_is_iterable(attributes, &_1, &_0, 0, 0, "phalcon/mvc/model.zep", 3573);
for (
- ; zephir_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
- ; zephir_hash_move_forward_ex(_1, &_0)
+ ; zend_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
+ ; zend_hash_move_forward_ex(_1, &_0)
) {
ZEPHIR_GET_HVALUE(attribute, _2);
zephir_array_update_zval(&keysAttributes, attribute, &ZEPHIR_GLOBAL(global_null), PH_COPY | PH_SEPARATE);
@@ -4568,8 +4567,8 @@ PHP_METHOD(Phalcon_Mvc_Model, allowEmptyStringValues) {
array_init(keysAttributes);
zephir_is_iterable(attributes, &_1, &_0, 0, 0, "phalcon/mvc/model.zep", 3605);
for (
- ; zephir_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
- ; zephir_hash_move_forward_ex(_1, &_0)
+ ; zend_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
+ ; zend_hash_move_forward_ex(_1, &_0)
) {
ZEPHIR_GET_HVALUE(attribute, _2);
zephir_array_update_zval(&keysAttributes, attribute, &ZEPHIR_GLOBAL(global_null), PH_COPY | PH_SEPARATE);
@@ -4606,11 +4605,11 @@ PHP_METHOD(Phalcon_Mvc_Model, hasOne) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 3, 1, &fields, &referenceModel_param, &referencedFields, &options);
- if (unlikely(Z_TYPE_P(referenceModel_param) != IS_STRING && Z_TYPE_P(referenceModel_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(referenceModel_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(referenceModel_param) == IS_STRING)) {
zephir_get_strval(referenceModel, referenceModel_param);
} else {
ZEPHIR_INIT_VAR(referenceModel);
@@ -4652,11 +4651,11 @@ PHP_METHOD(Phalcon_Mvc_Model, belongsTo) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 3, 1, &fields, &referenceModel_param, &referencedFields, &options);
- if (unlikely(Z_TYPE_P(referenceModel_param) != IS_STRING && Z_TYPE_P(referenceModel_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(referenceModel_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(referenceModel_param) == IS_STRING)) {
zephir_get_strval(referenceModel, referenceModel_param);
} else {
ZEPHIR_INIT_VAR(referenceModel);
@@ -4698,11 +4697,11 @@ PHP_METHOD(Phalcon_Mvc_Model, hasMany) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 3, 1, &fields, &referenceModel_param, &referencedFields, &options);
- if (unlikely(Z_TYPE_P(referenceModel_param) != IS_STRING && Z_TYPE_P(referenceModel_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(referenceModel_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(referenceModel_param) == IS_STRING)) {
zephir_get_strval(referenceModel, referenceModel_param);
} else {
ZEPHIR_INIT_VAR(referenceModel);
@@ -4761,21 +4760,21 @@ PHP_METHOD(Phalcon_Mvc_Model, hasManyToMany) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 6, 1, &fields, &intermediateModel_param, &intermediateFields, &intermediateReferencedFields, &referenceModel_param, &referencedFields, &options);
- if (unlikely(Z_TYPE_P(intermediateModel_param) != IS_STRING && Z_TYPE_P(intermediateModel_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(intermediateModel_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(intermediateModel_param) == IS_STRING)) {
zephir_get_strval(intermediateModel, intermediateModel_param);
} else {
ZEPHIR_INIT_VAR(intermediateModel);
ZVAL_EMPTY_STRING(intermediateModel);
}
- if (unlikely(Z_TYPE_P(referenceModel_param) != IS_STRING && Z_TYPE_P(referenceModel_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(referenceModel_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(referenceModel_param) == IS_STRING)) {
zephir_get_strval(referenceModel, referenceModel_param);
} else {
ZEPHIR_INIT_VAR(referenceModel);
@@ -4909,8 +4908,8 @@ PHP_METHOD(Phalcon_Mvc_Model, setSnapshotData) {
array_init(snapshot);
zephir_is_iterable(data, &_1$$3, &_0$$3, 0, 0, "phalcon/mvc/model.zep", 3830);
for (
- ; zephir_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_1$$3, &_0$$3)
+ ; zend_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_1$$3, &_0$$3)
) {
ZEPHIR_GET_HMKEY(key, _1$$3, _0$$3);
ZEPHIR_GET_HVALUE(value, _2$$3);
@@ -5061,8 +5060,8 @@ PHP_METHOD(Phalcon_Mvc_Model, getChangedFields) {
ZEPHIR_INIT_VAR(_1);
zephir_is_iterable(allAttributes, &_3, &_2, 0, 0, "phalcon/mvc/model.zep", 3958);
for (
- ; zephir_hash_get_current_data_ex(_3, (void**) &_4, &_2) == SUCCESS
- ; zephir_hash_move_forward_ex(_3, &_2)
+ ; zend_hash_get_current_data_ex(_3, (void**) &_4, &_2) == SUCCESS
+ ; zend_hash_move_forward_ex(_3, &_2)
) {
ZEPHIR_GET_HMKEY(name, _3, _2);
ZEPHIR_GET_HVALUE(_1, _4);
@@ -5192,21 +5191,21 @@ PHP_METHOD(Phalcon_Mvc_Model, _getRelatedRecords) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 3, 0, &modelName_param, &method_param, &arguments);
- if (unlikely(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(modelName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(modelName_param) == IS_STRING)) {
zephir_get_strval(modelName, modelName_param);
} else {
ZEPHIR_INIT_VAR(modelName);
ZVAL_EMPTY_STRING(modelName);
}
- if (unlikely(Z_TYPE_P(method_param) != IS_STRING && Z_TYPE_P(method_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(method_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(method_param) == IS_STRING)) {
zephir_get_strval(method, method_param);
} else {
ZEPHIR_INIT_VAR(method);
@@ -5503,8 +5502,8 @@ PHP_METHOD(Phalcon_Mvc_Model, __set) {
array_init(related);
zephir_is_iterable(value, &_3$$6, &_2$$6, 0, 0, "phalcon/mvc/model.zep", 4268);
for (
- ; zephir_hash_get_current_data_ex(_3$$6, (void**) &_4$$6, &_2$$6) == SUCCESS
- ; zephir_hash_move_forward_ex(_3$$6, &_2$$6)
+ ; zend_hash_get_current_data_ex(_3$$6, (void**) &_4$$6, &_2$$6) == SUCCESS
+ ; zend_hash_move_forward_ex(_3$$6, &_2$$6)
) {
ZEPHIR_GET_HMKEY(key, _3$$6, _2$$6);
ZEPHIR_GET_HVALUE(item, _4$$6);
@@ -5617,11 +5616,11 @@ PHP_METHOD(Phalcon_Mvc_Model, __get) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &property_param);
- if (unlikely(Z_TYPE_P(property_param) != IS_STRING && Z_TYPE_P(property_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(property_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(property_param) == IS_STRING)) {
zephir_get_strval(property, property_param);
} else {
ZEPHIR_INIT_VAR(property);
@@ -5693,11 +5692,11 @@ PHP_METHOD(Phalcon_Mvc_Model, __isset) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &property_param);
- if (unlikely(Z_TYPE_P(property_param) != IS_STRING && Z_TYPE_P(property_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(property_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(property_param) == IS_STRING)) {
zephir_get_strval(property, property_param);
} else {
ZEPHIR_INIT_VAR(property);
@@ -5775,11 +5774,11 @@ PHP_METHOD(Phalcon_Mvc_Model, unserialize) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &data_param);
- if (unlikely(Z_TYPE_P(data_param) != IS_STRING && Z_TYPE_P(data_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(data_param) != IS_STRING && Z_TYPE_P(data_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'data' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(data_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(data_param) == IS_STRING)) {
zephir_get_strval(data, data_param);
} else {
ZEPHIR_INIT_VAR(data);
@@ -5823,8 +5822,8 @@ PHP_METHOD(Phalcon_Mvc_Model, unserialize) {
}
zephir_is_iterable(attributes, &_5$$3, &_4$$3, 0, 0, "phalcon/mvc/model.zep", 4480);
for (
- ; zephir_hash_get_current_data_ex(_5$$3, (void**) &_6$$3, &_4$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_5$$3, &_4$$3)
+ ; zend_hash_get_current_data_ex(_5$$3, (void**) &_6$$3, &_4$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_5$$3, &_4$$3)
) {
ZEPHIR_GET_HMKEY(key, _5$$3, _4$$3);
ZEPHIR_GET_HVALUE(value, _6$$3);
@@ -5894,8 +5893,8 @@ PHP_METHOD(Phalcon_Mvc_Model, toArray) {
zephir_check_call_status();
zephir_is_iterable(_0, &_2, &_1, 0, 0, "phalcon/mvc/model.zep", 4548);
for (
- ; zephir_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
- ; zephir_hash_move_forward_ex(_2, &_1)
+ ; zend_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
+ ; zend_hash_move_forward_ex(_2, &_1)
) {
ZEPHIR_GET_HVALUE(attribute, _3);
if (Z_TYPE_P(columnMap) == IS_ARRAY) {
diff --git a/ext/phalcon/mvc/model/behavior.zep.c b/ext/phalcon/mvc/model/behavior.zep.c
index bccc1104e89..eee39d1294c 100644
--- a/ext/phalcon/mvc/model/behavior.zep.c
+++ b/ext/phalcon/mvc/model/behavior.zep.c
@@ -67,11 +67,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Behavior, mustTakeAction) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &eventName_param);
- if (unlikely(Z_TYPE_P(eventName_param) != IS_STRING && Z_TYPE_P(eventName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(eventName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(eventName_param) == IS_STRING)) {
zephir_get_strval(eventName, eventName_param);
} else {
ZEPHIR_INIT_VAR(eventName);
@@ -102,11 +102,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Behavior, getOptions) {
ZEPHIR_INIT_VAR(eventName);
ZVAL_EMPTY_STRING(eventName);
} else {
- if (unlikely(Z_TYPE_P(eventName_param) != IS_STRING && Z_TYPE_P(eventName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(eventName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(eventName_param) == IS_STRING)) {
zephir_get_strval(eventName, eventName_param);
} else {
ZEPHIR_INIT_VAR(eventName);
diff --git a/ext/phalcon/mvc/model/behavior/softdelete.zep.c b/ext/phalcon/mvc/model/behavior/softdelete.zep.c
index 88c63e0e445..0bfcfdf529a 100644
--- a/ext/phalcon/mvc/model/behavior/softdelete.zep.c
+++ b/ext/phalcon/mvc/model/behavior/softdelete.zep.c
@@ -18,7 +18,6 @@
#include "kernel/memory.h"
#include "kernel/exception.h"
#include "kernel/object.h"
-#include "kernel/hash.h"
#include "ext/spl/spl_exceptions.h"
@@ -51,11 +50,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Behavior_SoftDelete, notify) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &type_param, &model);
- if (unlikely(Z_TYPE_P(type_param) != IS_STRING && Z_TYPE_P(type_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(type_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(type_param) == IS_STRING)) {
zephir_get_strval(type, type_param);
} else {
ZEPHIR_INIT_VAR(type);
@@ -96,8 +95,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Behavior_SoftDelete, notify) {
zephir_check_call_status();
zephir_is_iterable(_3$$7, &_5$$7, &_4$$7, 0, 0, "phalcon/mvc/model/behavior/softdelete.zep", 89);
for (
- ; zephir_hash_get_current_data_ex(_5$$7, (void**) &_6$$7, &_4$$7) == SUCCESS
- ; zephir_hash_move_forward_ex(_5$$7, &_4$$7)
+ ; zend_hash_get_current_data_ex(_5$$7, (void**) &_6$$7, &_4$$7) == SUCCESS
+ ; zend_hash_move_forward_ex(_5$$7, &_4$$7)
) {
ZEPHIR_GET_HVALUE(message, _6$$7);
ZEPHIR_CALL_METHOD(NULL, model, "appendmessage", &_7, 0, message);
diff --git a/ext/phalcon/mvc/model/behavior/timestampable.zep.c b/ext/phalcon/mvc/model/behavior/timestampable.zep.c
index 45279942e0a..e71d82d442b 100644
--- a/ext/phalcon/mvc/model/behavior/timestampable.zep.c
+++ b/ext/phalcon/mvc/model/behavior/timestampable.zep.c
@@ -20,7 +20,6 @@
#include "Zend/zend_closures.h"
#include "kernel/object.h"
#include "kernel/time.h"
-#include "kernel/hash.h"
#include "ext/spl/spl_exceptions.h"
@@ -53,11 +52,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Behavior_Timestampable, notify) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &type_param, &model);
- if (unlikely(Z_TYPE_P(type_param) != IS_STRING && Z_TYPE_P(type_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(type_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(type_param) == IS_STRING)) {
zephir_get_strval(type, type_param);
} else {
ZEPHIR_INIT_VAR(type);
@@ -103,8 +102,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Behavior_Timestampable, notify) {
if (Z_TYPE_P(field) == IS_ARRAY) {
zephir_is_iterable(field, &_2$$12, &_1$$12, 0, 0, "phalcon/mvc/model/behavior/timestampable.zep", 94);
for (
- ; zephir_hash_get_current_data_ex(_2$$12, (void**) &_3$$12, &_1$$12) == SUCCESS
- ; zephir_hash_move_forward_ex(_2$$12, &_1$$12)
+ ; zend_hash_get_current_data_ex(_2$$12, (void**) &_3$$12, &_1$$12) == SUCCESS
+ ; zend_hash_move_forward_ex(_2$$12, &_1$$12)
) {
ZEPHIR_GET_HVALUE(singleField, _3$$12);
ZEPHIR_CALL_METHOD(NULL, model, "writeattribute", &_4, 0, singleField, timestamp);
diff --git a/ext/phalcon/mvc/model/binder.zep.c b/ext/phalcon/mvc/model/binder.zep.c
index 853fabdb18f..8f0a0d8ecc3 100644
--- a/ext/phalcon/mvc/model/binder.zep.c
+++ b/ext/phalcon/mvc/model/binder.zep.c
@@ -17,7 +17,6 @@
#include "Zend/zend_closures.h"
#include "kernel/operators.h"
#include "kernel/fcall.h"
-#include "kernel/hash.h"
#include "kernel/array.h"
#include "kernel/exception.h"
#include "kernel/concat.h"
@@ -168,8 +167,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Binder, bindToHandler) {
if (Z_TYPE_P(paramsCache) == IS_ARRAY) {
zephir_is_iterable(paramsCache, &_4$$4, &_3$$4, 0, 0, "phalcon/mvc/model/binder.zep", 102);
for (
- ; zephir_hash_get_current_data_ex(_4$$4, (void**) &_5$$4, &_3$$4) == SUCCESS
- ; zephir_hash_move_forward_ex(_4$$4, &_3$$4)
+ ; zend_hash_get_current_data_ex(_4$$4, (void**) &_5$$4, &_3$$4) == SUCCESS
+ ; zend_hash_move_forward_ex(_4$$4, &_3$$4)
) {
ZEPHIR_GET_HMKEY(paramKey, _4$$4, _3$$4);
ZEPHIR_GET_HVALUE(className, _5$$4);
@@ -274,8 +273,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Binder, getParamsFromReflection) {
zephir_array_keys(paramsKeys, params TSRMLS_CC);
zephir_is_iterable(methodParams, &_2, &_1, 0, 0, "phalcon/mvc/model/binder.zep", 197);
for (
- ; zephir_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
- ; zephir_hash_move_forward_ex(_2, &_1)
+ ; zend_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
+ ; zend_hash_move_forward_ex(_2, &_1)
) {
ZEPHIR_GET_HMKEY(paramKey, _2, _1);
ZEPHIR_GET_HVALUE(methodParam, _3);
diff --git a/ext/phalcon/mvc/model/criteria.zep.c b/ext/phalcon/mvc/model/criteria.zep.c
index 94dd0266218..aa48373d7e8 100644
--- a/ext/phalcon/mvc/model/criteria.zep.c
+++ b/ext/phalcon/mvc/model/criteria.zep.c
@@ -20,7 +20,6 @@
#include "kernel/operators.h"
#include "kernel/fcall.h"
#include "kernel/concat.h"
-#include "kernel/hash.h"
#include "kernel/string.h"
@@ -107,11 +106,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, setModelName) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &modelName_param);
- if (unlikely(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(modelName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(modelName_param) == IS_STRING)) {
zephir_get_strval(modelName, modelName_param);
} else {
ZEPHIR_INIT_VAR(modelName);
@@ -277,11 +276,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, join) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 3, &model_param, &conditions, &alias, &type);
- if (unlikely(Z_TYPE_P(model_param) != IS_STRING && Z_TYPE_P(model_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(model_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(model_param) == IS_STRING)) {
zephir_get_strval(model, model_param);
} else {
ZEPHIR_INIT_VAR(model);
@@ -348,11 +347,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, innerJoin) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 2, &model_param, &conditions, &alias);
- if (unlikely(Z_TYPE_P(model_param) != IS_STRING && Z_TYPE_P(model_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(model_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(model_param) == IS_STRING)) {
zephir_get_strval(model, model_param);
} else {
ZEPHIR_INIT_VAR(model);
@@ -391,11 +390,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, leftJoin) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 2, &model_param, &conditions, &alias);
- if (unlikely(Z_TYPE_P(model_param) != IS_STRING && Z_TYPE_P(model_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(model_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(model_param) == IS_STRING)) {
zephir_get_strval(model, model_param);
} else {
ZEPHIR_INIT_VAR(model);
@@ -434,11 +433,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, rightJoin) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 2, &model_param, &conditions, &alias);
- if (unlikely(Z_TYPE_P(model_param) != IS_STRING && Z_TYPE_P(model_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(model_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(model_param) == IS_STRING)) {
zephir_get_strval(model, model_param);
} else {
ZEPHIR_INIT_VAR(model);
@@ -472,11 +471,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, where) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 2, &conditions_param, &bindParams, &bindTypes);
- if (unlikely(Z_TYPE_P(conditions_param) != IS_STRING && Z_TYPE_P(conditions_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(conditions_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(conditions_param) == IS_STRING)) {
zephir_get_strval(conditions, conditions_param);
} else {
ZEPHIR_INIT_VAR(conditions);
@@ -542,11 +541,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, addWhere) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 2, &conditions_param, &bindParams, &bindTypes);
- if (unlikely(Z_TYPE_P(conditions_param) != IS_STRING && Z_TYPE_P(conditions_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(conditions_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(conditions_param) == IS_STRING)) {
zephir_get_strval(conditions, conditions_param);
} else {
ZEPHIR_INIT_VAR(conditions);
@@ -578,11 +577,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, andWhere) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 2, &conditions_param, &bindParams, &bindTypes);
- if (unlikely(Z_TYPE_P(conditions_param) != IS_STRING && Z_TYPE_P(conditions_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(conditions_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(conditions_param) == IS_STRING)) {
zephir_get_strval(conditions, conditions_param);
} else {
ZEPHIR_INIT_VAR(conditions);
@@ -621,11 +620,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, orWhere) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 2, &conditions_param, &bindParams, &bindTypes);
- if (unlikely(Z_TYPE_P(conditions_param) != IS_STRING && Z_TYPE_P(conditions_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(conditions_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(conditions_param) == IS_STRING)) {
zephir_get_strval(conditions, conditions_param);
} else {
ZEPHIR_INIT_VAR(conditions);
@@ -669,11 +668,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, betweenWhere) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 3, 0, &expr_param, &minimum, &maximum);
- if (unlikely(Z_TYPE_P(expr_param) != IS_STRING && Z_TYPE_P(expr_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(expr_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(expr_param) == IS_STRING)) {
zephir_get_strval(expr, expr_param);
} else {
ZEPHIR_INIT_VAR(expr);
@@ -721,11 +720,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, notBetweenWhere) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 3, 0, &expr_param, &minimum, &maximum);
- if (unlikely(Z_TYPE_P(expr_param) != IS_STRING && Z_TYPE_P(expr_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(expr_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(expr_param) == IS_STRING)) {
zephir_get_strval(expr, expr_param);
} else {
ZEPHIR_INIT_VAR(expr);
@@ -776,11 +775,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, inWhere) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &expr_param, &values_param);
- if (unlikely(Z_TYPE_P(expr_param) != IS_STRING && Z_TYPE_P(expr_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(expr_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(expr_param) == IS_STRING)) {
zephir_get_strval(expr, expr_param);
} else {
ZEPHIR_INIT_VAR(expr);
@@ -804,8 +803,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, inWhere) {
array_init(bindKeys);
zephir_is_iterable(values, &_3, &_2, 0, 0, "phalcon/mvc/model/criteria.zep", 418);
for (
- ; zephir_hash_get_current_data_ex(_3, (void**) &_4, &_2) == SUCCESS
- ; zephir_hash_move_forward_ex(_3, &_2)
+ ; zend_hash_get_current_data_ex(_3, (void**) &_4, &_2) == SUCCESS
+ ; zend_hash_move_forward_ex(_3, &_2)
) {
ZEPHIR_GET_HVALUE(value, _4);
ZEPHIR_INIT_NVAR(key);
@@ -847,11 +846,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, notInWhere) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &expr_param, &values_param);
- if (unlikely(Z_TYPE_P(expr_param) != IS_STRING && Z_TYPE_P(expr_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(expr_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(expr_param) == IS_STRING)) {
zephir_get_strval(expr, expr_param);
} else {
ZEPHIR_INIT_VAR(expr);
@@ -868,8 +867,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, notInWhere) {
array_init(bindKeys);
zephir_is_iterable(values, &_1, &_0, 0, 0, "phalcon/mvc/model/criteria.zep", 455);
for (
- ; zephir_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
- ; zephir_hash_move_forward_ex(_1, &_0)
+ ; zend_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
+ ; zend_hash_move_forward_ex(_1, &_0)
) {
ZEPHIR_GET_HVALUE(value, _2);
ZEPHIR_INIT_NVAR(key);
@@ -903,11 +902,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, conditions) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &conditions_param);
- if (unlikely(Z_TYPE_P(conditions_param) != IS_STRING && Z_TYPE_P(conditions_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(conditions_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(conditions_param) == IS_STRING)) {
zephir_get_strval(conditions, conditions_param);
} else {
ZEPHIR_INIT_VAR(conditions);
@@ -935,11 +934,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, order) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &orderColumns_param);
- if (unlikely(Z_TYPE_P(orderColumns_param) != IS_STRING && Z_TYPE_P(orderColumns_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(orderColumns_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(orderColumns_param) == IS_STRING)) {
zephir_get_strval(orderColumns, orderColumns_param);
} else {
ZEPHIR_INIT_VAR(orderColumns);
@@ -965,11 +964,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, orderBy) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &orderColumns_param);
- if (unlikely(Z_TYPE_P(orderColumns_param) != IS_STRING && Z_TYPE_P(orderColumns_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(orderColumns_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(orderColumns_param) == IS_STRING)) {
zephir_get_strval(orderColumns, orderColumns_param);
} else {
ZEPHIR_INIT_VAR(orderColumns);
@@ -1054,7 +1053,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, limit) {
ZEPHIR_CALL_FUNCTION(&_1, "abs", &_2, 198, &_0);
zephir_check_call_status();
limit = zephir_get_numberval(_1);
- if (unlikely(limit == 0)) {
+ if (UNEXPECTED(limit == 0)) {
RETURN_THIS();
}
if (zephir_is_numeric(offset)) {
@@ -1307,11 +1306,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, fromInput) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 3, 1, &dependencyInjector, &modelName_param, &data_param, &operator_param);
- if (unlikely(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(modelName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(modelName_param) == IS_STRING)) {
zephir_get_strval(modelName, modelName_param);
} else {
ZEPHIR_INIT_VAR(modelName);
@@ -1322,11 +1321,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, fromInput) {
ZEPHIR_INIT_VAR(operator);
ZVAL_STRING(operator, "AND", 1);
} else {
- if (unlikely(Z_TYPE_P(operator_param) != IS_STRING && Z_TYPE_P(operator_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(operator_param) != IS_STRING && Z_TYPE_P(operator_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'operator' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(operator_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(operator_param) == IS_STRING)) {
zephir_get_strval(operator, operator_param);
} else {
ZEPHIR_INIT_VAR(operator);
@@ -1361,8 +1360,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Criteria, fromInput) {
array_init(bind);
zephir_is_iterable(data, &_4$$3, &_3$$3, 0, 0, "phalcon/mvc/model/criteria.zep", 711);
for (
- ; zephir_hash_get_current_data_ex(_4$$3, (void**) &_5$$3, &_3$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_4$$3, &_3$$3)
+ ; zend_hash_get_current_data_ex(_4$$3, (void**) &_5$$3, &_3$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_4$$3, &_3$$3)
) {
ZEPHIR_GET_HMKEY(field, _4$$3, _3$$3);
ZEPHIR_GET_HVALUE(value, _5$$3);
diff --git a/ext/phalcon/mvc/model/manager.zep.c b/ext/phalcon/mvc/model/manager.zep.c
index ea65a7cd588..d56b10a6883 100644
--- a/ext/phalcon/mvc/model/manager.zep.c
+++ b/ext/phalcon/mvc/model/manager.zep.c
@@ -21,7 +21,6 @@
#include "kernel/exception.h"
#include "kernel/operators.h"
#include "kernel/concat.h"
-#include "kernel/hash.h"
#include "phalcon/mvc/model/orm.h"
@@ -297,11 +296,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, isInitialized) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &modelName_param);
- if (unlikely(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(modelName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(modelName_param) == IS_STRING)) {
zephir_get_strval(modelName, modelName_param);
} else {
ZEPHIR_INIT_VAR(modelName);
@@ -341,11 +340,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, load) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &modelName_param, &newInstance_param);
- if (unlikely(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(modelName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(modelName_param) == IS_STRING)) {
zephir_get_strval(modelName, modelName_param);
} else {
ZEPHIR_INIT_VAR(modelName);
@@ -424,11 +423,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, setModelSource) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &model, &source_param);
- if (unlikely(Z_TYPE_P(source_param) != IS_STRING && Z_TYPE_P(source_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(source_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(source_param) == IS_STRING)) {
zephir_get_strval(source, source_param);
} else {
ZEPHIR_INIT_VAR(source);
@@ -519,11 +518,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, setModelSchema) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &model, &schema_param);
- if (unlikely(Z_TYPE_P(schema_param) != IS_STRING && Z_TYPE_P(schema_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(schema_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(schema_param) == IS_STRING)) {
zephir_get_strval(schema, schema_param);
} else {
ZEPHIR_INIT_VAR(schema);
@@ -572,11 +571,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, setConnectionService) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &model, &connectionService_param);
- if (unlikely(Z_TYPE_P(connectionService_param) != IS_STRING && Z_TYPE_P(connectionService_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(connectionService_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(connectionService_param) == IS_STRING)) {
zephir_get_strval(connectionService, connectionService_param);
} else {
ZEPHIR_INIT_VAR(connectionService);
@@ -603,11 +602,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, setWriteConnectionService) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &model, &connectionService_param);
- if (unlikely(Z_TYPE_P(connectionService_param) != IS_STRING && Z_TYPE_P(connectionService_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(connectionService_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(connectionService_param) == IS_STRING)) {
zephir_get_strval(connectionService, connectionService_param);
} else {
ZEPHIR_INIT_VAR(connectionService);
@@ -633,11 +632,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, setReadConnectionService) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &model, &connectionService_param);
- if (unlikely(Z_TYPE_P(connectionService_param) != IS_STRING && Z_TYPE_P(connectionService_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(connectionService_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(connectionService_param) == IS_STRING)) {
zephir_get_strval(connectionService, connectionService_param);
} else {
ZEPHIR_INIT_VAR(connectionService);
@@ -801,11 +800,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, notifyEvent) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &eventName_param, &model);
- if (unlikely(Z_TYPE_P(eventName_param) != IS_STRING && Z_TYPE_P(eventName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(eventName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(eventName_param) == IS_STRING)) {
zephir_get_strval(eventName, eventName_param);
} else {
ZEPHIR_INIT_VAR(eventName);
@@ -822,8 +821,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, notifyEvent) {
if (zephir_array_isset_fetch(&modelsBehaviors, _0, _1, 0 TSRMLS_CC)) {
zephir_is_iterable(modelsBehaviors, &_3$$3, &_2$$3, 0, 0, "phalcon/mvc/model/manager.zep", 508);
for (
- ; zephir_hash_get_current_data_ex(_3$$3, (void**) &_4$$3, &_2$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_3$$3, &_2$$3)
+ ; zend_hash_get_current_data_ex(_3$$3, (void**) &_4$$3, &_2$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_3$$3, &_2$$3)
) {
ZEPHIR_GET_HVALUE(behavior, _4$$3);
ZEPHIR_CALL_METHOD(&status, behavior, "notify", NULL, 0, eventName, model);
@@ -877,11 +876,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, missingMethod) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 3, 0, &model, &eventName_param, &data);
- if (unlikely(Z_TYPE_P(eventName_param) != IS_STRING && Z_TYPE_P(eventName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(eventName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(eventName_param) == IS_STRING)) {
zephir_get_strval(eventName, eventName_param);
} else {
ZEPHIR_INIT_VAR(eventName);
@@ -896,8 +895,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, missingMethod) {
if (zephir_array_isset_fetch(&modelsBehaviors, _0, _1, 0 TSRMLS_CC)) {
zephir_is_iterable(modelsBehaviors, &_3$$3, &_2$$3, 0, 0, "phalcon/mvc/model/manager.zep", 557);
for (
- ; zephir_hash_get_current_data_ex(_3$$3, (void**) &_4$$3, &_2$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_3$$3, &_2$$3)
+ ; zend_hash_get_current_data_ex(_3$$3, (void**) &_4$$3, &_2$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_3$$3, &_2$$3)
) {
ZEPHIR_GET_HVALUE(behavior, _4$$3);
ZEPHIR_CALL_METHOD(&result, behavior, "missingmethod", NULL, 0, model, eventName, data);
@@ -1062,11 +1061,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addHasOne) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 4, 1, &model, &fields, &referencedModel_param, &referencedFields, &options);
- if (unlikely(Z_TYPE_P(referencedModel_param) != IS_STRING && Z_TYPE_P(referencedModel_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(referencedModel_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(referencedModel_param) == IS_STRING)) {
zephir_get_strval(referencedModel, referencedModel_param);
} else {
ZEPHIR_INIT_VAR(referencedModel);
@@ -1148,11 +1147,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addBelongsTo) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 4, 1, &model, &fields, &referencedModel_param, &referencedFields, &options);
- if (unlikely(Z_TYPE_P(referencedModel_param) != IS_STRING && Z_TYPE_P(referencedModel_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(referencedModel_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(referencedModel_param) == IS_STRING)) {
zephir_get_strval(referencedModel, referencedModel_param);
} else {
ZEPHIR_INIT_VAR(referencedModel);
@@ -1233,11 +1232,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addHasMany) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 4, 1, &model, &fields, &referencedModel_param, &referencedFields, &options);
- if (unlikely(Z_TYPE_P(referencedModel_param) != IS_STRING && Z_TYPE_P(referencedModel_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(referencedModel_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(referencedModel_param) == IS_STRING)) {
zephir_get_strval(referencedModel, referencedModel_param);
} else {
ZEPHIR_INIT_VAR(referencedModel);
@@ -1323,21 +1322,21 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, addHasManyToMany) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 7, 1, &model, &fields, &intermediateModel_param, &intermediateFields, &intermediateReferencedFields, &referencedModel_param, &referencedFields, &options);
- if (unlikely(Z_TYPE_P(intermediateModel_param) != IS_STRING && Z_TYPE_P(intermediateModel_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(intermediateModel_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(intermediateModel_param) == IS_STRING)) {
zephir_get_strval(intermediateModel, intermediateModel_param);
} else {
ZEPHIR_INIT_VAR(intermediateModel);
ZVAL_EMPTY_STRING(intermediateModel);
}
- if (unlikely(Z_TYPE_P(referencedModel_param) != IS_STRING && Z_TYPE_P(referencedModel_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(referencedModel_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(referencedModel_param) == IS_STRING)) {
zephir_get_strval(referencedModel, referencedModel_param);
} else {
ZEPHIR_INIT_VAR(referencedModel);
@@ -1423,21 +1422,21 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, existsBelongsTo) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &modelName_param, &modelRelation_param);
- if (unlikely(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(modelName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(modelName_param) == IS_STRING)) {
zephir_get_strval(modelName, modelName_param);
} else {
ZEPHIR_INIT_VAR(modelName);
ZVAL_EMPTY_STRING(modelName);
}
- if (unlikely(Z_TYPE_P(modelRelation_param) != IS_STRING && Z_TYPE_P(modelRelation_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(modelRelation_param) != IS_STRING && Z_TYPE_P(modelRelation_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'modelRelation' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(modelRelation_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(modelRelation_param) == IS_STRING)) {
zephir_get_strval(modelRelation, modelRelation_param);
} else {
ZEPHIR_INIT_VAR(modelRelation);
@@ -1473,21 +1472,21 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, existsHasMany) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &modelName_param, &modelRelation_param);
- if (unlikely(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(modelName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(modelName_param) == IS_STRING)) {
zephir_get_strval(modelName, modelName_param);
} else {
ZEPHIR_INIT_VAR(modelName);
ZVAL_EMPTY_STRING(modelName);
}
- if (unlikely(Z_TYPE_P(modelRelation_param) != IS_STRING && Z_TYPE_P(modelRelation_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(modelRelation_param) != IS_STRING && Z_TYPE_P(modelRelation_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'modelRelation' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(modelRelation_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(modelRelation_param) == IS_STRING)) {
zephir_get_strval(modelRelation, modelRelation_param);
} else {
ZEPHIR_INIT_VAR(modelRelation);
@@ -1523,21 +1522,21 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, existsHasOne) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &modelName_param, &modelRelation_param);
- if (unlikely(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(modelName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(modelName_param) == IS_STRING)) {
zephir_get_strval(modelName, modelName_param);
} else {
ZEPHIR_INIT_VAR(modelName);
ZVAL_EMPTY_STRING(modelName);
}
- if (unlikely(Z_TYPE_P(modelRelation_param) != IS_STRING && Z_TYPE_P(modelRelation_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(modelRelation_param) != IS_STRING && Z_TYPE_P(modelRelation_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'modelRelation' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(modelRelation_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(modelRelation_param) == IS_STRING)) {
zephir_get_strval(modelRelation, modelRelation_param);
} else {
ZEPHIR_INIT_VAR(modelRelation);
@@ -1573,21 +1572,21 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, existsHasManyToMany) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &modelName_param, &modelRelation_param);
- if (unlikely(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(modelName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(modelName_param) == IS_STRING)) {
zephir_get_strval(modelName, modelName_param);
} else {
ZEPHIR_INIT_VAR(modelName);
ZVAL_EMPTY_STRING(modelName);
}
- if (unlikely(Z_TYPE_P(modelRelation_param) != IS_STRING && Z_TYPE_P(modelRelation_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(modelRelation_param) != IS_STRING && Z_TYPE_P(modelRelation_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'modelRelation' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(modelRelation_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(modelRelation_param) == IS_STRING)) {
zephir_get_strval(modelRelation, modelRelation_param);
} else {
ZEPHIR_INIT_VAR(modelRelation);
@@ -1622,21 +1621,21 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getRelationByAlias) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &modelName_param, &alias_param);
- if (unlikely(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(modelName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(modelName_param) == IS_STRING)) {
zephir_get_strval(modelName, modelName_param);
} else {
ZEPHIR_INIT_VAR(modelName);
ZVAL_EMPTY_STRING(modelName);
}
- if (unlikely(Z_TYPE_P(alias_param) != IS_STRING && Z_TYPE_P(alias_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(alias_param) != IS_STRING && Z_TYPE_P(alias_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'alias' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(alias_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(alias_param) == IS_STRING)) {
zephir_get_strval(alias, alias_param);
} else {
ZEPHIR_INIT_VAR(alias);
@@ -1687,8 +1686,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, _mergeFindParameters) {
if (Z_TYPE_P(findParamsOne) == IS_ARRAY) {
zephir_is_iterable(findParamsOne, &_3$$4, &_2$$4, 0, 0, "phalcon/mvc/model/manager.zep", 1149);
for (
- ; zephir_hash_get_current_data_ex(_3$$4, (void**) &_4$$4, &_2$$4) == SUCCESS
- ; zephir_hash_move_forward_ex(_3$$4, &_2$$4)
+ ; zend_hash_get_current_data_ex(_3$$4, (void**) &_4$$4, &_2$$4) == SUCCESS
+ ; zend_hash_move_forward_ex(_3$$4, &_2$$4)
) {
ZEPHIR_GET_HMKEY(key, _3$$4, _2$$4);
ZEPHIR_GET_HVALUE(value, _4$$4);
@@ -1719,8 +1718,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, _mergeFindParameters) {
if (Z_TYPE_P(findParamsTwo) == IS_ARRAY) {
zephir_is_iterable(findParamsTwo, &_9$$11, &_8$$11, 0, 0, "phalcon/mvc/model/manager.zep", 1183);
for (
- ; zephir_hash_get_current_data_ex(_9$$11, (void**) &_10$$11, &_8$$11) == SUCCESS
- ; zephir_hash_move_forward_ex(_9$$11, &_8$$11)
+ ; zend_hash_get_current_data_ex(_9$$11, (void**) &_10$$11, &_8$$11) == SUCCESS
+ ; zend_hash_move_forward_ex(_9$$11, &_8$$11)
) {
ZEPHIR_GET_HMKEY(key, _9$$11, _8$$11);
ZEPHIR_GET_HVALUE(value, _10$$11);
@@ -1795,11 +1794,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getRelationRecords) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 3, 1, &relation, &method_param, &record, ¶meters);
- if (unlikely(Z_TYPE_P(method_param) != IS_STRING && Z_TYPE_P(method_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(method_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(method_param) == IS_STRING)) {
zephir_get_strval(method, method_param);
} else {
ZEPHIR_INIT_VAR(method);
@@ -1911,8 +1910,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getRelationRecords) {
zephir_check_call_status();
zephir_is_iterable(_16$$10, &_18$$10, &_17$$10, 0, 0, "phalcon/mvc/model/manager.zep", 1303);
for (
- ; zephir_hash_get_current_data_ex(_18$$10, (void**) &_19$$10, &_17$$10) == SUCCESS
- ; zephir_hash_move_forward_ex(_18$$10, &_17$$10)
+ ; zend_hash_get_current_data_ex(_18$$10, (void**) &_19$$10, &_17$$10) == SUCCESS
+ ; zend_hash_move_forward_ex(_18$$10, &_17$$10)
) {
ZEPHIR_GET_HMKEY(refPosition, _18$$10, _17$$10);
ZEPHIR_GET_HVALUE(field, _19$$10);
@@ -2012,21 +2011,21 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getReusableRecords) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &modelName_param, &key_param);
- if (unlikely(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(modelName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(modelName_param) == IS_STRING)) {
zephir_get_strval(modelName, modelName_param);
} else {
ZEPHIR_INIT_VAR(modelName);
ZVAL_EMPTY_STRING(modelName);
}
- if (unlikely(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(key_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(key_param) == IS_STRING)) {
zephir_get_strval(key, key_param);
} else {
ZEPHIR_INIT_VAR(key);
@@ -2053,21 +2052,21 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, setReusableRecords) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 3, 0, &modelName_param, &key_param, &records);
- if (unlikely(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(modelName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(modelName_param) == IS_STRING)) {
zephir_get_strval(modelName, modelName_param);
} else {
ZEPHIR_INIT_VAR(modelName);
ZVAL_EMPTY_STRING(modelName);
}
- if (unlikely(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(key_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(key_param) == IS_STRING)) {
zephir_get_strval(key, key_param);
} else {
ZEPHIR_INIT_VAR(key);
@@ -2103,21 +2102,21 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getBelongsToRecords) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 4, 1, &method_param, &modelName_param, &modelRelation, &record, ¶meters);
- if (unlikely(Z_TYPE_P(method_param) != IS_STRING && Z_TYPE_P(method_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(method_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(method_param) == IS_STRING)) {
zephir_get_strval(method, method_param);
} else {
ZEPHIR_INIT_VAR(method);
ZVAL_EMPTY_STRING(method);
}
- if (unlikely(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(modelName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(modelName_param) == IS_STRING)) {
zephir_get_strval(modelName, modelName_param);
} else {
ZEPHIR_INIT_VAR(modelName);
@@ -2158,21 +2157,21 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getHasManyRecords) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 4, 1, &method_param, &modelName_param, &modelRelation, &record, ¶meters);
- if (unlikely(Z_TYPE_P(method_param) != IS_STRING && Z_TYPE_P(method_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(method_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(method_param) == IS_STRING)) {
zephir_get_strval(method, method_param);
} else {
ZEPHIR_INIT_VAR(method);
ZVAL_EMPTY_STRING(method);
}
- if (unlikely(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(modelName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(modelName_param) == IS_STRING)) {
zephir_get_strval(modelName, modelName_param);
} else {
ZEPHIR_INIT_VAR(modelName);
@@ -2213,21 +2212,21 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getHasOneRecords) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 4, 1, &method_param, &modelName_param, &modelRelation, &record, ¶meters);
- if (unlikely(Z_TYPE_P(method_param) != IS_STRING && Z_TYPE_P(method_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(method_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(method_param) == IS_STRING)) {
zephir_get_strval(method, method_param);
} else {
ZEPHIR_INIT_VAR(method);
ZVAL_EMPTY_STRING(method);
}
- if (unlikely(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(modelName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(modelName_param) == IS_STRING)) {
zephir_get_strval(modelName, modelName_param);
} else {
ZEPHIR_INIT_VAR(modelName);
@@ -2389,11 +2388,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getRelations) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &modelName_param);
- if (unlikely(Z_TYPE_P(modelName_param) != IS_STRING && Z_TYPE_P(modelName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(modelName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(modelName_param) == IS_STRING)) {
zephir_get_strval(modelName, modelName_param);
} else {
ZEPHIR_INIT_VAR(modelName);
@@ -2410,8 +2409,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getRelations) {
if (zephir_array_isset_fetch(&relations, _0, entityName, 0 TSRMLS_CC)) {
zephir_is_iterable(relations, &_2$$3, &_1$$3, 0, 0, "phalcon/mvc/model/manager.zep", 1559);
for (
- ; zephir_hash_get_current_data_ex(_2$$3, (void**) &_3$$3, &_1$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_2$$3, &_1$$3)
+ ; zend_hash_get_current_data_ex(_2$$3, (void**) &_3$$3, &_1$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_2$$3, &_1$$3)
) {
ZEPHIR_GET_HVALUE(relation, _3$$3);
zephir_array_append(&allRelations, relation, PH_SEPARATE, "phalcon/mvc/model/manager.zep", 1557);
@@ -2422,8 +2421,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getRelations) {
if (zephir_array_isset_fetch(&relations, _4, entityName, 0 TSRMLS_CC)) {
zephir_is_iterable(relations, &_6$$5, &_5$$5, 0, 0, "phalcon/mvc/model/manager.zep", 1568);
for (
- ; zephir_hash_get_current_data_ex(_6$$5, (void**) &_7$$5, &_5$$5) == SUCCESS
- ; zephir_hash_move_forward_ex(_6$$5, &_5$$5)
+ ; zend_hash_get_current_data_ex(_6$$5, (void**) &_7$$5, &_5$$5) == SUCCESS
+ ; zend_hash_move_forward_ex(_6$$5, &_5$$5)
) {
ZEPHIR_GET_HVALUE(relation, _7$$5);
zephir_array_append(&allRelations, relation, PH_SEPARATE, "phalcon/mvc/model/manager.zep", 1566);
@@ -2434,8 +2433,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getRelations) {
if (zephir_array_isset_fetch(&relations, _8, entityName, 0 TSRMLS_CC)) {
zephir_is_iterable(relations, &_10$$7, &_9$$7, 0, 0, "phalcon/mvc/model/manager.zep", 1577);
for (
- ; zephir_hash_get_current_data_ex(_10$$7, (void**) &_11$$7, &_9$$7) == SUCCESS
- ; zephir_hash_move_forward_ex(_10$$7, &_9$$7)
+ ; zend_hash_get_current_data_ex(_10$$7, (void**) &_11$$7, &_9$$7) == SUCCESS
+ ; zend_hash_move_forward_ex(_10$$7, &_9$$7)
) {
ZEPHIR_GET_HVALUE(relation, _11$$7);
zephir_array_append(&allRelations, relation, PH_SEPARATE, "phalcon/mvc/model/manager.zep", 1575);
@@ -2456,21 +2455,21 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getRelationsBetween) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &first_param, &second_param);
- if (unlikely(Z_TYPE_P(first_param) != IS_STRING && Z_TYPE_P(first_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(first_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(first_param) == IS_STRING)) {
zephir_get_strval(first, first_param);
} else {
ZEPHIR_INIT_VAR(first);
ZVAL_EMPTY_STRING(first);
}
- if (unlikely(Z_TYPE_P(second_param) != IS_STRING && Z_TYPE_P(second_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(second_param) != IS_STRING && Z_TYPE_P(second_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'second' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(second_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(second_param) == IS_STRING)) {
zephir_get_strval(second, second_param);
} else {
ZEPHIR_INIT_VAR(second);
@@ -2516,11 +2515,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, createQuery) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &phql_param);
- if (unlikely(Z_TYPE_P(phql_param) != IS_STRING && Z_TYPE_P(phql_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(phql_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(phql_param) == IS_STRING)) {
zephir_get_strval(phql, phql_param);
} else {
ZEPHIR_INIT_VAR(phql);
@@ -2561,11 +2560,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, executeQuery) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 2, &phql_param, &placeholders, &types);
- if (unlikely(Z_TYPE_P(phql_param) != IS_STRING && Z_TYPE_P(phql_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(phql_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(phql_param) == IS_STRING)) {
zephir_get_strval(phql, phql_param);
} else {
ZEPHIR_INIT_VAR(phql);
@@ -2674,11 +2673,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getNamespaceAlias) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &alias_param);
- if (unlikely(Z_TYPE_P(alias_param) != IS_STRING && Z_TYPE_P(alias_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(alias_param) != IS_STRING && Z_TYPE_P(alias_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'alias' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(alias_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(alias_param) == IS_STRING)) {
zephir_get_strval(alias, alias_param);
} else {
ZEPHIR_INIT_VAR(alias);
diff --git a/ext/phalcon/mvc/model/message.zep.c b/ext/phalcon/mvc/model/message.zep.c
index 96363baf9a9..ce80a9345b2 100644
--- a/ext/phalcon/mvc/model/message.zep.c
+++ b/ext/phalcon/mvc/model/message.zep.c
@@ -84,11 +84,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Message, __construct) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 4, &message_param, &field, &type, &model, &code_param);
- if (unlikely(Z_TYPE_P(message_param) != IS_STRING && Z_TYPE_P(message_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(message_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(message_param) == IS_STRING)) {
zephir_get_strval(message, message_param);
} else {
ZEPHIR_INIT_VAR(message);
@@ -134,11 +134,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Message, setType) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &type_param);
- if (unlikely(Z_TYPE_P(type_param) != IS_STRING && Z_TYPE_P(type_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(type_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(type_param) == IS_STRING)) {
zephir_get_strval(type, type_param);
} else {
ZEPHIR_INIT_VAR(type);
@@ -173,11 +173,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Message, setMessage) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &message_param);
- if (unlikely(Z_TYPE_P(message_param) != IS_STRING && Z_TYPE_P(message_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(message_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(message_param) == IS_STRING)) {
zephir_get_strval(message, message_param);
} else {
ZEPHIR_INIT_VAR(message);
diff --git a/ext/phalcon/mvc/model/metadata/apc.zep.c b/ext/phalcon/mvc/model/metadata/apc.zep.c
index 4fb5e32952b..abe70f54a1c 100644
--- a/ext/phalcon/mvc/model/metadata/apc.zep.c
+++ b/ext/phalcon/mvc/model/metadata/apc.zep.c
@@ -94,11 +94,11 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Apc, read) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &key_param);
- if (unlikely(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(key_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(key_param) == IS_STRING)) {
zephir_get_strval(key, key_param);
} else {
ZEPHIR_INIT_VAR(key);
@@ -130,11 +130,11 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Apc, write) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &key_param, &data);
- if (unlikely(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(key_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(key_param) == IS_STRING)) {
zephir_get_strval(key, key_param);
} else {
ZEPHIR_INIT_VAR(key);
diff --git a/ext/phalcon/mvc/model/metadata/files.zep.c b/ext/phalcon/mvc/model/metadata/files.zep.c
index 4c29e7d22df..b4ce878ed41 100644
--- a/ext/phalcon/mvc/model/metadata/files.zep.c
+++ b/ext/phalcon/mvc/model/metadata/files.zep.c
@@ -88,11 +88,11 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Files, read) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &key_param);
- if (unlikely(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(key_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(key_param) == IS_STRING)) {
zephir_get_strval(key, key_param);
} else {
ZEPHIR_INIT_VAR(key);
@@ -132,11 +132,11 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Files, write) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &key_param, &data);
- if (unlikely(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(key_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(key_param) == IS_STRING)) {
zephir_get_strval(key, key_param);
} else {
ZEPHIR_INIT_VAR(key);
diff --git a/ext/phalcon/mvc/model/metadata/libmemcached.zep.c b/ext/phalcon/mvc/model/metadata/libmemcached.zep.c
index f4e8c38cddc..b0296123726 100644
--- a/ext/phalcon/mvc/model/metadata/libmemcached.zep.c
+++ b/ext/phalcon/mvc/model/metadata/libmemcached.zep.c
@@ -19,7 +19,6 @@
#include "kernel/fcall.h"
#include "ext/spl/spl_exceptions.h"
#include "kernel/operators.h"
-#include "kernel/hash.h"
#include "kernel/concat.h"
@@ -132,11 +131,11 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Libmemcached, read) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &key_param);
- if (unlikely(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(key_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(key_param) == IS_STRING)) {
zephir_get_strval(key, key_param);
} else {
ZEPHIR_INIT_VAR(key);
@@ -166,11 +165,11 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Libmemcached, write) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &key_param, &data);
- if (unlikely(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(key_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(key_param) == IS_STRING)) {
zephir_get_strval(key, key_param);
} else {
ZEPHIR_INIT_VAR(key);
@@ -204,8 +203,8 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Libmemcached, reset) {
ZEPHIR_INIT_VAR(_0$$3);
zephir_is_iterable(meta, &_2$$3, &_1$$3, 0, 0, "phalcon/mvc/model/metadata/libmemcached.zep", 132);
for (
- ; zephir_hash_get_current_data_ex(_2$$3, (void**) &_3$$3, &_1$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_2$$3, &_1$$3)
+ ; zend_hash_get_current_data_ex(_2$$3, (void**) &_3$$3, &_1$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_2$$3, &_1$$3)
) {
ZEPHIR_GET_HMKEY(key, _2$$3, _1$$3);
ZEPHIR_GET_HVALUE(_0$$3, _3$$3);
diff --git a/ext/phalcon/mvc/model/metadata/memcache.zep.c b/ext/phalcon/mvc/model/metadata/memcache.zep.c
index a0aeac8cc1b..163453af1f4 100644
--- a/ext/phalcon/mvc/model/metadata/memcache.zep.c
+++ b/ext/phalcon/mvc/model/metadata/memcache.zep.c
@@ -19,7 +19,6 @@
#include "ext/spl/spl_exceptions.h"
#include "kernel/exception.h"
#include "kernel/operators.h"
-#include "kernel/hash.h"
#include "kernel/concat.h"
@@ -135,11 +134,11 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Memcache, read) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &key_param);
- if (unlikely(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(key_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(key_param) == IS_STRING)) {
zephir_get_strval(key, key_param);
} else {
ZEPHIR_INIT_VAR(key);
@@ -169,11 +168,11 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Memcache, write) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &key_param, &data);
- if (unlikely(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(key_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(key_param) == IS_STRING)) {
zephir_get_strval(key, key_param);
} else {
ZEPHIR_INIT_VAR(key);
@@ -207,8 +206,8 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Memcache, reset) {
ZEPHIR_INIT_VAR(_0$$3);
zephir_is_iterable(meta, &_2$$3, &_1$$3, 0, 0, "phalcon/mvc/model/metadata/memcache.zep", 131);
for (
- ; zephir_hash_get_current_data_ex(_2$$3, (void**) &_3$$3, &_1$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_2$$3, &_1$$3)
+ ; zend_hash_get_current_data_ex(_2$$3, (void**) &_3$$3, &_1$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_2$$3, &_1$$3)
) {
ZEPHIR_GET_HMKEY(key, _2$$3, _1$$3);
ZEPHIR_GET_HVALUE(_0$$3, _3$$3);
diff --git a/ext/phalcon/mvc/model/metadata/memory.zep.c b/ext/phalcon/mvc/model/metadata/memory.zep.c
index e9ef2d30335..f8ad7af1691 100644
--- a/ext/phalcon/mvc/model/metadata/memory.zep.c
+++ b/ext/phalcon/mvc/model/metadata/memory.zep.c
@@ -69,11 +69,11 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Memory, read) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &key_param);
- if (unlikely(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(key_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(key_param) == IS_STRING)) {
zephir_get_strval(key, key_param);
} else {
ZEPHIR_INIT_VAR(key);
@@ -99,11 +99,11 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Memory, write) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &key_param, &data);
- if (unlikely(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(key_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(key_param) == IS_STRING)) {
zephir_get_strval(key, key_param);
} else {
ZEPHIR_INIT_VAR(key);
diff --git a/ext/phalcon/mvc/model/metadata/redis.zep.c b/ext/phalcon/mvc/model/metadata/redis.zep.c
index 257ecad024d..07ad014af58 100644
--- a/ext/phalcon/mvc/model/metadata/redis.zep.c
+++ b/ext/phalcon/mvc/model/metadata/redis.zep.c
@@ -19,7 +19,6 @@
#include "ext/spl/spl_exceptions.h"
#include "kernel/exception.h"
#include "kernel/operators.h"
-#include "kernel/hash.h"
#include "kernel/concat.h"
@@ -138,11 +137,11 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Redis, read) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &key_param);
- if (unlikely(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(key_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(key_param) == IS_STRING)) {
zephir_get_strval(key, key_param);
} else {
ZEPHIR_INIT_VAR(key);
@@ -172,11 +171,11 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Redis, write) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &key_param, &data);
- if (unlikely(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(key_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(key_param) == IS_STRING)) {
zephir_get_strval(key, key_param);
} else {
ZEPHIR_INIT_VAR(key);
@@ -210,8 +209,8 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Redis, reset) {
ZEPHIR_INIT_VAR(_0$$3);
zephir_is_iterable(meta, &_2$$3, &_1$$3, 0, 0, "phalcon/mvc/model/metadata/redis.zep", 134);
for (
- ; zephir_hash_get_current_data_ex(_2$$3, (void**) &_3$$3, &_1$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_2$$3, &_1$$3)
+ ; zend_hash_get_current_data_ex(_2$$3, (void**) &_3$$3, &_1$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_2$$3, &_1$$3)
) {
ZEPHIR_GET_HMKEY(key, _2$$3, _1$$3);
ZEPHIR_GET_HVALUE(_0$$3, _3$$3);
diff --git a/ext/phalcon/mvc/model/metadata/session.zep.c b/ext/phalcon/mvc/model/metadata/session.zep.c
index 2cb9bd5ca9e..11f70523bb8 100644
--- a/ext/phalcon/mvc/model/metadata/session.zep.c
+++ b/ext/phalcon/mvc/model/metadata/session.zep.c
@@ -86,11 +86,11 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Session, read) {
zephir_get_global(&_SESSION, SS("_SESSION") TSRMLS_CC);
zephir_fetch_params(1, 1, 0, &key_param);
- if (unlikely(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(key_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(key_param) == IS_STRING)) {
zephir_get_strval(key, key_param);
} else {
ZEPHIR_INIT_VAR(key);
@@ -124,11 +124,11 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Session, write) {
zephir_get_global(&_SESSION, SS("_SESSION") TSRMLS_CC);
zephir_fetch_params(1, 2, 0, &key_param, &data);
- if (unlikely(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(key_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(key_param) == IS_STRING)) {
zephir_get_strval(key, key_param);
} else {
ZEPHIR_INIT_VAR(key);
diff --git a/ext/phalcon/mvc/model/metadata/strategy/annotations.zep.c b/ext/phalcon/mvc/model/metadata/strategy/annotations.zep.c
index cc31e7f3d49..3fe0e9813ad 100644
--- a/ext/phalcon/mvc/model/metadata/strategy/annotations.zep.c
+++ b/ext/phalcon/mvc/model/metadata/strategy/annotations.zep.c
@@ -17,7 +17,6 @@
#include "kernel/memory.h"
#include "kernel/object.h"
#include "kernel/concat.h"
-#include "kernel/hash.h"
#include "kernel/operators.h"
#include "kernel/array.h"
@@ -108,8 +107,8 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Strategy_Annotations, getMetaData) {
array_init(emptyStringValues);
zephir_is_iterable(propertiesAnnotations, &_6, &_5, 0, 0, "phalcon/mvc/model/metadata/strategy/annotations.zep", 184);
for (
- ; zephir_hash_get_current_data_ex(_6, (void**) &_7, &_5) == SUCCESS
- ; zephir_hash_move_forward_ex(_6, &_5)
+ ; zend_hash_get_current_data_ex(_6, (void**) &_7, &_5) == SUCCESS
+ ; zend_hash_move_forward_ex(_6, &_5)
) {
ZEPHIR_GET_HMKEY(property, _6, _5);
ZEPHIR_GET_HVALUE(propAnnotations, _7);
@@ -324,8 +323,8 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Strategy_Annotations, getColumnMaps) {
ZVAL_NULL(reversedColumnMap);
zephir_is_iterable(propertiesAnnotations, &_6, &_5, 0, 0, "phalcon/mvc/model/metadata/strategy/annotations.zep", 262);
for (
- ; zephir_hash_get_current_data_ex(_6, (void**) &_7, &_5) == SUCCESS
- ; zephir_hash_move_forward_ex(_6, &_5)
+ ; zend_hash_get_current_data_ex(_6, (void**) &_7, &_5) == SUCCESS
+ ; zend_hash_move_forward_ex(_6, &_5)
) {
ZEPHIR_GET_HMKEY(property, _6, _5);
ZEPHIR_GET_HVALUE(propAnnotations, _7);
diff --git a/ext/phalcon/mvc/model/metadata/strategy/introspection.zep.c b/ext/phalcon/mvc/model/metadata/strategy/introspection.zep.c
index cd7a3f8accf..916b7cb19f8 100644
--- a/ext/phalcon/mvc/model/metadata/strategy/introspection.zep.c
+++ b/ext/phalcon/mvc/model/metadata/strategy/introspection.zep.c
@@ -18,7 +18,6 @@
#include "kernel/concat.h"
#include "kernel/exception.h"
#include "kernel/object.h"
-#include "kernel/hash.h"
#include "kernel/array.h"
@@ -124,8 +123,8 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Strategy_Introspection, getMetaData) {
array_init(emptyStringValues);
zephir_is_iterable(columns, &_8, &_7, 0, 0, "phalcon/mvc/model/metadata/strategy/introspection.zep", 165);
for (
- ; zephir_hash_get_current_data_ex(_8, (void**) &_9, &_7) == SUCCESS
- ; zephir_hash_move_forward_ex(_8, &_7)
+ ; zend_hash_get_current_data_ex(_8, (void**) &_9, &_7) == SUCCESS
+ ; zend_hash_move_forward_ex(_8, &_7)
) {
ZEPHIR_GET_HVALUE(column, _9);
ZEPHIR_CALL_METHOD(&fieldName, column, "getname", NULL, 0);
@@ -223,8 +222,8 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Strategy_Introspection, getColumnMaps) {
ZEPHIR_CPY_WRT(orderedColumnMap, userColumnMap);
zephir_is_iterable(userColumnMap, &_1$$3, &_0$$3, 0, 0, "phalcon/mvc/model/metadata/strategy/introspection.zep", 205);
for (
- ; zephir_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_1$$3, &_0$$3)
+ ; zend_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_1$$3, &_0$$3)
) {
ZEPHIR_GET_HMKEY(name, _1$$3, _0$$3);
ZEPHIR_GET_HVALUE(userName, _2$$3);
diff --git a/ext/phalcon/mvc/model/metadata/xcache.zep.c b/ext/phalcon/mvc/model/metadata/xcache.zep.c
index 0d568356399..a3bd6fc8e67 100644
--- a/ext/phalcon/mvc/model/metadata/xcache.zep.c
+++ b/ext/phalcon/mvc/model/metadata/xcache.zep.c
@@ -97,11 +97,11 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Xcache, read) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &key_param);
- if (unlikely(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(key_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(key_param) == IS_STRING)) {
zephir_get_strval(key, key_param);
} else {
ZEPHIR_INIT_VAR(key);
@@ -136,11 +136,11 @@ PHP_METHOD(Phalcon_Mvc_Model_MetaData_Xcache, write) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &key_param, &data);
- if (unlikely(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(key_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(key_param) == IS_STRING)) {
zephir_get_strval(key, key_param);
} else {
ZEPHIR_INIT_VAR(key);
diff --git a/ext/phalcon/mvc/model/query.zep.c b/ext/phalcon/mvc/model/query.zep.c
index d6d068c1301..4112d76f566 100644
--- a/ext/phalcon/mvc/model/query.zep.c
+++ b/ext/phalcon/mvc/model/query.zep.c
@@ -19,7 +19,6 @@
#include "kernel/operators.h"
#include "kernel/exception.h"
#include "kernel/concat.h"
-#include "kernel/hash.h"
#include "ext/spl/spl_exceptions.h"
#include "kernel/string.h"
#include "phalcon/mvc/model/orm.h"
@@ -342,8 +341,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _getQualified) {
_9$$12 = zephir_fetch_nproperty_this(this_ptr, SL("_modelsInstances"), PH_NOISY_CC);
zephir_is_iterable(_9$$12, &_11$$12, &_10$$12, 0, 0, "phalcon/mvc/model/query.zep", 288);
for (
- ; zephir_hash_get_current_data_ex(_11$$12, (void**) &_12$$12, &_10$$12) == SUCCESS
- ; zephir_hash_move_forward_ex(_11$$12, &_10$$12)
+ ; zend_hash_get_current_data_ex(_11$$12, (void**) &_12$$12, &_10$$12) == SUCCESS
+ ; zend_hash_move_forward_ex(_11$$12, &_10$$12)
) {
ZEPHIR_GET_HVALUE(model, _12$$12);
ZEPHIR_CALL_METHOD(&_13$$13, metaData, "hasattribute", &_14, 0, model, columnName);
@@ -482,8 +481,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _getCaseExpression) {
zephir_array_fetch_string(&_0, expr, SL("right"), PH_NOISY | PH_READONLY, "phalcon/mvc/model/query.zep", 365 TSRMLS_CC);
zephir_is_iterable(_0, &_2, &_1, 0, 0, "phalcon/mvc/model/query.zep", 380);
for (
- ; zephir_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
- ; zephir_hash_move_forward_ex(_2, &_1)
+ ; zend_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
+ ; zend_hash_move_forward_ex(_2, &_1)
) {
ZEPHIR_GET_HVALUE(whenExpr, _3);
if (zephir_array_isset_string(whenExpr, SS("right"))) {
@@ -551,8 +550,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _getFunctionCall) {
array_init(functionArgs);
zephir_is_iterable(arguments, &_1$$6, &_0$$6, 0, 0, "phalcon/mvc/model/query.zep", 408);
for (
- ; zephir_hash_get_current_data_ex(_1$$6, (void**) &_2$$6, &_0$$6) == SUCCESS
- ; zephir_hash_move_forward_ex(_1$$6, &_0$$6)
+ ; zend_hash_get_current_data_ex(_1$$6, (void**) &_2$$6, &_0$$6) == SUCCESS
+ ; zend_hash_move_forward_ex(_1$$6, &_0$$6)
) {
ZEPHIR_GET_HVALUE(argument, _2$$6);
ZEPHIR_CALL_METHOD(&_3$$7, this_ptr, "_getcallargument", &_4, 338, argument);
@@ -1214,8 +1213,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _getExpression) {
array_init(listItems);
zephir_is_iterable(expr, &_40$$71, &_39$$71, 0, 0, "phalcon/mvc/model/query.zep", 762);
for (
- ; zephir_hash_get_current_data_ex(_40$$71, (void**) &_41$$71, &_39$$71) == SUCCESS
- ; zephir_hash_move_forward_ex(_40$$71, &_39$$71)
+ ; zend_hash_get_current_data_ex(_40$$71, (void**) &_41$$71, &_39$$71) == SUCCESS
+ ; zend_hash_move_forward_ex(_40$$71, &_39$$71)
) {
ZEPHIR_GET_HVALUE(exprListItem, _41$$71);
ZEPHIR_CALL_METHOD(&_42$$72, this_ptr, "_getexpression", &_1, 337, exprListItem);
@@ -1264,8 +1263,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _getSelectColumn) {
_0$$4 = zephir_fetch_nproperty_this(this_ptr, SL("_models"), PH_NOISY_CC);
zephir_is_iterable(_0$$4, &_2$$4, &_1$$4, 0, 0, "phalcon/mvc/model/query.zep", 809);
for (
- ; zephir_hash_get_current_data_ex(_2$$4, (void**) &_3$$4, &_1$$4) == SUCCESS
- ; zephir_hash_move_forward_ex(_2$$4, &_1$$4)
+ ; zend_hash_get_current_data_ex(_2$$4, (void**) &_3$$4, &_1$$4) == SUCCESS
+ ; zend_hash_move_forward_ex(_2$$4, &_1$$4)
) {
ZEPHIR_GET_HMKEY(modelName, _2$$4, _1$$4);
ZEPHIR_GET_HVALUE(source, _3$$4);
@@ -1536,11 +1535,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _getSingleJoin) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 5, 0, &joinType_param, &joinSource, &modelAlias, &joinAlias, &relation);
- if (unlikely(Z_TYPE_P(joinType_param) != IS_STRING && Z_TYPE_P(joinType_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(joinType_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(joinType_param) == IS_STRING)) {
zephir_get_strval(joinType, joinType_param);
} else {
ZEPHIR_INIT_VAR(joinType);
@@ -1583,8 +1582,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _getSingleJoin) {
array_init(sqlJoinPartialConditions);
zephir_is_iterable(fields, &_6$$4, &_5$$4, 0, 0, "phalcon/mvc/model/query.zep", 1096);
for (
- ; zephir_hash_get_current_data_ex(_6$$4, (void**) &_7$$4, &_5$$4) == SUCCESS
- ; zephir_hash_move_forward_ex(_6$$4, &_5$$4)
+ ; zend_hash_get_current_data_ex(_6$$4, (void**) &_7$$4, &_5$$4) == SUCCESS
+ ; zend_hash_move_forward_ex(_6$$4, &_5$$4)
) {
ZEPHIR_GET_HMKEY(position, _6$$4, _5$$4);
ZEPHIR_GET_HVALUE(field, _7$$4);
@@ -1683,8 +1682,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _getMultiJoin) {
if (Z_TYPE_P(fields) == IS_ARRAY) {
zephir_is_iterable(fields, &_1$$3, &_0$$3, 0, 0, "phalcon/mvc/model/query.zep", 1223);
for (
- ; zephir_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_1$$3, &_0$$3)
+ ; zend_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_1$$3, &_0$$3)
) {
ZEPHIR_GET_HMKEY(field, _1$$3, _0$$3);
ZEPHIR_GET_HVALUE(position, _2$$3);
@@ -1856,8 +1855,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _getJoins) {
}
zephir_is_iterable(selectJoins, &_1, &_0, 0, 0, "phalcon/mvc/model/query.zep", 1474);
for (
- ; zephir_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
- ; zephir_hash_move_forward_ex(_1, &_0)
+ ; zend_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
+ ; zend_hash_move_forward_ex(_1, &_0)
) {
ZEPHIR_GET_HVALUE(joinItem, _2);
ZEPHIR_CALL_METHOD(&joinData, this_ptr, "_getjoin", &_3, 343, manager, joinItem);
@@ -1935,8 +1934,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _getJoins) {
zephir_update_property_this(this_ptr, SL("_modelsInstances"), modelsInstances TSRMLS_CC);
zephir_is_iterable(joinPrepared, &_13, &_12, 0, 0, "phalcon/mvc/model/query.zep", 1494);
for (
- ; zephir_hash_get_current_data_ex(_13, (void**) &_14, &_12) == SUCCESS
- ; zephir_hash_move_forward_ex(_13, &_12)
+ ; zend_hash_get_current_data_ex(_13, (void**) &_14, &_12) == SUCCESS
+ ; zend_hash_move_forward_ex(_13, &_12)
) {
ZEPHIR_GET_HMKEY(joinAliasName, _13, _12);
ZEPHIR_GET_HVALUE(joinItem, _14);
@@ -1952,8 +1951,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _getJoins) {
ZEPHIR_INIT_VAR(_18$$14);
zephir_is_iterable(joinPrepared, &_20$$14, &_19$$14, 0, 0, "phalcon/mvc/model/query.zep", 1505);
for (
- ; zephir_hash_get_current_data_ex(_20$$14, (void**) &_21$$14, &_19$$14) == SUCCESS
- ; zephir_hash_move_forward_ex(_20$$14, &_19$$14)
+ ; zend_hash_get_current_data_ex(_20$$14, (void**) &_21$$14, &_19$$14) == SUCCESS
+ ; zend_hash_move_forward_ex(_20$$14, &_19$$14)
) {
ZEPHIR_GET_HMKEY(joinAliasName, _20$$14, _19$$14);
ZEPHIR_GET_HVALUE(_18$$14, _21$$14);
@@ -1979,8 +1978,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _getJoins) {
array_init(fromModels);
zephir_is_iterable(selectTables, &_25, &_24, 0, 0, "phalcon/mvc/model/query.zep", 1519);
for (
- ; zephir_hash_get_current_data_ex(_25, (void**) &_26, &_24) == SUCCESS
- ; zephir_hash_move_forward_ex(_25, &_24)
+ ; zend_hash_get_current_data_ex(_25, (void**) &_26, &_24) == SUCCESS
+ ; zend_hash_move_forward_ex(_25, &_24)
) {
ZEPHIR_GET_HVALUE(tableItem, _26);
zephir_array_fetch_string(&_27$$16, tableItem, SL("qualifiedName"), PH_NOISY | PH_READONLY, "phalcon/mvc/model/query.zep", 1513 TSRMLS_CC);
@@ -1991,15 +1990,15 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _getJoins) {
ZEPHIR_INIT_VAR(_29);
zephir_is_iterable(fromModels, &_31, &_30, 0, 0, "phalcon/mvc/model/query.zep", 1627);
for (
- ; zephir_hash_get_current_data_ex(_31, (void**) &_32, &_30) == SUCCESS
- ; zephir_hash_move_forward_ex(_31, &_30)
+ ; zend_hash_get_current_data_ex(_31, (void**) &_32, &_30) == SUCCESS
+ ; zend_hash_move_forward_ex(_31, &_30)
) {
ZEPHIR_GET_HMKEY(fromModelName, _31, _30);
ZEPHIR_GET_HVALUE(_29, _32);
zephir_is_iterable(joinModels, &_34$$17, &_33$$17, 0, 0, "phalcon/mvc/model/query.zep", 1625);
for (
- ; zephir_hash_get_current_data_ex(_34$$17, (void**) &_35$$17, &_33$$17) == SUCCESS
- ; zephir_hash_move_forward_ex(_34$$17, &_33$$17)
+ ; zend_hash_get_current_data_ex(_34$$17, (void**) &_35$$17, &_33$$17) == SUCCESS
+ ; zend_hash_move_forward_ex(_34$$17, &_33$$17)
) {
ZEPHIR_GET_HMKEY(joinAlias, _34$$17, _33$$17);
ZEPHIR_GET_HVALUE(joinModel, _35$$17);
@@ -2048,8 +2047,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _getJoins) {
if (zephir_array_isset_long(sqlJoin, 0)) {
zephir_is_iterable(sqlJoin, &_45$$26, &_44$$26, 0, 0, "phalcon/mvc/model/query.zep", 1597);
for (
- ; zephir_hash_get_current_data_ex(_45$$26, (void**) &_46$$26, &_44$$26) == SUCCESS
- ; zephir_hash_move_forward_ex(_45$$26, &_44$$26)
+ ; zend_hash_get_current_data_ex(_45$$26, (void**) &_46$$26, &_44$$26) == SUCCESS
+ ; zend_hash_move_forward_ex(_45$$26, &_44$$26)
) {
ZEPHIR_GET_HVALUE(sqlJoinItem, _46$$26);
zephir_array_append(&sqlJoins, sqlJoinItem, PH_SEPARATE, "phalcon/mvc/model/query.zep", 1595);
@@ -2114,8 +2113,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _getOrderClause) {
array_init(orderParts);
zephir_is_iterable(orderColumns, &_1, &_0, 0, 0, "phalcon/mvc/model/query.zep", 1668);
for (
- ; zephir_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
- ; zephir_hash_move_forward_ex(_1, &_0)
+ ; zend_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
+ ; zend_hash_move_forward_ex(_1, &_0)
) {
ZEPHIR_GET_HVALUE(orderItem, _2);
zephir_array_fetch_string(&_3$$5, orderItem, SL("column"), PH_NOISY | PH_READONLY, "phalcon/mvc/model/query.zep", 1650 TSRMLS_CC);
@@ -2170,8 +2169,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _getGroupClause) {
array_init(groupParts);
zephir_is_iterable(group, &_1$$3, &_0$$3, 0, 0, "phalcon/mvc/model/query.zep", 1686);
for (
- ; zephir_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_1$$3, &_0$$3)
+ ; zend_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_1$$3, &_0$$3)
) {
ZEPHIR_GET_HVALUE(groupItem, _2$$3);
ZEPHIR_CALL_METHOD(&_3$$4, this_ptr, "_getexpression", &_4, 337, groupItem);
@@ -2321,8 +2320,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect) {
array_init(automaticJoins);
zephir_is_iterable(selectedModels, &_1, &_0, 0, 0, "phalcon/mvc/model/query.zep", 1940);
for (
- ; zephir_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
- ; zephir_hash_move_forward_ex(_1, &_0)
+ ; zend_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
+ ; zend_hash_move_forward_ex(_1, &_0)
) {
ZEPHIR_GET_HVALUE(selectedModel, _2);
ZEPHIR_OBS_NVAR(qualifiedName);
@@ -2404,8 +2403,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect) {
}
zephir_is_iterable(withs, &_14$$24, &_13$$24, 0, 0, "phalcon/mvc/model/query.zep", 1932);
for (
- ; zephir_hash_get_current_data_ex(_14$$24, (void**) &_15$$24, &_13$$24) == SUCCESS
- ; zephir_hash_move_forward_ex(_14$$24, &_13$$24)
+ ; zend_hash_get_current_data_ex(_14$$24, (void**) &_15$$24, &_13$$24) == SUCCESS
+ ; zend_hash_move_forward_ex(_14$$24, &_13$$24)
) {
ZEPHIR_GET_HVALUE(withItem, _15$$24);
ZEPHIR_SINIT_NVAR(_16$$27);
@@ -2557,16 +2556,16 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect) {
array_init(sqlColumnAliases);
zephir_is_iterable(selectColumns, &_43, &_42, 0, 0, "phalcon/mvc/model/query.zep", 2025);
for (
- ; zephir_hash_get_current_data_ex(_43, (void**) &_44, &_42) == SUCCESS
- ; zephir_hash_move_forward_ex(_43, &_42)
+ ; zend_hash_get_current_data_ex(_43, (void**) &_44, &_42) == SUCCESS
+ ; zend_hash_move_forward_ex(_43, &_42)
) {
ZEPHIR_GET_HVALUE(column, _44);
ZEPHIR_CALL_METHOD(&_45$$41, this_ptr, "_getselectcolumn", &_46, 348, column);
zephir_check_call_status();
zephir_is_iterable(_45$$41, &_48$$41, &_47$$41, 0, 0, "phalcon/mvc/model/query.zep", 2024);
for (
- ; zephir_hash_get_current_data_ex(_48$$41, (void**) &_49$$41, &_47$$41) == SUCCESS
- ; zephir_hash_move_forward_ex(_48$$41, &_47$$41)
+ ; zend_hash_get_current_data_ex(_48$$41, (void**) &_49$$41, &_47$$41) == SUCCESS
+ ; zend_hash_move_forward_ex(_48$$41, &_47$$41)
) {
ZEPHIR_GET_HVALUE(sqlColumn, _49$$41);
ZEPHIR_OBS_NVAR(alias);
@@ -2720,8 +2719,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareInsert) {
zephir_array_fetch_string(&_4, ast, SL("values"), PH_NOISY | PH_READONLY, "phalcon/mvc/model/query.zep", 2133 TSRMLS_CC);
zephir_is_iterable(_4, &_6, &_5, 0, 0, "phalcon/mvc/model/query.zep", 2142);
for (
- ; zephir_hash_get_current_data_ex(_6, (void**) &_7, &_5) == SUCCESS
- ; zephir_hash_move_forward_ex(_6, &_5)
+ ; zend_hash_get_current_data_ex(_6, (void**) &_7, &_5) == SUCCESS
+ ; zend_hash_move_forward_ex(_6, &_5)
) {
ZEPHIR_GET_HVALUE(exprValue, _7);
ZEPHIR_INIT_NVAR(_8$$9);
@@ -2752,8 +2751,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareInsert) {
array_init(sqlFields);
zephir_is_iterable(fields, &_14$$10, &_13$$10, 0, 0, "phalcon/mvc/model/query.zep", 2166);
for (
- ; zephir_hash_get_current_data_ex(_14$$10, (void**) &_15$$10, &_13$$10) == SUCCESS
- ; zephir_hash_move_forward_ex(_14$$10, &_13$$10)
+ ; zend_hash_get_current_data_ex(_14$$10, (void**) &_15$$10, &_13$$10) == SUCCESS
+ ; zend_hash_move_forward_ex(_14$$10, &_13$$10)
) {
ZEPHIR_GET_HVALUE(field, _15$$10);
ZEPHIR_OBS_NVAR(name);
@@ -2836,8 +2835,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareUpdate) {
zephir_read_property_this(&manager, this_ptr, SL("_manager"), PH_NOISY_CC);
zephir_is_iterable(updateTables, &_1, &_0, 0, 0, "phalcon/mvc/model/query.zep", 2273);
for (
- ; zephir_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
- ; zephir_hash_move_forward_ex(_1, &_0)
+ ; zend_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
+ ; zend_hash_move_forward_ex(_1, &_0)
) {
ZEPHIR_GET_HVALUE(table, _2);
ZEPHIR_OBS_NVAR(qualifiedName);
@@ -2908,8 +2907,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareUpdate) {
notQuoting = 0;
zephir_is_iterable(updateValues, &_10, &_9, 0, 0, "phalcon/mvc/model/query.zep", 2297);
for (
- ; zephir_hash_get_current_data_ex(_10, (void**) &_11, &_9) == SUCCESS
- ; zephir_hash_move_forward_ex(_10, &_9)
+ ; zend_hash_get_current_data_ex(_10, (void**) &_11, &_9) == SUCCESS
+ ; zend_hash_move_forward_ex(_10, &_9)
) {
ZEPHIR_GET_HVALUE(updateValue, _11);
zephir_array_fetch_string(&_13$$17, updateValue, SL("column"), PH_NOISY | PH_READONLY, "phalcon/mvc/model/query.zep", 2289 TSRMLS_CC);
@@ -3012,8 +3011,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareDelete) {
zephir_read_property_this(&manager, this_ptr, SL("_manager"), PH_NOISY_CC);
zephir_is_iterable(deleteTables, &_1, &_0, 0, 0, "phalcon/mvc/model/query.zep", 2403);
for (
- ; zephir_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
- ; zephir_hash_move_forward_ex(_1, &_0)
+ ; zend_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
+ ; zend_hash_move_forward_ex(_1, &_0)
) {
ZEPHIR_GET_HVALUE(table, _2);
ZEPHIR_OBS_NVAR(qualifiedName);
@@ -3224,8 +3223,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _executeSelect) {
zephir_array_fetch_string(&models, intermediate, SL("models"), PH_NOISY, "phalcon/mvc/model/query.zep", 2536 TSRMLS_CC);
zephir_is_iterable(models, &_1, &_0, 0, 0, "phalcon/mvc/model/query.zep", 2564);
for (
- ; zephir_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
- ; zephir_hash_move_forward_ex(_1, &_0)
+ ; zend_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
+ ; zend_hash_move_forward_ex(_1, &_0)
) {
ZEPHIR_GET_HVALUE(modelName, _2);
ZEPHIR_OBS_NVAR(model);
@@ -3265,8 +3264,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _executeSelect) {
ZEPHIR_CPY_WRT(columns1, columns);
zephir_is_iterable(columns, &_8, &_7, 0, 0, "phalcon/mvc/model/query.zep", 2591);
for (
- ; zephir_hash_get_current_data_ex(_8, (void**) &_9, &_7) == SUCCESS
- ; zephir_hash_move_forward_ex(_8, &_7)
+ ; zend_hash_get_current_data_ex(_8, (void**) &_9, &_7) == SUCCESS
+ ; zend_hash_move_forward_ex(_8, &_7)
) {
ZEPHIR_GET_HVALUE(column, _9);
if (Z_TYPE_P(column) != IS_ARRAY) {
@@ -3309,8 +3308,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _executeSelect) {
zephir_read_property_this(&metaData, this_ptr, SL("_metaData"), PH_NOISY_CC);
zephir_is_iterable(columns, &_12, &_11, 0, 0, "phalcon/mvc/model/query.zep", 2690);
for (
- ; zephir_hash_get_current_data_ex(_12, (void**) &_13, &_11) == SUCCESS
- ; zephir_hash_move_forward_ex(_12, &_11)
+ ; zend_hash_get_current_data_ex(_12, (void**) &_13, &_11) == SUCCESS
+ ; zend_hash_move_forward_ex(_12, &_11)
) {
ZEPHIR_GET_HMKEY(aliasCopy, _12, _11);
ZEPHIR_GET_HVALUE(column, _13);
@@ -3339,8 +3338,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _executeSelect) {
}
zephir_is_iterable(attributes, &_20$$24, &_19$$24, 0, 0, "phalcon/mvc/model/query.zep", 2646);
for (
- ; zephir_hash_get_current_data_ex(_20$$24, (void**) &_21$$24, &_19$$24) == SUCCESS
- ; zephir_hash_move_forward_ex(_20$$24, &_19$$24)
+ ; zend_hash_get_current_data_ex(_20$$24, (void**) &_21$$24, &_19$$24) == SUCCESS
+ ; zend_hash_move_forward_ex(_20$$24, &_19$$24)
) {
ZEPHIR_GET_HVALUE(attribute, _21$$24);
ZEPHIR_INIT_NVAR(_22$$27);
@@ -3366,8 +3365,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _executeSelect) {
} else {
zephir_is_iterable(attributes, &_28$$29, &_27$$29, 0, 0, "phalcon/mvc/model/query.zep", 2664);
for (
- ; zephir_hash_get_current_data_ex(_28$$29, (void**) &_29$$29, &_27$$29) == SUCCESS
- ; zephir_hash_move_forward_ex(_28$$29, &_27$$29)
+ ; zend_hash_get_current_data_ex(_28$$29, (void**) &_29$$29, &_27$$29) == SUCCESS
+ ; zend_hash_move_forward_ex(_28$$29, &_27$$29)
) {
ZEPHIR_GET_HVALUE(attribute, _29$$29);
ZEPHIR_INIT_NVAR(_30$$30);
@@ -3412,8 +3411,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _executeSelect) {
array_init(processed);
zephir_is_iterable(bindParams, &_33$$37, &_32$$37, 0, 0, "phalcon/mvc/model/query.zep", 2711);
for (
- ; zephir_hash_get_current_data_ex(_33$$37, (void**) &_34$$37, &_32$$37) == SUCCESS
- ; zephir_hash_move_forward_ex(_33$$37, &_32$$37)
+ ; zend_hash_get_current_data_ex(_33$$37, (void**) &_34$$37, &_32$$37) == SUCCESS
+ ; zend_hash_move_forward_ex(_33$$37, &_32$$37)
) {
ZEPHIR_GET_HMKEY(wildcard, _33$$37, _32$$37);
ZEPHIR_GET_HVALUE(value, _34$$37);
@@ -3438,8 +3437,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _executeSelect) {
array_init(processedTypes);
zephir_is_iterable(bindTypes, &_37$$43, &_36$$43, 0, 0, "phalcon/mvc/model/query.zep", 2727);
for (
- ; zephir_hash_get_current_data_ex(_37$$43, (void**) &_38$$43, &_36$$43) == SUCCESS
- ; zephir_hash_move_forward_ex(_37$$43, &_36$$43)
+ ; zend_hash_get_current_data_ex(_37$$43, (void**) &_38$$43, &_36$$43) == SUCCESS
+ ; zend_hash_move_forward_ex(_37$$43, &_36$$43)
) {
ZEPHIR_GET_HMKEY(typeWildcard, _37$$43, _36$$43);
ZEPHIR_GET_HVALUE(value, _38$$43);
@@ -3516,8 +3515,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _executeSelect) {
zephir_check_call_status();
zephir_is_iterable(_43$$60, &_45$$60, &_44$$60, 0, 0, "phalcon/mvc/model/query.zep", 2813);
for (
- ; zephir_hash_get_current_data_ex(_45$$60, (void**) &_46$$60, &_44$$60) == SUCCESS
- ; zephir_hash_move_forward_ex(_45$$60, &_44$$60)
+ ; zend_hash_get_current_data_ex(_45$$60, (void**) &_46$$60, &_44$$60) == SUCCESS
+ ; zend_hash_move_forward_ex(_45$$60, &_44$$60)
) {
ZEPHIR_GET_HVALUE(attribute, _46$$60);
ZEPHIR_INIT_NVAR(_47$$61);
@@ -3532,8 +3531,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _executeSelect) {
array_init(simpleColumnMap);
zephir_is_iterable(columnMap, &_50$$62, &_49$$62, 0, 0, "phalcon/mvc/model/query.zep", 2818);
for (
- ; zephir_hash_get_current_data_ex(_50$$62, (void**) &_51$$62, &_49$$62) == SUCCESS
- ; zephir_hash_move_forward_ex(_50$$62, &_49$$62)
+ ; zend_hash_get_current_data_ex(_50$$62, (void**) &_51$$62, &_49$$62) == SUCCESS
+ ; zend_hash_move_forward_ex(_50$$62, &_49$$62)
) {
ZEPHIR_GET_HMKEY(column, _50$$62, _49$$62);
ZEPHIR_GET_HVALUE(attribute, _51$$62);
@@ -3693,8 +3692,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _executeInsert) {
array_init(insertValues);
zephir_is_iterable(values, &_3, &_2, 0, 0, "phalcon/mvc/model/query.zep", 2983);
for (
- ; zephir_hash_get_current_data_ex(_3, (void**) &_4, &_2) == SUCCESS
- ; zephir_hash_move_forward_ex(_3, &_2)
+ ; zend_hash_get_current_data_ex(_3, (void**) &_4, &_2) == SUCCESS
+ ; zend_hash_move_forward_ex(_3, &_2)
) {
ZEPHIR_GET_HMKEY(number, _3, _2);
ZEPHIR_GET_HVALUE(value, _4);
@@ -3846,8 +3845,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _executeUpdate) {
ZEPHIR_CPY_WRT(selectBindTypes, bindTypes);
zephir_is_iterable(fields, &_3, &_2, 0, 0, "phalcon/mvc/model/query.zep", 3103);
for (
- ; zephir_hash_get_current_data_ex(_3, (void**) &_4, &_2) == SUCCESS
- ; zephir_hash_move_forward_ex(_3, &_2)
+ ; zend_hash_get_current_data_ex(_3, (void**) &_4, &_2) == SUCCESS
+ ; zend_hash_move_forward_ex(_3, &_2)
) {
ZEPHIR_GET_HMKEY(number, _3, _2);
ZEPHIR_GET_HVALUE(field, _4);
diff --git a/ext/phalcon/mvc/model/query/builder.zep.c b/ext/phalcon/mvc/model/query/builder.zep.c
index 78ae3f2eccb..131ab2d6b4e 100644
--- a/ext/phalcon/mvc/model/query/builder.zep.c
+++ b/ext/phalcon/mvc/model/query/builder.zep.c
@@ -15,7 +15,6 @@
#include "kernel/array.h"
#include "kernel/memory.h"
#include "kernel/object.h"
-#include "kernel/hash.h"
#include "kernel/operators.h"
#include "kernel/string.h"
#include "ext/spl/spl_exceptions.h"
@@ -142,8 +141,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, __construct) {
array_init(mergedTypes);
zephir_is_iterable(conditions, &_1$$7, &_0$$7, 0, 0, "phalcon/mvc/model/query/builder.zep", 152);
for (
- ; zephir_hash_get_current_data_ex(_1$$7, (void**) &_2$$7, &_0$$7) == SUCCESS
- ; zephir_hash_move_forward_ex(_1$$7, &_0$$7)
+ ; zend_hash_get_current_data_ex(_1$$7, (void**) &_2$$7, &_0$$7) == SUCCESS
+ ; zend_hash_move_forward_ex(_1$$7, &_0$$7)
) {
ZEPHIR_GET_HVALUE(singleConditionArray, _2$$7);
if (Z_TYPE_P(singleConditionArray) == IS_ARRAY) {
@@ -513,11 +512,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, join) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 3, &model_param, &conditions, &alias, &type);
- if (unlikely(Z_TYPE_P(model_param) != IS_STRING && Z_TYPE_P(model_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(model_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(model_param) == IS_STRING)) {
zephir_get_strval(model, model_param);
} else {
ZEPHIR_INIT_VAR(model);
@@ -574,11 +573,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, innerJoin) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 2, &model_param, &conditions, &alias);
- if (unlikely(Z_TYPE_P(model_param) != IS_STRING && Z_TYPE_P(model_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(model_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(model_param) == IS_STRING)) {
zephir_get_strval(model, model_param);
} else {
ZEPHIR_INIT_VAR(model);
@@ -626,11 +625,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, leftJoin) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 2, &model_param, &conditions, &alias);
- if (unlikely(Z_TYPE_P(model_param) != IS_STRING && Z_TYPE_P(model_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(model_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(model_param) == IS_STRING)) {
zephir_get_strval(model, model_param);
} else {
ZEPHIR_INIT_VAR(model);
@@ -678,11 +677,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, rightJoin) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 2, &model_param, &conditions, &alias);
- if (unlikely(Z_TYPE_P(model_param) != IS_STRING && Z_TYPE_P(model_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(model_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(model_param) == IS_STRING)) {
zephir_get_strval(model, model_param);
} else {
ZEPHIR_INIT_VAR(model);
@@ -813,11 +812,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, andWhere) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 2, &conditions_param, &bindParams, &bindTypes);
- if (unlikely(Z_TYPE_P(conditions_param) != IS_STRING && Z_TYPE_P(conditions_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(conditions_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(conditions_param) == IS_STRING)) {
zephir_get_strval(conditions, conditions_param);
} else {
ZEPHIR_INIT_VAR(conditions);
@@ -873,11 +872,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, orWhere) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 2, &conditions_param, &bindParams, &bindTypes);
- if (unlikely(Z_TYPE_P(conditions_param) != IS_STRING && Z_TYPE_P(conditions_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(conditions_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(conditions_param) == IS_STRING)) {
zephir_get_strval(conditions, conditions_param);
} else {
ZEPHIR_INIT_VAR(conditions);
@@ -922,11 +921,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, betweenWhere) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 3, 1, &expr_param, &minimum, &maximum, &operator_param);
- if (unlikely(Z_TYPE_P(expr_param) != IS_STRING && Z_TYPE_P(expr_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(expr_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(expr_param) == IS_STRING)) {
zephir_get_strval(expr, expr_param);
} else {
ZEPHIR_INIT_VAR(expr);
@@ -936,11 +935,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, betweenWhere) {
ZEPHIR_INIT_VAR(operator);
ZVAL_STRING(operator, "and", 1);
} else {
- if (unlikely(Z_TYPE_P(operator_param) != IS_STRING && Z_TYPE_P(operator_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(operator_param) != IS_STRING && Z_TYPE_P(operator_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'operator' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(operator_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(operator_param) == IS_STRING)) {
zephir_get_strval(operator, operator_param);
} else {
ZEPHIR_INIT_VAR(operator);
@@ -1010,11 +1009,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, notBetweenWhere) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 3, 1, &expr_param, &minimum, &maximum, &operator_param);
- if (unlikely(Z_TYPE_P(expr_param) != IS_STRING && Z_TYPE_P(expr_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(expr_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(expr_param) == IS_STRING)) {
zephir_get_strval(expr, expr_param);
} else {
ZEPHIR_INIT_VAR(expr);
@@ -1024,11 +1023,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, notBetweenWhere) {
ZEPHIR_INIT_VAR(operator);
ZVAL_STRING(operator, "and", 1);
} else {
- if (unlikely(Z_TYPE_P(operator_param) != IS_STRING && Z_TYPE_P(operator_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(operator_param) != IS_STRING && Z_TYPE_P(operator_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'operator' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(operator_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(operator_param) == IS_STRING)) {
zephir_get_strval(operator, operator_param);
} else {
ZEPHIR_INIT_VAR(operator);
@@ -1100,11 +1099,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, inWhere) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 1, &expr_param, &values_param, &operator_param);
- if (unlikely(Z_TYPE_P(expr_param) != IS_STRING && Z_TYPE_P(expr_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(expr_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(expr_param) == IS_STRING)) {
zephir_get_strval(expr, expr_param);
} else {
ZEPHIR_INIT_VAR(expr);
@@ -1115,11 +1114,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, inWhere) {
ZEPHIR_INIT_VAR(operator);
ZVAL_STRING(operator, "and", 1);
} else {
- if (unlikely(Z_TYPE_P(operator_param) != IS_STRING && Z_TYPE_P(operator_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(operator_param) != IS_STRING && Z_TYPE_P(operator_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'operator' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(operator_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(operator_param) == IS_STRING)) {
zephir_get_strval(operator, operator_param);
} else {
ZEPHIR_INIT_VAR(operator);
@@ -1164,8 +1163,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, inWhere) {
array_init(bindKeys);
zephir_is_iterable(values, &_8, &_7, 0, 0, "phalcon/mvc/model/query/builder.zep", 804);
for (
- ; zephir_hash_get_current_data_ex(_8, (void**) &_9, &_7) == SUCCESS
- ; zephir_hash_move_forward_ex(_8, &_7)
+ ; zend_hash_get_current_data_ex(_8, (void**) &_9, &_7) == SUCCESS
+ ; zend_hash_move_forward_ex(_8, &_7)
) {
ZEPHIR_GET_HVALUE(value, _9);
ZEPHIR_SINIT_NVAR(_10$$5);
@@ -1212,11 +1211,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, notInWhere) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 1, &expr_param, &values_param, &operator_param);
- if (unlikely(Z_TYPE_P(expr_param) != IS_STRING && Z_TYPE_P(expr_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(expr_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(expr_param) == IS_STRING)) {
zephir_get_strval(expr, expr_param);
} else {
ZEPHIR_INIT_VAR(expr);
@@ -1227,11 +1226,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, notInWhere) {
ZEPHIR_INIT_VAR(operator);
ZVAL_STRING(operator, "and", 1);
} else {
- if (unlikely(Z_TYPE_P(operator_param) != IS_STRING && Z_TYPE_P(operator_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(operator_param) != IS_STRING && Z_TYPE_P(operator_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'operator' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(operator_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(operator_param) == IS_STRING)) {
zephir_get_strval(operator, operator_param);
} else {
ZEPHIR_INIT_VAR(operator);
@@ -1276,8 +1275,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, notInWhere) {
array_init(bindKeys);
zephir_is_iterable(values, &_8, &_7, 0, 0, "phalcon/mvc/model/query/builder.zep", 853);
for (
- ; zephir_hash_get_current_data_ex(_8, (void**) &_9, &_7) == SUCCESS
- ; zephir_hash_move_forward_ex(_8, &_7)
+ ; zend_hash_get_current_data_ex(_8, (void**) &_9, &_7) == SUCCESS
+ ; zend_hash_move_forward_ex(_8, &_7)
) {
ZEPHIR_GET_HVALUE(value, _9);
ZEPHIR_SINIT_NVAR(_10$$5);
@@ -1369,11 +1368,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, having) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &having_param);
- if (unlikely(Z_TYPE_P(having_param) != IS_STRING && Z_TYPE_P(having_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(having_param) != IS_STRING && Z_TYPE_P(having_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'having' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(having_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(having_param) == IS_STRING)) {
zephir_get_strval(having, having_param);
} else {
ZEPHIR_INIT_VAR(having);
@@ -1454,7 +1453,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, limit) {
ZEPHIR_CALL_FUNCTION(&_1, "abs", &_2, 198, &_0);
zephir_check_call_status();
limit = zephir_get_numberval(_1);
- if (unlikely(limit == 0)) {
+ if (UNEXPECTED(limit == 0)) {
RETURN_THIS();
}
ZEPHIR_INIT_ZVAL_NREF(_3);
@@ -1695,8 +1694,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getPhql) {
array_init(selectedColumns);
zephir_is_iterable(columns, &_12$$25, &_11$$25, 0, 0, "phalcon/mvc/model/query/builder.zep", 1141);
for (
- ; zephir_hash_get_current_data_ex(_12$$25, (void**) &_13$$25, &_11$$25) == SUCCESS
- ; zephir_hash_move_forward_ex(_12$$25, &_11$$25)
+ ; zend_hash_get_current_data_ex(_12$$25, (void**) &_13$$25, &_11$$25) == SUCCESS
+ ; zend_hash_move_forward_ex(_12$$25, &_11$$25)
) {
ZEPHIR_GET_HMKEY(columnAlias, _12$$25, _11$$25);
ZEPHIR_GET_HVALUE(column, _13$$25);
@@ -1722,8 +1721,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getPhql) {
array_init(selectedColumns);
zephir_is_iterable(models, &_18$$31, &_17$$31, 0, 0, "phalcon/mvc/model/query/builder.zep", 1164);
for (
- ; zephir_hash_get_current_data_ex(_18$$31, (void**) &_19$$31, &_17$$31) == SUCCESS
- ; zephir_hash_move_forward_ex(_18$$31, &_17$$31)
+ ; zend_hash_get_current_data_ex(_18$$31, (void**) &_19$$31, &_17$$31) == SUCCESS
+ ; zend_hash_move_forward_ex(_18$$31, &_17$$31)
) {
ZEPHIR_GET_HMKEY(modelColumnAlias, _18$$31, _17$$31);
ZEPHIR_GET_HVALUE(model, _19$$31);
@@ -1755,8 +1754,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getPhql) {
array_init(selectedModels);
zephir_is_iterable(models, &_26$$36, &_25$$36, 0, 0, "phalcon/mvc/model/query/builder.zep", 1187);
for (
- ; zephir_hash_get_current_data_ex(_26$$36, (void**) &_27$$36, &_25$$36) == SUCCESS
- ; zephir_hash_move_forward_ex(_26$$36, &_25$$36)
+ ; zend_hash_get_current_data_ex(_26$$36, (void**) &_27$$36, &_25$$36) == SUCCESS
+ ; zend_hash_move_forward_ex(_26$$36, &_25$$36)
) {
ZEPHIR_GET_HMKEY(modelAlias, _26$$36, _25$$36);
ZEPHIR_GET_HVALUE(model, _27$$36);
@@ -1790,8 +1789,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getPhql) {
if (Z_TYPE_P(joins) == IS_ARRAY) {
zephir_is_iterable(joins, &_35$$41, &_34$$41, 0, 0, "phalcon/mvc/model/query/builder.zep", 1244);
for (
- ; zephir_hash_get_current_data_ex(_35$$41, (void**) &_36$$41, &_34$$41) == SUCCESS
- ; zephir_hash_move_forward_ex(_35$$41, &_34$$41)
+ ; zend_hash_get_current_data_ex(_35$$41, (void**) &_36$$41, &_34$$41) == SUCCESS
+ ; zend_hash_move_forward_ex(_35$$41, &_34$$41)
) {
ZEPHIR_GET_HVALUE(join, _36$$41);
ZEPHIR_OBS_NVAR(joinModel);
@@ -1857,8 +1856,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getPhql) {
array_init(groupItems);
zephir_is_iterable(group, &_50$$49, &_49$$49, 0, 0, "phalcon/mvc/model/query/builder.zep", 1271);
for (
- ; zephir_hash_get_current_data_ex(_50$$49, (void**) &_51$$49, &_49$$49) == SUCCESS
- ; zephir_hash_move_forward_ex(_50$$49, &_49$$49)
+ ; zend_hash_get_current_data_ex(_50$$49, (void**) &_51$$49, &_49$$49) == SUCCESS
+ ; zend_hash_move_forward_ex(_50$$49, &_49$$49)
) {
ZEPHIR_GET_HVALUE(groupItem, _51$$49);
ZEPHIR_CALL_METHOD(&_52$$52, this_ptr, "autoescape", &_7, 369, groupItem);
@@ -1888,8 +1887,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getPhql) {
array_init(orderItems);
zephir_is_iterable(order, &_57$$56, &_56$$56, 0, 0, "phalcon/mvc/model/query/builder.zep", 1291);
for (
- ; zephir_hash_get_current_data_ex(_57$$56, (void**) &_58$$56, &_56$$56) == SUCCESS
- ; zephir_hash_move_forward_ex(_57$$56, &_56$$56)
+ ; zend_hash_get_current_data_ex(_57$$56, (void**) &_58$$56, &_56$$56) == SUCCESS
+ ; zend_hash_move_forward_ex(_57$$56, &_56$$56)
) {
ZEPHIR_GET_HVALUE(orderItem, _58$$56);
ZEPHIR_CALL_METHOD(&_59$$57, this_ptr, "autoescape", &_7, 369, orderItem);
diff --git a/ext/phalcon/mvc/model/query/lang.zep.c b/ext/phalcon/mvc/model/query/lang.zep.c
index eedb0be6ed6..bab7b2df953 100644
--- a/ext/phalcon/mvc/model/query/lang.zep.c
+++ b/ext/phalcon/mvc/model/query/lang.zep.c
@@ -61,11 +61,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Lang, parsePHQL) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &phql_param);
- if (unlikely(Z_TYPE_P(phql_param) != IS_STRING && Z_TYPE_P(phql_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(phql_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(phql_param) == IS_STRING)) {
zephir_get_strval(phql, phql_param);
} else {
ZEPHIR_INIT_VAR(phql);
diff --git a/ext/phalcon/mvc/model/relation.zep.c b/ext/phalcon/mvc/model/relation.zep.c
index 96ffb272ce0..825eeff82c2 100644
--- a/ext/phalcon/mvc/model/relation.zep.c
+++ b/ext/phalcon/mvc/model/relation.zep.c
@@ -83,11 +83,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Relation, __construct) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 4, 1, &type, &referencedModel_param, &fields, &referencedFields, &options);
- if (unlikely(Z_TYPE_P(referencedModel_param) != IS_STRING && Z_TYPE_P(referencedModel_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(referencedModel_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(referencedModel_param) == IS_STRING)) {
zephir_get_strval(referencedModel, referencedModel_param);
} else {
ZEPHIR_INIT_VAR(referencedModel);
@@ -122,11 +122,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Relation, setIntermediateRelation) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 3, 0, &intermediateFields, &intermediateModel_param, &intermediateReferencedFields);
- if (unlikely(Z_TYPE_P(intermediateModel_param) != IS_STRING && Z_TYPE_P(intermediateModel_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(intermediateModel_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(intermediateModel_param) == IS_STRING)) {
zephir_get_strval(intermediateModel, intermediateModel_param);
} else {
ZEPHIR_INIT_VAR(intermediateModel);
@@ -214,11 +214,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Relation, getOption) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &name_param);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
diff --git a/ext/phalcon/mvc/model/resultset.zep.c b/ext/phalcon/mvc/model/resultset.zep.c
index 165f7b4ff86..68bc0e94ae7 100644
--- a/ext/phalcon/mvc/model/resultset.zep.c
+++ b/ext/phalcon/mvc/model/resultset.zep.c
@@ -362,7 +362,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset, offsetGet) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &index_param);
- if (unlikely(Z_TYPE_P(index_param) != IS_LONG)) {
+ if (UNEXPECTED(Z_TYPE_P(index_param) != IS_LONG)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'index' must be a int") TSRMLS_CC);
RETURN_MM_NULL();
}
diff --git a/ext/phalcon/mvc/model/resultset/complex.zep.c b/ext/phalcon/mvc/model/resultset/complex.zep.c
index d4ed1a488ae..eb5663dca40 100644
--- a/ext/phalcon/mvc/model/resultset/complex.zep.c
+++ b/ext/phalcon/mvc/model/resultset/complex.zep.c
@@ -16,7 +16,6 @@
#include "kernel/fcall.h"
#include "kernel/memory.h"
#include "kernel/operators.h"
-#include "kernel/hash.h"
#include "kernel/exception.h"
#include "kernel/array.h"
#include "kernel/concat.h"
@@ -137,8 +136,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Complex, current) {
_1 = zephir_fetch_nproperty_this(this_ptr, SL("_columnTypes"), PH_NOISY_CC);
zephir_is_iterable(_1, &_3, &_2, 0, 0, "phalcon/mvc/model/resultset/complex.zep", 246);
for (
- ; zephir_hash_get_current_data_ex(_3, (void**) &_4, &_2) == SUCCESS
- ; zephir_hash_move_forward_ex(_3, &_2)
+ ; zend_hash_get_current_data_ex(_3, (void**) &_4, &_2) == SUCCESS
+ ; zend_hash_move_forward_ex(_3, &_2)
) {
ZEPHIR_GET_HMKEY(alias, _3, _2);
ZEPHIR_GET_HVALUE(column, _4);
@@ -159,8 +158,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Complex, current) {
array_init(rowModel);
zephir_is_iterable(attributes, &_6$$11, &_5$$11, 0, 0, "phalcon/mvc/model/resultset/complex.zep", 162);
for (
- ; zephir_hash_get_current_data_ex(_6$$11, (void**) &_7$$11, &_5$$11) == SUCCESS
- ; zephir_hash_move_forward_ex(_6$$11, &_5$$11)
+ ; zend_hash_get_current_data_ex(_6$$11, (void**) &_7$$11, &_5$$11) == SUCCESS
+ ; zend_hash_move_forward_ex(_6$$11, &_5$$11)
) {
ZEPHIR_GET_HVALUE(attribute, _7$$11);
ZEPHIR_OBS_NVAR(columnValue);
@@ -321,11 +320,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Complex, unserialize) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &data_param);
- if (unlikely(Z_TYPE_P(data_param) != IS_STRING && Z_TYPE_P(data_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(data_param) != IS_STRING && Z_TYPE_P(data_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'data' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(data_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(data_param) == IS_STRING)) {
zephir_get_strval(data, data_param);
} else {
ZEPHIR_INIT_VAR(data);
diff --git a/ext/phalcon/mvc/model/resultset/simple.zep.c b/ext/phalcon/mvc/model/resultset/simple.zep.c
index ab6be9daacc..b55c515a9dd 100644
--- a/ext/phalcon/mvc/model/resultset/simple.zep.c
+++ b/ext/phalcon/mvc/model/resultset/simple.zep.c
@@ -16,7 +16,6 @@
#include "kernel/fcall.h"
#include "kernel/memory.h"
#include "kernel/operators.h"
-#include "kernel/hash.h"
#include "kernel/array.h"
#include "kernel/exception.h"
#include "kernel/concat.h"
@@ -199,16 +198,16 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Simple, toArray) {
if (Z_TYPE_P(records) == IS_ARRAY) {
zephir_is_iterable(records, &_2$$7, &_1$$7, 0, 0, "phalcon/mvc/model/resultset/simple.zep", 217);
for (
- ; zephir_hash_get_current_data_ex(_2$$7, (void**) &_3$$7, &_1$$7) == SUCCESS
- ; zephir_hash_move_forward_ex(_2$$7, &_1$$7)
+ ; zend_hash_get_current_data_ex(_2$$7, (void**) &_3$$7, &_1$$7) == SUCCESS
+ ; zend_hash_move_forward_ex(_2$$7, &_1$$7)
) {
ZEPHIR_GET_HVALUE(record, _3$$7);
ZEPHIR_INIT_NVAR(renamed);
array_init(renamed);
zephir_is_iterable(record, &_5$$8, &_4$$8, 0, 0, "phalcon/mvc/model/resultset/simple.zep", 215);
for (
- ; zephir_hash_get_current_data_ex(_5$$8, (void**) &_6$$8, &_4$$8) == SUCCESS
- ; zephir_hash_move_forward_ex(_5$$8, &_4$$8)
+ ; zend_hash_get_current_data_ex(_5$$8, (void**) &_6$$8, &_4$$8) == SUCCESS
+ ; zend_hash_move_forward_ex(_5$$8, &_4$$8)
) {
ZEPHIR_GET_HMKEY(key, _5$$8, _4$$8);
ZEPHIR_GET_HVALUE(value, _6$$8);
@@ -300,11 +299,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Simple, unserialize) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &data_param);
- if (unlikely(Z_TYPE_P(data_param) != IS_STRING && Z_TYPE_P(data_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(data_param) != IS_STRING && Z_TYPE_P(data_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'data' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(data_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(data_param) == IS_STRING)) {
zephir_get_strval(data, data_param);
} else {
ZEPHIR_INIT_VAR(data);
diff --git a/ext/phalcon/mvc/model/row.zep.c b/ext/phalcon/mvc/model/row.zep.c
index c89c2350c41..94beacef4b9 100644
--- a/ext/phalcon/mvc/model/row.zep.c
+++ b/ext/phalcon/mvc/model/row.zep.c
@@ -182,11 +182,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Row, writeAttribute) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &attribute_param, &value);
- if (unlikely(Z_TYPE_P(attribute_param) != IS_STRING && Z_TYPE_P(attribute_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(attribute_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(attribute_param) == IS_STRING)) {
zephir_get_strval(attribute, attribute_param);
} else {
ZEPHIR_INIT_VAR(attribute);
diff --git a/ext/phalcon/mvc/model/transaction/failed.zep.c b/ext/phalcon/mvc/model/transaction/failed.zep.c
index cfcfd8319e7..7c106c06c4e 100644
--- a/ext/phalcon/mvc/model/transaction/failed.zep.c
+++ b/ext/phalcon/mvc/model/transaction/failed.zep.c
@@ -47,11 +47,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Failed, __construct) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &message_param, &record);
- if (unlikely(Z_TYPE_P(message_param) != IS_STRING && Z_TYPE_P(message_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(message_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(message_param) == IS_STRING)) {
zephir_get_strval(message, message_param);
} else {
ZEPHIR_INIT_VAR(message);
diff --git a/ext/phalcon/mvc/model/transaction/manager.zep.c b/ext/phalcon/mvc/model/transaction/manager.zep.c
index 03814ef734b..126963d0fbd 100644
--- a/ext/phalcon/mvc/model/transaction/manager.zep.c
+++ b/ext/phalcon/mvc/model/transaction/manager.zep.c
@@ -19,7 +19,6 @@
#include "kernel/memory.h"
#include "ext/spl/spl_exceptions.h"
#include "kernel/array.h"
-#include "kernel/hash.h"
/**
@@ -158,11 +157,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Manager, setDbService) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &service_param);
- if (unlikely(Z_TYPE_P(service_param) != IS_STRING && Z_TYPE_P(service_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(service_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(service_param) == IS_STRING)) {
zephir_get_strval(service, service_param);
} else {
ZEPHIR_INIT_VAR(service);
@@ -320,8 +319,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Manager, getOrCreateTransaction) {
if (Z_TYPE_P(transactions) == IS_ARRAY) {
zephir_is_iterable(transactions, &_2$$5, &_1$$5, 0, 1, "phalcon/mvc/model/transaction/manager.zep", 201);
for (
- ; zephir_hash_get_current_data_ex(_2$$5, (void**) &_3$$5, &_1$$5) == SUCCESS
- ; zephir_hash_move_backwards_ex(_2$$5, &_1$$5)
+ ; zend_hash_get_current_data_ex(_2$$5, (void**) &_3$$5, &_1$$5) == SUCCESS
+ ; zend_hash_move_backwards_ex(_2$$5, &_1$$5)
) {
ZEPHIR_GET_HVALUE(transaction, _3$$5);
if (Z_TYPE_P(transaction) == IS_OBJECT) {
@@ -385,8 +384,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Manager, commit) {
if (Z_TYPE_P(transactions) == IS_ARRAY) {
zephir_is_iterable(transactions, &_1$$3, &_0$$3, 0, 0, "phalcon/mvc/model/transaction/manager.zep", 234);
for (
- ; zephir_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_1$$3, &_0$$3)
+ ; zend_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_1$$3, &_0$$3)
) {
ZEPHIR_GET_HVALUE(transaction, _2$$3);
ZEPHIR_CALL_METHOD(&connection, transaction, "getconnection", NULL, 0);
@@ -430,8 +429,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Manager, rollback) {
if (Z_TYPE_P(transactions) == IS_ARRAY) {
zephir_is_iterable(transactions, &_1$$3, &_0$$3, 0, 0, "phalcon/mvc/model/transaction/manager.zep", 259);
for (
- ; zephir_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_1$$3, &_0$$3)
+ ; zend_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_1$$3, &_0$$3)
) {
ZEPHIR_GET_HVALUE(transaction, _2$$3);
ZEPHIR_CALL_METHOD(&connection, transaction, "getconnection", NULL, 0);
@@ -513,8 +512,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Manager, _collectTransaction) {
array_init(newTransactions);
zephir_is_iterable(transactions, &_1$$3, &_0$$3, 0, 0, "phalcon/mvc/model/transaction/manager.zep", 296);
for (
- ; zephir_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_1$$3, &_0$$3)
+ ; zend_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_1$$3, &_0$$3)
) {
ZEPHIR_GET_HVALUE(managedTransaction, _2$$3);
if (!ZEPHIR_IS_EQUAL(managedTransaction, transaction)) {
@@ -546,8 +545,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Transaction_Manager, collectTransactions) {
ZEPHIR_INIT_VAR(_0$$3);
zephir_is_iterable(transactions, &_2$$3, &_1$$3, 0, 0, "phalcon/mvc/model/transaction/manager.zep", 312);
for (
- ; zephir_hash_get_current_data_ex(_2$$3, (void**) &_3$$3, &_1$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_2$$3, &_1$$3)
+ ; zend_hash_get_current_data_ex(_2$$3, (void**) &_3$$3, &_1$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_2$$3, &_1$$3)
) {
ZEPHIR_GET_HVALUE(_0$$3, _3$$3);
RETURN_ON_FAILURE(zephir_property_decr(this_ptr, SL("_number") TSRMLS_CC));
diff --git a/ext/phalcon/mvc/model/validator.zep.c b/ext/phalcon/mvc/model/validator.zep.c
index f39327a92bd..16f6929b316 100644
--- a/ext/phalcon/mvc/model/validator.zep.c
+++ b/ext/phalcon/mvc/model/validator.zep.c
@@ -81,11 +81,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Validator, appendMessage) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 2, &message_param, &field, &type);
- if (unlikely(Z_TYPE_P(message_param) != IS_STRING && Z_TYPE_P(message_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(message_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(message_param) == IS_STRING)) {
zephir_get_strval(message, message_param);
} else {
ZEPHIR_INIT_VAR(message);
@@ -155,11 +155,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Validator, getOption) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &option_param, &defaultValue);
- if (unlikely(Z_TYPE_P(option_param) != IS_STRING && Z_TYPE_P(option_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(option_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(option_param) == IS_STRING)) {
zephir_get_strval(option, option_param);
} else {
ZEPHIR_INIT_VAR(option);
@@ -191,11 +191,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Validator, isSetOption) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &option_param);
- if (unlikely(Z_TYPE_P(option_param) != IS_STRING && Z_TYPE_P(option_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(option_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(option_param) == IS_STRING)) {
zephir_get_strval(option, option_param);
} else {
ZEPHIR_INIT_VAR(option);
diff --git a/ext/phalcon/mvc/model/validator/uniqueness.zep.c b/ext/phalcon/mvc/model/validator/uniqueness.zep.c
index 766244bfaa9..53309058807 100644
--- a/ext/phalcon/mvc/model/validator/uniqueness.zep.c
+++ b/ext/phalcon/mvc/model/validator/uniqueness.zep.c
@@ -14,7 +14,6 @@
#include "kernel/main.h"
#include "kernel/fcall.h"
#include "kernel/memory.h"
-#include "kernel/hash.h"
#include "kernel/array.h"
#include "kernel/exception.h"
#include "kernel/concat.h"
@@ -115,8 +114,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Validator_Uniqueness, validate) {
if (Z_TYPE_P(field) == IS_ARRAY) {
zephir_is_iterable(field, &_2$$5, &_1$$5, 0, 0, "phalcon/mvc/model/validator/uniqueness.zep", 130);
for (
- ; zephir_hash_get_current_data_ex(_2$$5, (void**) &_3$$5, &_1$$5) == SUCCESS
- ; zephir_hash_move_forward_ex(_2$$5, &_1$$5)
+ ; zend_hash_get_current_data_ex(_2$$5, (void**) &_3$$5, &_1$$5) == SUCCESS
+ ; zend_hash_move_forward_ex(_2$$5, &_1$$5)
) {
ZEPHIR_GET_HVALUE(composeField, _3$$5);
if (Z_TYPE_P(columnMap) == IS_ARRAY) {
@@ -210,8 +209,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Validator_Uniqueness, validate) {
zephir_check_call_status();
zephir_is_iterable(_20$$16, &_22$$16, &_21$$16, 0, 0, "phalcon/mvc/model/validator/uniqueness.zep", 200);
for (
- ; zephir_hash_get_current_data_ex(_22$$16, (void**) &_23$$16, &_21$$16) == SUCCESS
- ; zephir_hash_move_forward_ex(_22$$16, &_21$$16)
+ ; zend_hash_get_current_data_ex(_22$$16, (void**) &_23$$16, &_21$$16) == SUCCESS
+ ; zend_hash_move_forward_ex(_22$$16, &_21$$16)
) {
ZEPHIR_GET_HVALUE(primaryField, _23$$16);
ZEPHIR_OBS_NVAR(bindType);
diff --git a/ext/phalcon/mvc/router.zep.c b/ext/phalcon/mvc/router.zep.c
index f54f145509f..3144365cef7 100644
--- a/ext/phalcon/mvc/router.zep.c
+++ b/ext/phalcon/mvc/router.zep.c
@@ -20,7 +20,6 @@
#include "kernel/exception.h"
#include "kernel/operators.h"
#include "kernel/string.h"
-#include "kernel/hash.h"
#include "kernel/concat.h"
@@ -125,7 +124,7 @@ PHP_METHOD(Phalcon_Mvc_Router, __construct) {
if (!defaultRoutes_param) {
defaultRoutes = 1;
} else {
- if (unlikely(Z_TYPE_P(defaultRoutes_param) != IS_BOOL)) {
+ if (UNEXPECTED(Z_TYPE_P(defaultRoutes_param) != IS_BOOL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'defaultRoutes' must be a bool") TSRMLS_CC);
RETURN_MM_NULL();
}
@@ -284,7 +283,7 @@ PHP_METHOD(Phalcon_Mvc_Router, removeExtraSlashes) {
zephir_fetch_params(0, 1, 0, &remove_param);
- if (unlikely(Z_TYPE_P(remove_param) != IS_BOOL)) {
+ if (UNEXPECTED(Z_TYPE_P(remove_param) != IS_BOOL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'remove' must be a bool") TSRMLS_CC);
RETURN_NULL();
}
@@ -311,11 +310,11 @@ PHP_METHOD(Phalcon_Mvc_Router, setDefaultNamespace) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &namespaceName_param);
- if (unlikely(Z_TYPE_P(namespaceName_param) != IS_STRING && Z_TYPE_P(namespaceName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(namespaceName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(namespaceName_param) == IS_STRING)) {
zephir_get_strval(namespaceName, namespaceName_param);
} else {
ZEPHIR_INIT_VAR(namespaceName);
@@ -339,11 +338,11 @@ PHP_METHOD(Phalcon_Mvc_Router, setDefaultModule) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &moduleName_param);
- if (unlikely(Z_TYPE_P(moduleName_param) != IS_STRING && Z_TYPE_P(moduleName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(moduleName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(moduleName_param) == IS_STRING)) {
zephir_get_strval(moduleName, moduleName_param);
} else {
ZEPHIR_INIT_VAR(moduleName);
@@ -367,11 +366,11 @@ PHP_METHOD(Phalcon_Mvc_Router, setDefaultController) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &controllerName_param);
- if (unlikely(Z_TYPE_P(controllerName_param) != IS_STRING && Z_TYPE_P(controllerName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(controllerName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(controllerName_param) == IS_STRING)) {
zephir_get_strval(controllerName, controllerName_param);
} else {
ZEPHIR_INIT_VAR(controllerName);
@@ -395,11 +394,11 @@ PHP_METHOD(Phalcon_Mvc_Router, setDefaultAction) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &actionName_param);
- if (unlikely(Z_TYPE_P(actionName_param) != IS_STRING && Z_TYPE_P(actionName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(actionName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(actionName_param) == IS_STRING)) {
zephir_get_strval(actionName, actionName_param);
} else {
ZEPHIR_INIT_VAR(actionName);
@@ -565,8 +564,8 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) {
_4 = zephir_fetch_nproperty_this(this_ptr, SL("_routes"), PH_NOISY_CC);
zephir_is_iterable(_4, &_6, &_5, 0, 1, "phalcon/mvc/router.zep", 582);
for (
- ; zephir_hash_get_current_data_ex(_6, (void**) &_7, &_5) == SUCCESS
- ; zephir_hash_move_backwards_ex(_6, &_5)
+ ; zend_hash_get_current_data_ex(_6, (void**) &_7, &_5) == SUCCESS
+ ; zend_hash_move_backwards_ex(_6, &_5)
) {
ZEPHIR_GET_HVALUE(route, _7);
ZEPHIR_INIT_NVAR(params);
@@ -702,8 +701,8 @@ PHP_METHOD(Phalcon_Mvc_Router, handle) {
zephir_check_call_status();
zephir_is_iterable(paths, &_25$$34, &_24$$34, 0, 0, "phalcon/mvc/router.zep", 571);
for (
- ; zephir_hash_get_current_data_ex(_25$$34, (void**) &_26$$34, &_24$$34) == SUCCESS
- ; zephir_hash_move_forward_ex(_25$$34, &_24$$34)
+ ; zend_hash_get_current_data_ex(_25$$34, (void**) &_26$$34, &_24$$34) == SUCCESS
+ ; zend_hash_move_forward_ex(_25$$34, &_24$$34)
) {
ZEPHIR_GET_HMKEY(part, _25$$34, _24$$34);
ZEPHIR_GET_HVALUE(position, _26$$34);
@@ -882,11 +881,11 @@ PHP_METHOD(Phalcon_Mvc_Router, add) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 3, &pattern_param, &paths, &httpMethods, &position);
- if (unlikely(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(pattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(pattern_param) == IS_STRING)) {
zephir_get_strval(pattern, pattern_param);
} else {
ZEPHIR_INIT_VAR(pattern);
@@ -943,11 +942,11 @@ PHP_METHOD(Phalcon_Mvc_Router, addGet) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 2, &pattern_param, &paths, &position);
- if (unlikely(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(pattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(pattern_param) == IS_STRING)) {
zephir_get_strval(pattern, pattern_param);
} else {
ZEPHIR_INIT_VAR(pattern);
@@ -983,11 +982,11 @@ PHP_METHOD(Phalcon_Mvc_Router, addPost) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 2, &pattern_param, &paths, &position);
- if (unlikely(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(pattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(pattern_param) == IS_STRING)) {
zephir_get_strval(pattern, pattern_param);
} else {
ZEPHIR_INIT_VAR(pattern);
@@ -1023,11 +1022,11 @@ PHP_METHOD(Phalcon_Mvc_Router, addPut) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 2, &pattern_param, &paths, &position);
- if (unlikely(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(pattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(pattern_param) == IS_STRING)) {
zephir_get_strval(pattern, pattern_param);
} else {
ZEPHIR_INIT_VAR(pattern);
@@ -1063,11 +1062,11 @@ PHP_METHOD(Phalcon_Mvc_Router, addPatch) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 2, &pattern_param, &paths, &position);
- if (unlikely(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(pattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(pattern_param) == IS_STRING)) {
zephir_get_strval(pattern, pattern_param);
} else {
ZEPHIR_INIT_VAR(pattern);
@@ -1103,11 +1102,11 @@ PHP_METHOD(Phalcon_Mvc_Router, addDelete) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 2, &pattern_param, &paths, &position);
- if (unlikely(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(pattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(pattern_param) == IS_STRING)) {
zephir_get_strval(pattern, pattern_param);
} else {
ZEPHIR_INIT_VAR(pattern);
@@ -1143,11 +1142,11 @@ PHP_METHOD(Phalcon_Mvc_Router, addOptions) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 2, &pattern_param, &paths, &position);
- if (unlikely(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(pattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(pattern_param) == IS_STRING)) {
zephir_get_strval(pattern, pattern_param);
} else {
ZEPHIR_INIT_VAR(pattern);
@@ -1183,11 +1182,11 @@ PHP_METHOD(Phalcon_Mvc_Router, addHead) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 2, &pattern_param, &paths, &position);
- if (unlikely(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(pattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(pattern_param) == IS_STRING)) {
zephir_get_strval(pattern, pattern_param);
} else {
ZEPHIR_INIT_VAR(pattern);
@@ -1223,11 +1222,11 @@ PHP_METHOD(Phalcon_Mvc_Router, addPurge) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 2, &pattern_param, &paths, &position);
- if (unlikely(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(pattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(pattern_param) == IS_STRING)) {
zephir_get_strval(pattern, pattern_param);
} else {
ZEPHIR_INIT_VAR(pattern);
@@ -1263,11 +1262,11 @@ PHP_METHOD(Phalcon_Mvc_Router, addTrace) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 2, &pattern_param, &paths, &position);
- if (unlikely(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(pattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(pattern_param) == IS_STRING)) {
zephir_get_strval(pattern, pattern_param);
} else {
ZEPHIR_INIT_VAR(pattern);
@@ -1303,11 +1302,11 @@ PHP_METHOD(Phalcon_Mvc_Router, addConnect) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 2, &pattern_param, &paths, &position);
- if (unlikely(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(pattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(pattern_param) == IS_STRING)) {
zephir_get_strval(pattern, pattern_param);
} else {
ZEPHIR_INIT_VAR(pattern);
@@ -1357,8 +1356,8 @@ PHP_METHOD(Phalcon_Mvc_Router, mount) {
if (Z_TYPE_P(beforeMatch) != IS_NULL) {
zephir_is_iterable(groupRoutes, &_1$$4, &_0$$4, 0, 0, "phalcon/mvc/router.zep", 814);
for (
- ; zephir_hash_get_current_data_ex(_1$$4, (void**) &_2$$4, &_0$$4) == SUCCESS
- ; zephir_hash_move_forward_ex(_1$$4, &_0$$4)
+ ; zend_hash_get_current_data_ex(_1$$4, (void**) &_2$$4, &_0$$4) == SUCCESS
+ ; zend_hash_move_forward_ex(_1$$4, &_0$$4)
) {
ZEPHIR_GET_HVALUE(route, _2$$4);
ZEPHIR_CALL_METHOD(NULL, route, "beforematch", NULL, 0, beforeMatch);
@@ -1370,8 +1369,8 @@ PHP_METHOD(Phalcon_Mvc_Router, mount) {
if (Z_TYPE_P(hostname) != IS_NULL) {
zephir_is_iterable(groupRoutes, &_4$$6, &_3$$6, 0, 0, "phalcon/mvc/router.zep", 823);
for (
- ; zephir_hash_get_current_data_ex(_4$$6, (void**) &_5$$6, &_3$$6) == SUCCESS
- ; zephir_hash_move_forward_ex(_4$$6, &_3$$6)
+ ; zend_hash_get_current_data_ex(_4$$6, (void**) &_5$$6, &_3$$6) == SUCCESS
+ ; zend_hash_move_forward_ex(_4$$6, &_3$$6)
) {
ZEPHIR_GET_HVALUE(route, _5$$6);
ZEPHIR_CALL_METHOD(NULL, route, "sethostname", NULL, 0, hostname);
@@ -1549,8 +1548,8 @@ PHP_METHOD(Phalcon_Mvc_Router, getRouteById) {
_0 = zephir_fetch_nproperty_this(this_ptr, SL("_routes"), PH_NOISY_CC);
zephir_is_iterable(_0, &_2, &_1, 0, 0, "phalcon/mvc/router.zep", 941);
for (
- ; zephir_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
- ; zephir_hash_move_forward_ex(_2, &_1)
+ ; zend_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
+ ; zend_hash_move_forward_ex(_2, &_1)
) {
ZEPHIR_GET_HVALUE(route, _3);
ZEPHIR_CALL_METHOD(&_4$$3, route, "getrouteid", NULL, 0);
@@ -1577,11 +1576,11 @@ PHP_METHOD(Phalcon_Mvc_Router, getRouteByName) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &name_param);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -1592,8 +1591,8 @@ PHP_METHOD(Phalcon_Mvc_Router, getRouteByName) {
_0 = zephir_fetch_nproperty_this(this_ptr, SL("_routes"), PH_NOISY_CC);
zephir_is_iterable(_0, &_2, &_1, 0, 0, "phalcon/mvc/router.zep", 956);
for (
- ; zephir_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
- ; zephir_hash_move_forward_ex(_2, &_1)
+ ; zend_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
+ ; zend_hash_move_forward_ex(_2, &_1)
) {
ZEPHIR_GET_HVALUE(route, _3);
ZEPHIR_CALL_METHOD(&_4$$3, route, "getname", NULL, 0);
diff --git a/ext/phalcon/mvc/router/annotations.zep.c b/ext/phalcon/mvc/router/annotations.zep.c
index bb25e5e3378..ea9752b08a4 100644
--- a/ext/phalcon/mvc/router/annotations.zep.c
+++ b/ext/phalcon/mvc/router/annotations.zep.c
@@ -19,7 +19,6 @@
#include "kernel/exception.h"
#include "kernel/operators.h"
#include "kernel/fcall.h"
-#include "kernel/hash.h"
#include "kernel/string.h"
#include "kernel/concat.h"
@@ -76,11 +75,11 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, addResource) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &handler_param, &prefix_param);
- if (unlikely(Z_TYPE_P(handler_param) != IS_STRING && Z_TYPE_P(handler_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(handler_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(handler_param) == IS_STRING)) {
zephir_get_strval(handler, handler_param);
} else {
ZEPHIR_INIT_VAR(handler);
@@ -90,11 +89,11 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, addResource) {
ZEPHIR_INIT_VAR(prefix);
ZVAL_EMPTY_STRING(prefix);
} else {
- if (unlikely(Z_TYPE_P(prefix_param) != IS_STRING && Z_TYPE_P(prefix_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(prefix_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(prefix_param) == IS_STRING)) {
zephir_get_strval(prefix, prefix_param);
} else {
ZEPHIR_INIT_VAR(prefix);
@@ -126,21 +125,21 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, addModuleResource) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 1, &module_param, &handler_param, &prefix_param);
- if (unlikely(Z_TYPE_P(module_param) != IS_STRING && Z_TYPE_P(module_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(module_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(module_param) == IS_STRING)) {
zephir_get_strval(module, module_param);
} else {
ZEPHIR_INIT_VAR(module);
ZVAL_EMPTY_STRING(module);
}
- if (unlikely(Z_TYPE_P(handler_param) != IS_STRING && Z_TYPE_P(handler_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(handler_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(handler_param) == IS_STRING)) {
zephir_get_strval(handler, handler_param);
} else {
ZEPHIR_INIT_VAR(handler);
@@ -150,11 +149,11 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, addModuleResource) {
ZEPHIR_INIT_VAR(prefix);
ZVAL_EMPTY_STRING(prefix);
} else {
- if (unlikely(Z_TYPE_P(prefix_param) != IS_STRING && Z_TYPE_P(prefix_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(prefix_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(prefix_param) == IS_STRING)) {
zephir_get_strval(prefix, prefix_param);
} else {
ZEPHIR_INIT_VAR(prefix);
@@ -193,11 +192,11 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, handle) {
ZEPHIR_INIT_VAR(uri);
ZVAL_EMPTY_STRING(uri);
} else {
- if (unlikely(Z_TYPE_P(uri_param) != IS_STRING && Z_TYPE_P(uri_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(uri_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(uri_param) == IS_STRING)) {
zephir_get_strval(uri, uri_param);
} else {
ZEPHIR_INIT_VAR(uri);
@@ -229,8 +228,8 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, handle) {
zephir_read_property_this(&controllerSuffix, this_ptr, SL("_controllerSuffix"), PH_NOISY_CC);
zephir_is_iterable(handlers, &_3, &_2, 0, 0, "phalcon/mvc/router/annotations.zep", 205);
for (
- ; zephir_hash_get_current_data_ex(_3, (void**) &_4, &_2) == SUCCESS
- ; zephir_hash_move_forward_ex(_3, &_2)
+ ; zend_hash_get_current_data_ex(_3, (void**) &_4, &_2) == SUCCESS
+ ; zend_hash_move_forward_ex(_3, &_2)
) {
ZEPHIR_GET_HVALUE(scope, _4);
if (Z_TYPE_P(scope) != IS_ARRAY) {
@@ -280,8 +279,8 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, handle) {
if (Z_TYPE_P(annotations) == IS_ARRAY) {
zephir_is_iterable(annotations, &_9$$14, &_8$$14, 0, 0, "phalcon/mvc/router/annotations.zep", 182);
for (
- ; zephir_hash_get_current_data_ex(_9$$14, (void**) &_10$$14, &_8$$14) == SUCCESS
- ; zephir_hash_move_forward_ex(_9$$14, &_8$$14)
+ ; zend_hash_get_current_data_ex(_9$$14, (void**) &_10$$14, &_8$$14) == SUCCESS
+ ; zend_hash_move_forward_ex(_9$$14, &_8$$14)
) {
ZEPHIR_GET_HVALUE(annotation, _10$$14);
ZEPHIR_CALL_METHOD(NULL, this_ptr, "processcontrollerannotation", &_11, 0, controllerName, annotation);
@@ -296,8 +295,8 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, handle) {
zephir_uncamelize(lowerControllerName, controllerName, NULL );
zephir_is_iterable(methodAnnotations, &_13$$16, &_12$$16, 0, 0, "phalcon/mvc/router/annotations.zep", 199);
for (
- ; zephir_hash_get_current_data_ex(_13$$16, (void**) &_14$$16, &_12$$16) == SUCCESS
- ; zephir_hash_move_forward_ex(_13$$16, &_12$$16)
+ ; zend_hash_get_current_data_ex(_13$$16, (void**) &_14$$16, &_12$$16) == SUCCESS
+ ; zend_hash_move_forward_ex(_13$$16, &_12$$16)
) {
ZEPHIR_GET_HMKEY(method, _13$$16, _12$$16);
ZEPHIR_GET_HVALUE(collection, _14$$16);
@@ -306,8 +305,8 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, handle) {
zephir_check_call_status();
zephir_is_iterable(_15$$18, &_17$$18, &_16$$18, 0, 0, "phalcon/mvc/router/annotations.zep", 197);
for (
- ; zephir_hash_get_current_data_ex(_17$$18, (void**) &_18$$18, &_16$$18) == SUCCESS
- ; zephir_hash_move_forward_ex(_17$$18, &_16$$18)
+ ; zend_hash_get_current_data_ex(_17$$18, (void**) &_18$$18, &_16$$18) == SUCCESS
+ ; zend_hash_move_forward_ex(_17$$18, &_16$$18)
) {
ZEPHIR_GET_HVALUE(annotation, _18$$18);
ZEPHIR_CALL_METHOD(NULL, this_ptr, "processactionannotation", &_19, 0, moduleName, namespaceName, lowerControllerName, method, annotation);
@@ -335,11 +334,11 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, processControllerAnnotation) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &handler_param, &annotation);
- if (unlikely(Z_TYPE_P(handler_param) != IS_STRING && Z_TYPE_P(handler_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(handler_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(handler_param) == IS_STRING)) {
zephir_get_strval(handler, handler_param);
} else {
ZEPHIR_INIT_VAR(handler);
@@ -376,41 +375,41 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, processActionAnnotation) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 5, 0, &module_param, &namespaceName_param, &controller_param, &action_param, &annotation);
- if (unlikely(Z_TYPE_P(module_param) != IS_STRING && Z_TYPE_P(module_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(module_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(module_param) == IS_STRING)) {
zephir_get_strval(module, module_param);
} else {
ZEPHIR_INIT_VAR(module);
ZVAL_EMPTY_STRING(module);
}
- if (unlikely(Z_TYPE_P(namespaceName_param) != IS_STRING && Z_TYPE_P(namespaceName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(namespaceName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(namespaceName_param) == IS_STRING)) {
zephir_get_strval(namespaceName, namespaceName_param);
} else {
ZEPHIR_INIT_VAR(namespaceName);
ZVAL_EMPTY_STRING(namespaceName);
}
- if (unlikely(Z_TYPE_P(controller_param) != IS_STRING && Z_TYPE_P(controller_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(controller_param) != IS_STRING && Z_TYPE_P(controller_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'controller' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(controller_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(controller_param) == IS_STRING)) {
zephir_get_strval(controller, controller_param);
} else {
ZEPHIR_INIT_VAR(controller);
ZVAL_EMPTY_STRING(controller);
}
- if (unlikely(Z_TYPE_P(action_param) != IS_STRING && Z_TYPE_P(action_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(action_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(action_param) == IS_STRING)) {
zephir_get_strval(action, action_param);
} else {
ZEPHIR_INIT_VAR(action);
@@ -534,8 +533,8 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, processActionAnnotation) {
if (Z_TYPE_P(converts) == IS_ARRAY) {
zephir_is_iterable(converts, &_7$$22, &_6$$22, 0, 0, "phalcon/mvc/router/annotations.zep", 339);
for (
- ; zephir_hash_get_current_data_ex(_7$$22, (void**) &_8$$22, &_6$$22) == SUCCESS
- ; zephir_hash_move_forward_ex(_7$$22, &_6$$22)
+ ; zend_hash_get_current_data_ex(_7$$22, (void**) &_8$$22, &_6$$22) == SUCCESS
+ ; zend_hash_move_forward_ex(_7$$22, &_6$$22)
) {
ZEPHIR_GET_HMKEY(param, _7$$22, _6$$22);
ZEPHIR_GET_HVALUE(convert, _8$$22);
@@ -551,8 +550,8 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, processActionAnnotation) {
if (Z_TYPE_P(converts) == IS_ARRAY) {
zephir_is_iterable(converts, &_11$$24, &_10$$24, 0, 0, "phalcon/mvc/router/annotations.zep", 349);
for (
- ; zephir_hash_get_current_data_ex(_11$$24, (void**) &_12$$24, &_10$$24) == SUCCESS
- ; zephir_hash_move_forward_ex(_11$$24, &_10$$24)
+ ; zend_hash_get_current_data_ex(_11$$24, (void**) &_12$$24, &_10$$24) == SUCCESS
+ ; zend_hash_move_forward_ex(_11$$24, &_10$$24)
) {
ZEPHIR_GET_HMKEY(conversorParam, _11$$24, _10$$24);
ZEPHIR_GET_HVALUE(convert, _12$$24);
@@ -599,11 +598,11 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, setControllerSuffix) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &controllerSuffix_param);
- if (unlikely(Z_TYPE_P(controllerSuffix_param) != IS_STRING && Z_TYPE_P(controllerSuffix_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(controllerSuffix_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(controllerSuffix_param) == IS_STRING)) {
zephir_get_strval(controllerSuffix, controllerSuffix_param);
} else {
ZEPHIR_INIT_VAR(controllerSuffix);
@@ -627,11 +626,11 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, setActionSuffix) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &actionSuffix_param);
- if (unlikely(Z_TYPE_P(actionSuffix_param) != IS_STRING && Z_TYPE_P(actionSuffix_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(actionSuffix_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(actionSuffix_param) == IS_STRING)) {
zephir_get_strval(actionSuffix, actionSuffix_param);
} else {
ZEPHIR_INIT_VAR(actionSuffix);
diff --git a/ext/phalcon/mvc/router/group.zep.c b/ext/phalcon/mvc/router/group.zep.c
index 87220619336..581e8f2c6fc 100644
--- a/ext/phalcon/mvc/router/group.zep.c
+++ b/ext/phalcon/mvc/router/group.zep.c
@@ -264,11 +264,11 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, add) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 2, &pattern_param, &paths, &httpMethods);
- if (unlikely(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(pattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(pattern_param) == IS_STRING)) {
zephir_get_strval(pattern, pattern_param);
} else {
ZEPHIR_INIT_VAR(pattern);
@@ -304,11 +304,11 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, addGet) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &pattern_param, &paths);
- if (unlikely(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(pattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(pattern_param) == IS_STRING)) {
zephir_get_strval(pattern, pattern_param);
} else {
ZEPHIR_INIT_VAR(pattern);
@@ -344,11 +344,11 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, addPost) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &pattern_param, &paths);
- if (unlikely(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(pattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(pattern_param) == IS_STRING)) {
zephir_get_strval(pattern, pattern_param);
} else {
ZEPHIR_INIT_VAR(pattern);
@@ -384,11 +384,11 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, addPut) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &pattern_param, &paths);
- if (unlikely(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(pattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(pattern_param) == IS_STRING)) {
zephir_get_strval(pattern, pattern_param);
} else {
ZEPHIR_INIT_VAR(pattern);
@@ -424,11 +424,11 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, addPatch) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &pattern_param, &paths);
- if (unlikely(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(pattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(pattern_param) == IS_STRING)) {
zephir_get_strval(pattern, pattern_param);
} else {
ZEPHIR_INIT_VAR(pattern);
@@ -464,11 +464,11 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, addDelete) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &pattern_param, &paths);
- if (unlikely(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(pattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(pattern_param) == IS_STRING)) {
zephir_get_strval(pattern, pattern_param);
} else {
ZEPHIR_INIT_VAR(pattern);
@@ -504,11 +504,11 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, addOptions) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &pattern_param, &paths);
- if (unlikely(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(pattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(pattern_param) == IS_STRING)) {
zephir_get_strval(pattern, pattern_param);
} else {
ZEPHIR_INIT_VAR(pattern);
@@ -544,11 +544,11 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, addHead) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &pattern_param, &paths);
- if (unlikely(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(pattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(pattern_param) == IS_STRING)) {
zephir_get_strval(pattern, pattern_param);
} else {
ZEPHIR_INIT_VAR(pattern);
@@ -597,11 +597,11 @@ PHP_METHOD(Phalcon_Mvc_Router_Group, _addRoute) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 2, &pattern_param, &paths, &httpMethods);
- if (unlikely(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(pattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(pattern_param) == IS_STRING)) {
zephir_get_strval(pattern, pattern_param);
} else {
ZEPHIR_INIT_VAR(pattern);
diff --git a/ext/phalcon/mvc/router/route.zep.c b/ext/phalcon/mvc/router/route.zep.c
index 4b0bd980229..a034ab6f7b6 100644
--- a/ext/phalcon/mvc/router/route.zep.c
+++ b/ext/phalcon/mvc/router/route.zep.c
@@ -21,7 +21,6 @@
#include "kernel/string.h"
#include "kernel/concat.h"
#include "kernel/array.h"
-#include "kernel/hash.h"
/**
@@ -74,11 +73,11 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, __construct) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 2, &pattern_param, &paths, &httpMethods);
- if (unlikely(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(pattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(pattern_param) == IS_STRING)) {
zephir_get_strval(pattern, pattern_param);
} else {
ZEPHIR_INIT_VAR(pattern);
@@ -121,11 +120,11 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, compilePattern) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &pattern_param);
- if (unlikely(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(pattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(pattern_param) == IS_STRING)) {
zephir_get_strval(pattern, pattern_param);
} else {
ZEPHIR_INIT_VAR(pattern);
@@ -237,11 +236,11 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, extractNamedParams) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &pattern_param);
- if (unlikely(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(pattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(pattern_param) == IS_STRING)) {
zephir_get_strval(pattern, pattern_param);
} else {
ZEPHIR_INIT_VAR(pattern);
@@ -482,11 +481,11 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, reConfigure) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &pattern_param, &paths);
- if (unlikely(Z_TYPE_P(pattern_param) != IS_STRING && Z_TYPE_P(pattern_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(pattern_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(pattern_param) == IS_STRING)) {
zephir_get_strval(pattern, pattern_param);
} else {
ZEPHIR_INIT_VAR(pattern);
@@ -799,8 +798,8 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, getReversedPaths) {
_0 = zephir_fetch_nproperty_this(this_ptr, SL("_paths"), PH_NOISY_CC);
zephir_is_iterable(_0, &_2, &_1, 0, 0, "phalcon/mvc/router/route.zep", 566);
for (
- ; zephir_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
- ; zephir_hash_move_forward_ex(_2, &_1)
+ ; zend_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
+ ; zend_hash_move_forward_ex(_2, &_1)
) {
ZEPHIR_GET_HMKEY(path, _2, _1);
ZEPHIR_GET_HVALUE(position, _3);
@@ -857,11 +856,11 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, setHostname) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &hostname_param);
- if (unlikely(Z_TYPE_P(hostname_param) != IS_STRING && Z_TYPE_P(hostname_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(hostname_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(hostname_param) == IS_STRING)) {
zephir_get_strval(hostname, hostname_param);
} else {
ZEPHIR_INIT_VAR(hostname);
@@ -923,11 +922,11 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, convert) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &name_param, &converter);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
diff --git a/ext/phalcon/mvc/url.zep.c b/ext/phalcon/mvc/url.zep.c
index b4db64a062d..2864c7033ee 100644
--- a/ext/phalcon/mvc/url.zep.c
+++ b/ext/phalcon/mvc/url.zep.c
@@ -106,11 +106,11 @@ PHP_METHOD(Phalcon_Mvc_Url, setBaseUri) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &baseUri_param);
- if (unlikely(Z_TYPE_P(baseUri_param) != IS_STRING && Z_TYPE_P(baseUri_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(baseUri_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(baseUri_param) == IS_STRING)) {
zephir_get_strval(baseUri, baseUri_param);
} else {
ZEPHIR_INIT_VAR(baseUri);
@@ -142,11 +142,11 @@ PHP_METHOD(Phalcon_Mvc_Url, setStaticBaseUri) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &staticBaseUri_param);
- if (unlikely(Z_TYPE_P(staticBaseUri_param) != IS_STRING && Z_TYPE_P(staticBaseUri_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(staticBaseUri_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(staticBaseUri_param) == IS_STRING)) {
zephir_get_strval(staticBaseUri, staticBaseUri_param);
} else {
ZEPHIR_INIT_VAR(staticBaseUri);
@@ -228,11 +228,11 @@ PHP_METHOD(Phalcon_Mvc_Url, setBasePath) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &basePath_param);
- if (unlikely(Z_TYPE_P(basePath_param) != IS_STRING && Z_TYPE_P(basePath_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(basePath_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(basePath_param) == IS_STRING)) {
zephir_get_strval(basePath, basePath_param);
} else {
ZEPHIR_INIT_VAR(basePath);
diff --git a/ext/phalcon/mvc/view.zep.c b/ext/phalcon/mvc/view.zep.c
index 21c56c9f854..9d17edfc576 100644
--- a/ext/phalcon/mvc/view.zep.c
+++ b/ext/phalcon/mvc/view.zep.c
@@ -18,7 +18,6 @@
#include "kernel/string.h"
#include "kernel/exception.h"
#include "kernel/concat.h"
-#include "kernel/hash.h"
#include "kernel/array.h"
#include "ext/spl/spl_exceptions.h"
#include "kernel/fcall.h"
@@ -287,8 +286,8 @@ PHP_METHOD(Phalcon_Mvc_View, setViewsDir) {
array_init(newViewsDir);
zephir_is_iterable(viewsDir, &_5$$6, &_4$$6, 0, 0, "phalcon/mvc/view.zep", 206);
for (
- ; zephir_hash_get_current_data_ex(_5$$6, (void**) &_6$$6, &_4$$6) == SUCCESS
- ; zephir_hash_move_forward_ex(_5$$6, &_4$$6)
+ ; zend_hash_get_current_data_ex(_5$$6, (void**) &_6$$6, &_4$$6) == SUCCESS
+ ; zend_hash_move_forward_ex(_5$$6, &_4$$6)
) {
ZEPHIR_GET_HMKEY(position, _5$$6, _4$$6);
ZEPHIR_GET_HVALUE(directory, _6$$6);
@@ -649,11 +648,11 @@ PHP_METHOD(Phalcon_Mvc_View, setParamToView) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &key_param, &value);
- if (unlikely(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(key_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(key_param) == IS_STRING)) {
zephir_get_strval(key, key_param);
} else {
ZEPHIR_INIT_VAR(key);
@@ -721,11 +720,11 @@ PHP_METHOD(Phalcon_Mvc_View, setVar) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &key_param, &value);
- if (unlikely(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(key_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(key_param) == IS_STRING)) {
zephir_get_strval(key, key_param);
} else {
ZEPHIR_INIT_VAR(key);
@@ -749,11 +748,11 @@ PHP_METHOD(Phalcon_Mvc_View, getVar) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &key_param);
- if (unlikely(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(key_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(key_param) == IS_STRING)) {
zephir_get_strval(key, key_param);
} else {
ZEPHIR_INIT_VAR(key);
@@ -868,8 +867,8 @@ PHP_METHOD(Phalcon_Mvc_View, _loadTemplateEngines) {
zephir_array_fast_append(arguments, dependencyInjector);
zephir_is_iterable(registeredEngines, &_3$$5, &_2$$5, 0, 0, "phalcon/mvc/view.zep", 569);
for (
- ; zephir_hash_get_current_data_ex(_3$$5, (void**) &_4$$5, &_2$$5) == SUCCESS
- ; zephir_hash_move_forward_ex(_3$$5, &_2$$5)
+ ; zend_hash_get_current_data_ex(_3$$5, (void**) &_4$$5, &_2$$5) == SUCCESS
+ ; zend_hash_move_forward_ex(_3$$5, &_2$$5)
) {
ZEPHIR_GET_HMKEY(extension, _3$$5, _2$$5);
ZEPHIR_GET_HVALUE(engineService, _4$$5);
@@ -950,8 +949,8 @@ PHP_METHOD(Phalcon_Mvc_View, _engineRender) {
zephir_check_call_status();
zephir_is_iterable(_1, &_3, &_2, 0, 0, "phalcon/mvc/view.zep", 696);
for (
- ; zephir_hash_get_current_data_ex(_3, (void**) &_4, &_2) == SUCCESS
- ; zephir_hash_move_forward_ex(_3, &_2)
+ ; zend_hash_get_current_data_ex(_3, (void**) &_4, &_2) == SUCCESS
+ ; zend_hash_move_forward_ex(_3, &_2)
) {
ZEPHIR_GET_HVALUE(viewsDir, _4);
ZEPHIR_CALL_METHOD(&_5$$3, this_ptr, "_isabsolutepath", &_6, 386, viewPath);
@@ -1008,8 +1007,8 @@ PHP_METHOD(Phalcon_Mvc_View, _engineRender) {
}
zephir_is_iterable(engines, &_15$$3, &_14$$3, 0, 0, "phalcon/mvc/view.zep", 694);
for (
- ; zephir_hash_get_current_data_ex(_15$$3, (void**) &_16$$3, &_14$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_15$$3, &_14$$3)
+ ; zend_hash_get_current_data_ex(_15$$3, (void**) &_16$$3, &_14$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_15$$3, &_14$$3)
) {
ZEPHIR_GET_HMKEY(extension, _15$$3, _14$$3);
ZEPHIR_GET_HVALUE(engine, _16$$3);
@@ -1118,11 +1117,11 @@ PHP_METHOD(Phalcon_Mvc_View, exists) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &view_param);
- if (unlikely(Z_TYPE_P(view_param) != IS_STRING && Z_TYPE_P(view_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(view_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(view_param) == IS_STRING)) {
zephir_get_strval(view, view_param);
} else {
ZEPHIR_INIT_VAR(view);
@@ -1144,15 +1143,15 @@ PHP_METHOD(Phalcon_Mvc_View, exists) {
zephir_check_call_status();
zephir_is_iterable(_0, &_2, &_1, 0, 0, "phalcon/mvc/view.zep", 753);
for (
- ; zephir_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
- ; zephir_hash_move_forward_ex(_2, &_1)
+ ; zend_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
+ ; zend_hash_move_forward_ex(_2, &_1)
) {
ZEPHIR_GET_HVALUE(viewsDir, _3);
ZEPHIR_INIT_NVAR(_4$$4);
zephir_is_iterable(engines, &_6$$4, &_5$$4, 0, 0, "phalcon/mvc/view.zep", 751);
for (
- ; zephir_hash_get_current_data_ex(_6$$4, (void**) &_7$$4, &_5$$4) == SUCCESS
- ; zephir_hash_move_forward_ex(_6$$4, &_5$$4)
+ ; zend_hash_get_current_data_ex(_6$$4, (void**) &_7$$4, &_5$$4) == SUCCESS
+ ; zend_hash_move_forward_ex(_6$$4, &_5$$4)
) {
ZEPHIR_GET_HMKEY(extension, _6$$4, _5$$4);
ZEPHIR_GET_HVALUE(_4$$4, _7$$4);
@@ -1192,21 +1191,21 @@ PHP_METHOD(Phalcon_Mvc_View, render) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 1, &controllerName_param, &actionName_param, ¶ms);
- if (unlikely(Z_TYPE_P(controllerName_param) != IS_STRING && Z_TYPE_P(controllerName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(controllerName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(controllerName_param) == IS_STRING)) {
zephir_get_strval(controllerName, controllerName_param);
} else {
ZEPHIR_INIT_VAR(controllerName);
ZVAL_EMPTY_STRING(controllerName);
}
- if (unlikely(Z_TYPE_P(actionName_param) != IS_STRING && Z_TYPE_P(actionName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(actionName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(actionName_param) == IS_STRING)) {
zephir_get_strval(actionName, actionName_param);
} else {
ZEPHIR_INIT_VAR(actionName);
@@ -1330,8 +1329,8 @@ PHP_METHOD(Phalcon_Mvc_View, render) {
silence = 0;
zephir_is_iterable(templatesBefore, &_18$$20, &_17$$20, 0, 0, "phalcon/mvc/view.zep", 904);
for (
- ; zephir_hash_get_current_data_ex(_18$$20, (void**) &_19$$20, &_17$$20) == SUCCESS
- ; zephir_hash_move_forward_ex(_18$$20, &_17$$20)
+ ; zend_hash_get_current_data_ex(_18$$20, (void**) &_19$$20, &_17$$20) == SUCCESS
+ ; zend_hash_move_forward_ex(_18$$20, &_17$$20)
) {
ZEPHIR_GET_HVALUE(templateBefore, _19$$20);
ZEPHIR_INIT_LNVAR(_20$$21);
@@ -1387,8 +1386,8 @@ PHP_METHOD(Phalcon_Mvc_View, render) {
silence = 0;
zephir_is_iterable(templatesAfter, &_29$$25, &_28$$25, 0, 0, "phalcon/mvc/view.zep", 931);
for (
- ; zephir_hash_get_current_data_ex(_29$$25, (void**) &_30$$25, &_28$$25) == SUCCESS
- ; zephir_hash_move_forward_ex(_29$$25, &_28$$25)
+ ; zend_hash_get_current_data_ex(_29$$25, (void**) &_30$$25, &_28$$25) == SUCCESS
+ ; zend_hash_move_forward_ex(_29$$25, &_28$$25)
) {
ZEPHIR_GET_HVALUE(templateAfter, _30$$25);
ZEPHIR_INIT_LNVAR(_31$$26);
@@ -1542,11 +1541,11 @@ PHP_METHOD(Phalcon_Mvc_View, getPartial) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &partialPath_param, ¶ms);
- if (unlikely(Z_TYPE_P(partialPath_param) != IS_STRING && Z_TYPE_P(partialPath_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(partialPath_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(partialPath_param) == IS_STRING)) {
zephir_get_strval(partialPath, partialPath_param);
} else {
ZEPHIR_INIT_VAR(partialPath);
@@ -1594,11 +1593,11 @@ PHP_METHOD(Phalcon_Mvc_View, partial) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &partialPath_param, ¶ms);
- if (unlikely(Z_TYPE_P(partialPath_param) != IS_STRING && Z_TYPE_P(partialPath_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(partialPath_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(partialPath_param) == IS_STRING)) {
zephir_get_strval(partialPath, partialPath_param);
} else {
ZEPHIR_INIT_VAR(partialPath);
@@ -1666,21 +1665,21 @@ PHP_METHOD(Phalcon_Mvc_View, getRender) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 2, &controllerName_param, &actionName_param, ¶ms, &configCallback);
- if (unlikely(Z_TYPE_P(controllerName_param) != IS_STRING && Z_TYPE_P(controllerName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(controllerName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(controllerName_param) == IS_STRING)) {
zephir_get_strval(controllerName, controllerName_param);
} else {
ZEPHIR_INIT_VAR(controllerName);
ZVAL_EMPTY_STRING(controllerName);
}
- if (unlikely(Z_TYPE_P(actionName_param) != IS_STRING && Z_TYPE_P(actionName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(actionName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(actionName_param) == IS_STRING)) {
zephir_get_strval(actionName, actionName_param);
} else {
ZEPHIR_INIT_VAR(actionName);
@@ -1857,8 +1856,8 @@ PHP_METHOD(Phalcon_Mvc_View, cache) {
}
zephir_is_iterable(options, &_1$$3, &_0$$3, 0, 0, "phalcon/mvc/view.zep", 1262);
for (
- ; zephir_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_1$$3, &_0$$3)
+ ; zend_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_1$$3, &_0$$3)
) {
ZEPHIR_GET_HMKEY(key, _1$$3, _0$$3);
ZEPHIR_GET_HVALUE(value, _2$$3);
@@ -2037,11 +2036,11 @@ PHP_METHOD(Phalcon_Mvc_View, __set) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &key_param, &value);
- if (unlikely(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(key_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(key_param) == IS_STRING)) {
zephir_get_strval(key, key_param);
} else {
ZEPHIR_INIT_VAR(key);
@@ -2069,11 +2068,11 @@ PHP_METHOD(Phalcon_Mvc_View, __get) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &key_param);
- if (unlikely(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(key_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(key_param) == IS_STRING)) {
zephir_get_strval(key, key_param);
} else {
ZEPHIR_INIT_VAR(key);
@@ -2115,11 +2114,11 @@ PHP_METHOD(Phalcon_Mvc_View, __isset) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &key_param);
- if (unlikely(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(key_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(key_param) == IS_STRING)) {
zephir_get_strval(key, key_param);
} else {
ZEPHIR_INIT_VAR(key);
diff --git a/ext/phalcon/mvc/view/engine.zep.c b/ext/phalcon/mvc/view/engine.zep.c
index 5eb8e99e7e4..e62832bcc7c 100644
--- a/ext/phalcon/mvc/view/engine.zep.c
+++ b/ext/phalcon/mvc/view/engine.zep.c
@@ -89,11 +89,11 @@ PHP_METHOD(Phalcon_Mvc_View_Engine, partial) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &partialPath_param, ¶ms);
- if (unlikely(Z_TYPE_P(partialPath_param) != IS_STRING && Z_TYPE_P(partialPath_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(partialPath_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(partialPath_param) == IS_STRING)) {
zephir_get_strval(partialPath, partialPath_param);
} else {
ZEPHIR_INIT_VAR(partialPath);
diff --git a/ext/phalcon/mvc/view/engine/php.zep.c b/ext/phalcon/mvc/view/engine/php.zep.c
index 5185c72e17e..270486a0ca2 100644
--- a/ext/phalcon/mvc/view/engine/php.zep.c
+++ b/ext/phalcon/mvc/view/engine/php.zep.c
@@ -13,7 +13,6 @@
#include "kernel/main.h"
#include "kernel/fcall.h"
-#include "kernel/hash.h"
#include "kernel/memory.h"
#include "kernel/require.h"
#include "kernel/object.h"
@@ -50,11 +49,11 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Php, render) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 1, &path_param, ¶ms, &mustClean_param);
- if (unlikely(Z_TYPE_P(path_param) != IS_STRING && Z_TYPE_P(path_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(path_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(path_param) == IS_STRING)) {
zephir_get_strval(path, path_param);
} else {
ZEPHIR_INIT_VAR(path);
@@ -74,8 +73,8 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Php, render) {
if (Z_TYPE_P(params) == IS_ARRAY) {
zephir_is_iterable(params, &_1$$4, &_0$$4, 0, 0, "phalcon/mvc/view/engine/php.zep", 50);
for (
- ; zephir_hash_get_current_data_ex(_1$$4, (void**) &_2$$4, &_0$$4) == SUCCESS
- ; zephir_hash_move_forward_ex(_1$$4, &_0$$4)
+ ; zend_hash_get_current_data_ex(_1$$4, (void**) &_2$$4, &_0$$4) == SUCCESS
+ ; zend_hash_move_forward_ex(_1$$4, &_0$$4)
) {
ZEPHIR_GET_HMKEY(key, _1$$4, _0$$4);
ZEPHIR_GET_HVALUE(value, _2$$4);
diff --git a/ext/phalcon/mvc/view/engine/volt.zep.c b/ext/phalcon/mvc/view/engine/volt.zep.c
index 6ed7e5b6f2d..542ba05ca78 100644
--- a/ext/phalcon/mvc/view/engine/volt.zep.c
+++ b/ext/phalcon/mvc/view/engine/volt.zep.c
@@ -17,7 +17,6 @@
#include "kernel/exception.h"
#include "kernel/memory.h"
#include "kernel/fcall.h"
-#include "kernel/hash.h"
#include "kernel/require.h"
#include "kernel/operators.h"
#include "kernel/string.h"
@@ -123,11 +122,11 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, render) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 1, &templatePath_param, ¶ms, &mustClean_param);
- if (unlikely(Z_TYPE_P(templatePath_param) != IS_STRING && Z_TYPE_P(templatePath_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(templatePath_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(templatePath_param) == IS_STRING)) {
zephir_get_strval(templatePath, templatePath_param);
} else {
ZEPHIR_INIT_VAR(templatePath);
@@ -153,8 +152,8 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, render) {
if (Z_TYPE_P(params) == IS_ARRAY) {
zephir_is_iterable(params, &_1$$4, &_0$$4, 0, 0, "phalcon/mvc/view/engine/volt.zep", 116);
for (
- ; zephir_hash_get_current_data_ex(_1$$4, (void**) &_2$$4, &_0$$4) == SUCCESS
- ; zephir_hash_move_forward_ex(_1$$4, &_0$$4)
+ ; zend_hash_get_current_data_ex(_1$$4, (void**) &_2$$4, &_0$$4) == SUCCESS
+ ; zend_hash_move_forward_ex(_1$$4, &_0$$4)
) {
ZEPHIR_GET_HMKEY(key, _1$$4, _0$$4);
ZEPHIR_GET_HVALUE(value, _2$$4);
@@ -253,21 +252,21 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, convertEncoding) {
zephir_fetch_params(1, 3, 0, &text_param, &from_param, &to_param);
zephir_get_strval(text, text_param);
- if (unlikely(Z_TYPE_P(from_param) != IS_STRING && Z_TYPE_P(from_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(from_param) != IS_STRING && Z_TYPE_P(from_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'from' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(from_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(from_param) == IS_STRING)) {
zephir_get_strval(from, from_param);
} else {
ZEPHIR_INIT_VAR(from);
ZVAL_EMPTY_STRING(from);
}
- if (unlikely(Z_TYPE_P(to_param) != IS_STRING && Z_TYPE_P(to_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(to_param) != IS_STRING && Z_TYPE_P(to_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'to' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(to_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(to_param) == IS_STRING)) {
zephir_get_strval(to, to_param);
} else {
ZEPHIR_INIT_VAR(to);
@@ -440,11 +439,11 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, callMacro) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &name_param, &arguments_param);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
diff --git a/ext/phalcon/mvc/view/engine/volt/compiler.zep.c b/ext/phalcon/mvc/view/engine/volt/compiler.zep.c
index 50a841a81c6..11efd40d549 100644
--- a/ext/phalcon/mvc/view/engine/volt/compiler.zep.c
+++ b/ext/phalcon/mvc/view/engine/volt/compiler.zep.c
@@ -18,7 +18,6 @@
#include "kernel/exception.h"
#include "kernel/operators.h"
#include "kernel/array.h"
-#include "kernel/hash.h"
#include "kernel/fcall.h"
#include "kernel/file.h"
#include "Zend/zend_closures.h"
@@ -171,11 +170,11 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, setOption) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &option_param, &value);
- if (unlikely(Z_TYPE_P(option_param) != IS_STRING && Z_TYPE_P(option_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(option_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(option_param) == IS_STRING)) {
zephir_get_strval(option, option_param);
} else {
ZEPHIR_INIT_VAR(option);
@@ -202,11 +201,11 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, getOption) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &option_param);
- if (unlikely(Z_TYPE_P(option_param) != IS_STRING && Z_TYPE_P(option_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(option_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(option_param) == IS_STRING)) {
zephir_get_strval(option, option_param);
} else {
ZEPHIR_INIT_VAR(option);
@@ -252,11 +251,11 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, fireExtensionEvent) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &name_param, &arguments);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -272,8 +271,8 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, fireExtensionEvent) {
if (Z_TYPE_P(extensions) == IS_ARRAY) {
zephir_is_iterable(extensions, &_1$$3, &_0$$3, 0, 0, "phalcon/mvc/view/engine/volt/compiler.zep", 189);
for (
- ; zephir_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_1$$3, &_0$$3)
+ ; zend_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_1$$3, &_0$$3)
) {
ZEPHIR_GET_HVALUE(extension, _2$$3);
if ((zephir_method_exists(extension, name TSRMLS_CC) == SUCCESS)) {
@@ -352,11 +351,11 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, addFunction) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &name_param, &definition);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -391,11 +390,11 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, addFilter) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &name_param, &definition);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -430,11 +429,11 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, setUniquePrefix) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &prefix_param);
- if (unlikely(Z_TYPE_P(prefix_param) != IS_STRING && Z_TYPE_P(prefix_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(prefix_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(prefix_param) == IS_STRING)) {
zephir_get_strval(prefix, prefix_param);
} else {
ZEPHIR_INIT_VAR(prefix);
@@ -1168,8 +1167,8 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, expression) {
array_init(items);
zephir_is_iterable(expr, &_4$$6, &_3$$6, 0, 0, "phalcon/mvc/view/engine/volt/compiler.zep", 993);
for (
- ; zephir_hash_get_current_data_ex(_4$$6, (void**) &_5$$6, &_3$$6) == SUCCESS
- ; zephir_hash_move_forward_ex(_4$$6, &_3$$6)
+ ; zend_hash_get_current_data_ex(_4$$6, (void**) &_5$$6, &_3$$6) == SUCCESS
+ ; zend_hash_move_forward_ex(_4$$6, &_3$$6)
) {
ZEPHIR_GET_HVALUE(singleExpr, _5$$6);
zephir_array_fetch_string(&_6$$7, singleExpr, SL("expr"), PH_NOISY | PH_READONLY, "phalcon/mvc/view/engine/volt/compiler.zep", 986 TSRMLS_CC);
@@ -1556,8 +1555,8 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, _statementListOrExtends) {
if (!(zephir_array_isset_string(statements, SS("type")))) {
zephir_is_iterable(statements, &_1$$4, &_0$$4, 0, 0, "phalcon/mvc/view/engine/volt/compiler.zep", 1310);
for (
- ; zephir_hash_get_current_data_ex(_1$$4, (void**) &_2$$4, &_0$$4) == SUCCESS
- ; zephir_hash_move_forward_ex(_1$$4, &_0$$4)
+ ; zend_hash_get_current_data_ex(_1$$4, (void**) &_2$$4, &_0$$4) == SUCCESS
+ ; zend_hash_move_forward_ex(_1$$4, &_0$$4)
) {
ZEPHIR_GET_HVALUE(statement, _2$$4);
if (Z_TYPE_P(statement) != IS_ARRAY) {
@@ -1626,8 +1625,8 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileForeach) {
if (Z_TYPE_P(blockStatements) == IS_ARRAY) {
zephir_is_iterable(blockStatements, &_2$$4, &_1$$4, 0, 0, "phalcon/mvc/view/engine/volt/compiler.zep", 1388);
for (
- ; zephir_hash_get_current_data_ex(_2$$4, (void**) &_3$$4, &_1$$4) == SUCCESS
- ; zephir_hash_move_forward_ex(_2$$4, &_1$$4)
+ ; zend_hash_get_current_data_ex(_2$$4, (void**) &_3$$4, &_1$$4) == SUCCESS
+ ; zend_hash_move_forward_ex(_2$$4, &_1$$4)
) {
ZEPHIR_GET_HVALUE(bstatement, _3$$4);
if (Z_TYPE_P(bstatement) != IS_ARRAY) {
@@ -1987,8 +1986,8 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, compileSet) {
ZVAL_STRING(compilation, "> 1)));
diff --git a/ext/phalcon/session/adapter.zep.c b/ext/phalcon/session/adapter.zep.c
index 346946cc718..4715d88b591 100644
--- a/ext/phalcon/session/adapter.zep.c
+++ b/ext/phalcon/session/adapter.zep.c
@@ -20,7 +20,6 @@
#include "ext/spl/spl_exceptions.h"
#include "kernel/exception.h"
#include "kernel/concat.h"
-#include "kernel/hash.h"
#include "kernel/string.h"
@@ -270,7 +269,6 @@ PHP_METHOD(Phalcon_Session_Adapter, get) {
*/
PHP_METHOD(Phalcon_Session_Adapter, set) {
- int _2, _1$$3;
zval *index_param = NULL, *value, *_SESSION, *uniqueId = NULL, *_0$$3;
zval *index = NULL;
@@ -285,18 +283,10 @@ PHP_METHOD(Phalcon_Session_Adapter, set) {
if (!(ZEPHIR_IS_EMPTY(uniqueId))) {
ZEPHIR_INIT_VAR(_0$$3);
ZEPHIR_CONCAT_VSV(_0$$3, uniqueId, "#", index);
- _1$$3 = zephir_maybe_separate_zval(&_SESSION);
- zephir_array_update_zval(&_SESSION, _0$$3, &value, PH_COPY | PH_SEPARATE);
- if (_1$$3) {
- ZEND_SET_SYMBOL(&EG(symbol_table), "_SESSION", _SESSION);
- }
+ zephir_array_update_zval(&_SESSION, _0$$3, &value, PH_COPY);
RETURN_MM_NULL();
}
- _2 = zephir_maybe_separate_zval(&_SESSION);
- zephir_array_update_zval(&_SESSION, index, &value, PH_COPY | PH_SEPARATE);
- if (_2) {
- ZEND_SET_SYMBOL(&EG(symbol_table), "_SESSION", _SESSION);
- }
+ zephir_array_update_zval(&_SESSION, index, &value, PH_COPY);
ZEPHIR_MM_RESTORE();
}
@@ -463,8 +453,8 @@ PHP_METHOD(Phalcon_Session_Adapter, destroy) {
ZEPHIR_INIT_VAR(_0$$4);
zephir_is_iterable(_SESSION, &_2$$4, &_1$$4, 1, 0, "phalcon/session/adapter.zep", 275);
for (
- ; zephir_hash_get_current_data_ex(_2$$4, (void**) &_3$$4, &_1$$4) == SUCCESS
- ; zephir_hash_move_forward_ex(_2$$4, &_1$$4)
+ ; zend_hash_get_current_data_ex(_2$$4, (void**) &_3$$4, &_1$$4) == SUCCESS
+ ; zend_hash_move_forward_ex(_2$$4, &_1$$4)
) {
ZEPHIR_GET_HMKEY(key, _2$$4, _1$$4);
ZEPHIR_GET_HVALUE(_0$$4, _3$$4);
diff --git a/ext/phalcon/session/adapter/libmemcached.zep.c b/ext/phalcon/session/adapter/libmemcached.zep.c
index 4c1c03720b1..bb12f37a891 100644
--- a/ext/phalcon/session/adapter/libmemcached.zep.c
+++ b/ext/phalcon/session/adapter/libmemcached.zep.c
@@ -18,7 +18,6 @@
#include "kernel/exception.h"
#include "kernel/fcall.h"
#include "kernel/operators.h"
-#include "kernel/hash.h"
/**
@@ -296,8 +295,8 @@ PHP_METHOD(Phalcon_Session_Adapter_Libmemcached, destroy) {
ZEPHIR_INIT_VAR(_0);
zephir_is_iterable(_SESSION, &_2, &_1, 1, 0, "phalcon/session/adapter/libmemcached.zep", 168);
for (
- ; zephir_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
- ; zephir_hash_move_forward_ex(_2, &_1)
+ ; zend_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
+ ; zend_hash_move_forward_ex(_2, &_1)
) {
ZEPHIR_GET_HMKEY(key, _2, _1);
ZEPHIR_GET_HVALUE(_0, _3);
diff --git a/ext/phalcon/session/bag.zep.c b/ext/phalcon/session/bag.zep.c
index 73d2b08a958..21572502d1c 100644
--- a/ext/phalcon/session/bag.zep.c
+++ b/ext/phalcon/session/bag.zep.c
@@ -69,11 +69,11 @@ PHP_METHOD(Phalcon_Session_Bag, __construct) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &name_param);
- if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(name_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(name_param) == IS_STRING)) {
zephir_get_strval(name, name_param);
} else {
ZEPHIR_INIT_VAR(name);
@@ -207,11 +207,11 @@ PHP_METHOD(Phalcon_Session_Bag, set) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &property_param, &value);
- if (unlikely(Z_TYPE_P(property_param) != IS_STRING && Z_TYPE_P(property_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(property_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(property_param) == IS_STRING)) {
zephir_get_strval(property, property_param);
} else {
ZEPHIR_INIT_VAR(property);
@@ -250,11 +250,11 @@ PHP_METHOD(Phalcon_Session_Bag, __set) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &property_param, &value);
- if (unlikely(Z_TYPE_P(property_param) != IS_STRING && Z_TYPE_P(property_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(property_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(property_param) == IS_STRING)) {
zephir_get_strval(property, property_param);
} else {
ZEPHIR_INIT_VAR(property);
@@ -284,11 +284,11 @@ PHP_METHOD(Phalcon_Session_Bag, get) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &property_param, &defaultValue);
- if (unlikely(Z_TYPE_P(property_param) != IS_STRING && Z_TYPE_P(property_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(property_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(property_param) == IS_STRING)) {
zephir_get_strval(property, property_param);
} else {
ZEPHIR_INIT_VAR(property);
@@ -329,11 +329,11 @@ PHP_METHOD(Phalcon_Session_Bag, __get) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &property_param);
- if (unlikely(Z_TYPE_P(property_param) != IS_STRING && Z_TYPE_P(property_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(property_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(property_param) == IS_STRING)) {
zephir_get_strval(property, property_param);
} else {
ZEPHIR_INIT_VAR(property);
@@ -365,11 +365,11 @@ PHP_METHOD(Phalcon_Session_Bag, has) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &property_param);
- if (unlikely(Z_TYPE_P(property_param) != IS_STRING && Z_TYPE_P(property_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(property_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(property_param) == IS_STRING)) {
zephir_get_strval(property, property_param);
} else {
ZEPHIR_INIT_VAR(property);
@@ -405,11 +405,11 @@ PHP_METHOD(Phalcon_Session_Bag, __isset) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &property_param);
- if (unlikely(Z_TYPE_P(property_param) != IS_STRING && Z_TYPE_P(property_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(property_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(property_param) == IS_STRING)) {
zephir_get_strval(property, property_param);
} else {
ZEPHIR_INIT_VAR(property);
@@ -439,11 +439,11 @@ PHP_METHOD(Phalcon_Session_Bag, remove) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &property_param);
- if (unlikely(Z_TYPE_P(property_param) != IS_STRING && Z_TYPE_P(property_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(property_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(property_param) == IS_STRING)) {
zephir_get_strval(property, property_param);
} else {
ZEPHIR_INIT_VAR(property);
@@ -487,11 +487,11 @@ PHP_METHOD(Phalcon_Session_Bag, __unset) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &property_param);
- if (unlikely(Z_TYPE_P(property_param) != IS_STRING && Z_TYPE_P(property_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(property_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(property_param) == IS_STRING)) {
zephir_get_strval(property, property_param);
} else {
ZEPHIR_INIT_VAR(property);
@@ -561,11 +561,11 @@ PHP_METHOD(Phalcon_Session_Bag, offsetSet) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &property_param, &value);
- if (unlikely(Z_TYPE_P(property_param) != IS_STRING && Z_TYPE_P(property_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(property_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(property_param) == IS_STRING)) {
zephir_get_strval(property, property_param);
} else {
ZEPHIR_INIT_VAR(property);
@@ -588,11 +588,11 @@ PHP_METHOD(Phalcon_Session_Bag, offsetExists) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &property_param);
- if (unlikely(Z_TYPE_P(property_param) != IS_STRING && Z_TYPE_P(property_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(property_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(property_param) == IS_STRING)) {
zephir_get_strval(property, property_param);
} else {
ZEPHIR_INIT_VAR(property);
@@ -615,11 +615,11 @@ PHP_METHOD(Phalcon_Session_Bag, offsetUnset) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &property_param);
- if (unlikely(Z_TYPE_P(property_param) != IS_STRING && Z_TYPE_P(property_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(property_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(property_param) == IS_STRING)) {
zephir_get_strval(property, property_param);
} else {
ZEPHIR_INIT_VAR(property);
@@ -642,11 +642,11 @@ PHP_METHOD(Phalcon_Session_Bag, offsetGet) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &property_param);
- if (unlikely(Z_TYPE_P(property_param) != IS_STRING && Z_TYPE_P(property_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(property_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(property_param) == IS_STRING)) {
zephir_get_strval(property, property_param);
} else {
ZEPHIR_INIT_VAR(property);
diff --git a/ext/phalcon/tag.zep.c b/ext/phalcon/tag.zep.c
index dae7aae97b9..fc99176d2d8 100644
--- a/ext/phalcon/tag.zep.c
+++ b/ext/phalcon/tag.zep.c
@@ -19,7 +19,6 @@
#include "kernel/fcall.h"
#include "ext/spl/spl_exceptions.h"
#include "kernel/exception.h"
-#include "kernel/hash.h"
#include "kernel/concat.h"
#include "kernel/string.h"
@@ -141,11 +140,11 @@ PHP_METHOD(Phalcon_Tag, renderAttributes) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &code_param, &attributes_param);
- if (unlikely(Z_TYPE_P(code_param) != IS_STRING && Z_TYPE_P(code_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(code_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(code_param) == IS_STRING)) {
zephir_get_strval(code, code_param);
} else {
ZEPHIR_INIT_VAR(code);
@@ -170,8 +169,8 @@ PHP_METHOD(Phalcon_Tag, renderAttributes) {
array_init(attrs);
zephir_is_iterable(order, &_1, &_0, 0, 0, "phalcon/tag.zep", 137);
for (
- ; zephir_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
- ; zephir_hash_move_forward_ex(_1, &_0)
+ ; zend_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
+ ; zend_hash_move_forward_ex(_1, &_0)
) {
ZEPHIR_GET_HMKEY(key, _1, _0);
ZEPHIR_GET_HVALUE(value, _2);
@@ -182,8 +181,8 @@ PHP_METHOD(Phalcon_Tag, renderAttributes) {
}
zephir_is_iterable(attributes, &_4, &_3, 0, 0, "phalcon/tag.zep", 143);
for (
- ; zephir_hash_get_current_data_ex(_4, (void**) &_5, &_3) == SUCCESS
- ; zephir_hash_move_forward_ex(_4, &_3)
+ ; zend_hash_get_current_data_ex(_4, (void**) &_5, &_3) == SUCCESS
+ ; zend_hash_move_forward_ex(_4, &_3)
) {
ZEPHIR_GET_HMKEY(key, _4, _3);
ZEPHIR_GET_HVALUE(value, _5);
@@ -198,8 +197,8 @@ PHP_METHOD(Phalcon_Tag, renderAttributes) {
ZEPHIR_CPY_WRT(newCode, code);
zephir_is_iterable(attrs, &_8, &_7, 0, 0, "phalcon/tag.zep", 162);
for (
- ; zephir_hash_get_current_data_ex(_8, (void**) &_9, &_7) == SUCCESS
- ; zephir_hash_move_forward_ex(_8, &_7)
+ ; zend_hash_get_current_data_ex(_8, (void**) &_9, &_7) == SUCCESS
+ ; zend_hash_move_forward_ex(_8, &_7)
) {
ZEPHIR_GET_HMKEY(key, _8, _7);
ZEPHIR_GET_HVALUE(value, _9);
@@ -380,11 +379,11 @@ PHP_METHOD(Phalcon_Tag, setDefault) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &id_param, &value);
- if (unlikely(Z_TYPE_P(id_param) != IS_STRING && Z_TYPE_P(id_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(id_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(id_param) == IS_STRING)) {
zephir_get_strval(id, id_param);
} else {
ZEPHIR_INIT_VAR(id);
@@ -1956,8 +1955,8 @@ PHP_METHOD(Phalcon_Tag, getTitle) {
zephir_check_call_status();
zephir_is_iterable(tmp$$5, &_9$$5, &_8$$5, 0, 0, "phalcon/tag.zep", 1228);
for (
- ; zephir_hash_get_current_data_ex(_9$$5, (void**) &_10$$5, &_8$$5) == SUCCESS
- ; zephir_hash_move_forward_ex(_9$$5, &_8$$5)
+ ; zend_hash_get_current_data_ex(_9$$5, (void**) &_10$$5, &_8$$5) == SUCCESS
+ ; zend_hash_move_forward_ex(_9$$5, &_8$$5)
) {
ZEPHIR_GET_HVALUE(title, _10$$5);
ZEPHIR_CALL_METHOD(&_11$$6, escaper, "escapehtml", &_12, 0, title);
@@ -1971,8 +1970,8 @@ PHP_METHOD(Phalcon_Tag, getTitle) {
if (!(ZEPHIR_IS_EMPTY(documentAppendTitle))) {
zephir_is_iterable(documentAppendTitle, &_14$$8, &_13$$8, 0, 0, "phalcon/tag.zep", 1238);
for (
- ; zephir_hash_get_current_data_ex(_14$$8, (void**) &_15$$8, &_13$$8) == SUCCESS
- ; zephir_hash_move_forward_ex(_14$$8, &_13$$8)
+ ; zend_hash_get_current_data_ex(_14$$8, (void**) &_15$$8, &_13$$8) == SUCCESS
+ ; zend_hash_move_forward_ex(_14$$8, &_13$$8)
) {
ZEPHIR_GET_HVALUE(title, _15$$8);
ZEPHIR_CALL_METHOD(&_16$$9, escaper, "escapehtml", &_17, 0, title);
@@ -2382,8 +2381,8 @@ PHP_METHOD(Phalcon_Tag, friendlyTitle) {
if (Z_TYPE_P(replace) == IS_ARRAY) {
zephir_is_iterable(replace, &_9$$6, &_8$$6, 0, 0, "phalcon/tag.zep", 1502);
for (
- ; zephir_hash_get_current_data_ex(_9$$6, (void**) &_10$$6, &_8$$6) == SUCCESS
- ; zephir_hash_move_forward_ex(_9$$6, &_8$$6)
+ ; zend_hash_get_current_data_ex(_9$$6, (void**) &_10$$6, &_8$$6) == SUCCESS
+ ; zend_hash_move_forward_ex(_9$$6, &_8$$6)
) {
ZEPHIR_GET_HVALUE(search, _10$$6);
ZEPHIR_INIT_NVAR(_11$$7);
diff --git a/ext/phalcon/tag/select.zep.c b/ext/phalcon/tag/select.zep.c
index 0263dd859e9..6d088d936e7 100644
--- a/ext/phalcon/tag/select.zep.c
+++ b/ext/phalcon/tag/select.zep.c
@@ -21,7 +21,6 @@
#include "kernel/concat.h"
#include "kernel/iterator.h"
#include "kernel/object.h"
-#include "kernel/hash.h"
/**
@@ -318,8 +317,8 @@ PHP_METHOD(Phalcon_Tag_Select, _optionsFromArray) {
ZVAL_STRING(code, "", 1);
zephir_is_iterable(data, &_1, &_0, 0, 0, "phalcon/tag/select.zep", 274);
for (
- ; zephir_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
- ; zephir_hash_move_forward_ex(_1, &_0)
+ ; zend_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
+ ; zend_hash_move_forward_ex(_1, &_0)
) {
ZEPHIR_GET_HMKEY(optionValue, _1, _0);
ZEPHIR_GET_HVALUE(optionText, _2);
diff --git a/ext/phalcon/text.zep.c b/ext/phalcon/text.zep.c
index 3f8f9e3b85c..6b10e5ef689 100644
--- a/ext/phalcon/text.zep.c
+++ b/ext/phalcon/text.zep.c
@@ -22,7 +22,7 @@
#include "kernel/fcall.h"
#include "kernel/math.h"
#include "kernel/object.h"
-#include "kernel/hash.h"
+#include "kernel/main.h"
/**
@@ -65,11 +65,11 @@ PHP_METHOD(Phalcon_Text, camelize) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &str_param, &delimiter);
- if (unlikely(Z_TYPE_P(str_param) != IS_STRING && Z_TYPE_P(str_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(str_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(str_param) == IS_STRING)) {
zephir_get_strval(str, str_param);
} else {
ZEPHIR_INIT_VAR(str);
@@ -102,11 +102,11 @@ PHP_METHOD(Phalcon_Text, uncamelize) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &str_param, &delimiter);
- if (unlikely(Z_TYPE_P(str_param) != IS_STRING && Z_TYPE_P(str_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(str_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(str_param) == IS_STRING)) {
zephir_get_strval(str, str_param);
} else {
ZEPHIR_INIT_VAR(str);
@@ -372,11 +372,11 @@ PHP_METHOD(Phalcon_Text, lower) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &str_param, &encoding_param);
- if (unlikely(Z_TYPE_P(str_param) != IS_STRING && Z_TYPE_P(str_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(str_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(str_param) == IS_STRING)) {
zephir_get_strval(str, str_param);
} else {
ZEPHIR_INIT_VAR(str);
@@ -386,11 +386,11 @@ PHP_METHOD(Phalcon_Text, lower) {
ZEPHIR_INIT_VAR(encoding);
ZVAL_STRING(encoding, "UTF-8", 1);
} else {
- if (unlikely(Z_TYPE_P(encoding_param) != IS_STRING && Z_TYPE_P(encoding_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(encoding_param) != IS_STRING && Z_TYPE_P(encoding_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'encoding' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(encoding_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(encoding_param) == IS_STRING)) {
zephir_get_strval(encoding, encoding_param);
} else {
ZEPHIR_INIT_VAR(encoding);
@@ -425,11 +425,11 @@ PHP_METHOD(Phalcon_Text, upper) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &str_param, &encoding_param);
- if (unlikely(Z_TYPE_P(str_param) != IS_STRING && Z_TYPE_P(str_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(str_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(str_param) == IS_STRING)) {
zephir_get_strval(str, str_param);
} else {
ZEPHIR_INIT_VAR(str);
@@ -439,11 +439,11 @@ PHP_METHOD(Phalcon_Text, upper) {
ZEPHIR_INIT_VAR(encoding);
ZVAL_STRING(encoding, "UTF-8", 1);
} else {
- if (unlikely(Z_TYPE_P(encoding_param) != IS_STRING && Z_TYPE_P(encoding_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(encoding_param) != IS_STRING && Z_TYPE_P(encoding_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'encoding' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(encoding_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(encoding_param) == IS_STRING)) {
zephir_get_strval(encoding, encoding_param);
} else {
ZEPHIR_INIT_VAR(encoding);
@@ -517,54 +517,52 @@ PHP_METHOD(Phalcon_Text, reduceSlashes) {
*/
PHP_METHOD(Phalcon_Text, concat) {
- HashTable *_6$$3;
- HashPosition _5$$3;
- zval *separator = NULL, *a = NULL, *b = NULL, _0 = zval_used_for_init, *c = NULL, *_11, *_12, *_2$$3, _3$$3, *_4$$3 = NULL, **_7$$3, *_8$$4 = NULL, *_9$$4 = NULL, *_10$$4 = NULL;
+ HashTable *_7$$3;
+ HashPosition _6$$3;
+ zval *separator = NULL, *a = NULL, *b = NULL, _0, _1, _2, *c = NULL, *_12, *_13, *_3$$3, _4$$3, *_5$$3 = NULL, **_8$$3, *_9$$4 = NULL, *_10$$4 = NULL, *_11$$4 = NULL;
int ZEPHIR_LAST_CALL_STATUS;
- zephir_fcall_cache_entry *_1 = NULL;
ZEPHIR_MM_GROW();
+ ZEPHIR_INIT_VAR(separator);
ZEPHIR_SINIT_VAR(_0);
ZVAL_LONG(&_0, 0);
- ZEPHIR_CALL_FUNCTION(&separator, "func_get_arg", &_1, 448, &_0);
- zephir_check_call_status();
- ZEPHIR_SINIT_NVAR(_0);
- ZVAL_LONG(&_0, 1);
- ZEPHIR_CALL_FUNCTION(&a, "func_get_arg", &_1, 448, &_0);
- zephir_check_call_status();
- ZEPHIR_SINIT_NVAR(_0);
- ZVAL_LONG(&_0, 2);
- ZEPHIR_CALL_FUNCTION(&b, "func_get_arg", &_1, 448, &_0);
- zephir_check_call_status();
+ zephir_get_arg(separator, zephir_get_intval(&_0) TSRMLS_CC);
+ ZEPHIR_INIT_VAR(a);
+ ZEPHIR_SINIT_VAR(_1);
+ ZVAL_LONG(&_1, 1);
+ zephir_get_arg(a, zephir_get_intval(&_1) TSRMLS_CC);
+ ZEPHIR_INIT_VAR(b);
+ ZEPHIR_SINIT_VAR(_2);
+ ZVAL_LONG(&_2, 2);
+ zephir_get_arg(b, zephir_get_intval(&_2) TSRMLS_CC);
if (ZEND_NUM_ARGS() > 3) {
- ZEPHIR_INIT_VAR(_2$$3);
- array_init(_2$$3);
- zend_copy_parameters_array(ZEND_NUM_ARGS(), _2$$3 TSRMLS_CC);
- ZEPHIR_SINIT_VAR(_3$$3);
- ZVAL_LONG(&_3$$3, 3);
- ZEPHIR_CALL_FUNCTION(&_4$$3, "array_slice", NULL, 395, _2$$3, &_3$$3);
+ ZEPHIR_INIT_VAR(_3$$3);
+ zephir_get_args(_3$$3 TSRMLS_CC);
+ ZEPHIR_SINIT_VAR(_4$$3);
+ ZVAL_LONG(&_4$$3, 3);
+ ZEPHIR_CALL_FUNCTION(&_5$$3, "array_slice", NULL, 395, _3$$3, &_4$$3);
zephir_check_call_status();
- zephir_is_iterable(_4$$3, &_6$$3, &_5$$3, 0, 0, "phalcon/text.zep", 256);
+ zephir_is_iterable(_5$$3, &_7$$3, &_6$$3, 0, 0, "phalcon/text.zep", 256);
for (
- ; zephir_hash_get_current_data_ex(_6$$3, (void**) &_7$$3, &_5$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_6$$3, &_5$$3)
+ ; zend_hash_get_current_data_ex(_7$$3, (void**) &_8$$3, &_6$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_7$$3, &_6$$3)
) {
- ZEPHIR_GET_HVALUE(c, _7$$3);
- ZEPHIR_INIT_NVAR(_8$$4);
- zephir_fast_trim(_8$$4, b, separator, ZEPHIR_TRIM_RIGHT TSRMLS_CC);
+ ZEPHIR_GET_HVALUE(c, _8$$3);
ZEPHIR_INIT_NVAR(_9$$4);
- zephir_fast_trim(_9$$4, c, separator, ZEPHIR_TRIM_LEFT TSRMLS_CC);
- ZEPHIR_INIT_LNVAR(_10$$4);
- ZEPHIR_CONCAT_VVV(_10$$4, _8$$4, separator, _9$$4);
- ZEPHIR_CPY_WRT(b, _10$$4);
+ zephir_fast_trim(_9$$4, b, separator, ZEPHIR_TRIM_RIGHT TSRMLS_CC);
+ ZEPHIR_INIT_NVAR(_10$$4);
+ zephir_fast_trim(_10$$4, c, separator, ZEPHIR_TRIM_LEFT TSRMLS_CC);
+ ZEPHIR_INIT_LNVAR(_11$$4);
+ ZEPHIR_CONCAT_VVV(_11$$4, _9$$4, separator, _10$$4);
+ ZEPHIR_CPY_WRT(b, _11$$4);
}
}
- ZEPHIR_INIT_VAR(_11);
- zephir_fast_trim(_11, a, separator, ZEPHIR_TRIM_RIGHT TSRMLS_CC);
ZEPHIR_INIT_VAR(_12);
- zephir_fast_trim(_12, b, separator, ZEPHIR_TRIM_LEFT TSRMLS_CC);
- ZEPHIR_CONCAT_VVV(return_value, _11, separator, _12);
+ zephir_fast_trim(_12, a, separator, ZEPHIR_TRIM_RIGHT TSRMLS_CC);
+ ZEPHIR_INIT_VAR(_13);
+ zephir_fast_trim(_13, b, separator, ZEPHIR_TRIM_LEFT TSRMLS_CC);
+ ZEPHIR_CONCAT_VVV(return_value, _12, separator, _13);
RETURN_MM();
}
@@ -599,11 +597,11 @@ PHP_METHOD(Phalcon_Text, dynamic) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 3, &text_param, &leftDelimiter_param, &rightDelimiter_param, &separator_param);
- if (unlikely(Z_TYPE_P(text_param) != IS_STRING && Z_TYPE_P(text_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(text_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(text_param) == IS_STRING)) {
zephir_get_strval(text, text_param);
} else {
ZEPHIR_INIT_VAR(text);
@@ -613,11 +611,11 @@ PHP_METHOD(Phalcon_Text, dynamic) {
ZEPHIR_INIT_VAR(leftDelimiter);
ZVAL_STRING(leftDelimiter, "{", 1);
} else {
- if (unlikely(Z_TYPE_P(leftDelimiter_param) != IS_STRING && Z_TYPE_P(leftDelimiter_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(leftDelimiter_param) != IS_STRING && Z_TYPE_P(leftDelimiter_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'leftDelimiter' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(leftDelimiter_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(leftDelimiter_param) == IS_STRING)) {
zephir_get_strval(leftDelimiter, leftDelimiter_param);
} else {
ZEPHIR_INIT_VAR(leftDelimiter);
@@ -628,11 +626,11 @@ PHP_METHOD(Phalcon_Text, dynamic) {
ZEPHIR_INIT_VAR(rightDelimiter);
ZVAL_STRING(rightDelimiter, "}", 1);
} else {
- if (unlikely(Z_TYPE_P(rightDelimiter_param) != IS_STRING && Z_TYPE_P(rightDelimiter_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(rightDelimiter_param) != IS_STRING && Z_TYPE_P(rightDelimiter_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'rightDelimiter' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(rightDelimiter_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(rightDelimiter_param) == IS_STRING)) {
zephir_get_strval(rightDelimiter, rightDelimiter_param);
} else {
ZEPHIR_INIT_VAR(rightDelimiter);
@@ -643,11 +641,11 @@ PHP_METHOD(Phalcon_Text, dynamic) {
ZEPHIR_INIT_VAR(separator);
ZVAL_STRING(separator, "|", 1);
} else {
- if (unlikely(Z_TYPE_P(separator_param) != IS_STRING && Z_TYPE_P(separator_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(separator_param) != IS_STRING && Z_TYPE_P(separator_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'separator' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(separator_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(separator_param) == IS_STRING)) {
zephir_get_strval(separator, separator_param);
} else {
ZEPHIR_INIT_VAR(separator);
@@ -656,24 +654,24 @@ PHP_METHOD(Phalcon_Text, dynamic) {
}
- ZEPHIR_CALL_FUNCTION(&_0, "substr_count", &_1, 449, text, leftDelimiter);
+ ZEPHIR_CALL_FUNCTION(&_0, "substr_count", &_1, 448, text, leftDelimiter);
zephir_check_call_status();
- ZEPHIR_CALL_FUNCTION(&_2, "substr_count", &_1, 449, text, rightDelimiter);
+ ZEPHIR_CALL_FUNCTION(&_2, "substr_count", &_1, 448, text, rightDelimiter);
zephir_check_call_status();
if (!ZEPHIR_IS_IDENTICAL(_0, _2)) {
ZEPHIR_INIT_VAR(_3$$3);
object_init_ex(_3$$3, spl_ce_RuntimeException);
ZEPHIR_INIT_VAR(_4$$3);
ZEPHIR_CONCAT_SVS(_4$$3, "Syntax error in string \"", text, "\"");
- ZEPHIR_CALL_METHOD(NULL, _3$$3, "__construct", NULL, 450, _4$$3);
+ ZEPHIR_CALL_METHOD(NULL, _3$$3, "__construct", NULL, 449, _4$$3);
zephir_check_call_status();
zephir_throw_exception_debug(_3$$3, "phalcon/text.zep", 283 TSRMLS_CC);
ZEPHIR_MM_RESTORE();
return;
}
- ZEPHIR_CALL_FUNCTION(&ldS, "preg_quote", &_5, 451, leftDelimiter);
+ ZEPHIR_CALL_FUNCTION(&ldS, "preg_quote", &_5, 450, leftDelimiter);
zephir_check_call_status();
- ZEPHIR_CALL_FUNCTION(&rdS, "preg_quote", &_5, 451, rightDelimiter);
+ ZEPHIR_CALL_FUNCTION(&rdS, "preg_quote", &_5, 450, rightDelimiter);
zephir_check_call_status();
ZEPHIR_INIT_VAR(pattern);
ZEPHIR_CONCAT_SVSVVSVS(pattern, "/", ldS, "([^", ldS, rdS, "]+)", rdS, "/");
@@ -691,8 +689,8 @@ PHP_METHOD(Phalcon_Text, dynamic) {
if (Z_TYPE_P(matches) == IS_ARRAY) {
zephir_is_iterable(matches, &_9$$5, &_8$$5, 0, 0, "phalcon/text.zep", 306);
for (
- ; zephir_hash_get_current_data_ex(_9$$5, (void**) &_10$$5, &_8$$5) == SUCCESS
- ; zephir_hash_move_forward_ex(_9$$5, &_8$$5)
+ ; zend_hash_get_current_data_ex(_9$$5, (void**) &_10$$5, &_8$$5) == SUCCESS
+ ; zend_hash_move_forward_ex(_9$$5, &_8$$5)
) {
ZEPHIR_GET_HVALUE(match, _10$$5);
_11$$6 = !(zephir_array_isset_long(match, 0));
@@ -706,11 +704,11 @@ PHP_METHOD(Phalcon_Text, dynamic) {
ZEPHIR_INIT_NVAR(words);
zephir_fast_explode(words, separator, _12$$6, LONG_MAX TSRMLS_CC);
ZEPHIR_OBS_NVAR(word);
- ZEPHIR_CALL_FUNCTION(&_13$$6, "array_rand", &_14, 452, words);
+ ZEPHIR_CALL_FUNCTION(&_13$$6, "array_rand", &_14, 451, words);
zephir_check_call_status();
zephir_array_fetch(&word, words, _13$$6, PH_NOISY, "phalcon/text.zep", 302 TSRMLS_CC);
zephir_array_fetch_long(&_15$$6, match, 0, PH_NOISY | PH_READONLY, "phalcon/text.zep", 303 TSRMLS_CC);
- ZEPHIR_CALL_FUNCTION(&sub, "preg_quote", &_5, 451, _15$$6, separator);
+ ZEPHIR_CALL_FUNCTION(&sub, "preg_quote", &_5, 450, _15$$6, separator);
zephir_check_call_status();
ZEPHIR_INIT_LNVAR(_16$$6);
ZEPHIR_CONCAT_SVS(_16$$6, "/", sub, "/");
@@ -742,11 +740,11 @@ PHP_METHOD(Phalcon_Text, underscore) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &text_param);
- if (unlikely(Z_TYPE_P(text_param) != IS_STRING && Z_TYPE_P(text_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(text_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(text_param) == IS_STRING)) {
zephir_get_strval(text, text_param);
} else {
ZEPHIR_INIT_VAR(text);
@@ -785,11 +783,11 @@ PHP_METHOD(Phalcon_Text, humanize) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &text_param);
- if (unlikely(Z_TYPE_P(text_param) != IS_STRING && Z_TYPE_P(text_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(text_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(text_param) == IS_STRING)) {
zephir_get_strval(text, text_param);
} else {
ZEPHIR_INIT_VAR(text);
diff --git a/ext/phalcon/translate/adapter.zep.c b/ext/phalcon/translate/adapter.zep.c
index dedb9a83b29..1c0ef4c18c0 100644
--- a/ext/phalcon/translate/adapter.zep.c
+++ b/ext/phalcon/translate/adapter.zep.c
@@ -96,11 +96,11 @@ PHP_METHOD(Phalcon_Translate_Adapter, t) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &translateKey_param, &placeholders);
- if (unlikely(Z_TYPE_P(translateKey_param) != IS_STRING && Z_TYPE_P(translateKey_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(translateKey_param) != IS_STRING && Z_TYPE_P(translateKey_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'translateKey' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(translateKey_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(translateKey_param) == IS_STRING)) {
zephir_get_strval(translateKey, translateKey_param);
} else {
ZEPHIR_INIT_VAR(translateKey);
@@ -133,11 +133,11 @@ PHP_METHOD(Phalcon_Translate_Adapter, _) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &translateKey_param, &placeholders);
- if (unlikely(Z_TYPE_P(translateKey_param) != IS_STRING && Z_TYPE_P(translateKey_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(translateKey_param) != IS_STRING && Z_TYPE_P(translateKey_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'translateKey' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(translateKey_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(translateKey_param) == IS_STRING)) {
zephir_get_strval(translateKey, translateKey_param);
} else {
ZEPHIR_INIT_VAR(translateKey);
@@ -185,11 +185,11 @@ PHP_METHOD(Phalcon_Translate_Adapter, offsetExists) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &translateKey_param);
- if (unlikely(Z_TYPE_P(translateKey_param) != IS_STRING && Z_TYPE_P(translateKey_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(translateKey_param) != IS_STRING && Z_TYPE_P(translateKey_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'translateKey' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(translateKey_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(translateKey_param) == IS_STRING)) {
zephir_get_strval(translateKey, translateKey_param);
} else {
ZEPHIR_INIT_VAR(translateKey);
@@ -236,11 +236,11 @@ PHP_METHOD(Phalcon_Translate_Adapter, offsetGet) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &translateKey_param);
- if (unlikely(Z_TYPE_P(translateKey_param) != IS_STRING && Z_TYPE_P(translateKey_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(translateKey_param) != IS_STRING && Z_TYPE_P(translateKey_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'translateKey' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(translateKey_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(translateKey_param) == IS_STRING)) {
zephir_get_strval(translateKey, translateKey_param);
} else {
ZEPHIR_INIT_VAR(translateKey);
@@ -268,11 +268,11 @@ PHP_METHOD(Phalcon_Translate_Adapter, replacePlaceholders) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &translation_param, &placeholders);
- if (unlikely(Z_TYPE_P(translation_param) != IS_STRING && Z_TYPE_P(translation_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(translation_param) != IS_STRING && Z_TYPE_P(translation_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'translation' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(translation_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(translation_param) == IS_STRING)) {
zephir_get_strval(translation, translation_param);
} else {
ZEPHIR_INIT_VAR(translation);
diff --git a/ext/phalcon/translate/adapter/csv.zep.c b/ext/phalcon/translate/adapter/csv.zep.c
index 1c598d2cab8..5eb0ff553ee 100644
--- a/ext/phalcon/translate/adapter/csv.zep.c
+++ b/ext/phalcon/translate/adapter/csv.zep.c
@@ -58,7 +58,7 @@ PHP_METHOD(Phalcon_Translate_Adapter_Csv, __construct) {
options = options_param;
- ZEPHIR_CALL_PARENT(NULL, phalcon_translate_adapter_csv_ce, this_ptr, "__construct", &_0, 453, options);
+ ZEPHIR_CALL_PARENT(NULL, phalcon_translate_adapter_csv_ce, this_ptr, "__construct", &_0, 452, options);
zephir_check_call_status();
if (!(zephir_array_isset_string(options, SS("content")))) {
ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_translate_exception_ce, "Parameter 'content' is required", "phalcon/translate/adapter/csv.zep", 42);
@@ -71,7 +71,7 @@ PHP_METHOD(Phalcon_Translate_Adapter_Csv, __construct) {
ZVAL_STRING(_3, ";", ZEPHIR_TEMP_PARAM_COPY);
ZEPHIR_INIT_VAR(_4);
ZVAL_STRING(_4, "\"", ZEPHIR_TEMP_PARAM_COPY);
- ZEPHIR_CALL_METHOD(NULL, this_ptr, "_load", NULL, 454, _1, _2, _3, _4);
+ ZEPHIR_CALL_METHOD(NULL, this_ptr, "_load", NULL, 453, _1, _2, _3, _4);
zephir_check_temp_parameter(_3);
zephir_check_temp_parameter(_4);
zephir_check_call_status();
@@ -115,7 +115,7 @@ PHP_METHOD(Phalcon_Translate_Adapter_Csv, _load) {
return;
}
while (1) {
- ZEPHIR_CALL_FUNCTION(&data, "fgetcsv", &_3, 455, fileHandler, length, delimiter, enclosure);
+ ZEPHIR_CALL_FUNCTION(&data, "fgetcsv", &_3, 454, fileHandler, length, delimiter, enclosure);
zephir_check_call_status();
if (ZEPHIR_IS_FALSE_IDENTICAL(data)) {
break;
@@ -156,11 +156,11 @@ PHP_METHOD(Phalcon_Translate_Adapter_Csv, query) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &index_param, &placeholders);
- if (unlikely(Z_TYPE_P(index_param) != IS_STRING && Z_TYPE_P(index_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(index_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(index_param) == IS_STRING)) {
zephir_get_strval(index, index_param);
} else {
ZEPHIR_INIT_VAR(index);
@@ -193,11 +193,11 @@ PHP_METHOD(Phalcon_Translate_Adapter_Csv, exists) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &index_param);
- if (unlikely(Z_TYPE_P(index_param) != IS_STRING && Z_TYPE_P(index_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(index_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(index_param) == IS_STRING)) {
zephir_get_strval(index, index_param);
} else {
ZEPHIR_INIT_VAR(index);
diff --git a/ext/phalcon/translate/adapter/gettext.zep.c b/ext/phalcon/translate/adapter/gettext.zep.c
index 958b73dfe2e..c4f6237e81b 100644
--- a/ext/phalcon/translate/adapter/gettext.zep.c
+++ b/ext/phalcon/translate/adapter/gettext.zep.c
@@ -18,7 +18,7 @@
#include "ext/spl/spl_exceptions.h"
#include "kernel/memory.h"
#include "kernel/operators.h"
-#include "kernel/hash.h"
+#include "kernel/main.h"
#include "kernel/concat.h"
#include "kernel/array.h"
@@ -130,7 +130,7 @@ PHP_METHOD(Phalcon_Translate_Adapter_Gettext, __construct) {
ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_translate_exception_ce, "This class requires the gettext extension for PHP", "phalcon/translate/adapter/gettext.zep", 72);
return;
}
- ZEPHIR_CALL_PARENT(NULL, phalcon_translate_adapter_gettext_ce, this_ptr, "__construct", &_0, 453, options);
+ ZEPHIR_CALL_PARENT(NULL, phalcon_translate_adapter_gettext_ce, this_ptr, "__construct", &_0, 452, options);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(NULL, this_ptr, "prepareoptions", NULL, 0, options);
zephir_check_call_status();
@@ -154,11 +154,11 @@ PHP_METHOD(Phalcon_Translate_Adapter_Gettext, query) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &index_param, &placeholders);
- if (unlikely(Z_TYPE_P(index_param) != IS_STRING && Z_TYPE_P(index_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(index_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(index_param) == IS_STRING)) {
zephir_get_strval(index, index_param);
} else {
ZEPHIR_INIT_VAR(index);
@@ -169,7 +169,7 @@ PHP_METHOD(Phalcon_Translate_Adapter_Gettext, query) {
}
- ZEPHIR_CALL_FUNCTION(&translation, "gettext", NULL, 456, index);
+ ZEPHIR_CALL_FUNCTION(&translation, "gettext", NULL, 455, index);
zephir_check_call_status();
ZEPHIR_RETURN_CALL_METHOD(this_ptr, "replaceplaceholders", NULL, 0, translation, placeholders);
zephir_check_call_status();
@@ -189,11 +189,11 @@ PHP_METHOD(Phalcon_Translate_Adapter_Gettext, exists) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &index_param);
- if (unlikely(Z_TYPE_P(index_param) != IS_STRING && Z_TYPE_P(index_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(index_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(index_param) == IS_STRING)) {
zephir_get_strval(index, index_param);
} else {
ZEPHIR_INIT_VAR(index);
@@ -220,27 +220,27 @@ PHP_METHOD(Phalcon_Translate_Adapter_Gettext, nquery) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 3, 2, &msgid1_param, &msgid2_param, &count_param, &placeholders, &domain_param);
- if (unlikely(Z_TYPE_P(msgid1_param) != IS_STRING && Z_TYPE_P(msgid1_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(msgid1_param) != IS_STRING && Z_TYPE_P(msgid1_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'msgid1' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(msgid1_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(msgid1_param) == IS_STRING)) {
zephir_get_strval(msgid1, msgid1_param);
} else {
ZEPHIR_INIT_VAR(msgid1);
ZVAL_EMPTY_STRING(msgid1);
}
- if (unlikely(Z_TYPE_P(msgid2_param) != IS_STRING && Z_TYPE_P(msgid2_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(msgid2_param) != IS_STRING && Z_TYPE_P(msgid2_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'msgid2' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(msgid2_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(msgid2_param) == IS_STRING)) {
zephir_get_strval(msgid2, msgid2_param);
} else {
ZEPHIR_INIT_VAR(msgid2);
ZVAL_EMPTY_STRING(msgid2);
}
- if (unlikely(Z_TYPE_P(count_param) != IS_LONG)) {
+ if (UNEXPECTED(Z_TYPE_P(count_param) != IS_LONG)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'count' must be a int") TSRMLS_CC);
RETURN_MM_NULL();
}
@@ -252,11 +252,11 @@ PHP_METHOD(Phalcon_Translate_Adapter_Gettext, nquery) {
ZEPHIR_INIT_VAR(domain);
ZVAL_EMPTY_STRING(domain);
} else {
- if (unlikely(Z_TYPE_P(domain_param) != IS_STRING && Z_TYPE_P(domain_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(domain_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(domain_param) == IS_STRING)) {
zephir_get_strval(domain, domain_param);
} else {
ZEPHIR_INIT_VAR(domain);
@@ -268,12 +268,12 @@ PHP_METHOD(Phalcon_Translate_Adapter_Gettext, nquery) {
if (!(!(!domain) && Z_STRLEN_P(domain))) {
ZEPHIR_SINIT_VAR(_0$$3);
ZVAL_LONG(&_0$$3, count);
- ZEPHIR_CALL_FUNCTION(&translation, "ngettext", NULL, 457, msgid1, msgid2, &_0$$3);
+ ZEPHIR_CALL_FUNCTION(&translation, "ngettext", NULL, 456, msgid1, msgid2, &_0$$3);
zephir_check_call_status();
} else {
ZEPHIR_SINIT_VAR(_1$$4);
ZVAL_LONG(&_1$$4, count);
- ZEPHIR_CALL_FUNCTION(&translation, "dngettext", NULL, 458, domain, msgid1, msgid2, &_1$$4);
+ ZEPHIR_CALL_FUNCTION(&translation, "dngettext", NULL, 457, domain, msgid1, msgid2, &_1$$4);
zephir_check_call_status();
}
ZEPHIR_RETURN_CALL_METHOD(this_ptr, "replaceplaceholders", NULL, 0, translation, placeholders);
@@ -295,7 +295,7 @@ PHP_METHOD(Phalcon_Translate_Adapter_Gettext, setDomain) {
- ZEPHIR_RETURN_CALL_FUNCTION("textdomain", NULL, 459, domain);
+ ZEPHIR_RETURN_CALL_FUNCTION("textdomain", NULL, 458, domain);
zephir_check_call_status();
RETURN_MM();
@@ -313,7 +313,7 @@ PHP_METHOD(Phalcon_Translate_Adapter_Gettext, resetDomain) {
ZEPHIR_CALL_METHOD(&_0, this_ptr, "getdefaultdomain", NULL, 0);
zephir_check_call_status();
- ZEPHIR_RETURN_CALL_FUNCTION("textdomain", NULL, 459, _0);
+ ZEPHIR_RETURN_CALL_FUNCTION("textdomain", NULL, 458, _0);
zephir_check_call_status();
RETURN_MM();
@@ -330,11 +330,11 @@ PHP_METHOD(Phalcon_Translate_Adapter_Gettext, setDefaultDomain) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &domain_param);
- if (unlikely(Z_TYPE_P(domain_param) != IS_STRING && Z_TYPE_P(domain_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(domain_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(domain_param) == IS_STRING)) {
zephir_get_strval(domain, domain_param);
} else {
ZEPHIR_INIT_VAR(domain);
@@ -385,18 +385,18 @@ PHP_METHOD(Phalcon_Translate_Adapter_Gettext, setDirectory) {
if (Z_TYPE_P(directory) == IS_ARRAY) {
zephir_is_iterable(directory, &_1$$4, &_0$$4, 0, 0, "phalcon/translate/adapter/gettext.zep", 180);
for (
- ; zephir_hash_get_current_data_ex(_1$$4, (void**) &_2$$4, &_0$$4) == SUCCESS
- ; zephir_hash_move_forward_ex(_1$$4, &_0$$4)
+ ; zend_hash_get_current_data_ex(_1$$4, (void**) &_2$$4, &_0$$4) == SUCCESS
+ ; zend_hash_move_forward_ex(_1$$4, &_0$$4)
) {
ZEPHIR_GET_HMKEY(key, _1$$4, _0$$4);
ZEPHIR_GET_HVALUE(value, _2$$4);
- ZEPHIR_CALL_FUNCTION(NULL, "bindtextdomain", &_3, 460, key, value);
+ ZEPHIR_CALL_FUNCTION(NULL, "bindtextdomain", &_3, 459, key, value);
zephir_check_call_status();
}
} else {
ZEPHIR_CALL_METHOD(&_4$$6, this_ptr, "getdefaultdomain", NULL, 0);
zephir_check_call_status();
- ZEPHIR_CALL_FUNCTION(NULL, "bindtextdomain", &_3, 460, _4$$6, directory);
+ ZEPHIR_CALL_FUNCTION(NULL, "bindtextdomain", &_3, 459, _4$$6, directory);
zephir_check_call_status();
}
ZEPHIR_MM_RESTORE();
@@ -424,16 +424,16 @@ PHP_METHOD(Phalcon_Translate_Adapter_Gettext, setLocale) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &category_param, &locale_param);
- if (unlikely(Z_TYPE_P(category_param) != IS_LONG)) {
+ if (UNEXPECTED(Z_TYPE_P(category_param) != IS_LONG)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'category' must be a int") TSRMLS_CC);
RETURN_MM_NULL();
}
category = Z_LVAL_P(category_param);
- if (unlikely(Z_TYPE_P(locale_param) != IS_STRING && Z_TYPE_P(locale_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(locale_param) != IS_STRING && Z_TYPE_P(locale_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'locale' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(locale_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(locale_param) == IS_STRING)) {
zephir_get_strval(locale, locale_param);
} else {
ZEPHIR_INIT_VAR(locale);
@@ -443,8 +443,7 @@ PHP_METHOD(Phalcon_Translate_Adapter_Gettext, setLocale) {
ZEPHIR_INIT_VAR(_0);
ZEPHIR_INIT_VAR(_1);
- array_init(_1);
- zend_copy_parameters_array(ZEND_NUM_ARGS(), _1 TSRMLS_CC);
+ zephir_get_args(_1 TSRMLS_CC);
ZEPHIR_SINIT_VAR(_2);
ZVAL_STRING(&_2, "setlocale", 0);
ZEPHIR_CALL_USER_FUNC_ARRAY(_0, &_2, _1);
@@ -456,17 +455,17 @@ PHP_METHOD(Phalcon_Translate_Adapter_Gettext, setLocale) {
_3 = zephir_fetch_nproperty_this(this_ptr, SL("_locale"), PH_NOISY_CC);
ZEPHIR_INIT_VAR(_4);
ZEPHIR_CONCAT_SV(_4, "LC_ALL=", _3);
- ZEPHIR_CALL_FUNCTION(NULL, "putenv", &_5, 461, _4);
+ ZEPHIR_CALL_FUNCTION(NULL, "putenv", &_5, 460, _4);
zephir_check_call_status();
_6 = zephir_fetch_nproperty_this(this_ptr, SL("_locale"), PH_NOISY_CC);
ZEPHIR_INIT_VAR(_7);
ZEPHIR_CONCAT_SV(_7, "LANG=", _6);
- ZEPHIR_CALL_FUNCTION(NULL, "putenv", &_5, 461, _7);
+ ZEPHIR_CALL_FUNCTION(NULL, "putenv", &_5, 460, _7);
zephir_check_call_status();
_8 = zephir_fetch_nproperty_this(this_ptr, SL("_locale"), PH_NOISY_CC);
ZEPHIR_INIT_VAR(_9);
ZEPHIR_CONCAT_SV(_9, "LANGUAGE=", _8);
- ZEPHIR_CALL_FUNCTION(NULL, "putenv", &_5, 461, _9);
+ ZEPHIR_CALL_FUNCTION(NULL, "putenv", &_5, 460, _9);
zephir_check_call_status();
_10 = zephir_fetch_nproperty_this(this_ptr, SL("_locale"), PH_NOISY_CC);
ZEPHIR_SINIT_VAR(_11);
diff --git a/ext/phalcon/translate/adapter/nativearray.zep.c b/ext/phalcon/translate/adapter/nativearray.zep.c
index 3516970bb68..5dd988c76ce 100644
--- a/ext/phalcon/translate/adapter/nativearray.zep.c
+++ b/ext/phalcon/translate/adapter/nativearray.zep.c
@@ -53,7 +53,7 @@ PHP_METHOD(Phalcon_Translate_Adapter_NativeArray, __construct) {
options = options_param;
- ZEPHIR_CALL_PARENT(NULL, phalcon_translate_adapter_nativearray_ce, this_ptr, "__construct", &_0, 453, options);
+ ZEPHIR_CALL_PARENT(NULL, phalcon_translate_adapter_nativearray_ce, this_ptr, "__construct", &_0, 452, options);
zephir_check_call_status();
ZEPHIR_OBS_VAR(data);
if (!(zephir_array_isset_string_fetch(&data, options, SS("content"), 0 TSRMLS_CC))) {
@@ -81,11 +81,11 @@ PHP_METHOD(Phalcon_Translate_Adapter_NativeArray, query) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &index_param, &placeholders);
- if (unlikely(Z_TYPE_P(index_param) != IS_STRING && Z_TYPE_P(index_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(index_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(index_param) == IS_STRING)) {
zephir_get_strval(index, index_param);
} else {
ZEPHIR_INIT_VAR(index);
@@ -118,11 +118,11 @@ PHP_METHOD(Phalcon_Translate_Adapter_NativeArray, exists) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &index_param);
- if (unlikely(Z_TYPE_P(index_param) != IS_STRING && Z_TYPE_P(index_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(index_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(index_param) == IS_STRING)) {
zephir_get_strval(index, index_param);
} else {
ZEPHIR_INIT_VAR(index);
diff --git a/ext/phalcon/translate/interpolator/associativearray.zep.c b/ext/phalcon/translate/interpolator/associativearray.zep.c
index e30650b71c2..6d53a941291 100644
--- a/ext/phalcon/translate/interpolator/associativearray.zep.c
+++ b/ext/phalcon/translate/interpolator/associativearray.zep.c
@@ -12,7 +12,6 @@
#include
#include "kernel/main.h"
-#include "kernel/hash.h"
#include "kernel/memory.h"
#include "kernel/string.h"
#include "kernel/concat.h"
@@ -44,11 +43,11 @@ PHP_METHOD(Phalcon_Translate_Interpolator_AssociativeArray, replacePlaceholders)
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &translation_param, &placeholders);
- if (unlikely(Z_TYPE_P(translation_param) != IS_STRING && Z_TYPE_P(translation_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(translation_param) != IS_STRING && Z_TYPE_P(translation_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'translation' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(translation_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(translation_param) == IS_STRING)) {
zephir_get_strval(translation, translation_param);
} else {
ZEPHIR_INIT_VAR(translation);
@@ -66,8 +65,8 @@ PHP_METHOD(Phalcon_Translate_Interpolator_AssociativeArray, replacePlaceholders)
if (_0) {
zephir_is_iterable(placeholders, &_2$$3, &_1$$3, 0, 0, "phalcon/translate/interpolator/associativearray.zep", 38);
for (
- ; zephir_hash_get_current_data_ex(_2$$3, (void**) &_3$$3, &_1$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_2$$3, &_1$$3)
+ ; zend_hash_get_current_data_ex(_2$$3, (void**) &_3$$3, &_1$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_2$$3, &_1$$3)
) {
ZEPHIR_GET_HMKEY(key, _2$$3, _1$$3);
ZEPHIR_GET_HVALUE(value, _3$$3);
diff --git a/ext/phalcon/translate/interpolator/indexedarray.zep.c b/ext/phalcon/translate/interpolator/indexedarray.zep.c
index cb27dbb12aa..9ee9fca3631 100644
--- a/ext/phalcon/translate/interpolator/indexedarray.zep.c
+++ b/ext/phalcon/translate/interpolator/indexedarray.zep.c
@@ -41,11 +41,11 @@ PHP_METHOD(Phalcon_Translate_Interpolator_IndexedArray, replacePlaceholders) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &translation_param, &placeholders);
- if (unlikely(Z_TYPE_P(translation_param) != IS_STRING && Z_TYPE_P(translation_param) != IS_NULL)) {
+ if (UNEXPECTED(Z_TYPE_P(translation_param) != IS_STRING && Z_TYPE_P(translation_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'translation' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(translation_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(translation_param) == IS_STRING)) {
zephir_get_strval(translation, translation_param);
} else {
ZEPHIR_INIT_VAR(translation);
diff --git a/ext/phalcon/validation.zep.c b/ext/phalcon/validation.zep.c
index b88f3848fd6..c65f66dfbb7 100644
--- a/ext/phalcon/validation.zep.c
+++ b/ext/phalcon/validation.zep.c
@@ -17,7 +17,6 @@
#include "kernel/fcall.h"
#include "kernel/operators.h"
#include "kernel/exception.h"
-#include "kernel/hash.h"
#include "kernel/array.h"
#include "ext/spl/spl_exceptions.h"
#include "kernel/string.h"
@@ -103,13 +102,13 @@ PHP_METHOD(Phalcon_Validation, __construct) {
ZEPHIR_INIT_VAR(_0$$3);
ZEPHIR_INIT_NVAR(_0$$3);
zephir_create_closure_ex(_0$$3, NULL, phalcon_0__closure_ce, SS("__invoke") TSRMLS_CC);
- ZEPHIR_CALL_FUNCTION(&_1$$3, "array_filter", &_2, 462, validators, _0$$3);
+ ZEPHIR_CALL_FUNCTION(&_1$$3, "array_filter", &_2, 461, validators, _0$$3);
zephir_check_call_status();
zephir_update_property_this(this_ptr, SL("_validators"), _1$$3 TSRMLS_CC);
ZEPHIR_INIT_VAR(_3$$3);
ZEPHIR_INIT_NVAR(_3$$3);
zephir_create_closure_ex(_3$$3, NULL, phalcon_1__closure_ce, SS("__invoke") TSRMLS_CC);
- ZEPHIR_CALL_FUNCTION(&_4$$3, "array_filter", &_2, 462, validators, _3$$3);
+ ZEPHIR_CALL_FUNCTION(&_4$$3, "array_filter", &_2, 461, validators, _3$$3);
zephir_check_call_status();
zephir_update_property_this(this_ptr, SL("_combinedFieldsValidators"), _4$$3 TSRMLS_CC);
}
@@ -189,8 +188,8 @@ PHP_METHOD(Phalcon_Validation, validate) {
}
zephir_is_iterable(validators, &_2, &_1, 0, 0, "phalcon/validation.zep", 161);
for (
- ; zephir_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
- ; zephir_hash_move_forward_ex(_2, &_1)
+ ; zend_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
+ ; zend_hash_move_forward_ex(_2, &_1)
) {
ZEPHIR_GET_HVALUE(scope, _3);
if (Z_TYPE_P(scope) != IS_ARRAY) {
@@ -225,8 +224,8 @@ PHP_METHOD(Phalcon_Validation, validate) {
}
zephir_is_iterable(combinedFieldsValidators, &_10, &_9, 0, 0, "phalcon/validation.zep", 193);
for (
- ; zephir_hash_get_current_data_ex(_10, (void**) &_11, &_9) == SUCCESS
- ; zephir_hash_move_forward_ex(_10, &_9)
+ ; zend_hash_get_current_data_ex(_10, (void**) &_11, &_9) == SUCCESS
+ ; zend_hash_move_forward_ex(_10, &_9)
) {
ZEPHIR_GET_HVALUE(scope, _11);
if (Z_TYPE_P(scope) != IS_ARRAY) {
@@ -293,8 +292,8 @@ PHP_METHOD(Phalcon_Validation, add) {
} else {
zephir_is_iterable(field, &_2$$5, &_1$$5, 0, 0, "phalcon/validation.zep", 215);
for (
- ; zephir_hash_get_current_data_ex(_2$$5, (void**) &_3$$5, &_1$$5) == SUCCESS
- ; zephir_hash_move_forward_ex(_2$$5, &_1$$5)
+ ; zend_hash_get_current_data_ex(_2$$5, (void**) &_3$$5, &_1$$5) == SUCCESS
+ ; zend_hash_move_forward_ex(_2$$5, &_1$$5)
) {
ZEPHIR_GET_HVALUE(singleField, _3$$5);
ZEPHIR_INIT_NVAR(_4$$6);
@@ -357,8 +356,8 @@ PHP_METHOD(Phalcon_Validation, rules) {
zephir_is_iterable(validators, &_1, &_0, 0, 0, "phalcon/validation.zep", 247);
for (
- ; zephir_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
- ; zephir_hash_move_forward_ex(_1, &_0)
+ ; zend_hash_get_current_data_ex(_1, (void**) &_2, &_0) == SUCCESS
+ ; zend_hash_move_forward_ex(_1, &_0)
) {
ZEPHIR_GET_HVALUE(validator, _2);
if (zephir_instance_of_ev(validator, phalcon_validation_validatorinterface_ce TSRMLS_CC)) {
@@ -391,8 +390,8 @@ PHP_METHOD(Phalcon_Validation, setFilters) {
if (Z_TYPE_P(field) == IS_ARRAY) {
zephir_is_iterable(field, &_1$$3, &_0$$3, 0, 0, "phalcon/validation.zep", 264);
for (
- ; zephir_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_1$$3, &_0$$3)
+ ; zend_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_1$$3, &_0$$3)
) {
ZEPHIR_GET_HVALUE(singleField, _2$$3);
zephir_update_property_array(this_ptr, SL("_filters"), singleField, filters TSRMLS_CC);
@@ -554,11 +553,11 @@ PHP_METHOD(Phalcon_Validation, getDefaultMessage) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &type_param);
- if (unlikely(Z_TYPE_P(type_param) != IS_STRING && Z_TYPE_P(type_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(type_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(type_param) == IS_STRING)) {
zephir_get_strval(type, type_param);
} else {
ZEPHIR_INIT_VAR(type);
@@ -652,7 +651,7 @@ PHP_METHOD(Phalcon_Validation, appendMessage) {
ZEPHIR_CALL_METHOD(NULL, messages, "__construct", NULL, 3);
zephir_check_call_status();
}
- ZEPHIR_CALL_METHOD(NULL, messages, "appendmessage", NULL, 463, message);
+ ZEPHIR_CALL_METHOD(NULL, messages, "appendmessage", NULL, 462, message);
zephir_check_call_status();
zephir_update_property_this(this_ptr, SL("_messages"), messages TSRMLS_CC);
RETURN_THIS();
@@ -848,11 +847,11 @@ PHP_METHOD(Phalcon_Validation, preChecking) {
if (Z_TYPE_P(field) == IS_ARRAY) {
zephir_is_iterable(field, &_1$$3, &_0$$3, 0, 0, "phalcon/validation.zep", 590);
for (
- ; zephir_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_1$$3, &_0$$3)
+ ; zend_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_1$$3, &_0$$3)
) {
ZEPHIR_GET_HVALUE(singleField, _2$$3);
- ZEPHIR_CALL_METHOD(&result, this_ptr, "prechecking", &_3, 464, singleField, validator);
+ ZEPHIR_CALL_METHOD(&result, this_ptr, "prechecking", &_3, 463, singleField, validator);
zephir_check_call_status();
if (zephir_is_true(result)) {
RETURN_CCTOR(result);
@@ -877,8 +876,8 @@ PHP_METHOD(Phalcon_Validation, preChecking) {
if (Z_TYPE_P(allowEmpty) == IS_ARRAY) {
zephir_is_iterable(allowEmpty, &_7$$9, &_6$$9, 0, 0, "phalcon/validation.zep", 604);
for (
- ; zephir_hash_get_current_data_ex(_7$$9, (void**) &_8$$9, &_6$$9) == SUCCESS
- ; zephir_hash_move_forward_ex(_7$$9, &_6$$9)
+ ; zend_hash_get_current_data_ex(_7$$9, (void**) &_8$$9, &_6$$9) == SUCCESS
+ ; zend_hash_move_forward_ex(_7$$9, &_6$$9)
) {
ZEPHIR_GET_HVALUE(emptyValue, _8$$9);
if (ZEPHIR_IS_IDENTICAL(emptyValue, value)) {
diff --git a/ext/phalcon/validation/message.zep.c b/ext/phalcon/validation/message.zep.c
index 5b417390ac0..e14343eb7b0 100644
--- a/ext/phalcon/validation/message.zep.c
+++ b/ext/phalcon/validation/message.zep.c
@@ -55,11 +55,11 @@ PHP_METHOD(Phalcon_Validation_Message, __construct) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 3, &message_param, &field, &type_param, &code_param);
- if (unlikely(Z_TYPE_P(message_param) != IS_STRING && Z_TYPE_P(message_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(message_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(message_param) == IS_STRING)) {
zephir_get_strval(message, message_param);
} else {
ZEPHIR_INIT_VAR(message);
@@ -102,11 +102,11 @@ PHP_METHOD(Phalcon_Validation_Message, setType) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &type_param);
- if (unlikely(Z_TYPE_P(type_param) != IS_STRING && Z_TYPE_P(type_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(type_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(type_param) == IS_STRING)) {
zephir_get_strval(type, type_param);
} else {
ZEPHIR_INIT_VAR(type);
@@ -141,11 +141,11 @@ PHP_METHOD(Phalcon_Validation_Message, setMessage) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &message_param);
- if (unlikely(Z_TYPE_P(message_param) != IS_STRING && Z_TYPE_P(message_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(message_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(message_param) == IS_STRING)) {
zephir_get_strval(message, message_param);
} else {
ZEPHIR_INIT_VAR(message);
@@ -259,7 +259,7 @@ PHP_METHOD(Phalcon_Validation_Message, __set_state) {
zephir_array_fetch_string(&_0, message, SL("_message"), PH_NOISY | PH_READONLY, "phalcon/validation/message.zep", 134 TSRMLS_CC);
zephir_array_fetch_string(&_1, message, SL("_field"), PH_NOISY | PH_READONLY, "phalcon/validation/message.zep", 134 TSRMLS_CC);
zephir_array_fetch_string(&_2, message, SL("_type"), PH_NOISY | PH_READONLY, "phalcon/validation/message.zep", 134 TSRMLS_CC);
- ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 465, _0, _1, _2);
+ ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 464, _0, _1, _2);
zephir_check_call_status();
RETURN_MM();
diff --git a/ext/phalcon/validation/message/group.zep.c b/ext/phalcon/validation/message/group.zep.c
index d951136f30b..6aa3108c8ea 100644
--- a/ext/phalcon/validation/message/group.zep.c
+++ b/ext/phalcon/validation/message/group.zep.c
@@ -20,7 +20,6 @@
#include "kernel/exception.h"
#include "kernel/operators.h"
#include "kernel/fcall.h"
-#include "kernel/hash.h"
/**
@@ -86,7 +85,7 @@ PHP_METHOD(Phalcon_Validation_Message_Group, offsetGet) {
zephir_fetch_params(0, 1, 0, &index_param);
- if (unlikely(Z_TYPE_P(index_param) != IS_LONG)) {
+ if (UNEXPECTED(Z_TYPE_P(index_param) != IS_LONG)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'index' must be a int") TSRMLS_CC);
RETURN_NULL();
}
@@ -119,7 +118,7 @@ PHP_METHOD(Phalcon_Validation_Message_Group, offsetSet) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &index_param, &message);
- if (unlikely(Z_TYPE_P(index_param) != IS_LONG)) {
+ if (UNEXPECTED(Z_TYPE_P(index_param) != IS_LONG)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'index' must be a int") TSRMLS_CC);
RETURN_MM_NULL();
}
@@ -188,7 +187,7 @@ PHP_METHOD(Phalcon_Validation_Message_Group, offsetUnset) {
ZEPHIR_INIT_VAR(_2$$3);
ZVAL_LONG(_2$$3, 1);
ZEPHIR_MAKE_REF(_1$$3);
- ZEPHIR_CALL_FUNCTION(NULL, "array_splice", NULL, 466, _1$$3, index, _2$$3);
+ ZEPHIR_CALL_FUNCTION(NULL, "array_splice", NULL, 465, _1$$3, index, _2$$3);
ZEPHIR_UNREF(_1$$3);
zephir_check_call_status();
}
@@ -294,11 +293,11 @@ PHP_METHOD(Phalcon_Validation_Message_Group, filter) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &fieldName_param);
- if (unlikely(Z_TYPE_P(fieldName_param) != IS_STRING && Z_TYPE_P(fieldName_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(fieldName_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(fieldName_param) == IS_STRING)) {
zephir_get_strval(fieldName, fieldName_param);
} else {
ZEPHIR_INIT_VAR(fieldName);
@@ -313,8 +312,8 @@ PHP_METHOD(Phalcon_Validation_Message_Group, filter) {
if (Z_TYPE_P(messages) == IS_ARRAY) {
zephir_is_iterable(messages, &_1$$3, &_0$$3, 0, 0, "phalcon/validation/message/group.zep", 210);
for (
- ; zephir_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
- ; zephir_hash_move_forward_ex(_1$$3, &_0$$3)
+ ; zend_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
+ ; zend_hash_move_forward_ex(_1$$3, &_0$$3)
) {
ZEPHIR_GET_HVALUE(message, _2$$3);
if ((zephir_method_exists_ex(message, SS("getfield") TSRMLS_CC) == SUCCESS)) {
diff --git a/ext/phalcon/validation/validator.zep.c b/ext/phalcon/validation/validator.zep.c
index 71ca8acebbb..8659d9d74bb 100644
--- a/ext/phalcon/validation/validator.zep.c
+++ b/ext/phalcon/validation/validator.zep.c
@@ -74,11 +74,11 @@ PHP_METHOD(Phalcon_Validation_Validator, isSetOption) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &key_param);
- if (unlikely(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(key_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(key_param) == IS_STRING)) {
zephir_get_strval(key, key_param);
} else {
ZEPHIR_INIT_VAR(key);
@@ -102,11 +102,11 @@ PHP_METHOD(Phalcon_Validation_Validator, hasOption) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &key_param);
- if (unlikely(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(key_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(key_param) == IS_STRING)) {
zephir_get_strval(key, key_param);
} else {
ZEPHIR_INIT_VAR(key);
@@ -132,11 +132,11 @@ PHP_METHOD(Phalcon_Validation_Validator, getOption) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &key_param, &defaultValue);
- if (unlikely(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(key_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(key_param) == IS_STRING)) {
zephir_get_strval(key, key_param);
} else {
ZEPHIR_INIT_VAR(key);
@@ -178,11 +178,11 @@ PHP_METHOD(Phalcon_Validation_Validator, setOption) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &key_param, &value);
- if (unlikely(Z_TYPE_P(key_param) != IS_STRING && Z_TYPE_P(key_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(key_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(key_param) == IS_STRING)) {
zephir_get_strval(key, key_param);
} else {
ZEPHIR_INIT_VAR(key);
diff --git a/ext/phalcon/validation/validator/alnum.zep.c b/ext/phalcon/validation/validator/alnum.zep.c
index 638beffbcfa..3854a2f7a09 100644
--- a/ext/phalcon/validation/validator/alnum.zep.c
+++ b/ext/phalcon/validation/validator/alnum.zep.c
@@ -73,11 +73,11 @@ PHP_METHOD(Phalcon_Validation_Validator_Alnum, validate) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &validation, &field_param);
- if (unlikely(Z_TYPE_P(field_param) != IS_STRING && Z_TYPE_P(field_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(field_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(field_param) == IS_STRING)) {
zephir_get_strval(field, field_param);
} else {
ZEPHIR_INIT_VAR(field);
@@ -87,7 +87,7 @@ PHP_METHOD(Phalcon_Validation_Validator_Alnum, validate) {
ZEPHIR_CALL_METHOD(&value, validation, "getvalue", NULL, 0, field);
zephir_check_call_status();
- ZEPHIR_CALL_FUNCTION(&_0, "ctype_alnum", NULL, 467, value);
+ ZEPHIR_CALL_FUNCTION(&_0, "ctype_alnum", NULL, 466, value);
zephir_check_call_status();
if (!(zephir_is_true(_0))) {
ZEPHIR_INIT_VAR(_1$$3);
@@ -137,7 +137,7 @@ PHP_METHOD(Phalcon_Validation_Validator_Alnum, validate) {
zephir_check_call_status();
ZEPHIR_INIT_VAR(_7$$3);
ZVAL_STRING(_7$$3, "Alnum", ZEPHIR_TEMP_PARAM_COPY);
- ZEPHIR_CALL_METHOD(NULL, _1$$3, "__construct", NULL, 465, _6$$3, field, _7$$3, code);
+ ZEPHIR_CALL_METHOD(NULL, _1$$3, "__construct", NULL, 464, _6$$3, field, _7$$3, code);
zephir_check_temp_parameter(_7$$3);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(NULL, validation, "appendmessage", NULL, 0, _1$$3);
diff --git a/ext/phalcon/validation/validator/alpha.zep.c b/ext/phalcon/validation/validator/alpha.zep.c
index 61b4900ad9c..6422a283afe 100644
--- a/ext/phalcon/validation/validator/alpha.zep.c
+++ b/ext/phalcon/validation/validator/alpha.zep.c
@@ -74,11 +74,11 @@ PHP_METHOD(Phalcon_Validation_Validator_Alpha, validate) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &validation, &field_param);
- if (unlikely(Z_TYPE_P(field_param) != IS_STRING && Z_TYPE_P(field_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(field_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(field_param) == IS_STRING)) {
zephir_get_strval(field, field_param);
} else {
ZEPHIR_INIT_VAR(field);
@@ -141,7 +141,7 @@ PHP_METHOD(Phalcon_Validation_Validator_Alpha, validate) {
zephir_check_call_status();
ZEPHIR_INIT_VAR(_9$$3);
ZVAL_STRING(_9$$3, "Alpha", ZEPHIR_TEMP_PARAM_COPY);
- ZEPHIR_CALL_METHOD(NULL, _3$$3, "__construct", NULL, 465, _8$$3, field, _9$$3, code);
+ ZEPHIR_CALL_METHOD(NULL, _3$$3, "__construct", NULL, 464, _8$$3, field, _9$$3, code);
zephir_check_temp_parameter(_9$$3);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(NULL, validation, "appendmessage", NULL, 0, _3$$3);
diff --git a/ext/phalcon/validation/validator/between.zep.c b/ext/phalcon/validation/validator/between.zep.c
index 604822d8a65..fc2f80700de 100644
--- a/ext/phalcon/validation/validator/between.zep.c
+++ b/ext/phalcon/validation/validator/between.zep.c
@@ -85,11 +85,11 @@ PHP_METHOD(Phalcon_Validation_Validator_Between, validate) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &validation, &field_param);
- if (unlikely(Z_TYPE_P(field_param) != IS_STRING && Z_TYPE_P(field_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(field_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(field_param) == IS_STRING)) {
zephir_get_strval(field, field_param);
} else {
ZEPHIR_INIT_VAR(field);
@@ -171,7 +171,7 @@ PHP_METHOD(Phalcon_Validation_Validator_Between, validate) {
zephir_check_call_status();
ZEPHIR_INIT_VAR(_10$$5);
ZVAL_STRING(_10$$5, "Between", ZEPHIR_TEMP_PARAM_COPY);
- ZEPHIR_CALL_METHOD(NULL, _4$$5, "__construct", NULL, 465, _9$$5, field, _10$$5, code);
+ ZEPHIR_CALL_METHOD(NULL, _4$$5, "__construct", NULL, 464, _9$$5, field, _10$$5, code);
zephir_check_temp_parameter(_10$$5);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(NULL, validation, "appendmessage", NULL, 0, _4$$5);
diff --git a/ext/phalcon/validation/validator/callback.zep.c b/ext/phalcon/validation/validator/callback.zep.c
index 6aed83419ab..9be21791c0b 100644
--- a/ext/phalcon/validation/validator/callback.zep.c
+++ b/ext/phalcon/validation/validator/callback.zep.c
@@ -85,11 +85,11 @@ PHP_METHOD(Phalcon_Validation_Validator_Callback, validate) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &validation, &field_param);
- if (unlikely(Z_TYPE_P(field_param) != IS_STRING && Z_TYPE_P(field_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(field_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(field_param) == IS_STRING)) {
zephir_get_strval(field, field_param);
} else {
ZEPHIR_INIT_VAR(field);
@@ -164,7 +164,7 @@ PHP_METHOD(Phalcon_Validation_Validator_Callback, validate) {
zephir_check_call_status();
ZEPHIR_INIT_VAR(_8$$6);
ZVAL_STRING(_8$$6, "Callback", ZEPHIR_TEMP_PARAM_COPY);
- ZEPHIR_CALL_METHOD(NULL, _2$$6, "__construct", NULL, 465, _7$$6, field, _8$$6, code);
+ ZEPHIR_CALL_METHOD(NULL, _2$$6, "__construct", NULL, 464, _7$$6, field, _8$$6, code);
zephir_check_temp_parameter(_8$$6);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(NULL, validation, "appendmessage", NULL, 0, _2$$6);
diff --git a/ext/phalcon/validation/validator/confirmation.zep.c b/ext/phalcon/validation/validator/confirmation.zep.c
index 31e25ee9ae3..3f31bb488af 100644
--- a/ext/phalcon/validation/validator/confirmation.zep.c
+++ b/ext/phalcon/validation/validator/confirmation.zep.c
@@ -79,11 +79,11 @@ PHP_METHOD(Phalcon_Validation_Validator_Confirmation, validate) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &validation, &field_param);
- if (unlikely(Z_TYPE_P(field_param) != IS_STRING && Z_TYPE_P(field_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(field_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(field_param) == IS_STRING)) {
zephir_get_strval(field, field_param);
} else {
ZEPHIR_INIT_VAR(field);
@@ -104,7 +104,7 @@ PHP_METHOD(Phalcon_Validation_Validator_Confirmation, validate) {
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&valueWith, validation, "getvalue", NULL, 0, fieldWith);
zephir_check_call_status();
- ZEPHIR_CALL_METHOD(&_2, this_ptr, "compare", NULL, 468, value, valueWith);
+ ZEPHIR_CALL_METHOD(&_2, this_ptr, "compare", NULL, 467, value, valueWith);
zephir_check_call_status();
if (!(zephir_is_true(_2))) {
ZEPHIR_INIT_VAR(_3$$4);
@@ -168,7 +168,7 @@ PHP_METHOD(Phalcon_Validation_Validator_Confirmation, validate) {
zephir_check_call_status();
ZEPHIR_INIT_VAR(_10$$4);
ZVAL_STRING(_10$$4, "Confirmation", ZEPHIR_TEMP_PARAM_COPY);
- ZEPHIR_CALL_METHOD(NULL, _3$$4, "__construct", NULL, 465, _9$$4, field, _10$$4, code);
+ ZEPHIR_CALL_METHOD(NULL, _3$$4, "__construct", NULL, 464, _9$$4, field, _10$$4, code);
zephir_check_temp_parameter(_10$$4);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(NULL, validation, "appendmessage", NULL, 0, _3$$4);
diff --git a/ext/phalcon/validation/validator/creditcard.zep.c b/ext/phalcon/validation/validator/creditcard.zep.c
index 9ea5a2e7f1c..403e4da9650 100644
--- a/ext/phalcon/validation/validator/creditcard.zep.c
+++ b/ext/phalcon/validation/validator/creditcard.zep.c
@@ -18,7 +18,6 @@
#include "kernel/array.h"
#include "ext/spl/spl_exceptions.h"
#include "kernel/exception.h"
-#include "kernel/hash.h"
/**
@@ -74,11 +73,11 @@ PHP_METHOD(Phalcon_Validation_Validator_CreditCard, validate) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &validation, &field_param);
- if (unlikely(Z_TYPE_P(field_param) != IS_STRING && Z_TYPE_P(field_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(field_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(field_param) == IS_STRING)) {
zephir_get_strval(field, field_param);
} else {
ZEPHIR_INIT_VAR(field);
@@ -88,7 +87,7 @@ PHP_METHOD(Phalcon_Validation_Validator_CreditCard, validate) {
ZEPHIR_CALL_METHOD(&value, validation, "getvalue", NULL, 0, field);
zephir_check_call_status();
- ZEPHIR_CALL_METHOD(&valid, this_ptr, "verifybyluhnalgorithm", NULL, 469, value);
+ ZEPHIR_CALL_METHOD(&valid, this_ptr, "verifybyluhnalgorithm", NULL, 468, value);
zephir_check_call_status();
if (!(zephir_is_true(valid))) {
ZEPHIR_INIT_VAR(_0$$3);
@@ -138,7 +137,7 @@ PHP_METHOD(Phalcon_Validation_Validator_CreditCard, validate) {
zephir_check_call_status();
ZEPHIR_INIT_VAR(_6$$3);
ZVAL_STRING(_6$$3, "CreditCard", ZEPHIR_TEMP_PARAM_COPY);
- ZEPHIR_CALL_METHOD(NULL, _0$$3, "__construct", NULL, 465, _5$$3, field, _6$$3, code);
+ ZEPHIR_CALL_METHOD(NULL, _0$$3, "__construct", NULL, 464, _5$$3, field, _6$$3, code);
zephir_check_temp_parameter(_6$$3);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(NULL, validation, "appendmessage", NULL, 0, _0$$3);
@@ -178,8 +177,8 @@ PHP_METHOD(Phalcon_Validation_Validator_CreditCard, verifyByLuhnAlgorithm) {
zephir_check_call_status();
zephir_is_iterable(_4, &_6, &_5, 0, 0, "phalcon/validation/validator/creditcard.zep", 118);
for (
- ; zephir_hash_get_current_data_ex(_6, (void**) &_7, &_5) == SUCCESS
- ; zephir_hash_move_forward_ex(_6, &_5)
+ ; zend_hash_get_current_data_ex(_6, (void**) &_7, &_5) == SUCCESS
+ ; zend_hash_move_forward_ex(_6, &_5)
) {
ZEPHIR_GET_HMKEY(position, _6, _5);
ZEPHIR_GET_HVALUE(digit, _7);
@@ -194,7 +193,7 @@ PHP_METHOD(Phalcon_Validation_Validator_CreditCard, verifyByLuhnAlgorithm) {
}
ZEPHIR_CALL_FUNCTION(&_9, "str_split", &_1, 71, hash);
zephir_check_call_status();
- ZEPHIR_CALL_FUNCTION(&result, "array_sum", NULL, 470, _9);
+ ZEPHIR_CALL_FUNCTION(&result, "array_sum", NULL, 469, _9);
zephir_check_call_status();
RETURN_MM_BOOL((zephir_safe_mod_zval_long(result, 10 TSRMLS_CC) == 0));
diff --git a/ext/phalcon/validation/validator/date.zep.c b/ext/phalcon/validation/validator/date.zep.c
index a4813db5009..2e8078fdf33 100644
--- a/ext/phalcon/validation/validator/date.zep.c
+++ b/ext/phalcon/validation/validator/date.zep.c
@@ -78,11 +78,11 @@ PHP_METHOD(Phalcon_Validation_Validator_Date, validate) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &validation, &field_param);
- if (unlikely(Z_TYPE_P(field_param) != IS_STRING && Z_TYPE_P(field_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(field_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(field_param) == IS_STRING)) {
zephir_get_strval(field, field_param);
} else {
ZEPHIR_INIT_VAR(field);
@@ -105,7 +105,7 @@ PHP_METHOD(Phalcon_Validation_Validator_Date, validate) {
ZEPHIR_INIT_NVAR(format);
ZVAL_STRING(format, "Y-m-d", 1);
}
- ZEPHIR_CALL_METHOD(&_2, this_ptr, "checkdate", NULL, 471, value, format);
+ ZEPHIR_CALL_METHOD(&_2, this_ptr, "checkdate", NULL, 470, value, format);
zephir_check_call_status();
if (!(zephir_is_true(_2))) {
ZEPHIR_INIT_VAR(_3$$5);
@@ -146,7 +146,7 @@ PHP_METHOD(Phalcon_Validation_Validator_Date, validate) {
zephir_check_call_status();
ZEPHIR_INIT_VAR(_8$$5);
ZVAL_STRING(_8$$5, "Date", ZEPHIR_TEMP_PARAM_COPY);
- ZEPHIR_CALL_METHOD(NULL, _3$$5, "__construct", NULL, 465, _7$$5, field, _8$$5);
+ ZEPHIR_CALL_METHOD(NULL, _3$$5, "__construct", NULL, 464, _7$$5, field, _8$$5);
zephir_check_temp_parameter(_8$$5);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(NULL, validation, "appendmessage", NULL, 0, _3$$5);
diff --git a/ext/phalcon/validation/validator/digit.zep.c b/ext/phalcon/validation/validator/digit.zep.c
index 5875696a435..56ecbb54e51 100644
--- a/ext/phalcon/validation/validator/digit.zep.c
+++ b/ext/phalcon/validation/validator/digit.zep.c
@@ -74,11 +74,11 @@ PHP_METHOD(Phalcon_Validation_Validator_Digit, validate) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &validation, &field_param);
- if (unlikely(Z_TYPE_P(field_param) != IS_STRING && Z_TYPE_P(field_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(field_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(field_param) == IS_STRING)) {
zephir_get_strval(field, field_param);
} else {
ZEPHIR_INIT_VAR(field);
@@ -90,7 +90,7 @@ PHP_METHOD(Phalcon_Validation_Validator_Digit, validate) {
zephir_check_call_status();
_0 = Z_TYPE_P(value) == IS_LONG;
if (!(_0)) {
- ZEPHIR_CALL_FUNCTION(&_1, "ctype_digit", NULL, 472, value);
+ ZEPHIR_CALL_FUNCTION(&_1, "ctype_digit", NULL, 471, value);
zephir_check_call_status();
_0 = zephir_is_true(_1);
}
@@ -144,7 +144,7 @@ PHP_METHOD(Phalcon_Validation_Validator_Digit, validate) {
zephir_check_call_status();
ZEPHIR_INIT_VAR(_8);
ZVAL_STRING(_8, "Digit", ZEPHIR_TEMP_PARAM_COPY);
- ZEPHIR_CALL_METHOD(NULL, _2, "__construct", NULL, 465, _7, field, _8, code);
+ ZEPHIR_CALL_METHOD(NULL, _2, "__construct", NULL, 464, _7, field, _8, code);
zephir_check_temp_parameter(_8);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(NULL, validation, "appendmessage", NULL, 0, _2);
diff --git a/ext/phalcon/validation/validator/email.zep.c b/ext/phalcon/validation/validator/email.zep.c
index d1b68cc9e44..12263816c9c 100644
--- a/ext/phalcon/validation/validator/email.zep.c
+++ b/ext/phalcon/validation/validator/email.zep.c
@@ -73,11 +73,11 @@ PHP_METHOD(Phalcon_Validation_Validator_Email, validate) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &validation, &field_param);
- if (unlikely(Z_TYPE_P(field_param) != IS_STRING && Z_TYPE_P(field_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(field_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(field_param) == IS_STRING)) {
zephir_get_strval(field, field_param);
} else {
ZEPHIR_INIT_VAR(field);
@@ -139,7 +139,7 @@ PHP_METHOD(Phalcon_Validation_Validator_Email, validate) {
zephir_check_call_status();
ZEPHIR_INIT_VAR(_8$$3);
ZVAL_STRING(_8$$3, "Email", ZEPHIR_TEMP_PARAM_COPY);
- ZEPHIR_CALL_METHOD(NULL, _2$$3, "__construct", NULL, 465, _7$$3, field, _8$$3, code);
+ ZEPHIR_CALL_METHOD(NULL, _2$$3, "__construct", NULL, 464, _7$$3, field, _8$$3, code);
zephir_check_temp_parameter(_8$$3);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(NULL, validation, "appendmessage", NULL, 0, _2$$3);
diff --git a/ext/phalcon/validation/validator/exclusionin.zep.c b/ext/phalcon/validation/validator/exclusionin.zep.c
index dbd34e28827..472eec091e3 100644
--- a/ext/phalcon/validation/validator/exclusionin.zep.c
+++ b/ext/phalcon/validation/validator/exclusionin.zep.c
@@ -85,11 +85,11 @@ PHP_METHOD(Phalcon_Validation_Validator_ExclusionIn, validate) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &validation, &field_param);
- if (unlikely(Z_TYPE_P(field_param) != IS_STRING && Z_TYPE_P(field_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(field_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(field_param) == IS_STRING)) {
zephir_get_strval(field, field_param);
} else {
ZEPHIR_INIT_VAR(field);
@@ -189,7 +189,7 @@ PHP_METHOD(Phalcon_Validation_Validator_ExclusionIn, validate) {
zephir_check_call_status();
ZEPHIR_INIT_VAR(_11$$9);
ZVAL_STRING(_11$$9, "ExclusionIn", ZEPHIR_TEMP_PARAM_COPY);
- ZEPHIR_CALL_METHOD(NULL, _5$$9, "__construct", NULL, 465, _10$$9, field, _11$$9, code);
+ ZEPHIR_CALL_METHOD(NULL, _5$$9, "__construct", NULL, 464, _10$$9, field, _11$$9, code);
zephir_check_temp_parameter(_11$$9);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(NULL, validation, "appendmessage", NULL, 0, _5$$9);
diff --git a/ext/phalcon/validation/validator/file.zep.c b/ext/phalcon/validation/validator/file.zep.c
index 2f03478b99e..8c654e62817 100644
--- a/ext/phalcon/validation/validator/file.zep.c
+++ b/ext/phalcon/validation/validator/file.zep.c
@@ -114,11 +114,11 @@ PHP_METHOD(Phalcon_Validation_Validator_File, validate) {
zephir_get_global(&_SERVER, SS("_SERVER") TSRMLS_CC);
zephir_fetch_params(1, 2, 0, &validation, &field_param);
- if (unlikely(Z_TYPE_P(field_param) != IS_STRING && Z_TYPE_P(field_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(field_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(field_param) == IS_STRING)) {
zephir_get_strval(field, field_param);
} else {
ZEPHIR_INIT_VAR(field);
@@ -199,7 +199,7 @@ PHP_METHOD(Phalcon_Validation_Validator_File, validate) {
zephir_check_call_status();
ZEPHIR_INIT_VAR(_16$$6);
ZVAL_STRING(_16$$6, "FileIniSize", ZEPHIR_TEMP_PARAM_COPY);
- ZEPHIR_CALL_METHOD(NULL, _11$$6, "__construct", &_17, 465, _14$$6, field, _16$$6, code);
+ ZEPHIR_CALL_METHOD(NULL, _11$$6, "__construct", &_17, 464, _14$$6, field, _16$$6, code);
zephir_check_temp_parameter(_16$$6);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(NULL, validation, "appendmessage", NULL, 0, _11$$6);
@@ -248,7 +248,7 @@ PHP_METHOD(Phalcon_Validation_Validator_File, validate) {
zephir_check_call_status();
ZEPHIR_INIT_VAR(_28$$9);
ZVAL_STRING(_28$$9, "FileEmpty", ZEPHIR_TEMP_PARAM_COPY);
- ZEPHIR_CALL_METHOD(NULL, _24$$9, "__construct", &_17, 465, _27$$9, field, _28$$9, code);
+ ZEPHIR_CALL_METHOD(NULL, _24$$9, "__construct", &_17, 464, _27$$9, field, _28$$9, code);
zephir_check_temp_parameter(_28$$9);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(NULL, validation, "appendmessage", NULL, 0, _24$$9);
@@ -289,7 +289,7 @@ PHP_METHOD(Phalcon_Validation_Validator_File, validate) {
zephir_check_call_status();
ZEPHIR_INIT_VAR(_35$$12);
ZVAL_STRING(_35$$12, "FileValid", ZEPHIR_TEMP_PARAM_COPY);
- ZEPHIR_CALL_METHOD(NULL, _31$$12, "__construct", &_17, 465, _34$$12, field, _35$$12, code);
+ ZEPHIR_CALL_METHOD(NULL, _31$$12, "__construct", &_17, 464, _34$$12, field, _35$$12, code);
zephir_check_temp_parameter(_35$$12);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(NULL, validation, "appendmessage", NULL, 0, _31$$12);
@@ -380,7 +380,7 @@ PHP_METHOD(Phalcon_Validation_Validator_File, validate) {
zephir_check_call_status();
ZEPHIR_INIT_VAR(_54$$18);
ZVAL_STRING(_54$$18, "FileSize", ZEPHIR_TEMP_PARAM_COPY);
- ZEPHIR_CALL_METHOD(NULL, _50$$18, "__construct", &_17, 465, _53$$18, field, _54$$18, code);
+ ZEPHIR_CALL_METHOD(NULL, _50$$18, "__construct", &_17, 464, _53$$18, field, _54$$18, code);
zephir_check_temp_parameter(_54$$18);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(NULL, validation, "appendmessage", NULL, 0, _50$$18);
@@ -450,7 +450,7 @@ PHP_METHOD(Phalcon_Validation_Validator_File, validate) {
zephir_check_call_status();
ZEPHIR_INIT_VAR(_63$$26);
ZVAL_STRING(_63$$26, "FileType", ZEPHIR_TEMP_PARAM_COPY);
- ZEPHIR_CALL_METHOD(NULL, _59$$26, "__construct", &_17, 465, _62$$26, field, _63$$26, code);
+ ZEPHIR_CALL_METHOD(NULL, _59$$26, "__construct", &_17, 464, _62$$26, field, _63$$26, code);
zephir_check_temp_parameter(_63$$26);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(NULL, validation, "appendmessage", NULL, 0, _59$$26);
@@ -538,7 +538,7 @@ PHP_METHOD(Phalcon_Validation_Validator_File, validate) {
zephir_check_call_status();
ZEPHIR_INIT_VAR(_77$$33);
ZVAL_STRING(_77$$33, "FileMinResolution", ZEPHIR_TEMP_PARAM_COPY);
- ZEPHIR_CALL_METHOD(NULL, _73$$33, "__construct", &_17, 465, _76$$33, field, _77$$33, code);
+ ZEPHIR_CALL_METHOD(NULL, _73$$33, "__construct", &_17, 464, _76$$33, field, _77$$33, code);
zephir_check_temp_parameter(_77$$33);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(NULL, validation, "appendmessage", NULL, 0, _73$$33);
@@ -597,7 +597,7 @@ PHP_METHOD(Phalcon_Validation_Validator_File, validate) {
zephir_check_call_status();
ZEPHIR_INIT_VAR(_86$$38);
ZVAL_STRING(_86$$38, "FileMaxResolution", ZEPHIR_TEMP_PARAM_COPY);
- ZEPHIR_CALL_METHOD(NULL, _82$$38, "__construct", &_17, 465, _85$$38, field, _86$$38, code);
+ ZEPHIR_CALL_METHOD(NULL, _82$$38, "__construct", &_17, 464, _85$$38, field, _86$$38, code);
zephir_check_temp_parameter(_86$$38);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(NULL, validation, "appendmessage", NULL, 0, _82$$38);
@@ -623,11 +623,11 @@ PHP_METHOD(Phalcon_Validation_Validator_File, isAllowEmpty) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &validation, &field_param);
- if (unlikely(Z_TYPE_P(field_param) != IS_STRING && Z_TYPE_P(field_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(field_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(field_param) == IS_STRING)) {
zephir_get_strval(field, field_param);
} else {
ZEPHIR_INIT_VAR(field);
diff --git a/ext/phalcon/validation/validator/identical.zep.c b/ext/phalcon/validation/validator/identical.zep.c
index 4165b2fa59e..a85adff6ba7 100644
--- a/ext/phalcon/validation/validator/identical.zep.c
+++ b/ext/phalcon/validation/validator/identical.zep.c
@@ -79,11 +79,11 @@ PHP_METHOD(Phalcon_Validation_Validator_Identical, validate) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &validation, &field_param);
- if (unlikely(Z_TYPE_P(field_param) != IS_STRING && Z_TYPE_P(field_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(field_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(field_param) == IS_STRING)) {
zephir_get_strval(field, field_param);
} else {
ZEPHIR_INIT_VAR(field);
@@ -176,7 +176,7 @@ PHP_METHOD(Phalcon_Validation_Validator_Identical, validate) {
zephir_check_call_status();
ZEPHIR_INIT_VAR(_14$$8);
ZVAL_STRING(_14$$8, "Identical", ZEPHIR_TEMP_PARAM_COPY);
- ZEPHIR_CALL_METHOD(NULL, _8$$8, "__construct", NULL, 465, _13$$8, field, _14$$8, code);
+ ZEPHIR_CALL_METHOD(NULL, _8$$8, "__construct", NULL, 464, _13$$8, field, _14$$8, code);
zephir_check_temp_parameter(_14$$8);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(NULL, validation, "appendmessage", NULL, 0, _8$$8);
diff --git a/ext/phalcon/validation/validator/inclusionin.zep.c b/ext/phalcon/validation/validator/inclusionin.zep.c
index 13150d002cd..142121881b6 100644
--- a/ext/phalcon/validation/validator/inclusionin.zep.c
+++ b/ext/phalcon/validation/validator/inclusionin.zep.c
@@ -79,11 +79,11 @@ PHP_METHOD(Phalcon_Validation_Validator_InclusionIn, validate) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &validation, &field_param);
- if (unlikely(Z_TYPE_P(field_param) != IS_STRING && Z_TYPE_P(field_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(field_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(field_param) == IS_STRING)) {
zephir_get_strval(field, field_param);
} else {
ZEPHIR_INIT_VAR(field);
@@ -183,7 +183,7 @@ PHP_METHOD(Phalcon_Validation_Validator_InclusionIn, validate) {
zephir_check_call_status();
ZEPHIR_INIT_VAR(_11$$9);
ZVAL_STRING(_11$$9, "InclusionIn", ZEPHIR_TEMP_PARAM_COPY);
- ZEPHIR_CALL_METHOD(NULL, _5$$9, "__construct", NULL, 465, _10$$9, field, _11$$9, code);
+ ZEPHIR_CALL_METHOD(NULL, _5$$9, "__construct", NULL, 464, _10$$9, field, _11$$9, code);
zephir_check_temp_parameter(_11$$9);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(NULL, validation, "appendmessage", NULL, 0, _5$$9);
diff --git a/ext/phalcon/validation/validator/numericality.zep.c b/ext/phalcon/validation/validator/numericality.zep.c
index 04ecb58d789..fc49ddbc2fb 100644
--- a/ext/phalcon/validation/validator/numericality.zep.c
+++ b/ext/phalcon/validation/validator/numericality.zep.c
@@ -74,11 +74,11 @@ PHP_METHOD(Phalcon_Validation_Validator_Numericality, validate) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &validation, &field_param);
- if (unlikely(Z_TYPE_P(field_param) != IS_STRING && Z_TYPE_P(field_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(field_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(field_param) == IS_STRING)) {
zephir_get_strval(field, field_param);
} else {
ZEPHIR_INIT_VAR(field);
@@ -141,7 +141,7 @@ PHP_METHOD(Phalcon_Validation_Validator_Numericality, validate) {
zephir_check_call_status();
ZEPHIR_INIT_VAR(_9$$3);
ZVAL_STRING(_9$$3, "Numericality", ZEPHIR_TEMP_PARAM_COPY);
- ZEPHIR_CALL_METHOD(NULL, _3$$3, "__construct", NULL, 465, _8$$3, field, _9$$3, code);
+ ZEPHIR_CALL_METHOD(NULL, _3$$3, "__construct", NULL, 464, _8$$3, field, _9$$3, code);
zephir_check_temp_parameter(_9$$3);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(NULL, validation, "appendmessage", NULL, 0, _3$$3);
diff --git a/ext/phalcon/validation/validator/presenceof.zep.c b/ext/phalcon/validation/validator/presenceof.zep.c
index 7189649316e..54459f509f8 100644
--- a/ext/phalcon/validation/validator/presenceof.zep.c
+++ b/ext/phalcon/validation/validator/presenceof.zep.c
@@ -74,11 +74,11 @@ PHP_METHOD(Phalcon_Validation_Validator_PresenceOf, validate) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &validation, &field_param);
- if (unlikely(Z_TYPE_P(field_param) != IS_STRING && Z_TYPE_P(field_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(field_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(field_param) == IS_STRING)) {
zephir_get_strval(field, field_param);
} else {
ZEPHIR_INIT_VAR(field);
@@ -140,7 +140,7 @@ PHP_METHOD(Phalcon_Validation_Validator_PresenceOf, validate) {
zephir_check_call_status();
ZEPHIR_INIT_VAR(_7$$3);
ZVAL_STRING(_7$$3, "PresenceOf", ZEPHIR_TEMP_PARAM_COPY);
- ZEPHIR_CALL_METHOD(NULL, _1$$3, "__construct", NULL, 465, _6$$3, field, _7$$3, code);
+ ZEPHIR_CALL_METHOD(NULL, _1$$3, "__construct", NULL, 464, _6$$3, field, _7$$3, code);
zephir_check_temp_parameter(_7$$3);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(NULL, validation, "appendmessage", NULL, 0, _1$$3);
diff --git a/ext/phalcon/validation/validator/regex.zep.c b/ext/phalcon/validation/validator/regex.zep.c
index f057c81102b..abe3dfea180 100644
--- a/ext/phalcon/validation/validator/regex.zep.c
+++ b/ext/phalcon/validation/validator/regex.zep.c
@@ -80,11 +80,11 @@ PHP_METHOD(Phalcon_Validation_Validator_Regex, validate) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &validation, &field_param);
- if (unlikely(Z_TYPE_P(field_param) != IS_STRING && Z_TYPE_P(field_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(field_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(field_param) == IS_STRING)) {
zephir_get_strval(field, field_param);
} else {
ZEPHIR_INIT_VAR(field);
@@ -161,7 +161,7 @@ PHP_METHOD(Phalcon_Validation_Validator_Regex, validate) {
zephir_check_call_status();
ZEPHIR_INIT_VAR(_9$$6);
ZVAL_STRING(_9$$6, "Regex", ZEPHIR_TEMP_PARAM_COPY);
- ZEPHIR_CALL_METHOD(NULL, _3$$6, "__construct", NULL, 465, _8$$6, field, _9$$6, code);
+ ZEPHIR_CALL_METHOD(NULL, _3$$6, "__construct", NULL, 464, _8$$6, field, _9$$6, code);
zephir_check_temp_parameter(_9$$6);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(NULL, validation, "appendmessage", NULL, 0, _3$$6);
diff --git a/ext/phalcon/validation/validator/stringlength.zep.c b/ext/phalcon/validation/validator/stringlength.zep.c
index 3e1052cc767..2c1d9981151 100644
--- a/ext/phalcon/validation/validator/stringlength.zep.c
+++ b/ext/phalcon/validation/validator/stringlength.zep.c
@@ -94,11 +94,11 @@ PHP_METHOD(Phalcon_Validation_Validator_StringLength, validate) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &validation, &field_param);
- if (unlikely(Z_TYPE_P(field_param) != IS_STRING && Z_TYPE_P(field_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(field_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(field_param) == IS_STRING)) {
zephir_get_strval(field, field_param);
} else {
ZEPHIR_INIT_VAR(field);
@@ -192,7 +192,7 @@ PHP_METHOD(Phalcon_Validation_Validator_StringLength, validate) {
zephir_check_call_status();
ZEPHIR_INIT_VAR(_11$$11);
ZVAL_STRING(_11$$11, "TooLong", ZEPHIR_TEMP_PARAM_COPY);
- ZEPHIR_CALL_METHOD(NULL, _6$$11, "__construct", &_12, 465, _9$$11, field, _11$$11, code);
+ ZEPHIR_CALL_METHOD(NULL, _6$$11, "__construct", &_12, 464, _9$$11, field, _11$$11, code);
zephir_check_temp_parameter(_11$$11);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(NULL, validation, "appendmessage", NULL, 0, _6$$11);
@@ -237,7 +237,7 @@ PHP_METHOD(Phalcon_Validation_Validator_StringLength, validate) {
zephir_check_call_status();
ZEPHIR_INIT_VAR(_19$$16);
ZVAL_STRING(_19$$16, "TooShort", ZEPHIR_TEMP_PARAM_COPY);
- ZEPHIR_CALL_METHOD(NULL, _15$$16, "__construct", &_12, 465, _18$$16, field, _19$$16, code);
+ ZEPHIR_CALL_METHOD(NULL, _15$$16, "__construct", &_12, 464, _18$$16, field, _19$$16, code);
zephir_check_temp_parameter(_19$$16);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(NULL, validation, "appendmessage", NULL, 0, _15$$16);
diff --git a/ext/phalcon/validation/validator/uniqueness.zep.c b/ext/phalcon/validation/validator/uniqueness.zep.c
index 80570d5d24e..af4ee4d48eb 100644
--- a/ext/phalcon/validation/validator/uniqueness.zep.c
+++ b/ext/phalcon/validation/validator/uniqueness.zep.c
@@ -16,7 +16,6 @@
#include "kernel/fcall.h"
#include "kernel/operators.h"
#include "kernel/array.h"
-#include "kernel/hash.h"
#include "kernel/exception.h"
#include "kernel/object.h"
#include "ext/spl/spl_exceptions.h"
@@ -155,7 +154,7 @@ PHP_METHOD(Phalcon_Validation_Validator_Uniqueness, validate) {
zephir_check_call_status();
ZEPHIR_INIT_NVAR(_6$$3);
ZVAL_STRING(_6$$3, "Uniqueness", ZEPHIR_TEMP_PARAM_COPY);
- ZEPHIR_CALL_METHOD(NULL, _1$$3, "__construct", NULL, 465, _4$$3, field, _6$$3, _5$$3);
+ ZEPHIR_CALL_METHOD(NULL, _1$$3, "__construct", NULL, 464, _4$$3, field, _6$$3, _5$$3);
zephir_check_temp_parameter(_6$$3);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(NULL, validation, "appendmessage", NULL, 0, _1$$3);
@@ -197,8 +196,8 @@ PHP_METHOD(Phalcon_Validation_Validator_Uniqueness, isUniqueness) {
zephir_check_call_status();
zephir_is_iterable(field, &_2, &_1, 0, 0, "phalcon/validation/validator/uniqueness.zep", 151);
for (
- ; zephir_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
- ; zephir_hash_move_forward_ex(_2, &_1)
+ ; zend_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
+ ; zend_hash_move_forward_ex(_2, &_1)
) {
ZEPHIR_GET_HVALUE(singleField, _3);
ZEPHIR_CALL_METHOD(&_4$$4, validation, "getvalue", &_5, 0, singleField);
@@ -265,11 +264,11 @@ PHP_METHOD(Phalcon_Validation_Validator_Uniqueness, getColumnNameReal) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &record, &field_param);
- if (unlikely(Z_TYPE_P(field_param) != IS_STRING && Z_TYPE_P(field_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(field_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(field_param) == IS_STRING)) {
zephir_get_strval(field, field_param);
} else {
ZEPHIR_INIT_VAR(field);
@@ -349,8 +348,8 @@ PHP_METHOD(Phalcon_Validation_Validator_Uniqueness, isUniquenessModel) {
zephir_check_call_status();
zephir_is_iterable(field, &_2, &_1, 0, 0, "phalcon/validation/validator/uniqueness.zep", 290);
for (
- ; zephir_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
- ; zephir_hash_move_forward_ex(_2, &_1)
+ ; zend_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
+ ; zend_hash_move_forward_ex(_2, &_1)
) {
ZEPHIR_GET_HVALUE(singleField, _3);
ZEPHIR_INIT_NVAR(fieldExcept);
@@ -396,8 +395,8 @@ PHP_METHOD(Phalcon_Validation_Validator_Uniqueness, isUniquenessModel) {
if (_10$$6) {
zephir_is_iterable(except, &_17$$7, &_16$$7, 0, 0, "phalcon/validation/validator/uniqueness.zep", 253);
for (
- ; zephir_hash_get_current_data_ex(_17$$7, (void**) &_18$$7, &_16$$7) == SUCCESS
- ; zephir_hash_move_forward_ex(_17$$7, &_16$$7)
+ ; zend_hash_get_current_data_ex(_17$$7, (void**) &_18$$7, &_16$$7) == SUCCESS
+ ; zend_hash_move_forward_ex(_17$$7, &_16$$7)
) {
ZEPHIR_GET_HMKEY(singleField, _17$$7, _16$$7);
ZEPHIR_GET_HVALUE(fieldExcept, _18$$7);
@@ -411,8 +410,8 @@ PHP_METHOD(Phalcon_Validation_Validator_Uniqueness, isUniquenessModel) {
if (Z_TYPE_P(fieldExcept) == IS_ARRAY) {
zephir_is_iterable(fieldExcept, &_22$$9, &_21$$9, 0, 0, "phalcon/validation/validator/uniqueness.zep", 246);
for (
- ; zephir_hash_get_current_data_ex(_22$$9, (void**) &_23$$9, &_21$$9) == SUCCESS
- ; zephir_hash_move_forward_ex(_22$$9, &_21$$9)
+ ; zend_hash_get_current_data_ex(_22$$9, (void**) &_23$$9, &_21$$9) == SUCCESS
+ ; zend_hash_move_forward_ex(_22$$9, &_21$$9)
) {
ZEPHIR_GET_HVALUE(singleExcept, _23$$9);
ZEPHIR_SINIT_NVAR(_24$$10);
@@ -450,8 +449,8 @@ PHP_METHOD(Phalcon_Validation_Validator_Uniqueness, isUniquenessModel) {
if (Z_TYPE_P(except) == IS_ARRAY) {
zephir_is_iterable(except, &_34$$13, &_33$$13, 0, 0, "phalcon/validation/validator/uniqueness.zep", 261);
for (
- ; zephir_hash_get_current_data_ex(_34$$13, (void**) &_35$$13, &_33$$13) == SUCCESS
- ; zephir_hash_move_forward_ex(_34$$13, &_33$$13)
+ ; zend_hash_get_current_data_ex(_34$$13, (void**) &_35$$13, &_33$$13) == SUCCESS
+ ; zend_hash_move_forward_ex(_34$$13, &_33$$13)
) {
ZEPHIR_GET_HVALUE(singleExcept, _35$$13);
ZEPHIR_SINIT_NVAR(_36$$14);
@@ -479,8 +478,8 @@ PHP_METHOD(Phalcon_Validation_Validator_Uniqueness, isUniquenessModel) {
} else if (zephir_fast_count_int(field TSRMLS_CC) > 1) {
zephir_is_iterable(field, &_43$$16, &_42$$16, 0, 0, "phalcon/validation/validator/uniqueness.zep", 283);
for (
- ; zephir_hash_get_current_data_ex(_43$$16, (void**) &_44$$16, &_42$$16) == SUCCESS
- ; zephir_hash_move_forward_ex(_43$$16, &_42$$16)
+ ; zend_hash_get_current_data_ex(_43$$16, (void**) &_44$$16, &_42$$16) == SUCCESS
+ ; zend_hash_move_forward_ex(_43$$16, &_42$$16)
) {
ZEPHIR_GET_HVALUE(singleField, _44$$16);
ZEPHIR_INIT_NVAR(_46$$17);
@@ -493,8 +492,8 @@ PHP_METHOD(Phalcon_Validation_Validator_Uniqueness, isUniquenessModel) {
if (Z_TYPE_P(except) == IS_ARRAY) {
zephir_is_iterable(except, &_48$$18, &_47$$18, 0, 0, "phalcon/validation/validator/uniqueness.zep", 276);
for (
- ; zephir_hash_get_current_data_ex(_48$$18, (void**) &_49$$18, &_47$$18) == SUCCESS
- ; zephir_hash_move_forward_ex(_48$$18, &_47$$18)
+ ; zend_hash_get_current_data_ex(_48$$18, (void**) &_49$$18, &_47$$18) == SUCCESS
+ ; zend_hash_move_forward_ex(_48$$18, &_47$$18)
) {
ZEPHIR_GET_HVALUE(singleExcept, _49$$18);
ZEPHIR_SINIT_NVAR(_50$$19);
@@ -537,8 +536,8 @@ PHP_METHOD(Phalcon_Validation_Validator_Uniqueness, isUniquenessModel) {
zephir_check_call_status();
zephir_is_iterable(_59$$21, &_61$$21, &_60$$21, 0, 0, "phalcon/validation/validator/uniqueness.zep", 298);
for (
- ; zephir_hash_get_current_data_ex(_61$$21, (void**) &_62$$21, &_60$$21) == SUCCESS
- ; zephir_hash_move_forward_ex(_61$$21, &_60$$21)
+ ; zend_hash_get_current_data_ex(_61$$21, (void**) &_62$$21, &_60$$21) == SUCCESS
+ ; zend_hash_move_forward_ex(_61$$21, &_60$$21)
) {
ZEPHIR_GET_HVALUE(primaryField, _62$$21);
ZEPHIR_CALL_METHOD(&_63$$22, this_ptr, "getcolumnnamereal", &_6, 0, record, primaryField);
@@ -598,8 +597,8 @@ PHP_METHOD(Phalcon_Validation_Validator_Uniqueness, isUniquenessCollection) {
zephir_array_update_string(¶ms, SL("conditions"), &_0, PH_COPY | PH_SEPARATE);
zephir_is_iterable(field, &_2, &_1, 0, 0, "phalcon/validation/validator/uniqueness.zep", 363);
for (
- ; zephir_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
- ; zephir_hash_move_forward_ex(_2, &_1)
+ ; zend_hash_get_current_data_ex(_2, (void**) &_3, &_1) == SUCCESS
+ ; zend_hash_move_forward_ex(_2, &_1)
) {
ZEPHIR_GET_HVALUE(singleField, _3);
ZEPHIR_INIT_NVAR(fieldExcept);
@@ -637,8 +636,8 @@ PHP_METHOD(Phalcon_Validation_Validator_Uniqueness, isUniquenessCollection) {
if (Z_TYPE_P(fieldExcept) == IS_ARRAY) {
zephir_is_iterable(fieldExcept, &_9$$10, &_8$$10, 0, 0, "phalcon/validation/validator/uniqueness.zep", 344);
for (
- ; zephir_hash_get_current_data_ex(_9$$10, (void**) &_10$$10, &_8$$10) == SUCCESS
- ; zephir_hash_move_forward_ex(_9$$10, &_8$$10)
+ ; zend_hash_get_current_data_ex(_9$$10, (void**) &_10$$10, &_8$$10) == SUCCESS
+ ; zend_hash_move_forward_ex(_9$$10, &_8$$10)
) {
ZEPHIR_GET_HVALUE(singleExcept, _10$$10);
zephir_array_append(¬InValues, singleExcept, PH_SEPARATE, "phalcon/validation/validator/uniqueness.zep", 342);
@@ -656,8 +655,8 @@ PHP_METHOD(Phalcon_Validation_Validator_Uniqueness, isUniquenessCollection) {
} else if (_7$$6) {
zephir_is_iterable(except, &_12$$13, &_11$$13, 0, 0, "phalcon/validation/validator/uniqueness.zep", 354);
for (
- ; zephir_hash_get_current_data_ex(_12$$13, (void**) &_13$$13, &_11$$13) == SUCCESS
- ; zephir_hash_move_forward_ex(_12$$13, &_11$$13)
+ ; zend_hash_get_current_data_ex(_12$$13, (void**) &_13$$13, &_11$$13) == SUCCESS
+ ; zend_hash_move_forward_ex(_12$$13, &_11$$13)
) {
ZEPHIR_GET_HVALUE(singleExcept, _13$$13);
zephir_array_append(¬InValues, singleExcept, PH_SEPARATE, "phalcon/validation/validator/uniqueness.zep", 352);
diff --git a/ext/phalcon/validation/validator/url.zep.c b/ext/phalcon/validation/validator/url.zep.c
index c6318494d4d..04edbda4616 100644
--- a/ext/phalcon/validation/validator/url.zep.c
+++ b/ext/phalcon/validation/validator/url.zep.c
@@ -73,11 +73,11 @@ PHP_METHOD(Phalcon_Validation_Validator_Url, validate) {
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &validation, &field_param);
- if (unlikely(Z_TYPE_P(field_param) != IS_STRING && Z_TYPE_P(field_param) != IS_NULL)) {
+ 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 a string") TSRMLS_CC);
RETURN_MM_NULL();
}
- if (likely(Z_TYPE_P(field_param) == IS_STRING)) {
+ if (EXPECTED(Z_TYPE_P(field_param) == IS_STRING)) {
zephir_get_strval(field, field_param);
} else {
ZEPHIR_INIT_VAR(field);
@@ -139,7 +139,7 @@ PHP_METHOD(Phalcon_Validation_Validator_Url, validate) {
zephir_check_call_status();
ZEPHIR_INIT_VAR(_8$$3);
ZVAL_STRING(_8$$3, "Url", ZEPHIR_TEMP_PARAM_COPY);
- ZEPHIR_CALL_METHOD(NULL, _2$$3, "__construct", NULL, 465, _7$$3, field, _8$$3, code);
+ ZEPHIR_CALL_METHOD(NULL, _2$$3, "__construct", NULL, 464, _7$$3, field, _8$$3, code);
zephir_check_temp_parameter(_8$$3);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(NULL, validation, "appendmessage", NULL, 0, _2$$3);
diff --git a/ext/phalcon/version.zep.c b/ext/phalcon/version.zep.c
index 09ac08b8457..e1d0022e493 100644
--- a/ext/phalcon/version.zep.c
+++ b/ext/phalcon/version.zep.c
@@ -112,7 +112,7 @@ PHP_METHOD(Phalcon_Version, _getVersion) {
ZVAL_LONG(_0, 1);
zephir_array_fast_append(return_value, _0);
ZEPHIR_INIT_NVAR(_0);
- ZVAL_LONG(_0, 1);
+ ZVAL_LONG(_0, 2);
zephir_array_fast_append(return_value, _0);
ZEPHIR_INIT_NVAR(_0);
ZVAL_LONG(_0, 4);
@@ -193,7 +193,7 @@ PHP_METHOD(Phalcon_Version, get) {
zephir_array_fetch_long(&specialNumber, version, 4, PH_NOISY, "phalcon/version.zep", 143 TSRMLS_CC);
ZEPHIR_INIT_VAR(result);
ZEPHIR_CONCAT_VSVSVS(result, major, ".", medium, ".", minor, " ");
- ZEPHIR_CALL_STATIC(&suffix, "_getspecial", &_0, 473, special);
+ ZEPHIR_CALL_STATIC(&suffix, "_getspecial", &_0, 472, special);
zephir_check_call_status();
if (!ZEPHIR_IS_STRING(suffix, "")) {
ZEPHIR_INIT_VAR(_1$$3);
@@ -277,7 +277,7 @@ PHP_METHOD(Phalcon_Version, getPart) {
}
if (part == 3) {
zephir_array_fetch_long(&_1$$4, version, 3, PH_NOISY | PH_READONLY, "phalcon/version.zep", 204 TSRMLS_CC);
- ZEPHIR_CALL_STATIC(&result, "_getspecial", &_0, 473, _1$$4);
+ ZEPHIR_CALL_STATIC(&result, "_getspecial", &_0, 472, _1$$4);
zephir_check_call_status();
break;
}
diff --git a/ext/php_phalcon.h b/ext/php_phalcon.h
index f8a09a15f56..5fc7451acb5 100644
--- a/ext/php_phalcon.h
+++ b/ext/php_phalcon.h
@@ -11,10 +11,10 @@
#include "kernel/globals.h"
#define PHP_PHALCON_NAME "phalcon"
-#define PHP_PHALCON_VERSION "3.1.1"
+#define PHP_PHALCON_VERSION "3.1.2"
#define PHP_PHALCON_EXTNAME "phalcon"
#define PHP_PHALCON_AUTHOR "Phalcon Team and contributors"
-#define PHP_PHALCON_ZEPVERSION "0.9.6a-dev-3a72ba9bb5"
+#define PHP_PHALCON_ZEPVERSION "0.9.6a-dev-5628cc90de"
#define PHP_PHALCON_DESCRIPTION "Web framework delivered as a C-extension for PHP"
typedef struct _zephir_struct_db {