Skip to content

Commit 80315ed

Browse files
committedSep 10, 2022
Introduce PROGRESS_CACHE_SLOT() macro
1 parent e042297 commit 80315ed

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed
 

‎Zend/zend_execute.c

+4-6
Original file line numberDiff line numberDiff line change
@@ -1001,6 +1001,8 @@ static zend_always_inline bool zend_value_instanceof_static(zval *zv) {
10011001
# define HAVE_CACHE_SLOT 1
10021002
#endif
10031003

1004+
#define PROGRESS_CACHE_SLOT() if (HAVE_CACHE_SLOT) {cache_slot++;}
1005+
10041006
static zend_always_inline zend_class_entry *zend_fetch_ce_from_cache_slot(
10051007
void **cache_slot, zend_type *type)
10061008
{
@@ -1065,9 +1067,7 @@ static zend_always_inline bool zend_check_type_slow(
10651067
if (!ce || !instanceof_function(Z_OBJCE_P(arg), ce)) {
10661068
return false;
10671069
}
1068-
if (HAVE_CACHE_SLOT) {
1069-
cache_slot++;
1070-
}
1070+
PROGRESS_CACHE_SLOT();
10711071
} ZEND_TYPE_LIST_FOREACH_END();
10721072
return true;
10731073
} else {
@@ -1085,9 +1085,7 @@ static zend_always_inline bool zend_check_type_slow(
10851085
}
10861086
}
10871087

1088-
if (HAVE_CACHE_SLOT) {
1089-
cache_slot++;
1090-
}
1088+
PROGRESS_CACHE_SLOT();
10911089
} ZEND_TYPE_LIST_FOREACH_END();
10921090
}
10931091
} else {

0 commit comments

Comments
 (0)